Something went wrong. Try again.
Flake for my desktop, laptop, and my homelab.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108{lib, ...}: { flake.aspects.nix.nixos = { # keep-sorted start config, vars, # keep-sorted end ... }: let inherit (vars) username; in { sops = { secrets = { # keep-sorted start "nix_access_tokens/github" = {}; "nix_access_tokens/ncps" = {}; # keep-sorted end };
templates = { access_tokens = { content = '' access-tokens = github.com=${config.sops.placeholder."nix_access_tokens/github"} ''; owner = username; };
nix-netrc = { content = let ncpsHost = "ncps.${vars.groundDomain}"; in '' machine ${ncpsHost} login nix password ${config.sops.placeholder."nix_access_tokens/ncps"} ''; group = "root"; mode = "0400"; owner = "root"; }; }; };
# Let tack reuse the access tokens nix.conf includes. environment.sessionVariables.TACK_NIX_CONF_TOKENS = "1";
nix = { settings = let substituters = [ # keep-sorted start "https://adam01110-nur.cachix.org/" "https://cache.numtide.com" "https://forkprince.cachix.org/" "https://mic92.cachix.org" "https://nix-community.cachix.org" # keep-sorted end ]; in { inherit substituters;
trusted-substituters = substituters;
trusted-public-keys = [ # keep-sorted start "adam01110-nur.cachix.org-1:43B8awTREG19aQ20luDD9BkxijKG/Q7hf8voMzS1X9I=" "cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" "forkprince.cachix.org-1:9cN+fX492ZKlfd228xpYAC3T9gNKwS1sZvCqH8iAy1M=" "mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ=" "niks3.numtide.com-1:DTx8wZduET09hRmMtKdQDxNNthLQETkc/yaX7M4qK0g=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" # keep-sorted end ];
netrc-file = config.sops.templates.nix-netrc.path;
experimental-features = [ # keep-sorted start "flakes" "nix-command" "pipe-operators" # keep-sorted end ];
lazy-trees = true; eval-cores = 0;
# Store profile and channel links under XDG state directories. use-xdg-base-directories = true; };
# Load access tokens from the generated sops template. extraOptions = "!include ${config.sops.templates.access_tokens.path}"; };
nixpkgs.config = { allowInsecurePredicate = pkg: (lib.getName pkg == "electron" && builtins.elem (lib.getVersion pkg) [ # keep-sorted start "39.8.10" "40.10.5" # keep-sorted end ]) || (lib.getName pkg == "nodejs" && lib.hasPrefix "20." (lib.getVersion pkg)); allowUnfree = true; }; };}