agenix module

This commit is contained in:
Osman Faruk Bayram 2025-02-16 02:25:43 +03:00
parent 0ba4cbb699
commit 7499da1897
4 changed files with 36 additions and 16 deletions

View file

@ -44,7 +44,6 @@
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
inputs.agenix.packages.x86_64-linux.default
inputs.osbm-nvim.packages.x86_64-linux.default inputs.osbm-nvim.packages.x86_64-linux.default
nixd nixd
]; ];

View file

@ -90,7 +90,6 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nvidia-container-toolkit nvidia-container-toolkit
inputs.agenix.packages.x86_64-linux.default
inputs.osbm-nvim.packages.x86_64-linux.default inputs.osbm-nvim.packages.x86_64-linux.default
nixd nixd
]; ];

View file

@ -30,7 +30,6 @@
lolcat lolcat
cmatrix cmatrix
inxi inxi
age
jq jq
onefetch onefetch
just just

View file

@ -1,17 +1,40 @@
{ {
age.secrets = { config,
network-manager.file = ../secrets/network-manager.age; pkgs,
ssh-key-private = { inputs,
file = ../secrets/ssh-key-private.age; lib,
path = "/home/osbm/.ssh/id_ed25519"; ...
owner = "osbm"; }: {
mode = "0600"; options = {
}; myModules.enableSecrets = lib.mkOption {
ssh-key-public = { type = lib.types.bool;
file = ../secrets/ssh-key-public.age; default = true;
path = "/home/osbm/.ssh/id_ed25519.pub"; description = "Enable agenix secrets management";
owner = "osbm";
mode = "0644";
}; };
}; };
config = lib.mkMerge [
(lib.mkIf config.myModules.enableSecrets {
environment.systemPackages = with pkgs; [
inputs.agenix.packages.x86_64-linux.default
age
];
age.secrets = {
network-manager.file = ../secrets/network-manager.age;
ssh-key-private = {
file = ../secrets/ssh-key-private.age;
path = "/home/osbm/.ssh/id_ed25519";
owner = "osbm";
mode = "0600";
};
ssh-key-public = {
file = ../secrets/ssh-key-public.age;
path = "/home/osbm/.ssh/id_ed25519.pub";
owner = "osbm";
mode = "0644";
};
};
})
];
} }