This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ system ? builtins.currentSystem | |
, baseModulesFile ? ../nixos/modules/module-list.nix | |
}: | |
let | |
evalNixOS = import ../nixos/lib/eval-config.nix { | |
system = system; | |
baseModules = import baseModulesFile; | |
modules = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ system ? builtins.currentSystem | |
, baseModules ? import ../nixos/modules/module-list.nix | |
}: | |
let | |
evalNixOS = import ../nixos/lib/eval-config.nix { | |
inherit system baseModules; | |
modules = [ | |
({ modulesPath, ... }: { | |
# these are required for nixos to evaluate | |
boot.loader.systemd-boot.enable = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Small function that checks if a TCP port on localhost is open. | |
# | |
# Timeout after 10 attempts. | |
# | |
# Usage: wait_port <port> | |
wait_port() ( | |
local i=0 port=$1 | |
echo "waiting on port $port" | |
# Bash has a magic filesystem that can be used to do basic TCP. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "users" { | |
type = list(string) | |
default = ["bob"] | |
} | |
resource "random_password" "passwords" { | |
for_each = toset(var.users) | |
length = 32 | |
special = false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, callPackage }: | |
let | |
evalHome = import "${toString pkgs.sources.home-manager}/modules"; | |
in | |
{ | |
home-manager = evalHome { | |
configuration = ./home-manager.nix; | |
lib = pkgs.lib; | |
pkgs = pkgs; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# A small bash wrapper to kaniko with a few assumptions built in. | |
set -euo pipefail | |
context=$1 | |
dockerfile=$2 | |
destination=$3 | |
cache=true | |
cache_repo=$(echo "$destination" | cut -d : -f 1)-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lib: prev: { | |
servant-client-core = lib.doJailbreak (lib.dontCheck (prev.callPackage ./servant-client-core.nix { })); | |
servant-multipart = lib.doJailbreak (lib.dontCheck (prev.callPackage ./servant-multipart.nix { })); | |
generic-lens = lib.doJailbreak (lib.dontCheck (prev.callPackage ./generic-lens.nix { })); | |
servant-client = lib.doJailbreak (lib.dontCheck (prev.callPackage ./servant-client.nix { })); | |
servant-foreign = lib.doJailbreak (lib.dontCheck (prev.callPackage ./servant-foreign.nix { })); | |
servant = lib.doJailbreak (lib.dontCheck (prev.callPackage ./servant.nix { })); | |
servant-server = lib.doJailbreak (lib.dontCheck (prev.callPackage ./servant-server.nix { })); | |
protolude = lib.doJailbreak (lib.dontCheck (prev.callPackage ./protolude.nix { })); | |
openapi3 = lib.doJailbreak (lib.dontCheck (prev.callPackage ./openapi3.nix { })); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Run this script to update the dependencies | |
set -euo pipefail | |
# This is the list of dependencies that should be generated using `cabal2nix`. | |
# The left-hand side is the name of the package, and .nix file that will be | |
# generated. | |
# The right-hand side is a `cabal2nix`-compatible URI. | |
declare -A dependencies=( | |
[protolude]=cabal://protolude-0.3.0 # password-instances depends on this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, lib, ... }: { | |
imports = [ | |
./wayland.nix | |
]; | |
home.packages = with pkgs; [ | |
brightnessctl | |
#dmenu | |
grim # screenshot CLI | |
i3status-rust # menu bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
targetHost=$(basename "$(dirname "$(readlink -f "$0")")") | |
hostname=$(< /proc/sys/kernel/hostname) | |
args=( | |
--flake ".#$targetHost" | |
--use-remote-sudo | |
) |