modularize NixOS secrets config

This commit is contained in:
2025-11-23 21:46:07 +01:00
parent 1a57e8a424
commit cdf5127071
5 changed files with 79 additions and 29 deletions

View File

@@ -6,11 +6,15 @@
...
}:
let
username = "h";
in
{
system.stateVersion = "25.05";
imports = [
inputs.disko.nixosModules.disko
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.default
./hard.nix
../../modules/bootloader.nix
@@ -28,8 +32,15 @@
../../modules/localization.nix
../../modules/fonts
../../modules/ssh/hardened-openssh.nix
(import ../../modules/secrets {
inherit lib;
inherit inputs;
inherit config;
})
];
secrets.username = username;
disko.devices = {
disk.data = {
type = "disk";
@@ -75,7 +86,7 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.h = import ../../home/hosts/andromache {
users.${username} = import ../../home/hosts/andromache {
inherit inputs;
inherit config;
inherit pkgs;
@@ -99,7 +110,7 @@
enable = true;
openDefaultPorts = true;
folders = {
"/home/h/sync" = {
"/home/${username}/sync" = {
id = "sync";
devices = [ ];
};