lkjdsalkjdsalkjad

This commit is contained in:
2025-03-19 17:36:58 +01:00
parent 36a6779fc0
commit 7b2203e6b6
8 changed files with 26 additions and 6 deletions
+8 -4
View File
@@ -229,6 +229,7 @@
(mkModule extra-modules domain system inputs stateVersion modules hostname)
];
};
# TODO: move this to a file or separate flake
mkReport = extra-modules: domain: system: inputs: stateVersion: modules: hostname: let
nixos = mkConfig extra-modules domain system inputs stateVersion modules hostname;
cfg = nixos.config;
@@ -247,14 +248,16 @@
users = lib.pipe cfg.users.users [
(lib.filterAttrs (uname: user: user.isNormalUser))
(builtins.mapAttrs (uname: user: {
inherit (user) home;
authorizedKeys = lib.forEach user.openssh.authorizedKeys.keys (key: builtins.concatStringsSep " " (
lib.take
(lib.length (lib.splitString " " key))
[
(builtins.elemAt (lib.splitString " " key) 0)
"..."
(builtins.elemAt (lib.splitString " " key) 2)
]));
(builtins.elemAt (lib.splitString " " key) 0)
"..."
(builtins.elemAt (lib.splitString " " key) 2)
]
));
}))
];
nix-system-features = cfg.nix.settings.system-features;
@@ -265,6 +268,7 @@
(lib.filterAttrs (mount: fs: fs.fsType != "nfs"))
(lib.mapAttrs (mount: fs: "${fs.fsType}://${fs.device}"))
];
} // lib.optionalAttrs cfg.services.nginx.enable {
nginx-vhosts = lib.pipe cfg.services.nginx.virtualHosts [
#(lib.filterAttrs (domain: vhost: )
(lib.mapAttrs (domain: vhost: vhost.serverAliases or []))