current
1{
2 lib,
3 den,
4 ...
5}: let
6 inherit (den.lib) __findFile;
7in {
8 den.aspects.hpcesia.includes = [
9 <den/primary-user>
10 ];
11
12 # for all hosts that hpcesia has access to
13 den.aspects.hpcesia.provides.to-hosts.includes = [
14 ({host, ...}: let
15 listHas = l: e: (lib.lists.findFirstIndex (x: x == e) null l) != null;
16 isDevelop = listHas ["dev-server" "desktop" "laptop"] host.usage;
17 isGraphic = listHas ["desktop" "laptop"] host.usage;
18 in {
19 includes =
20 (lib.optionals isDevelop [
21 <dev>
22 ])
23 ++ (lib.optionals isGraphic [
24 <desktop/app>
25 <desktop/terminal/ghostty>
26 <desktop/terminal/ghostty/xdg-term-exec>
27 <desktop/xdg>
28 <game>
29 ])
30 ++ (lib.optionals (isDevelop && isGraphic) [
31 <desktop/yubikey>
32 <dev/desktop>
33 ]);
34 })
35 ];
36
37 # host specific configuration for kevin
38 den.aspects.hpcesia.provides.kevin.includes = [
39 <pardofelis/ssh>
40 <mobius/ssh>
41 ];
42
43 den.aspects.hpcesia.nixos = {config, ...}: {
44 users.users.hpcesia = {
45 description = "HPCesia";
46 hashedPasswordFile = config.vaultix.secrets.user-hpcesia-hashed-password.path;
47 extraGroups =
48 []
49 ++ (lib.optionals config.virtualisation.podman.enable ["podman"])
50 ++ (lib.optionals config.virtualisation.docker.enable ["docker"])
51 ++ (lib.optionals config.programs.gamemode.enable ["gamemode"]);
52 openssh.authorizedKeys.keys = [
53 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFMKaGC2I3an4AJDeWzVx5vhm63+kxi6zJNdh7yEp6CK hpcesia@kevin"
54 "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIH6wZFUEv9pSV+MgzqZRJ08WwJvL5FRMhayp73kCnDckAAAABHNzaDo= me@hpcesia.com"
55 ];
56 };
57
58 vaultix.secrets.user-hpcesia-hashed-password.file = ./hashed-password.age;
59 };
60
61 den.aspects.hpcesia.homeManager = {
62 # This value determines the Home Manager release that your
63 # configuration is compatible with. This helps avoid breakage
64 # when a new Home Manager release introduces backwards
65 # incompatible changes.
66 #
67 # You can update Home Manager without changing this value. See
68 # the Home Manager release notes for a list of state version
69 # changes in each release.
70 home.stateVersion = "25.11";
71 };
72}