diff --git a/ci.nix b/ci.nix deleted file mode 100644 index 9cd3fb8..0000000 --- a/ci.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - inputs, - system, - name, -}: let - nixpkgs = inputs.nixpkgs; - pkgs = nixpkgs.legacyPackages.${system}; - ensureFiles = paths: - pkgs.runCommand "directory" {} '' - set -efu - mkdir $out - cd $out - ${ - nixpkgs.lib.concatMapStringsSep "\n" (path: '' - mkdir -p "$(dirname ${nixpkgs.lib.escapeShellArg path})" - echo foo > ${nixpkgs.lib.escapeShellArg path} - '') - paths - } - ''; - nixPath = nixpkgs.lib.concatStringsSep ":" ([ - "niveum=${toString ./.}" - "nixos-config=${toString ./.}/systems/${name}/configuration.nix" - "system-secrets=${systemSecrets}" - "secrets=${sharedSecrets}" - "nixpkgs=${toString (inputs.nixpkgs)}" - ] - ++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs); - # cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//' - sharedSecrets = ensureFiles [ - "di.fm/key" - "eduroam/identity" - "eduroam/password" - "github/notification.token" - "hass/token" - "mail/cock" - "mail/fastmail" - "mail/gmail/amroplay" - "mail/gmail/kieran.meinhardt" - "mail/meinhaki" - "mail/dslalewa" - "mail/fsklassp" - "mail/posteo" - "mega/password" - "nextcloud-fysi/password" - "nextcloud/password" - "openweathermap.key" - "restic/password" - "traadfri.key" - "miniflux/password" - "wifi/Aether.psk" - "spotify/username" - "spotify/password" - ]; - systemSecrets = let - basic = ["retiolum.ed25519" "retiolum.key" "syncthing/cert.pem" "syncthing/key.pem" "ssh/passphrase"]; - in - { - zaatar = ensureFiles (["moodle.token" "telegram/moodle-dl.token" "mpd-web.key"] ++ basic); - kabsa = ensureFiles basic; - manakish = ensureFiles basic; - tahina = ensureFiles basic; - tabula = ensureFiles basic; - ful = ensureFiles (["root.password"] ++ basic); - makanek = ensureFiles ([ - "grafana/admin" - "irc/retiolum" - "irc/hackint" - "irc/libera" - "irc/oftc" - "matrix/nibbana" - "maxmind/license.key" - "moodle-dl/faye.token" - "nextcloud/admin" - "nextcloud/database" - "telegram/nachtischsatan.token" - "telegram/reverse.token" - "telegram/odyssey.token" - "telegram/betacode.token" - "telegram/moodle-dl.token" - "telegram/proverb.token" - "telegram/menstruation.token" - "telegram/cool_village.token" - "telegram/kmein.token" - "telegram/krebs.token" - "telegram/prometheus.token" - "weechat/relay" - ] - ++ basic); - } - .${name}; -in - toString (pkgs.writers.writeDash "build" "NIX_PATH=${nixPath} nix-build '' -A system --dry-run")