Replace sops-nix with agenix; nix flake update
This commit is contained in:
32
flake.nix
32
flake.nix
@ -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";
|
||||
})
|
||||
|
Reference in New Issue
Block a user