Testing agenix

This commit is contained in:
baduhai 2022-12-20 12:14:07 -03:00
parent c8cede43df
commit 36195dee41
4 changed files with 27 additions and 10 deletions

View file

@ -3,33 +3,37 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.11";
nur.url = "github:nix-community/nur";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
kmonad = {
url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-22.11";
home-manager-stable = { home-manager-stable = {
url = "github:nix-community/home-manager/release-22.11"; url = "github:nix-community/home-manager/release-22.11";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
nur.url = "github:nix-community/nur";
kmonad = {
url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs = { deploy-rs = {
url = "github:serokell/deploy-rs"; url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs @ { self, nixpkgs, home-manager, nur, kmonad, nixpkgs-stable, home-manager-stable, deploy-rs, ... }: { outputs = inputs @ { self, nixpkgs, home-manager, nur, kmonad, nixpkgs-stable, home-manager-stable, deploy-rs, agenix, ... }: {
nixosConfigurations = { nixosConfigurations = {
io = nixpkgs.lib.nixosSystem { io = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -37,6 +41,7 @@
modules = [ modules = [
./hosts/desktops/io.nix ./hosts/desktops/io.nix
kmonad.nixosModules.default kmonad.nixosModules.default
agenix.nixosModule
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
nixpkgs.overlays = [ nur.overlay ]; nixpkgs.overlays = [ nur.overlay ];

View file

@ -10,6 +10,8 @@
./io ./io
]; ];
age.secrets.secret1.file = ../secrets/secret1.age;
networking.hostName = "io"; networking.hostName = "io";
zramSwap = { zramSwap = {

BIN
secrets/secret1.age Normal file

Binary file not shown.

10
secrets/secrets.nix Normal file
View file

@ -0,0 +1,10 @@
let
io = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKCIrKJk5zWzWEHvLMPMK8T3PyeBjsCsqzxPN+OrXfhA";
desktops = [ io ];
alexandria = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK95QueW+jp1ZmF299Xr3XkgHJ6dL7aZVsfWxqbOKVKA";
servers = [ alexandria ];
in
{
"secret1.age".publicKeys = desktops;
}