refactor!: rewrite following dendritic patterns

This commit is contained in:
2026-06-29 15:28:56 +02:00
parent 76fa31e3d2
commit a206132d94
15 changed files with 359 additions and 4 deletions
+13
View File
@@ -0,0 +1,13 @@
{inputs, ...}: {
flake.modules = {
nixos.phundrak = {
imports = [./nixos.nix];
home-manager.users.phundrak = {
imports = [inputs.self.modules.homeManager.phundrak];
};
};
homeManager.phundrak = {
imports = [./homeManager.nix];
};
};
}
+32
View File
@@ -0,0 +1,32 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.flake.options.phundrak;
in {
options.flake.options.phundrak = {
sudo = mkEnableOption "Make phundrak a superuser";
trusted = mkOption {
description = "Mark phundrak as trusted by Nix";
type = types.bool;
default = cfg.sudo;
};
};
config = {
users.users.phundrak = {
isNormalUser = true;
description = "Greg";
extraGroups =
["networkmanager" "dialout" "games" "audio" "input"]
++ optional cfg.sudo "wheel";
shell = pkgs.zsh;
openssh.authorizedKeys.keyFiles = filesystem.listFilesRecursive ./keys;
};
nix.settings = mkIf cfg.trusted {
trusted-users = ["phundrak"];
};
};
}