diff options
| author | Mel <einebeere@gmail.com> | 2024-11-17 11:27:30 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-11-17 11:27:30 +0100 |
| commit | 2edfd4d7669b775e671af739ab8f12c52784670c (patch) | |
| tree | 6dd8fe3ebc09353b15604bddfdb20324f84e593c | |
| parent | f7e5d29029399af167f868ef3ae0a6cc34f4a4ad (diff) | |
| download | network-2edfd4d7669b775e671af739ab8f12c52784670c.tar.zst network-2edfd4d7669b775e671af739ab8f12c52784670c.zip | |
Add age and unconfigured agenix flake
Signed-off-by: Mel <einebeere@gmail.com>
| -rw-r--r-- | flake.lock | 63 | ||||
| -rw-r--r-- | flake.nix | 33 | ||||
| -rw-r--r-- | modules/common.nix | 3 |
3 files changed, 89 insertions, 10 deletions
diff --git a/flake.lock b/flake.lock index c90c374..2ecd3e1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,52 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1723293904, + "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", + "owner": "ryantm", + "repo": "agenix", + "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "flake-compat": { "locked": { "lastModified": 1696426674, @@ -86,12 +133,28 @@ }, "root": { "inputs": { + "agenix": "agenix", "flake-compat": "flake-compat", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "oisd": "oisd" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index f99f130..f51b05e 100644 --- a/flake.nix +++ b/flake.nix @@ -9,15 +9,23 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + agenix = { + url = "github:ryantm/agenix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + home-manager.follows = "home-manager"; + }; + }; + flake-compat.url = "github:edolstra/flake-compat"; - + oisd = { url = "github:sjhgvr/oisd"; flake = false; }; }; - outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, ... }: + outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, agenix, ... }: let tailnetName = "serval-moth"; @@ -45,13 +53,18 @@ { name = "lapin"; system = arm; tailscale.ip = "100.83.254.27"; } { name = "renard"; system = x86; tailscale.ip = "100.75.17.75"; } ]; - + + overlays = [ agenix.overlays.default ]; + packageSetsForSystem = system: let - pkgsInputs = { inherit system; config = import ./config.nix; }; + pkgsInputs = + i: { inherit system; config = import ./config.nix; } // i; in rec { - pkgs = import nixpkgs pkgsInputs; - unstablePkgs = import nixpkgs-unstable pkgsInputs; - auxiliaryPkgs = import ./pkgs { inherit system pkgs unstablePkgs; }; + pkgs = import nixpkgs (pkgsInputs { inherit overlays; }); + + unstablePkgs = import nixpkgs-unstable (pkgsInputs { }); + + auxiliaryPkgs = import ./pkgs (pkgsInputs { inherit pkgs unstablePkgs; }); }; inherit (nixpkgs) lib; @@ -68,18 +81,20 @@ modules = [ ./machines/${machine.name} - + home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users.mel = import ./machines/${machine.name}/home.nix; } + + agenix.nixosModules.default ]; }; }) machines); # compatibility wrapper for nixos-option - legacyPackages = lib.genAttrs (lib.attrValues systems) + legacyPackages = lib.genAttrs (lib.attrValues systems) (system: with packageSetsForSystem system; pkgs.recurseIntoAttrs pkgs); }; } diff --git a/modules/common.nix b/modules/common.nix index 7d46a37..9cdf2c1 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -77,7 +77,8 @@ }; environment.systemPackages = (with pkgs; [ - file unzip jq dig htop glances wget gnupg pinentry-curses + file unzip jq dig htop glances wget + gnupg pinentry-curses age agenix inetutils pciutils lshw inxi iw tcpdump ffmpeg_7-headless |
