add sops + sops-nix

This commit is contained in:
Daylin Morgan 2024-11-28 17:35:38 -06:00
parent 67459a9e80
commit dba19e95f0
Signed by: daylin
GPG key ID: 950D13E9719334AD
4 changed files with 39 additions and 15 deletions

View file

@ -915,11 +915,32 @@
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_4",
"nixpkgs-wayland": "nixpkgs-wayland", "nixpkgs-wayland": "nixpkgs-wayland",
"pixi": "pixi", "pixi": "pixi",
"sops-nix": "sops-nix",
"stable": "stable", "stable": "stable",
"tsm": "tsm", "tsm": "tsm",
"utils": "utils" "utils": "utils"
} }
}, },
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1732575825,
"narHash": "sha256-xtt95+c7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1732632634, "lastModified": 1732632634,

View file

@ -16,6 +16,11 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
lix = { lix = {
url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"; url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";
flake = false; flake = false;

View file

@ -7,7 +7,7 @@
] ]
++ (with pkgs; [ ++ (with pkgs; [
sops
distrobox distrobox
zk zk
quarto quarto

View file

@ -17,13 +17,15 @@ let
listify listify
; ;
inherit (lib.filesystem) listFilesRecursive; inherit (lib.filesystem) listFilesRecursive;
flake = flakeFromSystem "x86_64-linux"; flake = flakeFromSystem "x86_64-linux";
hostPath = host: ../. + "/hosts/${host}"; hostPath = host: ../. + "/hosts/${host}";
# all nix files not including pkgs.nix # all nix files not including pkgs.nix
# hostFiles = host: filter isNixFile (listFilesRecursive (hostPath host));
hostFiles = host: host |> hostPath |> listFilesRecursive |> filter isNixFile; hostFiles = host: host |> hostPath |> listFilesRecursive |> filter isNixFile;
nixosModules = names: names |> listify |> map (n: inputs.${n}.nixosModules.default);
selfModules = names: names |> listify |> map (n: self.nixosModules.${n});
commonSpecialArgs = { commonSpecialArgs = {
inherit inherit
self self
@ -35,12 +37,7 @@ let
mkIso = nixosSystem { mkIso = nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = (nixosModules "lix-module") ++ (selfModules "nix|essentials|iso");
inputs.lix-module.nixosModules.default
self.nixosModules.nix
self.nixosModules.essentials
self.nixosModules.iso
];
specialArgs = commonSpecialArgs; specialArgs = commonSpecialArgs;
}; };
@ -48,12 +45,13 @@ let
hostName: hostName:
nixosSystem { nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules =
../modules/oizys.nix [
inputs.lix-module.nixosModules.default
inputs.hyprland.nixosModules.default
inputs.comin.nixosModules.comin inputs.comin.nixosModules.comin
] ++ (hostFiles hostName); ]
++ (selfModules ''oizys'')
++ (nixosModules ''lix-module|hyprland|sops-nix'')
++ (hostFiles hostName);
specialArgs = commonSpecialArgs // { specialArgs = commonSpecialArgs // {
inherit inherit