Replace sops-nix with agenix; nix flake update

This commit is contained in:
2023-06-25 20:49:00 -05:00
parent 4ed6c07680
commit efbf9c87e9
6 changed files with 84 additions and 94 deletions

View File

@ -1,13 +1,14 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
sops = {
url = "github:Mic92/sops-nix";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.darwin.follows = "";
};
};
outputs = { self, nixpkgs, sops, ... }@attrs:
outputs = { self, nixpkgs, agenix, ... }@attrs:
let
containerDef = import ./containers.nix;
serviceContainers = containerDef.containers;
@ -16,8 +17,11 @@
system = "x86_64-linux";
in {
devShell.x86_64-linux = pkgs.mkShell {
buildInputs =
[ (pkgs.nixos { }).nixos-rebuild pkgs.terraform pkgs.sops ];
buildInputs = [
agenix.packages.x86_64-linux.default
(pkgs.nixos { }).nixos-rebuild
pkgs.terraform
];
shellHook = ''
alias deploy="nixos-rebuild switch --target-host root@matri.cx --build-host root@matri.cx --flake .#eve-psr-nix0"
'';
@ -32,7 +36,7 @@
modules = [
({ modulesPath, ... }: {
imports = [ sops.nixosModules.sops ./hardware-configuration.nix ];
imports = [ agenix.nixosModules.default ./hardware-configuration.nix ];
nix = {
buildMachines = [ ];
@ -103,13 +107,15 @@
};
sops = {
age = { sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; };
defaultSopsFile = ./secrets/keys.yaml;
secrets = {
hostname = { };
};
};
age.secrets.keys.file = ./secrets/keys.age;
#sops = {
# age = { sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; };
# defaultSopsFile = ./secrets/keys.yaml;
# secrets = {
# hostname = { };
# };
#};
system.stateVersion = "22.11";
})