include agenix

This commit is contained in:
Anish Lakhwara 2022-10-03 17:09:27 +10:00
parent 577f1a83de
commit c4e454e3e9
4 changed files with 37 additions and 7 deletions

View file

@ -1,5 +1,25 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1664140963,
"narHash": "sha256-pFxDtOLduRFlol0Y4ShE+soRQX4kbhaCNBtDOvx7ykw=",
"owner": "ryantm",
"repo": "agenix",
"rev": "6acb1fe5f8597d5ce63fc82bc7fcac7774b1cdf0",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"bonfire": { "bonfire": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -8,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1664356228, "lastModified": 1664777933,
"narHash": "sha256-YLmsR/OSf7q0t3/7gAPI0Uf9sS9JQSWF7trmrtsDPOo=", "narHash": "sha256-+ngnfFpWnsJeSPoTDLe8+hsMBQ4nFzJDOyNa/XNxzvY=",
"owner": "bonfire-networks", "owner": "bonfire-networks",
"repo": "bonfire-app", "repo": "bonfire-app",
"rev": "9533e672724198fcad61ba4d7f7e92649cb4a655", "rev": "8607eccc8b6d6a311095c35e764e35905ae6883e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -69,6 +89,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"bonfire": "bonfire", "bonfire": "bonfire",
"hardware": "hardware", "hardware": "hardware",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"

View file

@ -7,10 +7,11 @@
hardware.url = "github:nixos/nixos-hardware"; hardware.url = "github:nixos/nixos-hardware";
bonfire.url = "github:bonfire-networks/bonfire-app"; bonfire.url = "github:bonfire-networks/bonfire-app";
bonfire.inputs.nixpkgs.follows = "nixpkgs"; bonfire.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { nixpkgs, bonfire, ... }@inputs: outputs = { nixpkgs, bonfire, agenix, ... }@inputs:
let let
forAllSystems = nixpkgs.lib.genAttrs [ forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux" "aarch64-linux"
@ -33,7 +34,7 @@
# Devshell for bootstrapping # Devshell for bootstrapping
# Acessible through 'nix develop' or 'nix-shell' (legacy) # Acessible through 'nix develop' or 'nix-shell' (legacy)
devShells = forAllSystems (system: { devShells = forAllSystems (system: {
default = legacyPackages.${system}.callPackage ./shell.nix { }; default = legacyPackages.${system}.callPackage ./shell.nix { agenix = agenix; };
}); });
# This instantiates nixpkgs for each system listed above # This instantiates nixpkgs for each system listed above
@ -61,6 +62,7 @@
# > Our main nixos configuration file < # > Our main nixos configuration file <
./nixos/configuration.nix ./nixos/configuration.nix
bonfire.nixosModules.bonfire bonfire.nixosModules.bonfire
agenix.nixosModule.age
]; ];
}; };
test = nixpkgs.lib.nixosSystem { test = nixpkgs.lib.nixosSystem {

6
secrets/secrets.nix Normal file
View file

@ -0,0 +1,6 @@
# let
# system = "";
# in
{
# "bookstack-app-file-key.age".publicKeys = [ system ];
}

View file

@ -10,9 +10,10 @@
overlays = [ ]; # Explicit blank overlay to avoid interference overlays = [ ]; # Explicit blank overlay to avoid interference
in in
import nixpkgs { inherit system overlays; } import nixpkgs { inherit system overlays; }
, agenix
, ... , ...
}: pkgs.mkShell { }: pkgs.mkShell {
# Enable experimental features without having to specify the argument # Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes"; NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [ nix home-manager git ]; nativeBuildInputs = with pkgs; [ nix home-manager git ] ++ agenix.defaultPackage.x86_64-linux;
} }