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 <game>
25 ])
26 ++ (lib.optionals (isDevelop && isGraphic) [
27 <desktop/yubikey>
28 <dev/desktop>
29 ]);
30 })
31 ];
32
33 # host specific configuration for kevin
34 den.aspects.hpcesia.provides.kevin.includes = [
35 <pardofelis/ssh>
36 <mobius/ssh>
37 ];
38
39 den.aspects.hpcesia.nixos = {config, ...}: {
40 users.users.hpcesia = {
41 description = "HPCesia";
42 hashedPasswordFile = config.vaultix.secrets.user-hpcesia-hashed-password.path;
43 extraGroups =
44 []
45 ++ (lib.optionals config.virtualisation.podman.enable ["podman"])
46 ++ (lib.optionals config.virtualisation.docker.enable ["docker"])
47 ++ (lib.optionals config.programs.gamemode.enable ["gamemode"]);
48 openssh.authorizedKeys.keys = [
49 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFMKaGC2I3an4AJDeWzVx5vhm63+kxi6zJNdh7yEp6CK hpcesia@kevin"
50 ];
51 };
52
53 vaultix.secrets.user-hpcesia-hashed-password.file = ./hashed-password.age;
54 };
55
56 den.aspects.hpcesia.homeManager = {
57 # This value determines the Home Manager release that your
58 # configuration is compatible with. This helps avoid breakage
59 # when a new Home Manager release introduces backwards
60 # incompatible changes.
61 #
62 # You can update Home Manager without changing this value. See
63 # the Home Manager release notes for a list of state version
64 # changes in each release.
65 home.stateVersion = "25.11";
66 };
67}