refactor!: switch to dendritic pattern

BREAKING CHANGE: complete reorganization of the repository
This commit is contained in:
2026-09-30 18:36:06 +02:00
parent 12684b4e9c
commit 5f4a7a4a42
323 changed files with 7117 additions and 7380 deletions
+36
View File
@@ -0,0 +1,36 @@
{
flake.modules.nixos.system-account-creug = {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.mySystem.users.creug;
in {
options.mySystem.users.creug = {
enable = mkEnableOption "Enables user creug";
sudo = mkEnableOption "Make the user a superuser";
trusted = mkOption {
description = "Mark the user as trusted by Nix";
default = cfg.sudo;
example = true;
};
};
config = {
users.users.creug = mkIf cfg.enable {
isNormalUser = true;
description = "Greg";
extraGroups =
["networkmanager" "dialout" "games" "audio" "input"]
++ lists.optional cfg.sudo "wheel";
shell = pkgs.zsh;
openssh.authorizedKeys.keyFiles = lib.filesystem.listFilesRecursive ../home/creug/keys;
};
nix.settings = mkIf cfg.trusted {
trusted-users = ["creug"];
};
};
};
}
+36
View File
@@ -0,0 +1,36 @@
{
flake.modules.nixos.system-account-phundrak = {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.mySystem.users.phundrak;
in {
options.mySystem.users.phundrak = {
enable = mkEnableOption "Enables user phundrak";
trusted = mkEnableOption "Mark the user as trusted by Nix";
extraGroups = mkOption {
type = types.listOf types.str;
default = [];
example = ["feedbackd"];
};
};
config = {
users.users.phundrak = mkIf cfg.enable {
isNormalUser = true;
description = "Lucien Cartier-Tilet";
extraGroups =
["networkmanager" "wheel" "dialout" "plugdev" "games" "audio" "input"]
++ cfg.extraGroups;
shell = pkgs.zsh;
openssh.authorizedKeys.keyFiles = lib.filesystem.listFilesRecursive ../home/phundrak/keys;
};
nix.settings = mkIf cfg.trusted {
trusted-users = ["phundrak"];
};
};
};
}
+19
View File
@@ -0,0 +1,19 @@
{
flake.modules.nixos.system-account-root = {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.mySystem.users.root;
in {
options.mySystem.users.root.disablePassword = mkEnableOption "Disables root password";
config = {
users.users.root = {
hashedPassword = mkIf cfg.disablePassword "*";
shell = pkgs.zsh;
};
};
};
}