feat(home): add initial role configuration

This commit is contained in:
ooks-io 2024-06-06 22:08:51 +12:00
parent 0f9d05be36
commit 3615bb010f
3 changed files with 32 additions and 2 deletions

5
home/roles/default.nix Normal file
View file

@ -0,0 +1,5 @@
{
imports = [
./ooks-desktop-workstation.nix
];
}

View file

@ -0,0 +1,26 @@
{ lib, config, osConfig, ... }:
let
inherit (lib) mkIf;
host = osConfig.ooknet.host;
in
{
config = mkIf (host.admin.name == "ooks" && host.type == "desktop" && host.role == "workstation") {
ooknet = {
theme = "minimal";
desktop = {
environment = "hyprland";
browser = "firefox";
terminal = "foot";
notes = "obsidian";
pdf = "zathura";
discord = "vesktop";
};
console = {
editor = "helix";
multiplexer = "zellij";
};
};
};
}

View file

@ -2,7 +2,6 @@
let
cfg = config.ooknet.host.admin;
host = config.ooknet.host;
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
inherit (lib) mkIf types mkOption;
in
@ -68,7 +67,7 @@ in
verbose = true;
extraSpecialArgs = { inherit inputs outputs self; };
users.${cfg.name} = {
imports = [ "${self}/home/user/${cfg.name}/${host.name}" ];
imports = [ "${self}/home" ];
};
};
};