Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: Better standalone home config detection

Add lib.getStandaloneHomeConfigurations and lib.isStandaloneHome

Configure agenix-rekey to only consider standalone homes to avoid dummy
host warning on unused host-based home configurations

Modify ciMatrix package to use the new standalone home functions

+35 -20
+4 -2
flake.nix
··· 6 6 {inherit inputs;} 7 7 ({flake-parts-lib, ...}: let 8 8 inherit (flake-parts-lib) importApply; 9 - import' = path: import path {inherit inputs;}; 10 - importApply' = path: importApply path {inherit inputs;}; 9 + inherit (inputs.nixpkgs) lib; 10 + specialArgs = {inherit inputs lib self;}; 11 + import' = path: import path specialArgs; 12 + importApply' = path: importApply path specialArgs; 11 13 systems = ["aarch64-linux" "x86_64-linux"]; 12 14 in { 13 15 inherit systems;
+7 -2
nix/flakeModules/agenixRekey.nix
··· 1 - {inputs, ...}: { 1 + { 2 + inputs, 3 + self, 4 + ... 5 + }: { 2 6 imports = [ 3 7 inputs.agenix-rekey.flakeModule 4 8 ]; 5 9 6 10 perSystem = {pkgs, ...}: { 7 11 agenix-rekey = { 8 - inherit (inputs.self) homeConfigurations nixosConfigurations; 12 + inherit (self) nixosConfigurations; 9 13 agePackage = pkgs.rage; 14 + homeConfigurations = self.lib.getStandaloneHomeConfigurations self; 10 15 }; 11 16 }; 12 17 }
+6 -7
nix/legacyPackages/ciMatrix.nix
··· 1 1 { 2 - inputs, 3 2 lib, 3 + self, 4 4 writeText, 5 5 ... 6 6 }: let 7 - inherit (inputs.self) devShells homeConfigurations nixosConfigurations packages systems; 7 + inherit (self) systems; 8 8 getOutputInfo = mkDerivationPath: output: 9 9 lib.mapAttrsToList (name: drv: { 10 10 inherit name; ··· 44 44 infos; 45 45 ciInfo = { 46 46 homeConfigurations = 47 - homeConfigurations 48 - |> lib.filterAttrs (_: home: home._module.specialArgs.osConfig == {}) # Standalone only 47 + (self.lib.getStandaloneHomeConfigurations self) 49 48 |> filterToBuild 50 49 |> getOutputInfo (name: ".#homeConfigurations.${name}.activationPackage") 51 50 |> spreadBranchOrDefault []; 52 51 nixosConfigurations = 53 - nixosConfigurations 52 + self.nixosConfigurations 54 53 |> filterToBuild 55 54 |> getOutputInfo (name: ".#nixosConfigurations.${name}.config.system.build.toplevel") 56 55 |> spreadBranchOrDefault []; 57 56 packages = 58 - packages 57 + self.packages 59 58 |> filterPerSystemToBuild 60 59 |> getPerSystemOutputInfo (system: name: ".#packages.${system}.${name}") 61 60 |> spreadBranchOrDefault ["main" "develop"]; 62 61 devShells = 63 - devShells 62 + self.devShells 64 63 |> filterPerSystemToBuild 65 64 |> getPerSystemOutputInfo (system: name: ".#devShells.${system}.${name}") 66 65 |> spreadBranchOrDefault ["main" "develop"];
+1 -1
nix/legacyPackages/default.nix
··· 10 10 callPackageRecursive = callPackageRecursiveWith pkgs; 11 11 in { 12 12 legacyPackages = { 13 - ci.matrix = callPackage ./ciMatrix.nix {inherit (args) inputs;}; 13 + ci.matrix = callPackage ./ciMatrix.nix {inherit (args.inputs) self;}; 14 14 scripts = callPackageRecursive ./scripts {inherit (self'.legacyPackages.pkgs) writeNuScriptStdinBin;}; 15 15 }; 16 16 };
+17 -8
nix/lib/default.nix
··· 8 8 storage = import ./storage args; 9 9 strings = import ./strings.nix args; 10 10 11 + mkPkgs = { 12 + system, 13 + nixpkgs ? inputs.nixpkgs, 14 + }: 15 + import nixpkgs { 16 + inherit system overlays; 17 + allowUnfree = true; 18 + }; 11 19 callPackageWith = pkgs: path: extraArgs: 12 20 lib.callPackageWith 13 21 pkgs ··· 25 33 directory = path; 26 34 } 27 35 |> lib.filterAttrsRecursive (name: _: name != "default"); 28 - mkPkgs = { 29 - system, 30 - nixpkgs ? inputs.nixpkgs, 31 - }: 32 - import nixpkgs { 33 - inherit system overlays; 34 - allowUnfree = true; 35 - }; 36 + 37 + getStandaloneHomeConfigurations = self: 38 + self.homeConfigurations 39 + |> lib.filterAttrs (name: _: self.lib.isStandaloneHome self.nixosConfigurations name); 40 + isStandaloneHome = nixosConfigurations: name: 41 + !(nixosConfigurations ? ${name |> lib.splitString "@" |> lib.last}); 42 + 36 43 isNvidia = config: let 37 44 drivers = config.services.xserver.videoDrivers or []; 38 45 in ··· 55 62 | nu-generate-carapace-spec \ 56 63 > $out 57 64 ''; 65 + 58 66 nixFilesToAttrs = path: 59 67 builtins.readDir path 60 68 |> lib.filterAttrs (name: type: type == "regular" && lib.hasSuffix ".nix" name && name != "default.nix") 61 69 |> lib.concatMapAttrs (relativePath: _: { 62 70 ${relativePath |> lib.removeSuffix ".nix"} = path + /${relativePath}; 63 71 }); 72 + 64 73 mkOneShotBootService = 65 74 lib.recursiveUpdate 66 75 {
secrets/rekeyed/laptop/436ec0f4a8351cc704f0e9341a61bcf9-user.emily.password.age

This is a binary file and will not be displayed.

secrets/rekeyed/raspberrypi/df6b34c90fcbdf12dccd55c27804ca79-user.emily.password.age

This is a binary file and will not be displayed.