Compare commits

..

3 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
ff1130a16a flake bump 2025-08-25 13:17:59 +02:00
Lennart J. Kurzweg (Nx2)
19f151cb81 rclone 2025-08-25 13:17:53 +02:00
Lennart J. Kurzweg (Nx2)
dbf3b87b2d bar 2025-08-25 13:17:47 +02:00
64 changed files with 1121 additions and 1634 deletions

View File

@@ -2,9 +2,6 @@ keys:
- &users: - &users:
- &nx2 22FB2CC03DC5292AB81CF67D0AF27B383170E634 - &nx2 22FB2CC03DC5292AB81CF67D0AF27B383170E634
- &nx2_key_13 age1x2lpsennl74n0f5jl60uv2ffjcuqymzf9ap3frlz2quyv0x3hq3scnewwq - &nx2_key_13 age1x2lpsennl74n0f5jl60uv2ffjcuqymzf9ap3frlz2quyv0x3hq3scnewwq
- &xps-home age1pn4utvwpqdrswn0xurfdexn5nks9cd06jxzwg3m3m6za25ap4vxqxd0p3k
- &ace-home age1ur5zpr325cv7w0yn49azz9f48xsxd73w2sytt22yrnw5qs9r34nsv3vl05
- &north-home age1jr72q042ccgxpdgdaaev0arzc0vh3r02etv2tzhhsejl0mfaxs3q9hhlaz
- &hosts: - &hosts:
- &north age1vkqn2nars5qmpr35tac0x9vshphrq6nnzjfyxwusgn27kt3zualssv0u8e - &north age1vkqn2nars5qmpr35tac0x9vshphrq6nnzjfyxwusgn27kt3zualssv0u8e
- &xps age1jvf2lyrt2dw9jfnwgvnhmj9fmvyq8vvtepqjpkyycc5dqkkd4edqhxsgv6 - &xps age1jvf2lyrt2dw9jfnwgvnhmj9fmvyq8vvtepqjpkyycc5dqkkd4edqhxsgv6
@@ -17,8 +14,5 @@ creation_rules:
- *xps - *xps
- *ace - *ace
- *nx2_key_13 - *nx2_key_13
- *xps-home
- *ace-home
- *north-home
pgp: pgp:
- *nx2 - *nx2

View File

@@ -32,6 +32,7 @@
./system-modules/sops.nix ./system-modules/sops.nix
./system-modules/sound.nix ./system-modules/sound.nix
./system-modules/sshd.nix ./system-modules/sshd.nix
./system-modules/base-packages.nix
./system-modules/input.nix ./system-modules/input.nix
./system-modules/syncthing.nix ./system-modules/syncthing.nix
./system-modules/tuda.nix ./system-modules/tuda.nix
@@ -60,14 +61,10 @@
./system-modules/calendar/dicos.nix ./system-modules/calendar/dicos.nix
] else [ ] else [
]); ]);
environment.systemPackages = import ./system-modules/base-packages.nix pkgs;
systemd.extraConfig = "DefaultLimitNOFILE=2048"; systemd.extraConfig = "DefaultLimitNOFILE=2048";
system.stateVersion = hyper.pkgs-version; system.stateVersion = hyper.pkgs-version;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
programs.bash.shellInit = '' programs.bash.shellInit = ''
if [[ "$USER" == "${hyper.user}" ]]; then source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
fi
''; '';
} }

View File

@@ -1,7 +1,6 @@
{ {
unfree = [ unfree = [
"cursor"
"discord" "discord"
"spotify" "spotify"
"obsidian" "obsidian"

View File

@@ -1,13 +1,13 @@
{ {
"base": { "base": {
"foreground": "#eddbef", "foreground": "#fefefe",
"background": "#100711" "background": "#020202"
}, },
"to_alter": { "to_alter": {
"accent": "#ba71c0", "accent": "#aaaaff",
"secondary": "#3266ff", "secondary": "#aaeeff",
"tertiary": "#4bb6e6", "tertiary": "#aaffaa",
"special": "#76c071", "special": "#aaffaa",
"weird": "#c08571" "weird": "#ffffaa"
} }
} }

View File

@@ -7,24 +7,10 @@ pkgs: rec {
gap-size = 5; gap-size = 5;
border-width = 2; border-width = 2;
color = let color = let
dark = (-0.4); dark = (-0.5);
darker = (-0.6); bright = (0.5);
bright = 0.4; alter-set = let f = lib.alter-luminace-hex; in color-name: color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
brighter = 0.7; alter = let f = lib.alter-luminace-hex; in color-value: { base = color-value; dark = f color-value dark; bright = f color-value bright; };
alter-set = let f = lib.alter-luminace-hex; in color-name: color-value: {
base = color-value;
dark = f color-value dark;
darker = f color-value darker;
bright = f color-value bright;
brighter = f color-value brighter;
};
alter = let f = lib.alter-luminace-hex; in color-value: {
base = color-value;
dark = f color-value dark;
darker = f color-value darker;
bright = f color-value bright;
brighter = f color-value brighter;
};
# ccolor = builtins.mapAttrs alter-set (builtins.fromJSON (builtins.readFile ./colors.json)); # ccolor = builtins.mapAttrs alter-set (builtins.fromJSON (builtins.readFile ./colors.json));
ccolor = builtins.mapAttrs alter-set { ccolor = builtins.mapAttrs alter-set {
black = "#040404"; # "#111111" "#001100"; black = "#040404"; # "#111111" "#001100";
@@ -40,14 +26,13 @@ pkgs: rec {
fbcolor = (builtins.fromJSON (builtins.readFile ./colors.json)).base; fbcolor = (builtins.fromJSON (builtins.readFile ./colors.json)).base;
fcolor = facolor // fbcolor; fcolor = facolor // fbcolor;
xcolor = with ccolor; with fcolor; { xcolor = with ccolor; with fcolor; {
# background = "#000000"; background = "#000000";
# foreground = "#dddddd"; # foreground = "#dddddd";
# accent = blue; # accent = blue;
# secondary = cyan; # secondary = cyan;
# tertiary = magenta; # tertiary = magenta;
# special = yellow; # special = yellow;
# weird = green; # weird = green;
subtle = { darker = "#111111"; dark = "#444444"; base = "#777777"; bright = "#999999"; brighter = "#cccccc"; };
positive = alter "#00dd00"; positive = alter "#00dd00";
negative = alter "#dd0000"; negative = alter "#dd0000";
border = accent.base; border = accent.base;
@@ -55,10 +40,9 @@ pkgs: rec {
}; };
in ccolor // fcolor // xcolor; in ccolor // fcolor // xcolor;
font = { font = {
code = rec { code = {
name = "JetBrainsMono Nerd Font"; name = "JetBrainsMono Nerd Font";
package = pkgs.nerd-fonts.jetbrains-mono; package = pkgs.nerd-fonts.jetbrains-mono;
regular-path = "${package}/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFont-Regular.ttf";
}; };
base = { base = {
# name = "NewComputerModern08"; # name = "NewComputerModern08";

372
flake.lock generated
View File

@@ -20,11 +20,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760101617, "lastModified": 1753216019,
"narHash": "sha256-8jf/3ZCi+B7zYpIyV04+3wm72BD7Z801IlOzsOACR7I=", "narHash": "sha256-zik7WISrR1ks2l6T1MZqZHb/OqroHdJnSnAehkE0kCk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "1826a9923881320306231b1c2090379ebf9fa4f8", "rev": "be166e11d86ba4186db93e10c54a141058bdce49",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -39,11 +39,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1761517857, "lastModified": 1755988415,
"narHash": "sha256-1xYv73nGA+Lm/hKRqjiUyuBzabaRwmeDxBCIMve5CWU=", "narHash": "sha256-QveKdwB5ACKS1+qNqYsaZrai3nasidjsiKslnk0F6os=",
"owner": "9001", "owner": "9001",
"repo": "copyparty", "repo": "copyparty",
"rev": "e9ab040ce8e72e299a3d8fbd109865b1e218eb57", "rev": "68503444c7d6f6f7fc6f5a41258cabf50568a9ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -153,7 +153,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1731533236, "lastModified": 1731533236,
@@ -220,11 +220,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758463745, "lastModified": 1755928099,
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", "narHash": "sha256-OILVkfhRCm8u18IZ2DKR8gz8CVZM2ZcJmQBXmjFLIfk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", "rev": "4a44fb9f7555da362af9d499817084f4288a957f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -234,27 +234,6 @@
"type": "github" "type": "github"
} }
}, },
"home-manager24": {
"inputs": {
"nixpkgs": [
"nixpkgs24"
]
},
"locked": {
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@@ -300,11 +279,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760445448, "lastModified": 1754305013,
"narHash": "sha256-fXGjL6dw31FPFRrmIemzGiNSlfvEJTJNsmadZi+qNhI=", "narHash": "sha256-u+M2f0Xf1lVHzIPQ7DsNCDkM1NYxykOSsRr4t3TbSM4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprgraphics", "repo": "hyprgraphics",
"rev": "50fb9f069219f338a11cf0bcccb9e58357d67757", "rev": "4c1d63a0f22135db123fc789f174b89544c6ec2d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -329,11 +308,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1761249114, "lastModified": 1756022257,
"narHash": "sha256-KDy8Vtlwe+7Z053HtD4fCRqlHBt0Kils0Zea4D77R7o=", "narHash": "sha256-2ABxsC0wvS6aYQz97CBvrmxUOEXWFvKQfs4e05Rvt5o=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "aa5a239ac92a6bd6947cce2ca3911606df392cb6", "rev": "ced38b1b0f46f9fbdf9d37644d27bdbd2a29af1d",
"revCount": 6522, "revCount": 6391,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -361,11 +340,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761653710, "lastModified": 1755183521,
"narHash": "sha256-MhHSU9m/9HSckJ61OXcom/6F92NQf3s1QfLbRUApalc=", "narHash": "sha256-wrP8TM2lb2x0+PyTc7Uc3yfVBeIlYW7+hFeG14N9Cr8=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-plugins", "repo": "hyprland-plugins",
"rev": "e689220b1740aa99ca67fa06055792f82fa9ed85", "rev": "c1ddebb423acc7c88653c04de5ddafee64dac89a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -386,11 +365,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1759610243, "lastModified": 1749046714,
"narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", "narHash": "sha256-kymV5FMnddYGI+UjwIw8ceDjdeg7ToDVjbHCvUlhn14=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", "rev": "613878cb6f459c5e323aaafe1e6f388ac8a36330",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -454,11 +433,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1759080228, "lastModified": 1753819801,
"narHash": "sha256-RgDoAja0T1hnF0pTc56xPfLfFOO8Utol2iITwYbUhTk=", "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-qtutils", "repo": "hyprland-qtutils",
"rev": "629b15c19fa4082e4ce6be09fdb89e8c3312aed7", "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -483,11 +462,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1758927902, "lastModified": 1753622892,
"narHash": "sha256-LZgMds7M94+vuMql2bERQ6LiFFdhgsEFezE4Vn+Ys3A=", "narHash": "sha256-0K+A+gmOI8IklSg5It1nyRNv0kCNL51duwnhUO/B8JA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "4dafa28d4f79877d67a7d1a654cddccf8ebf15da", "rev": "23f0debd2003f17bd65f851cd3f930cff8a8c809",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -496,6 +475,27 @@
"type": "github" "type": "github"
} }
}, },
"hyprspace": {
"inputs": {
"hyprland": [
"hyprland"
],
"systems": "systems_2"
},
"locked": {
"lastModified": 1754887838,
"narHash": "sha256-npC+H+Wl60EdrV75sjqm+bbbLbKgCCGn4ALSM0B2OWA=",
"owner": "KZDKM",
"repo": "Hyprspace",
"rev": "2b61fd2115262243b03aa9afe8dfd8a78e71636c",
"type": "github"
},
"original": {
"owner": "KZDKM",
"repo": "Hyprspace",
"type": "github"
}
},
"hyprutils": { "hyprutils": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -508,11 +508,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1759619523, "lastModified": 1754481650,
"narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=", "narHash": "sha256-6u6HdEFJh5gY6VfyMQbhP7zDdVcqOrCDTkbiHJmAtMI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef", "rev": "df6b8820c4a0835d83d0c7c7be86fbc555f1f7fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -533,11 +533,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1755184602, "lastModified": 1751897909,
"narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=", "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d", "rev": "fcca0c61f988a9d092cbb33e906775014c61579d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -570,68 +570,17 @@
"type": "github" "type": "github"
} }
}, },
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
],
"nmd": "nmd",
"nmt": "nmt"
},
"locked": {
"lastModified": 1705252799,
"narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "2de39dedd79aab14c01b9e2934842051a160ffa5",
"type": "github"
},
"original": {
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"type": "github"
}
},
"nix-on-droid": {
"inputs": {
"home-manager": [
"home-manager24"
],
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"nixpkgs24"
],
"nixpkgs-docs": "nixpkgs-docs",
"nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap",
"nmd": "nmd_2"
},
"locked": {
"lastModified": 1720396533,
"narHash": "sha256-UFzk/hZWO1VkciIO5UPaSpJN8s765wsngUSvtJM6d5Q=",
"owner": "nix-community",
"repo": "nix-on-droid",
"rev": "f3d3b8294039f2f9a8fb7ea82c320f29c6b0fe25",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"repo": "nix-on-droid",
"type": "github"
}
},
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_3",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1761563673, "lastModified": 1755261305,
"narHash": "sha256-d+1TpVAmRjcNBfjZsh2yQSdwUfN7Xgz1blJ185g73+A=", "narHash": "sha256-EOqCupB5X5WoGVHVcfOZcqy0SbKWNuY3kq+lj1wHdu8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "a518cf710e5ebb935518dc7ac98e07e7ee5014c3", "rev": "203a7b463f307c60026136dd1191d9001c43457f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -656,45 +605,13 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs-docs": {
"locked": {
"lastModified": 1705957679,
"narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9a333eaa80901efe01df07eade2c16d183761fa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-for-bootstrap": {
"locked": {
"lastModified": 1720244366,
"narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40",
"type": "github"
}
},
"nixpkgs-latest": { "nixpkgs-latest": {
"locked": { "locked": {
"lastModified": 1761810199, "lastModified": 1756040103,
"narHash": "sha256-iMLB/90mK7lncjk3GVYlAmN1K+D6/7JVhOSau3O7eK0=", "narHash": "sha256-tyRpc3rv2YEWfDrE/Pq3ujpGERfs7JCwcwuAWH50gXk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d03f6e8ae73c291f8088abf52ae378c448a2cce3", "rev": "09340442016bf3b9688e659d598ac8077a08eb42",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -722,11 +639,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1761672384, "lastModified": 1755615617,
"narHash": "sha256-o9KF3DJL7g7iYMZq9SWgfS1BFlNbsm6xplRjVlOCkXI=", "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "08dacfca559e1d7da38f3cf05f1f45ee9bfd213c", "rev": "20075955deac2583bb12f07151c2df830ef346b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -735,29 +652,13 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs24": {
"locked": {
"lastModified": 1735563628,
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1761114652, "lastModified": 1754725699,
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -785,11 +686,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1761373498, "lastModified": 1754725699,
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=", "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce", "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -801,11 +702,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1761468971, "lastModified": 1755922037,
"narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=", "narHash": "sha256-wY1+2JPH0ZZC4BQefoZw/k+3+DowFyfOxv17CN/idKs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "78e34d1667d32d8a0ffc3eba4591ff256e80576e", "rev": "b1b3291469652d5a2edb0becc4ef0246fff97a7c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -816,11 +717,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1756288264, "lastModified": 1752596105,
"narHash": "sha256-Om8adB1lfkU7D33VpR+/haZ2gI5r3Q+ZbIPzE5sYnwE=", "narHash": "sha256-lFNVsu/mHLq3q11MuGkMhUUoSXEdQjCHvpReaGP1S2k=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ddd1826f294a0ee5fdc198ab72c8306a0ea73aa9", "rev": "dab3a6e781554f965bde3def0aa2fda4eb8f1708",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -830,60 +731,6 @@
"type": "github" "type": "github"
} }
}, },
"nmd": {
"flake": false,
"locked": {
"lastModified": 1666190571,
"narHash": "sha256-Z1hc7M9X6L+H83o9vOprijpzhTfOBjd0KmUTnpHAVjA=",
"owner": "rycee",
"repo": "nmd",
"rev": "b75d312b4f33bd3294cd8ae5c2ca8c6da2afc169",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmd",
"type": "gitlab"
}
},
"nmd_2": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs-docs"
],
"scss-reset": "scss-reset"
},
"locked": {
"lastModified": 1705050560,
"narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=",
"owner": "~rycee",
"repo": "nmd",
"rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3",
"type": "sourcehut"
},
"original": {
"owner": "~rycee",
"repo": "nmd",
"type": "sourcehut"
}
},
"nmt": {
"flake": false,
"locked": {
"lastModified": 1648075362,
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
"owner": "rycee",
"repo": "nmt",
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
"type": "gitlab"
},
"original": {
"owner": "rycee",
"repo": "nmt",
"type": "gitlab"
}
},
"pre-commit-hooks": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@@ -894,11 +741,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760663237, "lastModified": 1754416808,
"narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=", "narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37", "rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -938,16 +785,14 @@
"inputs": { "inputs": {
"copyparty": "copyparty", "copyparty": "copyparty",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager24": "home-manager24",
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins", "hyprland-plugins": "hyprland-plugins",
"hyprspace": "hyprspace",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nix-on-droid": "nix-on-droid",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-latest": "nixpkgs-latest", "nixpkgs-latest": "nixpkgs-latest",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixpkgs24": "nixpkgs24",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"yazi": "yazi" "yazi": "yazi"
} }
@@ -981,11 +826,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1756348497, "lastModified": 1752633862,
"narHash": "sha256-xJp3VnoYh4kpsaKFO/7SsGbwOz7pI1ZmjbqpXEuR2cw=", "narHash": "sha256-Bj7ozT1+5P7NmvDcuAXJvj56txcXuAhk3Vd9FdWFQzk=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "0adf92c70d23fb4f703aea5d3ebb51ac65994f7f", "rev": "8668ca94858206ac3db0860a9dec471de0d995f8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -994,22 +839,6 @@
"type": "github" "type": "github"
} }
}, },
"scss-reset": {
"flake": false,
"locked": {
"lastModified": 1631450058,
"narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=",
"owner": "andreymatin",
"repo": "scss-reset",
"rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91",
"type": "github"
},
"original": {
"owner": "andreymatin",
"repo": "scss-reset",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1017,11 +846,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760998189, "lastModified": 1754988908,
"narHash": "sha256-ee2e1/AeGL5X8oy/HXsZQvZnae6XfEVdstGopKucYLY=", "narHash": "sha256-t+voe2961vCgrzPFtZxha0/kmFSHFobzF00sT8p9h0U=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "5a7d18b5c55642df5c432aadb757140edfeb70b3", "rev": "3223c7a92724b5d804e9988c6b447a0d09017d48",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1046,6 +875,21 @@
} }
}, },
"systems_2": { "systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -1088,11 +932,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1760713634, "lastModified": 1753633878,
"narHash": "sha256-5HXelmz2x/uO26lvW7MudnadbAfoBnve4tRBiDVLtOM=", "narHash": "sha256-js2sLRtsOUA/aT10OCDaTjO80yplqwOIaLUqEe0nMx0=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "753bbbdf6a052994da94062e5b753288cef28dfb", "rev": "371b96bd11ad2006ed4f21229dbd1be69bed3e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1108,11 +952,11 @@
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1761655046, "lastModified": 1755961571,
"narHash": "sha256-lG7eQqs8HDmmOl6vFkJ1iDlQBR+jY30uD4YtvWulCZc=", "narHash": "sha256-PZ/5FT98cHeUBt7k3nnNmiYbuO6kf7vB1DA8ieAmYpw=",
"owner": "sxyazi", "owner": "sxyazi",
"repo": "yazi", "repo": "yazi",
"rev": "564b8851961a7545a93ebf04c0f8dd5778d0eccb", "rev": "c27ef58116794de7f559bca74e60e6e13ae92051",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -2,44 +2,23 @@
description = "Multisystem NixOS Flake of Lennart J. Kurzweg"; description = "Multisystem NixOS Flake of Lennart J. Kurzweg";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-25.05"; nixpkgs = { url = "nixpkgs/nixos-25.05"; };
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
nixpkgs-latest.url = "github:nixos/nixpkgs?ref=master"; nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
nixpkgs24.url = "github:NixOS/nixpkgs/nixos-24.05";
home-manager = { home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; };
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager24 ={
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs24";
};
nix-on-droid = { nixos-wsl = { url = "github:nix-community/NixOS-WSL/main"; };
url = "github:nix-community/nix-on-droid/release-24.05";
inputs.nixpkgs.follows = "nixpkgs24";
inputs.home-manager.follows = "home-manager24";
};
nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.2"; };
sops-nix ={ hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; };
url = "github:Mic92/sops-nix"; hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
inputs.nixpkgs.follows = "nixpkgs"; hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; };
};
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2"; yazi = { url = "github:sxyazi/yazi"; };
copyparty = { url = "github:9001/copyparty"; };
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
yazi.url = "github:sxyazi/yazi";
copyparty.url = "github:9001/copyparty";
}; };
outputs = { ... }@inputs: with inputs; let outputs = { ... }@inputs: with inputs; let
@@ -49,19 +28,20 @@
config = { allowUnfreePredicate = pkg: builtins.elem (simple-pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; config = { allowUnfreePredicate = pkg: builtins.elem (simple-pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
hyper-base = rec { hyper-base = rec {
system = "x86_64-linux"; inherit system;
user = "nx2"; user = "nx2";
domain = "nx2.site"; domain = "nx2.site";
home = "/home/${user}"; home = "/home/${user}/";
webroot = "/var/lib/hugo/nx2site/public"; webroot = "/var/lib/hugo/nx2site/public";
pkgs-version = "25.05";
}; };
get-pkgs = { host, system?system, nixpkgs?inputs.nixpkgs, version?"25.05" }: import nixpkgs { my-pkgs = host: import nixpkgs {
inherit system config; inherit system config;
overlays = [(final: prev: { overlays = [(final: prev: {
unstable = import nixpkgs-unstable { inherit system config; }; unstable = import nixpkgs-unstable { inherit system config; };
latest = import nixpkgs-latest { inherit system config; }; latest = import nixpkgs-latest { inherit system config; };
inherit version; version = "25.05";
})] ++ (if host == "NxACE" then [ })] ++ (if host == "NxACE" then [
copyparty.overlays.default copyparty.overlays.default
] else []); ] else []);
@@ -73,58 +53,36 @@
in { in {
nixosConfigurations = let nixosConfigurations = let
make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem { make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem {
pkgs = get-pkgs { inherit host; }; pkgs = my-pkgs host;
modules = [ ./configuration.nix ]; modules = [ ./configuration.nix ];
specialArgs = let specialArgs = let
hyper = hyper-base // { inherit host; nvidia = (nvidia-base // nvidia-settings); }; hyper = hyper-base // { inherit host; nvidia = (nvidia-base // nvidia-settings); };
in { inherit inputs hyper rice secrets; }; in { inherit inputs hyper rice secrets; };
}; };
make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem { make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem {
pkgs = get-pkgs { inherit host; }; pkgs = my-pkgs host;
modules = [ ./wsl.nix ]; modules = [ ./nixos-wsl.nix ];
specialArgs = let specialArgs = let
hyper = hyper-base // { inherit host; }; hyper = hyper-base // { inherit host; };
rice = import ./flake-modules/rice.nix pkgs;
in { inherit inputs hyper rice; }; in { inherit inputs hyper rice; };
}; };
in { in {
NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; }; NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; };
NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; }; NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; };
NxACE = make-nixos-system "NxACE" { enable = false; }; NxACE = make-nixos-system "NxACE" { enable = false; };
NxDCS = make-nixos-wsl-system "NxDCS"; NxWSL = make-nixos-wsl-system "NxWSL";
}; };
nixOnDroidConfigurations = let
makeNODConfiguration = host: nix-on-droid.lib.nixOnDroidConfiguration rec {
pkgs = let
options = { inherit host; system = "aarch64-linux"; };
in (get-pkgs options) //
(get-pkgs (options // { version = "24.05"; nixpkgs = nixpkgs24; } )
);
modules = [ ./nod.nix ];
home-manager-path = home-manager24.outPath;
extraSpecialArgs = let
hyper = hyper-base // {
inherit host;
system = "aarch64-linux";
user = "nix-on-droid";
home = "/data/data/com.termux.nix/files/home";
};
rice = import ./flake-modules/rice.nix pkgs;
in { inherit inputs hyper rice; };
};
in { NxS23U = makeNODConfiguration "NxS23U"; };
homeConfigurations = let homeConfigurations = let
make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration { make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration {
pkgs = get-pkgs { inherit host; }; pkgs = my-pkgs host;
modules = [ ./home.nix ]; modules = [ ./home.nix ];
extraSpecialArgs = let extraSpecialArgs = let
hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; }; hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; };
in { inherit inputs hyper rice secrets; }; in { inherit inputs hyper rice secrets; };
}; };
make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration { make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration {
pkgs = get-pkgs { inherit host; }; pkgs = my-pkgs host;
modules = [ ./shell-only.nix ]; modules = [ ./shell-only.nix ];
extraSpecialArgs = let extraSpecialArgs = let
hyper = hyper-base // { inherit host; }; hyper = hyper-base // { inherit host; };
@@ -135,7 +93,7 @@
"${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; }; "${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; };
"${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; }; "${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; };
"${hyper-base.user}@NxDCS" = make-shell-configuration "NxDCS" hyper-base.user; "${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user;
}; };
}; };
} }

Binary file not shown.

View File

@@ -2,125 +2,4 @@
sops.secrets = { sops.secrets = {
"nx2site/radicale/password" = { }; "nx2site/radicale/password" = { };
}; };
home.packages = [
(pkgs.writers.writePython3Bin "caldav_event" {
libraries = with pkgs.python3Packages; [ caldav ics pytz ];
flakeIgnore = [ "E302" "E305" "E501" "E261" ];
} /* python */ ''
import os
import json
from caldav import DAVClient
from datetime import datetime, timezone
from ics import Calendar
from pytz import UTC
def get_password(password_file):
with open(password_file, "r") as file:
return file.read().strip()
def datetime_converter(obj):
if isinstance(obj, datetime):
return obj.isoformat()
return obj
def datetime_parser(dct):
for key, value in dct.items():
if isinstance(value, str):
try:
dct[key] = datetime.fromisoformat(value)
except ValueError:
pass
return dct
def load_cache(cache_file):
if os.path.exists(cache_file):
with open(cache_file, "r") as file:
return json.load(file, object_hook=datetime_parser)
return None
def save_cache(cache_file, data):
with open(cache_file, "w") as file:
json.dump(data, file, default=datetime_converter, indent=4)
def get_ongoing_or_next_event(url, username, password):
now = datetime.now(timezone.utc)
try:
client = DAVClient(url, username=username, password=password)
principal = client.principal()
calendars = principal.calendars()
next_event_dict = {
'event_name': "fake",
'event_begin': datetime(9000, 1, 1, tzinfo=UTC), # in the year 9000
'event_end': datetime(9000, 1, 1, 8, tzinfo=UTC),
}
for calendar in calendars:
for event in calendar.search(start=now):
calendar_parsed = Calendar(event.data)
for ics_event in calendar_parsed.events:
event_dict = {}
event_dict['event_name'] = ics_event.name or "(No Title)"
event_dict['event_begin'] = ics_event.begin.astimezone(timezone.utc)
event_dict['event_end'] = ics_event.end.astimezone(timezone.utc)
if event_dict['event_begin'] <= now and now <= event_dict['event_end']:
return event_dict
elif event_dict['event_begin'] >= now and next_event_dict['event_begin'] > event_dict['event_begin']:
next_event_dict = event_dict
return next_event_dict
except Exception as e:
print(f"Error accessing {url}: {e}")
return None
def is_expired(event_dict: dict):
now = datetime.now(timezone.utc).timestamp()
event_end = event_dict['event_end'].timestamp()
return not (now <= event_end)
if __name__ == "__main__":
password_file = "${config.sops.secrets."nx2site/radicale/password".path}" # Path to password file
cache_file = "/tmp/caldav_event_cache.json" # Path to cache file
url = "https://dav.${hyper.domain}/"
username = "nx2"
password = get_password(password_file)
now = datetime.now(timezone.utc).timestamp()
event_dict = load_cache(cache_file)
if (event_dict is None) or (is_expired(event_dict)):
event_dict = get_ongoing_or_next_event(url, username, password)
save_cache(cache_file, event_dict)
if event_dict is None: # none were found
print("* zen *")
exit(0)
event_start = event_dict['event_begin'].timestamp()
event_end = event_dict['event_end'].timestamp()
if event_start <= now <= event_end: # is currently ongoing
action_string = "ends"
t = event_end - now # time_remaining
else: # is in the future
action_string = "starts"
t = event_start - now # time_remaining
hours, rem = divmod(int(t), 3600)
minutes, _ = divmod(rem, 60)
hour_string = f"{hours} hour{'s ' if hours != 1 else ' '}" if hours > 0 else ""
minu_string = f"{minutes} minute{'s ' if minutes != 1 else ' '}" if minutes > 0 else ""
if hour_string == "" and minu_string == "":
time_string = "now"
elif hour_string == "" or minu_string == "":
time_string = "in " + hour_string + minu_string
else:
time_string = "in " + hour_string + "and " + minu_string
print(f"\'{event_dict['event_name']}\' {action_string} {time_string}")
'')
];
} }

View File

@@ -1,8 +1,7 @@
{ pkgs, ... }: let { pkgs, ... }@all: with all; {
sep = " "; home.packages = with pkgs; [
in {
home.packages = [ (pkgs.writeShellApplication { name = "cclock"; text = /*bash*/ ''
(pkgs.writeShellApplication { name = "cclock"; text = /* bash */ ''
ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}') ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}')
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
echo "󰃮${sep}$(date +'%A the')" "$ord" "of" "$(date +'%B')" " ${sep}$(date +'%R')" echo "󰃮${sep}$(date +'%A the')" "$ord" "of" "$(date +'%B')" " ${sep}$(date +'%R')"
@@ -10,5 +9,125 @@ in {
echo "$(date +'%A the')" "$ord" "of" "$(date +'%B')" "$(date +'%R')" echo "$(date +'%A the')" "$ord" "of" "$(date +'%B')" "$(date +'%R')"
fi fi
'';}) '';})
];
(pkgs.writers.writePython3Bin "caldav_event" {
libraries = with pkgs.python3Packages; [ caldav ics pytz ];
flakeIgnore = [ "E302" "E305" "E501" "E261" ];
} /* python */ ''
import os
import json
from caldav import DAVClient
from datetime import datetime, timezone
from ics import Calendar
from pytz import UTC
def get_password(password_file):
with open(password_file, "r") as file:
return file.read().strip()
def datetime_converter(obj):
if isinstance(obj, datetime):
return obj.isoformat()
return obj
def datetime_parser(dct):
for key, value in dct.items():
if isinstance(value, str):
try:
dct[key] = datetime.fromisoformat(value)
except ValueError:
pass
return dct
def load_cache(cache_file):
if os.path.exists(cache_file):
with open(cache_file, "r") as file:
return json.load(file, object_hook=datetime_parser)
return None
def save_cache(cache_file, data):
with open(cache_file, "w") as file:
json.dump(data, file, default=datetime_converter, indent=4)
def get_ongoing_or_next_event(url, username, password):
now = datetime.now(timezone.utc)
try:
client = DAVClient(url, username=username, password=password)
principal = client.principal()
calendars = principal.calendars()
next_event_dict = {
'event_name': "fake",
'event_begin': datetime(9000, 1, 1, tzinfo=UTC), # in the year 9000
'event_end': datetime(9000, 1, 1, 8, tzinfo=UTC),
}
for calendar in calendars:
for event in calendar.search(start=now):
calendar_parsed = Calendar(event.data)
for ics_event in calendar_parsed.events:
event_dict = {}
event_dict['event_name'] = ics_event.name or "(No Title)"
event_dict['event_begin'] = ics_event.begin.astimezone(timezone.utc)
event_dict['event_end'] = ics_event.end.astimezone(timezone.utc)
if event_dict['event_begin'] <= now and now <= event_dict['event_end']:
return event_dict
elif event_dict['event_begin'] >= now and next_event_dict['event_begin'] > event_dict['event_begin']:
next_event_dict = event_dict
return next_event_dict
except Exception as e:
print(f"Error accessing {url}: {e}")
return None
def is_expired(event_dict: dict):
now = datetime.now(timezone.utc).timestamp()
event_end = event_dict['event_end'].timestamp()
return not (now <= event_end)
if __name__ == "__main__":
password_file = "${config.sops.secrets."nx2site/radicale/password".path}" # Path to password file
cache_file = "/tmp/caldav_event_cache.json" # Path to cache file
url = "https://dav.${hyper.domain}/"
username = "nx2"
password = get_password(password_file)
now = datetime.now(timezone.utc).timestamp()
event_dict = load_cache(cache_file)
if (event_dict is None) or (is_expired(event_dict)):
event_dict = get_ongoing_or_next_event(url, username, password)
save_cache(cache_file, event_dict)
if event_dict is None: # none were found
print("* zen *")
exit(0)
event_start = event_dict['event_begin'].timestamp()
event_end = event_dict['event_end'].timestamp()
if event_start <= now <= event_end: # is currently ongoing
action_string = "ends"
t = event_end - now # time_remaining
else: # is in the future
action_string = "starts"
t = event_start - now # time_remaining
hours, rem = divmod(int(t), 3600)
minutes, _ = divmod(rem, 60)
hour_string = f"{hours} hour{'s ' if hours != 1 else ' '}" if hours > 0 else ""
minu_string = f"{minutes} minute{'s ' if minutes != 1 else ' '}" if minutes > 0 else ""
if hour_string == "" and minu_string == "":
time_string = "now"
elif hour_string == "" or minu_string == "":
time_string = "in " + hour_string + minu_string
else:
time_string = "in " + hour_string + "and " + minu_string
print(f"{event_dict['event_name']} {action_string} {time_string}")
'')
]
} }

View File

@@ -2,7 +2,7 @@
xdg.configFile = { xdg.configFile = {
"hyprpanel/modules.scss".text = with rice.color; /* scss */ '' "hyprpanel/modules.scss".text = with rice.color; /* scss */ ''
@include styleModule('cmodule-cclock', ( @include styleModule('cmodule-cclock', (
'text-color': ${accent.base}, 'text-color': #${accent.base},
/* 'icon-color': , */ /* 'icon-color': , */
/* 'icon-background': , */ /* 'icon-background': , */
/* 'label-background': #242438, */ /* 'label-background': #242438, */
@@ -12,26 +12,9 @@
/* 'icon-size': 1.2em */ /* 'icon-size': 1.2em */
)); ));
@include styleModule('cmodule-caldav_event', ( @include styleModule('cmodule-caldav_event', (
'text-color': ${accent.base}, 'text-color': #${accent.base},
)); ));
''; '';
"hyprpanel/modules.json".text = builtins.toJSON {
"custom/cclock" = {
execute = "cclock";
executeOnAction = "";
label = "{}";
interval = 60000;
hideOnEmpty = true;
actions.onLeftClick = "menu:calendar";
};
"custom/caldav_event" = {
execute = "caldav_event";
label = "󰃰 {}";
interval = 60000;
hideOnEmpty = false;
actions = {};
};
};
}; };
programs.hyprpanel = { programs.hyprpanel = {
enable = true; enable = true;
@@ -47,16 +30,16 @@
# "cpu" # "cpu"
# "cputemp" # "cputemp"
# "ram" # "ram"
(pkgs.lib.mkIf (hyper.host == "NxXPS") "battery") "battery"
# "bluetooth" # "bluetooth"
"network" "network"
"windowtitle" "windowtitle"
"media"
]; ];
"middle" = [ "workspaces" ]; "middle" = [ "workspaces" ];
"right" = [ "right" = [
"submap" "submap"
"custom/caldav_event" "custom/caldav_event"
"media"
"custom/cclock" "custom/cclock"
"notifications" "notifications"
"systray" "systray"
@@ -66,18 +49,15 @@
"bar.bluetooth.label" = true; "bar.bluetooth.label" = true;
"bar.customModules.submap.disabledIcon" = ""; "bar.customModules.submap.enabledIcon" = "[󰧹]";
"bar.customModules.submap.disabledText" = "";
"bar.customModules.submap.enabledIcon" = "";
"bar.customModules.submap.enabledText" = "[SUBMAP]";
"bar.customModules.submap.icon" = false;
"bar.customModules.submap.label" = true;
"bar.customModules.submap.showSubmapIcon" = false;
"bar.customModules.submap.showSubmapName" = false; "bar.customModules.submap.showSubmapName" = false;
"bar.customModules.submap.label" = false;
"bar.customModules.submap.icon" = true;
"bar.customModules.submap.disabledIcon" = "";
"bar.workspaces.applicationIconEmptyWorkspace" = ""; "bar.workspaces.applicationIconEmptyWorkspace" = "";
"bar.workspaces.applicationIconOncePerWorkspace" = false; "bar.workspaces.applicationIconOncePerWorkspace" = false;
"bar.workspaces.numbered_active_indicator" = "color"; "bar.workspaces.numbered_active_indicator" = "underline";
"bar.workspaces.scroll_speed" = 1; "bar.workspaces.scroll_speed" = 1;
"bar.workspaces.showAllActive" = false; "bar.workspaces.showAllActive" = false;
"bar.workspaces.showApplicationIcons" = true; "bar.workspaces.showApplicationIcons" = true;
@@ -261,11 +241,10 @@
"theme.bar.buttons.workspaces.background" = background; "theme.bar.buttons.workspaces.background" = background;
"theme.bar.buttons.workspaces.border" = accent.base; "theme.bar.buttons.workspaces.border" = accent.base;
"theme.bar.buttons.workspaces.hover" = foreground; "theme.bar.buttons.workspaces.hover" = foreground;
"theme.bar.buttons.workspaces.numbered_active_highlighted" = accent.base; "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.base;
"theme.bar.buttons.workspaces.numbered_active_highlighted_text_color" = accent.dark; "theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.2em";
"theme.bar.buttons.workspaces.numbered_active_highlight_padding" = "0.4em";
"theme.bar.buttons.workspaces.numbered_active_underline_color" = accent.bright; "theme.bar.buttons.workspaces.numbered_active_underline_color" = accent.bright;
"theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.4em"; "theme.bar.buttons.workspaces.numbered_inactive_padding" = "0.2em";
"theme.bar.buttons.workspaces.occupied" = secondary.base; "theme.bar.buttons.workspaces.occupied" = secondary.base;
"theme.bar.buttons.workspaces.pill.width" = "4em"; "theme.bar.buttons.workspaces.pill.width" = "4em";
"theme.bar.buttons.workspaces.smartHighlight" = true; "theme.bar.buttons.workspaces.smartHighlight" = true;
@@ -425,8 +404,8 @@
"theme.bar.menus.menu.notifications.label" = accent.base; "theme.bar.menus.menu.notifications.label" = accent.base;
"theme.bar.menus.menu.notifications.no_notifications_label" = accent.base; "theme.bar.menus.menu.notifications.no_notifications_label" = accent.base;
"theme.bar.menus.menu.notifications.pager.background" = background; "theme.bar.menus.menu.notifications.pager.background" = background;
"theme.bar.menus.menu.notifications.pager.button" = accent.base; "theme.bar.menus.menu.notifications.pager.button" = accent.dark;
"theme.bar.menus.menu.notifications.pager.label" = accent.bright; "theme.bar.menus.menu.notifications.pager.label" = accent.base;
"theme.bar.menus.menu.notifications.scrollbar.color" = accent.base; "theme.bar.menus.menu.notifications.scrollbar.color" = accent.base;
"theme.bar.menus.menu.notifications.switch.disabled" = accent.base; "theme.bar.menus.menu.notifications.switch.disabled" = accent.base;
"theme.bar.menus.menu.notifications.switch_divider" = accent.base; "theme.bar.menus.menu.notifications.switch_divider" = accent.base;
@@ -492,12 +471,12 @@
"theme.notification.actions.background" = background; "theme.notification.actions.background" = background;
"theme.notification.actions.text" = foreground; "theme.notification.actions.text" = foreground;
"theme.notification.background" = background; "theme.notification.background" = background;
"theme.notification.border" = border; "theme.notification.border" = accent.base;
"theme.notification.close_button.background" = accent.dark; "theme.notification.close_button.background" = accent.dark;
"theme.notification.close_button.label" = accent.base; "theme.notification.close_button.label" = accent.base;
"theme.notification.label" = accent.bright; "theme.notification.label" = accent.base;
"theme.notification.labelicon" = accent.base; "theme.notification.labelicon" = accent.base;
"theme.notification.opacity" = 100; "theme.notification.opacity" = 1.0;
"theme.notification.text" = foreground; "theme.notification.text" = foreground;
"theme.notification.time" = accent.base; "theme.notification.time" = accent.base;

View File

@@ -1,37 +1,38 @@
{ pkgs, ... }: { { pkgs, ... }@all: with all; {
home.packages = [ home.packages = with pkgs; [
(pkgs.writeShellApplication { name = "submap_indicator"; text = /*bash*/ ''
print_help() { (pkgs.writeShellApplication { name = "submap_indicator"; text = /*bash*/ ''
echo "Usage: submap_indicator {set <string>|unset}" print_help() {
} echo "Usage: submap_indicator {set <string>|unset}"
if [ $# -lt 1 ]; then }
print_help; exit 1; if [ $# -lt 1 ]; then
fi print_help; exit 1;
case "$1" in fi
set) case "$1" in
# Check if there is a second argument for the 'set' operation set)
if [ $# -eq 2 ]; then # Check if there is a second argument for the 'set' operation
echo "$2" > /tmp/submap-indictor if [ $# -eq 2 ]; then
pkill -RTMIN+8 waybar echo "$2" > /tmp/submap-indictor
pkill -RTMIN+8 hyprpanel pkill -RTMIN+8 waybar
else pkill -RTMIN+8 hyprpanel
echo "Error: 'set' operation requires exactly one string argument." else
print_help echo "Error: 'set' operation requires exactly one string argument."
exit 1 print_help
fi exit 1
;; fi
unset) ;;
echo "" > /tmp/submap-indictor unset)
pkill -RTMIN+8 waybar echo "" > /tmp/submap-indictor
pkill -RTMIN+8 hyprpanel pkill -RTMIN+8 waybar
;; pkill -RTMIN+8 hyprpanel
*) ;;
echo "Error: Unknown command '$1'" *)
print_help echo "Error: Unknown command '$1'"
exit 1 print_help
;; exit 1
esac ;;
exit 0 esac
'';}) exit 0
]; '';})
]
} }

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }@all: with all; let { pkgs, ... }@all: with all; {
sep = " ";
in {
programs.waybar = { programs.waybar = {
enable = false; enable = false;
package = pkgs.waybar; package = pkgs.waybar;

View File

@@ -1,10 +1,6 @@
{ pkgs, ... }: { ... }:
{ {
programs.bash = let programs.bash = {
init = /* bash */ ''
source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
'';
in {
enable = true; enable = true;
shellAliases = { shellAliases = {
ll = "ls -l"; ll = "ls -l";
@@ -19,10 +15,5 @@
"checkjobs" "checkjobs"
]; ];
enableCompletion = false; enableCompletion = false;
};
} // pkgs.lib.mkIf (pkgs.version != "24.05") {
shellInit = init;
} // pkgs.lib.mkIf (pkgs.version != "25.05") {
profileExtra = init;
};
} }

View File

@@ -47,13 +47,6 @@
read-only = true; read-only = true;
type = "ics"; type = "ics";
} }
{
name = "Worlds";
url = "https://zlypher.github.io/lol-events/cal/league-of-legends-world-championship.ical";
color = "#A4C3DE";
read-only = true;
type = "ics";
}
{ {
name = "Feiertage Hessen"; name = "Feiertage Hessen";
url = "https://ics.tools/Feiertage/hessen.ics"; url = "https://ics.tools/Feiertage/hessen.ics";
@@ -61,6 +54,13 @@
read-only = true; read-only = true;
type = "ics"; type = "ics";
} }
# {
# name = "Handball Männer";
# url = "http://i.cal.to/ical/108/dhb/handball-nationalmannschaft/c687e97f.bc7c3eb6-11a0e356.ics";
# color = "#880023";
# read-only = true;
# type = "ics";
# }
]; ];
default_set = { default_set = {
# name = # name =

View File

@@ -6,7 +6,7 @@ let
# "asmongold" # "asmongold"
# "Caedrel" # "Caedrel"
# "EintrachtSpandau" # "EintrachtSpandau"
# "GamesDoneQuick" "GamesDoneQuick"
"Odoamne" "Odoamne"
"iwdominate" "iwdominate"
"imls" "imls"
@@ -20,13 +20,13 @@ let
"lol_nemesis" "lol_nemesis"
# "NASA" # "NASA"
"NoWay4u_Sir" "NoWay4u_Sir"
# "OfficialMikeShinoda" "OfficialMikeShinoda"
"Rekkles" "Rekkles"
"riotgames" "riotgames"
"thebausffs" "thebausffs"
"ThePrimeagen" "ThePrimeagen"
"Tolkin" "Tolkin"
"imperialhal__" # "TSM_ImperialHal"
"velja_lol" "velja_lol"
# "Xisuma" # "Xisuma"
"zackrawrr" "zackrawrr"
@@ -46,13 +46,13 @@ let
}; };
}; };
in { in {
# sops.secrets."streamlink/twitch-oauth" = { path = "%r/secrets/streamlink/twich-oauth"; }; sops.secrets."streamlink/twitch-oauth" = { path = "%r/secrets/streamlink/twich-oauth"; };
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
chatterino2 chatterino2
streamlink streamlink
# mpv mpv
]; ];
file = { file = {
".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; /* json */ '' ".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; /* json */ ''
@@ -207,7 +207,7 @@ in {
"external": { "external": {
"streamlink": { "streamlink": {
"quality": "", "quality": "",
"options": "--config ${hyper.home}/.config/streamlink/config" "options": "--config ${hyper.home}.config/streamlink/config"
} }
} }
} }

View File

@@ -3,30 +3,20 @@
home.file.".config/color-pallete.html".text = with rice.color; let home.file.".config/color-pallete.html".text = with rice.color; let
cb = color-set: color-name: size: /* html */ '' cb = color-set: color-name: size: /* html */ ''
<div class="color-container" style="border-color: ${color-set.base}"> <div class="color-container" style="border-color: ${color-set.base}">
<div class="color-box" style="background: ${color-set.darker}; height: ${builtins.toString size}px;">
<p style="color: ${color-set.bright}"> ${color-name}.darker </p>
<p sktyle="color: ${color-set.bright}"> ${color-set.darker} </p>
</div>
<div class="color-box" style="background: ${color-set.dark}; height: ${builtins.toString size}px;"> <div class="color-box" style="background: ${color-set.dark}; height: ${builtins.toString size}px;">
<p style="color: ${color-set.brighter}"> ${color-name}.dark </p> <p style="color: ${color-set.bright}"> ${color-name}.dark </p>
<p style="color: ${color-set.brighter}"> ${color-set.dark} </p> <p style="color: ${color-set.bright}"> ${color-set.dark} </p>
</div> </div>
<div class="color-box" style="background: ${color-set.base}; height: ${builtins.toString size}px;"> <div class="color-box" style="background: ${color-set.base}; height: ${builtins.toString size}px;">
<p class="dynamic-text"> ${color-name}.base </p> <p class="dynamic-text"> ${color-name}.base </p>
<p class="dynamic-text"> ${color-set.base} </p> <p class="dynamic-text"> ${color-set.base} </p>
</div> </div>
<div class="color-box" style="background: ${color-set.bright}; height: ${builtins.toString size}px;"> <div class="color-box" style="background: ${color-set.bright}; height: ${builtins.toString size}px;">
<p style="color: ${color-set.darker}"> ${color-name}.bright </p> <p style="color: ${color-set.dark}"> ${color-name}.bright </p>
<p style="color: ${color-set.darker}"> ${color-set.bright} </p> <p style="color: ${color-set.dark}"> ${color-set.bright} </p>
</div>
<div class="color-box" style="background: ${color-set.brighter}; height: ${builtins.toString size}px;">
<p style="color: ${color-set.dark}"> ${color-name}.brighter </p>
<p style="color: ${color-set.dark}"> ${color-set.brighter} </p>
</div> </div>
</div> </div>
''; '';
rgb = rice.lib.hex-to-rgb-comma-string;
s = builtins.toString;
in /* html */ '' in /* html */ ''
<!DOCTYPE html> <!DOCTYPE html>
<head> <head>
@@ -40,26 +30,27 @@
padding: 0px; padding: 0px;
} }
html { html {
background: transparent; background: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency});
padding: auto;
} }
body { body {
font-family: ${rice.font.base.name}; font-family: ${rice.font.base.name};
color: ${foreground}; color: ${foreground};
width: fit-content; width: fit-content;
margin: 10px auto 10px auto; margin: 10px auto 10px auto;
background: rgba(${rgb background},${s rice.transparency}); background: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency});
border: ${s rice.border-width}px solid ${border}; border: ${builtins.toString rice.border-width}px solid ${border};
border-radius: ${s rice.rounding}px; border-radius: ${builtins.toString rice.rounding}px;
padding: ${s rice.gap-size}px; padding: ${builtins.toString rice.gap-size}px;
} }
h1 { h1 {
margin: ${s rice.gap-size}px; margin: ${builtins.toString rice.gap-size}px;
} }
.color-container { .color-container {
font-family: ${rice.font.code.name}; font-family: ${rice.font.code.name};
display: flex; display: flex;
gap: ${s rice.gap-size}px; gap: ${builtins.toString rice.gap-size}px;
margin: ${s rice.gap-size}px; margin: ${builtins.toString rice.gap-size}px;
} }
.color-box { .color-box {
width: 200px; width: 200px;
@@ -67,7 +58,7 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: ${s rice.rounding}px; border-radius: ${builtins.toString rice.rounding}px;
} }
</style> </style>
</head> </head>
@@ -76,9 +67,8 @@
${cb accent "accent" 100} ${cb accent "accent" 100}
${cb secondary "secondary" 100} ${cb secondary "secondary" 100}
${cb tertiary "tertiary" 100} ${cb tertiary "tertiary" 100}
${cb weird "weird" 80} ${cb weird "weird" 100}
${cb special "special" 80} ${cb special "special" 100}
${cb subtle "subtle" 80}
<br> <br>
${cb positive "positive" 70} ${cb positive "positive" 70}
${cb negative "negative" 70} ${cb negative "negative" 70}

View File

@@ -1,4 +1,7 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
# browser.tabs.allow_transparent_browser
# https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/
{
programs.firefox.profiles."{hyper.user}".settings = { programs.firefox.profiles."{hyper.user}".settings = {
"widget.use-xdg-desktop-portal.file-picker" = 1; "widget.use-xdg-desktop-portal.file-picker" = 1;
}; };
@@ -6,11 +9,257 @@
packages = with pkgs; [ packages = with pkgs; [
firefox firefox
]; ];
file = { file = with rice.color; let
".mozilla/firefox/${hyper.user}/chrome/userChrome.css".text = import ./userChrome.nix rice; blur = builtins.toString 20;
".mozilla/firefox/${hyper.user}/chrome/userContent.css".text = import ./userContent.nix rice; in {
".mozilla/firefox/${hyper.user}/chrome/userChrome.css".text = /* css */ ''
:root{
/* Popup panels */
--arrowpanel-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--arrowpanel-border-color : ${border} !important;
--arrowpanel-color : ${secondary.base} !important;
--arrowpanel-dimmed : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important;
--arrowpanel-dimmed-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.6) !important;
--arrowpanel-dimmed-even-further : rgba(${rice.lib.hex-to-rgb-comma-string background},0.8) !important;
/* Autocomplete */
--autocomplete-popup-background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--autocomplete-popup-color : ${foreground} !important;
--autocomplete-popup-highlight-background: ${accent.base} !important;
--autocomplete-popup-highlight-color : ${foreground} !important;
/* Toolbar background */
--toolbar-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background},0.4) !important;
--toolbar-non-lwt-bgcolor : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--toolbar-non-lwt-bgimage : none !important;
--toolbar-color : ${foreground} !important;
/* Tabs */
--tab-selected-bgcolor : ${accent.base} !important;
--tabs-border-color : ${border} !important;
--tab-line-color : ${accent.base} !important;
--tab-loader-size : 16px !important;
/* Sidebar */
--lwt-sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--lwt-sidebar-text-color : ${foreground} !important;
--sidebar-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--sidebar-text-color : ${foreground} !important;
--sidebar-border-color : ${border} !important;
/* URL bar */
--urlbar-popup-url-color : ${foreground} !important;
--urlbar-popup-action-color : ${secondary.base} !important;
--toolbar-field-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--toolbar-field-focus-background-color : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--toolbar-field-color : ${accent.base} !important;
--toolbar-field-focus-color : ${foreground} !important;
--toolbar-field-focus-border-color : ${accent.base} !important;
/* Buttons */
--toolbarbutton-icon-fill : ${foreground} !important;
--toolbarbutton-hover-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.2) !important;
--toolbarbutton-active-background : rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.4) !important;
/* Notification and panel */
--panel-disabled-color : rgba(${rice.lib.hex-to-rgb-comma-string foreground},0.3) !important;
--panel-separator-color : ${border} !important;
/* New tab page */
--newtab-background-color : ${background} !important;
--newtab-background-color-secondary : ${background} !important;
--newtab-text-primary-color : ${foreground} !important;
--newtab-text-secondary-color : ${secondary.base} !important;
--newtab-search-icon-color : ${accent.base} !important;
--tabpanel-background-color : transparent !important;
background : rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
}
.tabbrowser-tab[selected="true"] {
color: ${background} !important;
}
#appcontent {
background: transparent !important;
}
#navigator-toolbox {
--tabs-border-color: transparent !important;
}
#toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box {
background-color: transparent !important;
-moz-appearance: none !important;
background-image: none !important;
}
window, #nav-bar{
background-color: transparent !important;
-moz-appearance: none !important;
background-image: none !important;
}
'';
".mozilla/firefox/${hyper.user}/chrome/userContent.css".text = /* css */ ''
/* Removes the white loading page */
/* url(about:newtab), url(about:home) */
@-moz-document url(about:blank) {
html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
background: ${background} !important;
}
}
/* Sets up minimal incognito scrollbar */
@-moz-document url(about:privatebrowsing) {
:root{
scrollbar-width: thin !important;
scrollbar-color: rgb(161, 161, 161) transparent !important;
}
}
/* new-tab */
@-moz-document url-prefix(about:home), url-prefix(about:newtab) {
:root{
--newtab-background-color-secondary: ${background} !important;
}
body, html {
background: transparent !important;
}
.tile, .search-handoff-button {
border: ${builtins.toString rice.border-width}px solid ${border} !important;
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{
background-color: transparent !important;
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
}
body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{
background-color: transparent !important;
}
}
@-moz-document domain(google.com) {
.sfbg {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, div#search > * {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
.g, .appbar {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
div#rso {
* {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
}
div#cnt > div {
}
}
@media (prefers-color-scheme: dark) {
:root .theme-system {
--color-bg: transtparent !important;
--color-text: ${rice.color.foreground}
}
}
@-moz-document domain(developer.mozilla.org) {
html, body {
background-color: transparent !important;
}
.top-navigation, .article-actions-container {
background-color: rgba(0,0,0,1) !important;
backdrop-filter: blur(100px);
border-radius: ${builtins.toString rice.rounding}px;
}
}
@-moz-document domain(github.com) {
body, html, header, #repository-container-header, .bgColor-muted, section {
background-color: transparent !important;
}
}
@-moz-document domain(mynixos.com) {
body, html {
background-color: transparent !important;
}
header, footer {
background-color: rgba(0,0,0,1) !important;
backdrop-filter: blur(100px);
border-radius: ${builtins.toString rice.rounding}px;
}
}
@-moz-document domain(moodle.informatik.tu-darmstadt.de) {
body, html , .main-inner, .main-inner * {
background-color: transparent !important;
}
.bg-primary {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.5) !important!
}
}
@-moz-document url-prefix("https://nx2.site/") {
html {
background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important;
background-repeat: repeat !important;
background-size: 2vmin 2vmin !important;
}
}
@-moz-document url-prefix("pw.nx2.site") {
html {
background: black;
}
}
@-moz-document url-prefix("pw.nx2.site") {
html {
background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important;
background-repeat: repeat !important;
background-size: 2vmin 2vmin !important;
}
body, .tw-bg-background-alt3, main, .card-header, .card-body, .modal-body {
background-color: transparent !important;
}
.modal-open, .modal-header, form.modal-content, .modal-footer {
background-color: rgba(0,0,0,0.8) !important;
backdrop-filter: blur(5px);
}
.cdk-virtual-scroll-content-wrapper, .card, .tw-bg-background, .modal-content {
background-color: rgba(0,0,0,0.8) !important;
border-radius: 10px !important;
border: ${toString rice.border-width}px solid ${border} !important;
}
}
'';
# @-moz-document domain(chatgpt.com) {
# body, html , .bg-token-sidebar-surface-primary {
# background-color: transparent !important;
# }
# .bg-token-main-surface-primary {
# background-color: rgba(0,0,0,1) !important;
# backdrop-filter: blur(100px) !important;
# border-radius: ${builtins.toString rice.rounding}px !important;
# }
# }
}; };
}; };
} }
# browser.tabs.allow_transparent_browser
# https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/

View File

@@ -1,19 +0,0 @@
{ pkgs, ... }@all: with all;
# browser.tabs.allow_transparent_browser
# https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/
{
programs.firefox.profiles."{hyper.user}".settings = {
"widget.use-xdg-desktop-portal.file-picker" = 1;
};
home = {
packages = with pkgs; [
firefox
];
file = with rice.color; let
blur = builtins.toString 20;
f = rice.lib.hex-to-rgb-comma-string;
in {
".mozilla/firefox/${hyper.user}/chrome/userChrome.css".text = import ./userChrome.nix rice;
".mozilla/firefox/${hyper.user}/chrome/userContent.css".text = import ./userContent.nix rice; };
};
}

View File

@@ -1,92 +0,0 @@
rice: with rice.color; let
f = rice.lib.hex-to-rgb-comma-string;
# blur = builtins.toString 20;
in /* css */ ''
:root{
/* Popup panels */
--arrowpanel-background : rgba(${f background}, ${builtins.toString rice.transparency}) !important;
--arrowpanel-border-color : ${border} !important;
--arrowpanel-color : ${secondary.base} !important;
--arrowpanel-dimmed : rgba(${f background},0.4) !important;
--arrowpanel-dimmed-further : rgba(${f background},0.6) !important;
--arrowpanel-dimmed-even-further : rgba(${f background},0.8) !important;
/* Autocomplete */
--autocomplete-popup-background : rgba(${f background}, ${builtins.toString rice.transparency}) !important;
--autocomplete-popup-color : ${foreground} !important;
--autocomplete-popup-highlight-background: ${accent.base} !important;
--autocomplete-popup-highlight-color : ${foreground} !important;
/* Toolbar background */
--toolbar-bgcolor : transparent !important;
--toolbar-non-lwt-bgcolor : rgba(${f background}, ${builtins.toString rice.transparency}) !important;
--toolbar-non-lwt-bgimage : none !important;
--toolbar-color : ${foreground} !important;
/* Tabs */
--tab-selected-bgcolor : ${accent.base} !important;
--tabs-border-color : ${border} !important;
--tab-line-color : ${accent.base} !important;
--tab-loader-size : 16px !important;
/* Sidebar */
--lwt-sidebar-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important;
--lwt-sidebar-text-color : ${foreground} !important;
--sidebar-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important;
--sidebar-text-color : ${foreground} !important;
--sidebar-border-color : ${border} !important;
/* URL bar */
--urlbar-popup-url-color : ${foreground} !important;
--urlbar-popup-action-color : ${secondary.base} !important;
--toolbar-field-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important;
--toolbar-field-focus-background-color : rgba(${f background}, ${builtins.toString rice.transparency}) !important;
--toolbar-field-color : ${accent.base} !important;
--toolbar-field-focus-color : ${foreground} !important;
--toolbar-field-focus-border-color : ${accent.base} !important;
/* Buttons */
--toolbarbutton-icon-fill : ${foreground} !important;
--toolbarbutton-hover-background : rgba(${f accent.base}, 0.2) !important;
--toolbarbutton-active-background : rgba(${f accent.base}, 0.4) !important;
/* Notification and panel */
--panel-disabled-color : rgba(${f foreground},0.3) !important;
--panel-separator-color : ${border} !important;
/* New tab page */
--newtab-background-color : transparent !important;
--newtab-background-color-secondary : ${secondary.dark} !important;
--newtab-text-primary-color : ${foreground} !important;
--newtab-text-secondary-color : ${secondary.base} !important;
--newtab-search-icon-color : ${accent.base} !important;
--newtab-background-card : ${accent.dark} !important;
--tabpanel-background-color : transparent !important;
background : linear-gradient(180deg,rgba(${f secondary.dark}, ${builtins.toString rice.transparency}) 0%, rgba(${f accent.dark}, ${builtins.toString rice.transparency}) 100%) !important;
}
.tabbrowser-tab[selected="true"] {
color: ${background} !important;
}
hbox#browser {
backround-color: transparent: !important;
}
#appcontent {
background: transparent !important;
}
#navigator-toolbox {
--tabs-border-color: transparent !important;
}
#toolbar-menubar, #TabsToolbar, #PersonalToolbar, #navigator-toolbox, #sidebar-box {
background-color: transparent !important;
-moz-appearance: none !important;
background-image: none !important;
}
window, #nav-bar{
background-color: transparent !important;
-moz-appearance: none !important;
background-image: none !important;
}
''

View File

@@ -1,226 +0,0 @@
rice: with rice.color; let
f = rice.lib.hex-to-rgb-comma-string;
blur = builtins.toString 20;
in /* css */ ''
/* Removes the white loading page */
/* url(about:newtab), url(about:home) */
@-moz-document url(about:blank) {
html:not(#ublock0-epicker), html:not(#ublock0-epicker) body, #newtab-customize-overlay {
background: transparent !important;
}
}
/* Sets up minimal incognito scrollbar */
@-moz-document url(about:privatebrowsing) {
:root{
scrollbar-width: thin !important;
scrollbar-color: rgb(161, 161, 161) transparent !important;
}
}
/* new-tab */
@-moz-document url-prefix(about:home), url-prefix(about:newtab) {
:root{
--newtab-background-color-secondary: rgba(${f background},0.5) !important;
}
body, html {
background: transparent !important;
}
.tile, .search-handoff-button {
border: ${builtins.toString rice.border-width}px solid ${border} !important;
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${f background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree, #flex-left-nav-container {
background-color: transparent !important;
}
#main-content {
background-color: rgba(${f background},0.5)!important;
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
}
body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{
background-color: transparent !important;
}
}
@-moz-document domain(google.com) {
.sfbg {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, div#search > * {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
.g, .appbar {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
div#rso {
* {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
}
div#cnt > div {
}
}
@media (prefers-color-scheme: dark) {
:root .theme-system {
--color-bg: transtparent !important;
--color-text: ${rice.color.foreground}
}
}
@-moz-document domain(developer.mozilla.org) {
html, body {
background-color: transparent !important;
}
.top-navigation, .article-actions-container {
background-color: rgba(0,0,0,1) !important;
backdrop-filter: blur(100px);
border-radius: ${builtins.toString rice.rounding}px;
}
}
@-moz-document domain(github.com) {
body, html, header, #repository-container-header, .bgColor-muted, section {
background-color: transparent !important;
}
}
@-moz-document domain(youtube.com) {
body, html, div#content, ytd-app, #frosted-glass.with-chipbar.ytd-app, ytd-shorts[is-dark] #cinematic-shorts-scrim.ytd-shorts {
background-color: transparent !important;
}
#background.ytd-masthead, div#background {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(100px);
}
* {
--yt-spec-base-background: transparent;
--yt-spec-raised-background: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important;
--yt-spec-menu-background: rgba(${rice.lib.hex-to-rgb-comma-string accent.dark}, ${builtins.toString rice.transparency}) !important;
--yt-spec-inverted-background: rgba(${rice.lib.hex-to-rgb-comma-string secondary.dark}, ${builtins.toString rice.transparency}) !important;
}
}
@-moz-document domain(mynixos.com) {
body, html {
background-color: transparent !important;
}
header, footer {
background-color: rgba(0,0,0,1) !important;
backdrop-filter: blur(100px);
border-radius: ${builtins.toString rice.rounding}px;
}
}
@-moz-document domain(moodle.informatik.tu-darmstadt.de) {
body, html , .main-inner, .main-inner * {
background-color: transparent !important;
}
.bg-primary {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base},0.5) !important;
}
}
@-moz-document domain(wikipedia.org) {
body, html, div.mw-page-container, .vector-header, .mw-header {
background-color: transparent !important;
}
:root {
--color-base: ${foreground} !important;
--color-base--hover: ${accent.bright} !important;
--color-emphasized: ${accent.base} !important;
--color-progressive: ${accent.base} !important;
--color-progressive--hover: ${accent.brighter} !important;
--color-progressive--active: ${secondary.bright} !important;
--color-destructive: ${negative.base} !important;
--color-destructive--hover: ${negative.brighter} !important;
--color-destructive--active: ${negative.bright} !important;
--color-visited: ${secondary.base} !important;
--color-visited--hover: ${secondary.brighter} !important;
--color-visited--active: ${secondary.bright} !important;
--color-error: ${negative.base} !important;
--color-error--hover: ${negative.bright} !important;
--color-error--active: ${negative.bright} !important;
--color-warning: ${weird.base} !important;
--color-success: ${positive.base} !important;
--color-notice: ${special.base} !important;
--color-content-added: ${positive.base} !important;
--color-content-removed: ${negative.base} !important;
--color-base--subtle: ${accent.dark} !important;
--box-shadow-color-base: ${black.base} !important;
--background-color-base: transparent !important;
--background-color-neutral: transparent !important;
--background-color-neutral-subtle: transparent !important;
--background-color-interactive: ${accent.darker} !important;
--background-color-interactive--hover: ${accent.dark} !important;
--background-color-interactive--active: ${secondary.dark} !important;
--background-color-interactive-subtle: ${subtle.darker} !important;
--background-color-interactive-subtle--hover: ${subtle.dark} !important;
--background-color-interactive-subtle--active: ${subtle.base} !important;
--border-color-base: ${border} !important;
--border-color-emphasized: ${border2} !important;
--border-color-subtle: ${subtle.base} !important;
--border-color-muted: ${subtle.dark} !important;
}
}
@-moz-document url-prefix("https://nx2.site/") {
html {
background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important;
background-repeat: repeat !important;
background-size: 2vmin 2vmin !important;
}
}
@-moz-document url-prefix("pw.nx2.site") {
html {
background: black;
}
}
@-moz-document url-prefix("pw.nx2.site") {
html {
background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important;
background-repeat: repeat !important;
background-size: 2vmin 2vmin !important;
}
body, .tw-bg-background-alt3, main, .card-header, .card-body, .modal-body {
background-color: transparent !important;
}
.modal-open, .modal-header, form.modal-content, .modal-footer {
background-color: rgba(0,0,0,0.8) !important;
backdrop-filter: blur(5px);
}
.cdk-virtual-scroll-content-wrapper, .card, .tw-bg-background, .modal-content {
background-color: rgba(0,0,0,0.8) !important;
border-radius: 10px !important;
border: ${toString rice.border-width}px solid ${border} !important;
}
}
''
# @-moz-document domain(chatgpt.com) {
# body, html , .bg-token-sidebar-surface-primary {
# background-color: transparent !important;
# }
# .bg-token-main-surface-primary {
# background-color: rgba(0,0,0,1) !important;
# backdrop-filter: blur(100px) !important;
# border-radius: ${builtins.toString rice.rounding}px !important;
# }
# }

View File

@@ -1,37 +1,36 @@
{ pkgs, ... }@all: with all; { pkgs, ... }@all: with all;
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
fish
any-nix-shell any-nix-shell
(writeShellScriptBin "nxfetch" /* bash */ '' (writeShellScriptBin "nxfetch" ''
logo=$(echo -e " logo=$(echo -e "
OS OS
DE/WM DE/WM
TERM TERM
SHELL SHELL
ISHELL ISHELL
KERNEL KERNEL
EDITOR EDITOR
TFM TFM
PROMPT PROMPT
" | lolcat --force 2> /dev/null) " | lolcat --force 2> /dev/null)
release_line=$(cat /etc/*-release 2> /dev/null || echo 'PRETTY_NAME="[No Release]"') msg="
$(echo -e "$logo" | sed -n 3p): $(cat /etc/*-release | grep PRETTY_NAME | cut -c 14- | rev | cut -c 2- | rev)
msg=" $(echo -e "$logo" | sed -n 4p): ''${XDG_CURRENT_DESKTOP^}
$(echo -e "$logo" | sed -n 3p): $(echo "$release_line" | grep PRETTY_NAME | cut -c 14- | rev | cut -c 2- | rev) $(echo -e "$logo" | sed -n 5p): ''${TERM^}
$(echo -e "$logo" | sed -n 4p): ''${XDG_CURRENT_DESKTOP^} $(echo -e "$logo" | sed -n 6p): $(bash --version | head --lines 1 | cut -f -4 -d' ' | sed -E 's-(.*?), version (.*?)\(.*-\1 \2-g')
$(echo -e "$logo" | sed -n 5p): ''${TERM^} $(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev | sed 's/./\U&/')
$(echo -e "$logo" | sed -n 6p): $(bash --version | head --lines 1 | cut -f -4 -d' ' | sed -E 's-(.*?), version (.*?)\(.*-\1 \2-g') $(echo -e "$logo" | sed -n 8p): ''$(uname -r)
$(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev | sed 's/./\U&/') $(echo -e "$logo" | sed -n 9p): $($EDITOR --version | head -n 1 | sed -E 's-(.+?) \(.*-\1-g' | sed 's/./\U&/')
$(echo -e "$logo" | sed -n 8p): ''$(uname -r | sed -E 's=(.+-.+-.+-.+)-.+=\1=g') $(echo -e "$logo" | sed -n 10p): $(yazi --version | sed -E 's-(.*?) \(.*-\1-g')
$(echo -e "$logo" | sed -n 9p): $($EDITOR --version | head -n 1 | sed -E 's-(.+?) \(.*-\1-g' | sed 's/./\U&/') $(echo -e "$logo" | sed -n 11p): $(starship --version | head -n 1 | sed 's/./\U&/')
$(echo -e "$logo" | sed -n 10p): $(yazi --version | sed -E 's-(.*?) \(.*-\1-g') "
$(echo -e "$logo" | sed -n 11p): $(starship --version | head -n 1 | sed 's/./\U&/') echo -e "$msg"
"
echo -e "$msg"
'') '')
]; ];
@@ -39,7 +38,6 @@
programs.fish = { programs.fish = {
enable = true; enable = true;
package = pkgs.fish;
shellAliases = let shellAliases = let
base-eza = "eza --icons --git --smart-group --group-directories-first"; base-eza = "eza --icons --git --smart-group --group-directories-first";
in { in {
@@ -87,7 +85,6 @@
d = "docker"; d = "docker";
dcmp = "docker compose"; dcmp = "docker compose";
stui = "sudo systemctl-tui"; stui = "sudo systemctl-tui";
wlc = "wl-copy";
# nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}''; # nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}'';
# ya = "yazi"; # function # ya = "yazi"; # function
@@ -113,12 +110,6 @@
mkdir $argv mkdir $argv
cd $argv cd $argv
''; '';
nx_backup = let
destination = if hyper.host == "NxNORTH" then "${hyper.home}/shared/" else "${hyper.home}/backups/";
in pkgs.lib.mkIf (hyper.host == "NxXPS" || hyper.host == "NxNORTH") ''
set RPATH (curl -s https://${hyper.domain}/latest-backup)
rsync -avz --info=progress2 -e "ssh -p ${builtins.toString secrets.ssh.port}" ${hyper.user}@ssh.${hyper.domain}:"$RPATH" ${destination}
'';
# gpg = ''; # gpg = '';
# set bold \e[1m # set bold \e[1m
# set green \e[32m # set green \e[32m

View File

@@ -3,7 +3,7 @@ lib.mkIf (hyper.host == "NxNORTH")
{ {
home = { home = {
packages = (with pkgs.unstable; [ packages = (with pkgs.unstable; [
protonup-ng protonup
mangohud mangohud
prismlauncher prismlauncher

View File

@@ -21,17 +21,16 @@
}; };
extraConfig = { extraConfig = {
credential = { credential = {
"https://git.da.dicos.de".username = lib.mkIf (hyper.host =="NxDCS") "lkurzweg"; "https://git.da.dicos.de".username = lib.mkIf (hyper.host =="NxWSL") "lkurzweg";
"https://git.da.dicos.de".password = lib.mkIf (hyper.host =="NxDCS") "Test"; "https://git.da.dicos.de".password = lib.mkIf (hyper.host =="NxWSL") "Test";
}; };
url."ssh://git@git.da.dicos.de/".insteadOf = lib.mkIf (hyper.host =="NxDCS") "https://git.da.dicos.de/"; url."ssh://git@git.da.dicos.de/".insteadOf = lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/";
url."ssh://git@github.com/".insteadOf = "https://github.com/"; url."ssh://git@github.com/".insteadOf = "https://github.com/";
pull.rebase = false; # true pull.rebase = false; # true
}; };
}; };
programs.lazygit = { programs.lazygit = {
enable = true; enable = true;
package = pkgs.lazygit;
settings = { settings = {
windowSize = "normal"; windowSize = "normal";
gui.theme = with rice.color; { gui.theme = with rice.color; {

View File

@@ -1,36 +1,16 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
home.packages = with pkgs; [ pinentry-all ]; {
programs.gpg = { # there also is a system module
enable = true; home.packages = with pkgs; [
package = pkgs.gnupg; gnupg
homedir = "${hyper.home}/vault/gnupg"; gpg-tui
settings = { pinentry-all
armor = true; ];
cert-digest-algo = "SHA512";
charset = "utf-8";
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
keyid-format = "0xlong";
list-options = "show-uid-validity";
no-comments = true;
no-emit-version = true;
no-greeting = true;
no-symkey-cache = true;
personal-cipher-preferences = "AES256 AES192 AES";
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
personal-digest-preferences = "SHA512 SHA384 SHA256";
pinentry-mode = "loopback";
require-cross-certification = true;
s2k-cipher-algo = "AES256";
s2k-digest-algo = "SHA512";
use-agent = true;
verify-options = "show-uid-validity";
with-fingerprint = true;
};
};
services.gpg-agent = let services.gpg-agent = let
min2sec = min: (min * 60); min2sec = min: (min * 60);
in { in {
enable = false; enable = true;
verbose = true; verbose = true;
sshKeys = [ sshKeys = [
"97081264F7FD72D890D496E839AA9A4C7892A7D8" # Keygrip (not Fingerprint!) of [A] Subkey "97081264F7FD72D890D496E839AA9A4C7892A7D8" # Keygrip (not Fingerprint!) of [A] Subkey
@@ -39,8 +19,35 @@
enableFishIntegration = true; enableFishIntegration = true;
defaultCacheTtlSsh = min2sec 60; defaultCacheTtlSsh = min2sec 60;
defaultCacheTtl = min2sec 30; defaultCacheTtl = min2sec 30;
pinentry = {
package = pkgs.pinentry;
program = "pinentry";
};
extraConfig = '' extraConfig = ''
allow-loopback-pinentry allow-loopback-pinentry
''; '';
}; };
home.file.".gnupg/gpg.conf".text = ''
personal-cipher-preferences AES256 AES192 AES
personal-digest-preferences SHA512 SHA384 SHA256
personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed
default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed
cert-digest-algo SHA512
s2k-digest-algo SHA512
s2k-cipher-algo AES256
charset utf-8
no-comments
no-emit-version
no-greeting
keyid-format 0xlong
list-options show-uid-validity
verify-options show-uid-validity
with-fingerprint
require-cross-certification
no-symkey-cache
armor
use-agent
pinentry-mode loopback
'';
} }

View File

@@ -1,4 +1,5 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
{
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
# nixfmt-classic # nix formater # nixfmt-classic # nix formater
@@ -204,18 +205,18 @@
language = [ language = [
{ {
name = "nix"; name = "nix";
language-servers = [ "nixd" ]; language-servers = [
"nixd"
# "llm"
];
} }
{ {
name = "latex"; name = "latex";
language-servers = [ "texlab" "language-tool" ]; language-servers = [ "texlab" "language-tool" ];
} }
{
name = "typst";
language-servers = [ "language-tool" "tinymist" ];
}
{ {
name = "markdown"; name = "markdown";
# language-servers = [ "marksman" "style-check" "language-tool" ];
language-servers = [ "language-tool" "marksman" ]; language-servers = [ "language-tool" "marksman" ];
file-types = [ "md" "MD" ]; file-types = [ "md" "MD" ];
scope = "text.<name>"; scope = "text.<name>";
@@ -435,8 +436,8 @@
fg = black.bright; fg = black.bright;
}; };
"ui.virtual.inlay-hint" = { "ui.virtual.inlay-hint" = {
fg = subtle.base; fg = background;
bg = subtle.dark; bg = tertiary.dark;
}; };
"ui.virtual.ruler" = { "ui.virtual.ruler" = {
bg = background; bg = background;

View File

@@ -1,24 +1,25 @@
{ pkgs, ... }@all: with all; let { pkgs, ... }@all: with all;
let
animation-speed = "5"; animation-speed = "5";
transparency = builtins.toString rice.transparency; transparency = builtins.toString rice.transparency;
terminal = "ghostty"; terminal = "ghostty";
terminal-exec = "ghostty --command="; terminal-exec = "ghostty --command=";
monitors = { monitors = {
xps = { xps = {
main = { name = "eDP-1"; resolution = "1920x1200"; position = "1920x1080"; scale = "1.0"; }; main = { name = "eDP-1"; resolution = "1920x1200"; position = "0x1080"; scale = "1.0"; };
second = { name = "desc:Sony SONY TV 0x01010101"; resolution = "1920x1080"; position = "1920x0"; scale = "1.0"; }; second = { name = "desc:Sony SONY TV 0x01010101"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; };
third = { name = "DP-6"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; };
}; };
north = { north = {
main = { name = "desc:Iiyama North America PL3270Q na"; resolution = "2560x1440"; position = "1920x0"; scale = "1.0"; }; main = { name = "desc:Iiyama North America PL3270Q na"; resolution = "2560x1440"; position = "1920x150"; scale = "1.0"; };
left = { name = "desc:Philips Consumer Electronics Company 273PLPH AU11423002132"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; }; left = { name = "desc:Philips Consumer Electronics Company 273PLPH AU11423002132"; resolution = "1920x1080"; position = "0x0"; scale = "1.0"; };
# right = { name = "HDMI-A-2"; resolution = "1920x1080"; position = "4480x360"; scale = "1.0"; }; # right = { name = "HDMI-A-2"; resolution = "1920x1080"; position = "4480x360"; scale = "1.0"; };
}; };
ace.main = { name = "HDMI-A-1"; resolution = "3840x2160"; position = "0x0"; scale = "2.0"; }; ace = {
main = { name = "HDMI-A-1"; resolution = "3840x2160"; position = "0x0"; scale = "2.0"; };
};
}; };
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
xdg-desktop-portal-hyprland
hyprland-protocols hyprland-protocols
hyprlock hyprlock
hypridle hypridle
@@ -41,7 +42,7 @@ in {
# inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo # inputs.hyprland-plugins.packages.${pkgs.system}.hyprexpo
# inputs.hyprfocus.packages.${pkgs.system}.hyprfocus # inputs.hyprfocus.packages.${pkgs.system}.hyprfocus
# inputs.hycov.packages.${pkgs.system}.hycov # inputs.hycov.packages.${pkgs.system}.hycov
# pkgs.hyprlandPlugins.hyprspace pkgs.hyprlandPlugins.hyprspace
# inputs.hyprspace.packages.${pkgs.system}.Hyprspace # inputs.hyprspace.packages.${pkgs.system}.Hyprspace
]; ];
@@ -50,7 +51,6 @@ in {
if hyper.host == "NxXPS" then (with monitors.xps; [ if hyper.host == "NxXPS" then (with monitors.xps; [
"${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}"
"${second.name}, ${second.resolution}, ${second.position}, ${second.scale}" "${second.name}, ${second.resolution}, ${second.position}, ${second.scale}"
"${third.name}, ${third.resolution}, ${third.position}, ${third.scale}"
]) else (if hyper.host == "NxNORTH" then (with monitors.north; [ ]) else (if hyper.host == "NxNORTH" then (with monitors.north; [
"${main.name}, ${main.resolution}, ${main.position}, ${main.scale}" "${main.name}, ${main.resolution}, ${main.position}, ${main.scale}"
"${left.name}, ${left.resolution}, ${left.position}, ${left.scale}" "${left.name}, ${left.resolution}, ${left.position}, ${left.scale}"
@@ -62,7 +62,7 @@ in {
workspace = let workspace = let
d1 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); d1 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name);
d2 = if hyper.host == "NxXPS" then monitors.xps.second.name else (if hyper.host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name); d2 = if hyper.host == "NxXPS" then monitors.xps.second.name else (if hyper.host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name);
d3 = if hyper.host == "NxXPS" then monitors.xps.third.name else (if hyper.host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name); d3 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name);
# d3 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.hyper.host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name); # d3 = if hyper.host == "NxXPS" then monitors.xps.main.name else (if hyper.hyper.host == "NxNORTH" then monitors.north.right.name else monitors.ace.main.name);
compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false"; compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false";
in [ in [
@@ -87,7 +87,7 @@ in {
"28, monitor:${d2}" "28, monitor:${d2}"
"29, monitor:${d2}" "29, monitor:${d2}"
"20, monitor:${d2}, ${compact}" "20, monitor:${d2}, ${compact}"
"31, monitor:${d3}, default:${let x = if hyper.host == "NxNORTH" then "true" else "false"; in x}, ${compact}" "31, monitor:${d3}, default:${let x = if hyper.host == "NxNORTH" then "true" else "false"; in x}"
"32, monitor:${d3}" "32, monitor:${d3}"
"33, monitor:${d3}" "33, monitor:${d3}"
"34, monitor:${d3}" "34, monitor:${d3}"
@@ -224,7 +224,7 @@ in {
]; ];
windowrulev2 = [ windowrulev2 = [
"bordercolor rgba(${rice.lib.nohash rice.color.special.bright}ff), pinned:1" "bordercolor rgba(${rice.lib.nohash rice.color.magenta.bright}ff), pinned:1"
"bordersize 0, floating:0, onworkspace:w[tv1]" "bordersize 0, floating:0, onworkspace:w[tv1]"
"rounding 0, floating:0, onworkspace:w[tv1]" "rounding 0, floating:0, onworkspace:w[tv1]"
@@ -256,15 +256,16 @@ in {
"opacity ${transparency}, class:^(Code)$" "opacity ${transparency}, class:^(Code)$"
"opacity ${transparency}, class:^(code-oss)$" "opacity ${transparency}, class:^(code-oss)$"
"opacity ${transparency}, class:^(discord)$" "opacity ${transparency}, class:^(discord)$"
# "opacity ${transparency}, class:^(vesktop)$" "opacity ${transparency}, class:^(vesktop)$"
# "opacity ${transparency}, class:^(Element)$" # "opacity ${transparency}, class:^(Element)$"
"opacity ${transparency}, class:^(lutris)$" "opacity ${transparency}, class:^(lutris)$"
"opacity ${transparency}, class:^(neovide)$" "opacity ${transparency}, class:^(neovide)$"
# "opacity ${transparency}, class:^(obsidian)$" # "opacity ${transparency}, class:^(obsidian)$"
"opacity ${transparency}, class:^(vesktop)$"
"opacity ${transparency}, class:^(VSCodium)$" "opacity ${transparency}, class:^(VSCodium)$"
"opacity ${transparency}, title:^(wlogout)$" "opacity ${transparency}, title:^(wlogout)$"
"opaque, title:^(GNU Image Manipulation Program)$" "opaque, title:^(GNU Image Manipulation Program)$"
"opaque, fullscreen:1"
"pin, title:^(Picture-in-Picture)$" "pin, title:^(Picture-in-Picture)$"
@@ -276,7 +277,6 @@ in {
"dimaround, title:^(terminal-file-picker)$" "dimaround, title:^(terminal-file-picker)$"
"center, title:^(terminal-file-picker)$" "center, title:^(terminal-file-picker)$"
"size 80% 80%, title:^(terminal-file-picker)$" "size 80% 80%, title:^(terminal-file-picker)$"
"size: 30% 30%, initialTitle:^(Select Calendar)$"
]; ];
@@ -361,7 +361,7 @@ in {
"SUPER, Q, killactive" "SUPER, Q, killactive"
"SUPER, W, exec, submap_indicator set '󰈹 '" "SUPER, W, exec, submap_indicator set '󰈹 '"
"SUPER, W, submap, browserSM " "SUPER, W, submap, browserSM "
# "SUPER, E, exec, element-desktop" "SUPER, E, exec, element-desktop"
"SUPER, R, exec, rofi -show drun" "SUPER, R, exec, rofi -show drun"
# "SUPER, T, exec, alacritty" # "SUPER, T, exec, alacritty"
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace"" # "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace""
@@ -372,7 +372,7 @@ in {
"SUPER, I, exec, ${terminal-exec}'hx ~/nix-dots/ && fish'" "SUPER, I, exec, ${terminal-exec}'hx ~/nix-dots/ && fish'"
"SUPER SHIFT, I, exec, ${terminal-exec}'nh home switch || read'" "SUPER SHIFT, I, exec, ${terminal-exec}'nh home switch || read'"
"SUPER CTRL, I, exec, ${terminal-exec}'nh os switch || read'" "SUPER CTRL, I, exec, ${terminal-exec}'nh os switch || read'"
# "SUPER, O, exec, obsidian " "SUPER, O, exec, obsidian "
"SUPER, P, pin " "SUPER, P, pin "
# "SUPER, Ü," # "SUPER, Ü,"
# "SUPER, +," # "SUPER, +,"
@@ -408,7 +408,7 @@ in {
"SUPER, C, exec, chatterino" "SUPER, C, exec, chatterino"
"SUPER SHIFT, C, exec, hyprpicker -n -a" "SUPER SHIFT, C, exec, hyprpicker -n -a"
"SUPER, V, togglefloating, " "SUPER, V, togglefloating, "
# "SUPER, B, exec, bitwarden" "SUPER, B, exec, bitwarden"
"SUPER, N, togglesplit" "SUPER, N, togglesplit"
# "SUPER, M, exec, /home/nx2/scripts/meme-full-screen/meme-full-screen.sh " # "SUPER, M, exec, /home/nx2/scripts/meme-full-screen/meme-full-screen.sh "
# "SUPER, comma, exec, /home/nx2/scripts/change-language.sh" # "SUPER, comma, exec, /home/nx2/scripts/change-language.sh"

View File

@@ -1,4 +1,5 @@
{ config, pkgs, ... }@all: with all; { { config, pkgs, ... }@all: with all;
{
home.packages = with pkgs; [ libnotify ]; home.packages = with pkgs; [ libnotify ];
services.mako = with rice; { services.mako = with rice; {
enable = if config.programs.hyprpanel.enable then false else true; enable = if config.programs.hyprpanel.enable then false else true;

View File

@@ -1,80 +0,0 @@
{ pkgs, ... }@all: with all; {
programs.mpv = {
enable = true;
package = pkgs.mpv;
config = {
# osc = false; # Disables the on-screen controller (seekbar, volume, etc.)
# osd-bar = false; # Disables the on-screen display progress bar
demuxer-max-back-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking backwards
demuxer-max-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking forwards
interpolation = true; # Enables frame interpolation for smoother playback
video-sync = "display-resample"; # Synchronizes video playback to the display's refresh rate
sub-visibility = true; # Hides subtitles by default
sub-auto = "fuzzy"; # Automatically loads subtitles if their filename is similar to the video file
sub-font = rice.font.base.name;
# sub-blur = 10; # this blurs the whole thing, text aswell
sub-color = rice.color.accent.bright;
sub-back-color = "${rice.color.background}${rice.lib.float-to-drune 0.8}"; # does not seem to work
# sub-border-size = 0;
sub-border-style = "opaque-box";
background-color = "${rice.color.background}"; # transparency breaks blur on hyprland sometimes, so just rgb
alang = "en,eng,de,ger"; # Sets preferred audio languages in order
slang = "en,eng,de,ger"; # Sets preferred subtitle languages in order
vlang = "en,eng,de,ger"; # Sets preferred video languages in order
save-position-on-quit = true; # Saves the playback position when quitting
ignore-path-in-watch-later-config = true; # Ignores the path in the watch-later configuration
ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; # Sets the format for downloading YouTube videos
vo = pkgs.lib.mkIf hyper.nvidia.enable "gpu";
hwdec = if hyper.nvidia.enable then "no" else "no"; # bugged
};
scripts = with pkgs.mpvScripts; [
mpris # use media keys
thumbfast # thumbnails on timeline hover
# uosc # custom ui
sponsorblock
];
bindings = {
"O" = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"'';
# "tab" = ''script-binding uosc/toggle-ui'';
# "space" = ''cycle pause; script-binding uosc/flash-pause-indicator'';
# "right" = ''seek 5'';
# "left" = ''seek -5'';
# "shift+right" = ''seek 30; script-binding uosc/flash-timeline'';
# "shift+left" = ''seek -30; script-binding uosc/flash-timeline'';
# "m" = ''no-osd cycle mute; script-binding uosc/flash-volume'';
# "up" = ''no-osd add volume 10; script-binding uosc/flash-volume'';
# "down" = ''no-osd add volume -10; script-binding uosc/flash-volume'';
# "[" = ''no-osd add speed -0.25; script-binding uosc/flash-speed'';
# "]" = ''no-osd add speed 0.25; script-binding uosc/flash-speed'';
# "\\" = ''no-osd set speed 1; script-binding uosc/flash-speed'';
# ">" = ''script-binding uosc/next; script-message-to uosc flash-elements top_bar,timeline'';
# "<" = ''script-binding uosc/prev; script-message-to uosc flash-elements top_bar,timeline>'';
};
scriptOpts = {
thumbfast = {
spawn_first = true;
network = true;
hwdec = true;
};
uosc = {
timeline_size = 25;
timeline_persistency = "paused,audio";
progress = "always";
progress_size = 4;
progress_line_width = 4;
controls = "subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality";
top_bar = "never";
refine = "text_width";
};
};
};
xdg.configFile."mpv/shaders/invert.glsl".text = /* glsl */ ''
//!HOOK LUMA
//!BIND HOOKED
vec4 hook()
{
float luma = LUMA_texOff(0).x;
return vec4(1.0 - luma);
}
'';
}

View File

@@ -1,4 +1,4 @@
{ pkgs, ... }@all: with all; let { pkgs, ... }@all: with all;
sep = " "; sep = " ";
in { in {
home = { home = {

View File

@@ -1,7 +1,7 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all; {
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
opencode latest.opencode
]; ];
file.".config/opencode/opencode.json".text = let file.".config/opencode/opencode.json".text = let
model = "qwen2.5-coder:7b"; model = "qwen2.5-coder:7b";
@@ -11,7 +11,8 @@
theme = "matrix"; theme = "matrix";
provider = { provider = {
ollama = { ollama = {
name = "Ollama (local)"; apiKey = "KEY";
disabled = false;
npm = "@ai-sdk/openai-compatible"; npm = "@ai-sdk/openai-compatible";
options = { options = {
baseURL = "http://localhost:11434/v1"; baseURL = "http://localhost:11434/v1";

View File

@@ -1,6 +1,5 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all; {
home.packages = with pkgs; [ home.packages = with pkgs; [
xdg-desktop-portal
brightnessctl brightnessctl
blueman blueman
fontpreview fontpreview
@@ -8,11 +7,10 @@
gsettings-desktop-schemas gsettings-desktop-schemas
imv imv
pavucontrol pavucontrol
playerctl # playerctl
swww swww
wev wev
wl-clipboard wl-clipboard
xclip xclip
wlr-randr
]; ];
} }

View File

@@ -1,20 +1,16 @@
{ pkgs, hyper, ... }: { { pkgs, hyper, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
chromium chromium
gnome-clocks
gnome-calculator
gnome-characters
gnome-2048
element-desktop element-desktop
mpv
qbittorrent qbittorrent
unstable.spotify
wl-clipboard wl-clipboard
xfce.thunar xfce.thunar
] ++ (if (hyper.host != "NxACE") then [ ] ++ (if (hyper.host != "NxACE") then [
signal-desktop signal-desktop
unstable.code-cursor-fhs
obsidian obsidian
zoom-us zoom-us
inkscape inkscape
audacity
] else []); ] else []);
} }

View File

@@ -2,7 +2,6 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
bat bat
cmake cmake
cmatrix
dig dig
du-dust du-dust
dysk dysk
@@ -21,6 +20,7 @@
lolcat lolcat
lynx lynx
mediainfo mediainfo
mpv
neofetch neofetch
pastel pastel
pdfgrep pdfgrep
@@ -34,7 +34,6 @@
systemctl-tui systemctl-tui
tldr tldr
w3m w3m
which
yt-dlp yt-dlp
]; ];
} }

View File

@@ -1,12 +0,0 @@
{ ... }: {
imports = [
./programming/c.nix
./programming/gleam.nix
./programming/glsl.nix
./programming/go.nix
./programming/java.nix
./programming/js.nix
./programming/python.nix
./programming/rust.nix
];
}

View File

@@ -1,8 +0,0 @@
{ pkgs, ... }@all: with all;
{
home = {
packages = with pkgs; [
glsl_analyzer
];
};
}

View File

@@ -1,7 +1,8 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
programs.go = { {
enable = true; home = {
package = pkgs.go; packages = with pkgs; [
goPath = "${config.xdg.dataHome}/go"; go
];
}; };
} }

View File

@@ -1,11 +0,0 @@
{ pkgs, ... }@all: with all; {
home = {
packages = with pkgs; [
cargo
clippy
rustc
rustfmt
rust-analyzer
];
};
}

View File

@@ -23,7 +23,9 @@
}; };
}; };
}; };
secrets.pass = "/run/user/1000/secrets/copyparty/user-password/${hyper.user}"; secrets = {
pass = "/run/user/1000/secrets/copyparty/user-password/${hyper.user}";
};
}; };
}; };
}; };

View File

@@ -1,7 +1,23 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
imports = [ inputs.sops-nix.homeManagerModules.sops ]; {
imports = [
inputs.sops-nix.homeManagerModules.sops
];
sops = { sops = {
age.keyFile = "${hyper.home}/vault/age/sopsnix-${hyper.host}-home.key"; age.keyFile = lib.mkIf (hyper.host == "NxACE") "${hyper.home}.age_nx2_key_13.txt";
gnupg.home = lib.mkIf (hyper.host != "NxACE") "${hyper.home}.gnupg";
defaultSopsFile = ../sops-secrets.yaml; defaultSopsFile = ../sops-secrets.yaml;
# %r is $XDG_RUNTIME_DIR
secrets = {
"example" = {
path = "%r/secrets/example";
};
# "sops-age-private-key" = { # Bootstrapping doens't work
# mode = "0400";
# path = "/home/${user}/.config/sops/age/keys.txt";
# };
};
}; };
} }

View File

@@ -1,56 +0,0 @@
{ pkgs, ... }@all: with all;
{
home.packages = with pkgs; [
unstable.spotify
];
services.librespot = {
enable = true;
package = pkgs.unstable.librespot;
};
sops.secrets."spotify/spotiy-player-clinet-id" = { path = "%r/secrets/spotify/spotiy-player-clinet-id"; };
programs.spotify-player = {
enable = true;
package = pkgs.unstable.spotify-player;
settings = {
border_type = "Rounded";
client_id_command = "cat $XDG_RUNTIME_DIR/secrets/spotify/spotiy-player-clinet-id";
copy_command.command = "wl-copy";
cover_img_length = 20;
cover_img_scale = 1; # if this is not 1 it doesnt fit in the box (for me)
cover_img_width = 9; # this ratio depends on your terminal font
device.normalization = true;
genre_num = 32; # all of them
liked_icon = "";
name = "spotify-player-${hyper.host}";
pause_icon = "";
playback_window_position = "Bottom";
play_icon = "";
progress_bar_position = "Right"; # "Bottom"
progress_bar_type = "Rectangle"; # "Line"
theme = "${hyper.user}";
};
themes = [{
name = "${hyper.user}";
component_style = with rice.color; {
block_title = { fg = accent.bright; };
border = { fg = border; };
current_playing = { fg = special.base; bg = special.darker; modifiers = ["Italic"]; };
like = { fg = positive.base; };
lyrics_played = { fg = subtle.base; };
lyrics_playing = { fg = special.base; };
page_desc = { fg = secondary.base; };
playback_album = { fg = secondary.base; };
playback_artists = { fg = secondary.base; };
playback_genres = { fg = subtle.base; };
playback_metadata = { fg = accent.base; bg = background; };
playback_progress_bar = { fg = accent.brighter; bg = accent.dark; modifiers = ["Bold"]; };
playback_status = { fg = accent.bright; };
playback_track = { fg = accent.bright; modifiers = ["Bold"]; };
secondary_row = { fg = secondary.base; };
selection = { bg = accent.dark; };
table_header = { fg = tertiary.bright; };
# playback_progress_bar_unfilled (Specific to progress_bar_type as Line) = "";
};
}];
};
}

View File

@@ -1,37 +1,27 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
home.packages = with pkgs; [ sshfs ]; {
programs.ssh = { home = {
enable = true; packages = with pkgs; [ sshfs ];
package = pkgs.openssh; file.".ssh/config".text = ''
addKeysToAgent = "yes"; HOST nxace
matchBlocks = let HostName ssh.${hyper.domain}
nxace = name: { User ${hyper.user}
host = name; Port 50022
hostname = "ssh.${hyper.domain}";
user = "nx2"; HOST nxacel
port = 50022; HostName 10.0.1.1
identityFile = "${hyper.home}/vault/ssh/nxace-nx2-${hyper.host}"; User ${hyper.user}
}; Port 50022
in {
"*".identityFile = [ HOST nxrpil
"${hyper.home}/vault/ssh/nxgit-nx2-${hyper.host}" HostName 10.0.1.31
"${hyper.home}/vault/ssh/github-noggynoggy-${hyper.host}" User ${hyper.user}
"${hyper.home}/vault/ssh/tg-dm-informatik-tuda" Port 22
];
"github.com".identityFile = [ "${hyper.home}/vault/ssh/github-noggynoggy-${hyper.host}" ]; HOST nxgit
"nxace" = nxace "nxace"; HostName ssh.${hyper.domain}
"nxacel" = (nxace "nxacel") // { hostname = "10.0.1.1"; }; User git
"nxrpli" = (nxace "nxrpil") // { hostname = "10.0.1.31"; port = 22; }; Port 50022
"nxgit" = (nxace "nxgit") // { '';
user = "git";
identityFile = "${hyper.home}/vault/ssh/nxgit-nx2-${hyper.host}";
# addKeysToAgent = "1h";
};
};
};
services.ssh-agent = {
enable = true;
# socket = "ssh-agent"; # suffix to $XDG_RUNTIME_DIR
# package = pkgs.openssh;
}; };
} }

View File

@@ -139,7 +139,7 @@
weird = alter_hue(ilist=accent, hue=80) weird = alter_hue(ilist=accent, hue=80)
special = alter_hue(ilist=accent, hue=180) special = alter_hue(ilist=accent, hue=180)
foreground = alter_l(accent, 0.9) foreground = alter_l(accent, 0.9)
background = alter_l(accent, 0.05) background = alter_l(accent, 0.1)
d = { d = {
"base": { "base": {

View File

@@ -1,32 +1,32 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all; {
xdg = { xdg = {
enable = true; enable = true;
configHome = "${hyper.home}/.config"; configHome = "${hyper.home}.config";
cacheHome = "${hyper.home}/.cache"; cacheHome = "${hyper.home}.cache";
dataHome = "${hyper.home}/.local/share"; dataHome = "${hyper.home}.local/share";
stateHome = "${hyper.home}/.local/state"; stateHome = "${hyper.home}.local/state";
mimeApps = { mimeApps = {
enable = true; enable = true;
defaultApplications = let defaultApplications = let
browser = "firefox.desktop"; browser = "firefox.desktop";
image = "imv.desktop"; image = "imv.desktop";
in { in {
"default-web-browser" = [ browser ]; "default-web-browser" = [ browser ];
"text/html" = [ browser ]; "text/html" = [ browser ];
"text/htm" = [ browser ]; "text/htm" = [ browser ];
"x-scheme-handler/http" = [ browser ]; "x-scheme-handler/http" = [ browser ];
"x-scheme-handler/https" = [ browser ]; "x-scheme-handler/https" = [ browser ];
"x-scheme-handler/about" = [ browser ]; "x-scheme-handler/about" = [ browser ];
"x-scheme-handler/unknown" = [ browser ]; "x-scheme-handler/unknown" = [ browser ];
"x-scheme-handler/mailto" = "thunderbird.desktop"; "x-scheme-handler/mailto" = "thunderbird.desktop";
"image/png" = image; "image/png" = image;
"image/jpg" = image; "image/jpg" = image;
"image/jpeg" = image; "image/jpeg" = image;
"image/webp" = image; "image/webp" = image;
"image/gif" = image; "image/gif" = image;
"application/pdf" = "zathura.desktop"; "application/pdf" = "zathura.desktop";
"inode/directory" = "thunar.desktop"; "inode/directory" = "thunar.desktop";
}; };
}; };
}; };
} }

View File

@@ -1,17 +1,37 @@
{ pkgs, ... }@all: with all; let { pkgs, ... }@all: with all;
nox-var = (pkgs.version != "24.05"); {
tfc = pkgs.unstable.xdg-desktop-portal-termfilechooser; home.packages = with pkgs; [
in { unar
home.packages = [
pkgs.unar
tfc
]; ];
programs.yazi = { programs.yazi = {
enable = true; enable = true;
# package = pkgs.yazi; # package = pkgs.yazi;
package = inputs.yazi.packages.${hyper.system}.default; package = inputs.yazi.packages.${hyper.system}.default;
enableFishIntegration = true; enableFishIntegration = true;
# initLua = /* lua */ '' ''; # down shellWrapperName = "ya";
initLua = /* lua */ ''
require("zoxide"):setup {
update_db = true,
}
Status:children_add(function()
local h = cx.active.current.hovered
if not h or ya.target_family() ~= "unix" then
return ""
end
return ui.Line {
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
":",
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
" ",
}
end, 500, Status.RIGHT)
'';
plugins = with pkgs; {
inherit glow git;
};
# initLua = /* lua */ '' '';
keymap = { keymap = {
mgr.keymap = [ mgr.keymap = [
{ on = "<Esc>"; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; } { on = "<Esc>"; run = "escape"; desc = "Exit visual mode, clear selected, or cancel search"; }
@@ -159,7 +179,7 @@ in {
{ on = "{"; run = "tab_swap -1"; desc = "Swap current tab wittab"; } { on = "{"; run = "tab_swap -1"; desc = "Swap current tab wittab"; }
{ on = "}"; run = "tab_swap 1"; desc = "Swap current tab with next tab"; } { on = "}"; run = "tab_swap 1"; desc = "Swap current tab with next tab"; }
# Tasks # Tasks
{ on = "w"; run = "tasks:show"; desc = "Show Task View"; } { on = "w"; run = "tasks_show"; desc = "Show task manager"; }
]; ];
tasks.keymap = [ tasks.keymap = [
# Task # Task
@@ -308,12 +328,6 @@ in {
border_symbol = ""; border_symbol = "";
border_style = { fg = border; }; border_style = { fg = border; };
}; };
tabs = {
active = { fg = secondary.dark; bg = secondary.base; };
inactive = { fg = secondary.base; bg = secondary.dark; };
# sep_inner =
# sep_outer =
};
status = { status = {
separator_open = " "; #""; separator_open = " "; #"";
separator_close = " "; #""; separator_close = " "; #"";
@@ -381,56 +395,75 @@ in {
]; ];
}; };
}; };
} // (if nox-var then { };
shellWrapperName = "ya";
initLua = /* lua */ ''
require("zoxide"):setup {
update_db = true,
}
Status:children_add(function()
local h = cx.active.current.hovered
if not h or ya.target_family() ~= "unix" then
return ""
end
return ui.Line {
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
":",
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
" ",
}
end, 500, Status.RIGHT)
'';
plugins = with pkgs; {
inherit glow git;
};
} else {});
xdg = { xdg = {
configFile."xdg-desktop-portal-termfilechooser/config" = { # # https://github.com/hunkyburrito/xdg-desktop-portal-termfilechooser/pull/44
force = true; configFile = let
text = '' wrapper = pkgs.writeShellApplication { name = "yazi-wrapper.sh"; text = /*bash*/ ''
set -ex
multiple="$1"
directory="$2"
save="$3"
path="$4"
out="$5"
cmd="yazi"
termcmd="''${TERMCMD:-kitty --title 'termfilechooser'}"
if [ "$save" = "1" ]; then
# save a file
set -- --chooser-file="$out" "$path"
elif [ "$directory" = "1" ]; then
# upload files from a directory
set -- --chooser-file="$out" --cwd-file="$out" "$path"
elif [ "$multiple" = "1" ]; then
# upload multiple files
set -- --chooser-file="$out" "$path"
else
# upload only 1 file
set -- --chooser-file="$out" "$path"
fi
command="$termcmd $cmd"
for arg in "$@"; do
# escape double quotes
escaped=$(printf "%s" "$arg" | sed -E 's/[\"\(\)\{\}\|]//g')
# escape spaces
command="$command \"$escaped\""
done
sh -c "$command"
'';};
in {
"xdg-desktop-portal-termfilechooser/config".text = ''
[filechooser] [filechooser]
cmd=${tfc}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh cmd=${wrapper}/bin/yazi-wrapper.sh
default_dir=$HOME
env=TERMCMD=ghostty --title="terminal-file-picker -e" env=TERMCMD=ghostty --title="terminal-file-picker -e"
default_dir=$HOME
open_mode=suggested open_mode=suggested
save_mode=last save_mode=last
''; '';
# "xdg-desktop-portal-termfilechooser/config".text = ''
# [filechooser]
# cmd=${pkgs.latest.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
# env=TERMCMD=ghostty --title="terminal-file-picker -e"
# default_dir=$HOME
# open_mode=suggested
# save_mode=last
# '';
}; };
portal = { portal = {
enable = true; enable = true;
xdgOpenUsePortal = true; extraPortals = [ pkgs.latest.xdg-desktop-portal-termfilechooser ];
config.common."org.freedesktop.impl.portal.FileChooser" = "termfilechooser"; config = {
extraPortals = [ tfc ] ++ (with pkgs; [ common = {
xdg-desktop-portal-hyprland "org.freedesktop.impl.portal.FileChooser" = "termfilechooser";
xdg-desktop-portal };
xdg-desktop-portal-gnome };
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
xdg-desktop-portal-wlr
]);
}; };
}; };
home.sessionVariables."GTK_USE_PORTAL" = "1"; home.sessionVariables = {
GTK_USE_PORTAL = "1";
};
} }

View File

@@ -10,7 +10,7 @@
completion-fg = foreground; completion-fg = foreground;
completion-highlight-bg = background; completion-highlight-bg = background;
completion-highlight-fg = accent.base; completion-highlight-fg = accent.base;
default-bg = "rgba(${f accent.dark},${t})"; default-bg = "rgba(${f background},${t})";
default-fg = foreground; default-fg = foreground;
highlight-active-color = "rgba(${f accent.base},0.5)"; highlight-active-color = "rgba(${f accent.base},0.5)";
highlight-color = "rgba(${f secondary.base},0.5)"; highlight-color = "rgba(${f secondary.base},0.5)";

View File

@@ -12,7 +12,7 @@
./home-modules/discord.nix ./home-modules/discord.nix
./home-modules/email.nix ./home-modules/email.nix
./home-modules/figlet.nix ./home-modules/figlet.nix
./home-modules/firefox/firefox.nix ./home-modules/firefox.nix
./home-modules/fish.nix ./home-modules/fish.nix
./home-modules/games.nix ./home-modules/games.nix
./home-modules/gestures.nix ./home-modules/gestures.nix
@@ -28,7 +28,6 @@
./home-modules/latex.nix ./home-modules/latex.nix
./home-modules/mako.nix ./home-modules/mako.nix
# ./home-modules/matrix.nix # ./home-modules/matrix.nix
./home-modules/mpv.nix
./home-modules/nh.nix ./home-modules/nh.nix
./home-modules/nixd.nix ./home-modules/nixd.nix
./home-modules/nvidia.nix ./home-modules/nvidia.nix
@@ -42,14 +41,18 @@
./home-modules/pkgs-list/programs.nix ./home-modules/pkgs-list/programs.nix
./home-modules/pkgs-list/shell.nix ./home-modules/pkgs-list/shell.nix
./home-modules/pnx.nix ./home-modules/pnx.nix
./home-modules/programming.nix ./home-modules/programming/c.nix
./home-modules/programming/gleam.nix
./home-modules/programming/go.nix
./home-modules/programming/java.nix
./home-modules/programming/js.nix
./home-modules/programming/python.nix
./home-modules/qt.nix ./home-modules/qt.nix
./home-modules/rclone.nix ./home-modules/rclone.nix
./home-modules/rofi.nix ./home-modules/rofi.nix
./home-modules/scanning.nix ./home-modules/scanning.nix
./home-modules/sent.nix ./home-modules/sent.nix
./home-modules/sops.nix ./home-modules/sops.nix
./home-modules/spotify.nix
./home-modules/ssh.nix ./home-modules/ssh.nix
./home-modules/starship.nix ./home-modules/starship.nix
./home-modules/tts.nix ./home-modules/tts.nix
@@ -69,8 +72,8 @@
./home-modules/calendar-campuszeit-fix.nix ./home-modules/calendar-campuszeit-fix.nix
] else []); ] else []);
home.username = hyper.user; home.username = hyper.user;
home.homeDirectory = hyper.home; # home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here
# home.homeDirectory = "/home/${hyper.user}"; home.homeDirectory = "/home/${hyper.user}";
home.stateVersion = hyper.pkgs-version; home.stateVersion = hyper.pkgs-version;
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

24
nix-on-droid.nix Normal file
View File

@@ -0,0 +1,24 @@
{ pkgs, ... }@all: with all;
{
# Simply install just the packages
environment.packages = with pkgs; [
helix
git
lazygit
yazi
];
# Backup etc files instead of failing to activate generation if a file already exists in /etc
environment.etcBackupExtension = ".bak";
# Read the changelog before changing this value
system.stateVersion = pkgs.version;
# Set up nix for flakes
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
# Set your time zone
time.timeZone = "Europe/Berlin";
}

View File

@@ -1,15 +1,19 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
{
imports = [ imports = [
inputs.nixos-wsl.nixosModules.default inputs.nixos-wsl.nixosModules.default
./system-modules/base-packages.nix ./system-modules/users.nix
./system-modules/docker.nix
./system-modules/gc.nix ./system-modules/gc.nix
./system-modules/docker.nix
./system-modules/gpg.nix ./system-modules/gpg.nix
./system-modules/networking.nix ./system-modules/networking.nix
./system-modules/nixd.nix ./system-modules/nixd.nix
./system-modules/users.nix # ./system-modules/sops.nix
# ./system-modules/sshd.nix
# ./system-modules/syncthing.nix
]; ];
system.stateVersion = pkgs.version; system.stateVersion = pkgs.version;
# system.stateVersion = "24.11";
wsl = { wsl = {
defaultUser = hyper.user; defaultUser = hyper.user;
enable = true; enable = true;
@@ -26,5 +30,6 @@
]; ];
}; };
}; };
nixpkgs.hostPlatform = hyper.system; nixpkgs.hostPlatform = hyper.system;
} }

32
nod.nix
View File

@@ -1,32 +0,0 @@
{ pkgs, ... }@all: with all; {
environment = {
packages = import ./system-modules/base-packages.nix pkgs;
etcBackupExtension = ".bak";
motd = "";
};
terminal = {
font = rice.font.code.regular-path;
};
android-integration = {
termux-setup-storage.enable = true;
};
system.stateVersion = pkgs.version;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
user ={
shell = "${pkgs.fish}/bin/fish";
# userName = pkgs.lib.mkForce hyper.user; if its read-only, whats the point of this option???
};
# Set your time zone
time.timeZone = "Europe/Berlin";
home-manager = {
config = import ./shell-only.nix;
useGlobalPkgs = true;
backupFileExtension = "backup";
extraSpecialArgs = { inherit (all) inputs hyper rice; };
};
}

View File

@@ -1,4 +1,5 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
{
imports = [ imports = [
./home-modules/bash.nix ./home-modules/bash.nix
./home-modules/color-pallete.nix ./home-modules/color-pallete.nix
@@ -12,7 +13,7 @@
./home-modules/nixd.nix ./home-modules/nixd.nix
./home-modules/nxgs.nix ./home-modules/nxgs.nix
./home-modules/pandoc.nix ./home-modules/pandoc.nix
# ./home-modules/programming/c.nix ./home-modules/programming/c.nix
./home-modules/programming/gleam.nix ./home-modules/programming/gleam.nix
./home-modules/programming/go.nix ./home-modules/programming/go.nix
./home-modules/programming/java.nix ./home-modules/programming/java.nix
@@ -27,11 +28,10 @@
./home-modules/pkgs-list/shell.nix ./home-modules/pkgs-list/shell.nix
]; ];
home = { home.username = hyper.user;
username = hyper.user; # home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here
homeDirectory = hyper.home; home.homeDirectory = "/home/${hyper.user}";
stateVersion = pkgs.version; home.stateVersion = pkgs.version;
};
xdg = { xdg = {
enable = true; enable = true;
configHome = "${hyper.home}/.config"; configHome = "${hyper.home}/.config";

View File

@@ -21,8 +21,6 @@ weechat:
passphrase: ENC[AES256_GCM,data:3NVhMouf3wwMJTZCvIjbi5fjHJHxe25Q+wRo,iv:W8cShdM3iUyEiRCPNupMin3gfF+cqGxslD18CAvUW4c=,tag:DXBATGEhHjhXqy+J9BNVwg==,type:str] passphrase: ENC[AES256_GCM,data:3NVhMouf3wwMJTZCvIjbi5fjHJHxe25Q+wRo,iv:W8cShdM3iUyEiRCPNupMin3gfF+cqGxslD18CAvUW4c=,tag:DXBATGEhHjhXqy+J9BNVwg==,type:str]
streamlink: streamlink:
twitch-oauth: ENC[AES256_GCM,data:SvV0CBVL6MO0zqiRg2Ns00KNHLDfzgNObse5F69n,iv:h0DFbwIVKfJSoVowgO3voAOdHXIsw1D3O/aweFRVKcI=,tag:PW0gc+gzlfdOUvIoYIkywg==,type:str] twitch-oauth: ENC[AES256_GCM,data:SvV0CBVL6MO0zqiRg2Ns00KNHLDfzgNObse5F69n,iv:h0DFbwIVKfJSoVowgO3voAOdHXIsw1D3O/aweFRVKcI=,tag:PW0gc+gzlfdOUvIoYIkywg==,type:str]
spotify:
spotiy-player-clinet-id: ENC[AES256_GCM,data:hJpLMgWKzPpqTffr80Jh65Zl3MzKGXiMb8x2F1CxuSQ=,iv:Q8TdEZiAtcdkndsKmvCAlnuu+i60xXUBX6I6VSxwQow=,tag:CIeaJbkMeqRoWnuOgERHYw==,type:str]
nx2site: nx2site:
cloudflare: cloudflare:
api-token-dns-edit: ENC[AES256_GCM,data:fR4fH6NqwtHI8aebEwjUn5JMoy3q3GXgu/dREe8JK7yRBIOhJ8BKuw==,iv:fQqLRYCN/7zhpHzYxMcn8q1aA7x4qd3qWGgrFWn2E/U=,tag:GJ1muJG755ch/84Sgcf2Vw==,type:str] api-token-dns-edit: ENC[AES256_GCM,data:fR4fH6NqwtHI8aebEwjUn5JMoy3q3GXgu/dREe8JK7yRBIOhJ8BKuw==,iv:fQqLRYCN/7zhpHzYxMcn8q1aA7x4qd3qWGgrFWn2E/U=,tag:GJ1muJG755ch/84Sgcf2Vw==,type:str]
@@ -58,78 +56,51 @@ sops:
- recipient: age1vkqn2nars5qmpr35tac0x9vshphrq6nnzjfyxwusgn27kt3zualssv0u8e - recipient: age1vkqn2nars5qmpr35tac0x9vshphrq6nnzjfyxwusgn27kt3zualssv0u8e
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB6U0NCaG16bGl4Uy9JdkpV YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwZWl0RCszNGZqNDhzY25a
alRjakVGQkM4ZzdsWDlJWTFQdlJ3dHB5dm1vCmtHSE9oS1dhc0ZvemVTTFJ3TWJ2 K2dPTGMvMzBSZytRMWR5d1pkTVpETmNZUTFzCmUrU25XdklVc3NicUV2OVh5bktR
YlZZd3VLaXM1dllPVTR1TElQdXIvMHcKLS0tIFoxbnlMVFVWaWp0R1RvSmpNcC9s YmZIeGZzYkVJMXRwSkt6bXlaRGpiaEkKLS0tIEZOMDUxaEo1aXRsV050a3I0eFNR
UDREUnEweDY1UU5QTjEySUdERjEwMkkKCt6wGWglsfmTfnR+qesaxfb0/lKizXjd UlIxODJVK3lEaC9lWG9wNmhaUWhuZEEKnQT50Svfxgnbo6+gTSGyLW8vt+hzehu5
QnXb7ynqAx+0/mg5QXEE6S9nzfN/Shm84aR98VRptyYeDHk4jZhZxw== djy0wdML7XGORKURUJcAnGCdgsugu7exTBPMeKldlPXySPGUf6vPRA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1jvf2lyrt2dw9jfnwgvnhmj9fmvyq8vvtepqjpkyycc5dqkkd4edqhxsgv6 - recipient: age1jvf2lyrt2dw9jfnwgvnhmj9fmvyq8vvtepqjpkyycc5dqkkd4edqhxsgv6
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBEbDhLenZ5cTF2RmU3aWFR YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBISzJjS2t4OFNtd2s3RjE3
TDN3VXZJamN2WXVGejNqdWZzR1Frb0sxeG0wCk1OaVF4UGJ2elZ3eHBhOU1McjhG V2hOUnByNVp3bjE4a0tPSkdCbXcwU093NGtFCmR2RXdzbTk1RXhQbmdVM0pkdGhE
TWZqVFZLbW1wVDlhKy9DeU5XQURMT2cKLS0tIHdNQTJkZFg1cS9sdERjZkhYbDJy T2VGN1VnYlRqWXRmWEJucTd5eU5HYWsKLS0tIFJRODNibTZNRjZtZjlpN0IzbVZQ
RWVkczdGZlFQRENkbEdlb1c5bHA4ZEEKPS2AB8yyJ3An7PkWDJQj135MT7NGeOPj aHQwY0l3OTRVYlNSZnBQMGM4ekp0NGMKL0scPlNFywKmdPI3I8sgvmaVXOp6qm2m
dpalfnbvDw6uK9APGGkM35xIKYTy+kal4Qx4U5BAmaH57EWqL22Rpg== O0N8BuQPEhiZXzNhPBPJnt6e/X+eW35lXdvbQ6AKv791WjZ4OlSZow==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1jj7kfjw3e7rf9kwg5f87zf4ns6yr5465wcasanr9gcgwrq7c6dmq6gprgk - recipient: age1jj7kfjw3e7rf9kwg5f87zf4ns6yr5465wcasanr9gcgwrq7c6dmq6gprgk
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBLT0I0MDdUZWRXaFNJN2FK YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAwT2laNmNOYnhON2FEcGxl
bm40a1QwdFdpQ3RManhXYWxmMkZXRGhiaTN3CnRqdmZ1bHhCTXh2c3gxeGJOYS9i OVFHa2owL1RCWWNWdDhzZWRlSkhPZmJpQjFvCjNPSGc4L1V5cENBMzY2VU56RnNW
VDNDZWRhT0FYczQ3Q2ExQXBacURZaGsKLS0tIHdwbU5SbVk1YVdqd0l1dUg1bC9v QmNiNGMyZXY0WmN3R0c5YURQN1RGbDQKLS0tIE5lZXZiR2FZVms4YllUd1BsOURD
eEcydGlvNGcvTGI4OE1jek1WVE5jajQKhgxCDgmRbokbcHG+8OlJYms4NgVaHPqO YTMxdkhkLzNGOWVYQkZJQnVCeW4zcXcKLaGzWYXBaR9mpLE47pWAkYUv/L5JuCR9
feXp9tvnTPpFcGIcN8pBE3ZRRJDshyubR9FyHmfUmSNJTtFOEjhR7g== ZH2oaOLio6BHY+pf9WbbazbjIKXMZ8KozpLTzbn7ayKYYgGxEiwdIA==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1x2lpsennl74n0f5jl60uv2ffjcuqymzf9ap3frlz2quyv0x3hq3scnewwq - recipient: age1x2lpsennl74n0f5jl60uv2ffjcuqymzf9ap3frlz2quyv0x3hq3scnewwq
enc: | enc: |
-----BEGIN AGE ENCRYPTED FILE----- -----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxTkV0MEhqL2NJYTdRWDRl YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByUmxCQ3ZOVGlWUWFkcGk1
aHpJeFNsMjNJUUYxRklIVmZDRHd6NkVrTTBJCnUwMFA5RWxCTTdxcGJSQVExdjcy ZzNaR0R0UG43dkh5Wjd5MmQ5SlkwU0g3c0ZJCnVYZExQdi94ME56eUVwUG5XbjJi
Zjg4NW9UQW5BWTI4TzRVS2t4K21oN28KLS0tIDhpUmF2OHlTUnpGVnUrbWNIV3RQ OC9OSmZYeHo4anJLb0NQSEs3cmMrS1UKLS0tIFJWU1VYL09SbDlHZlJtRlhmSjFJ
eUZ2OC9Za2lJdjdmdWo3UzV3VHVldU0K2txL8P3NxMaTzjo+geMeBZr8fr3iuf6o YkJWUEMySU50ZHVxUzVudjNnYURXak0KkMn/8sFrrviqb3s8DtS/BAbrdCwJ+jv/
m6L3vbAx/PMgfSVFpV6jZ6lyNfQkyEtP5BIUIWbdX5qdGscfb+Gr4g== A8rXQkKMjvTqG1f0fq5IlSmRAQy7XFBzkfbKdIUoefhey190WPEHaw==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
- recipient: age1pn4utvwpqdrswn0xurfdexn5nks9cd06jxzwg3m3m6za25ap4vxqxd0p3k lastmodified: "2025-08-06T22:09:56Z"
enc: | mac: ENC[AES256_GCM,data:s3lBIa/Y0fjtFFTDggC+Oxd9T5A1al9ULh4VM78vS+A6nmCZWdezLkY1CwXPrCcrwYQtnKrj5N4Y1jQQmEkF1UIcgkvH7ZQsT7MOJyvWhZUx2/wIg1DwcdlHYJAiwFkIkZ1fEvE4m/uDCWA8xO4qWU4NJaxPzTyapPKKF4VwkNs=,iv:tqDVOQlwS+CMzX8MxrBRPjBVj1Svx91eQx2xamAsSiE=,tag:VJf1at+026fQJ5ML2D/PEg==,type:str]
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlVktxTmx4QXQrOEhNTCtq
R3FML2ZubHovblU2OTBBQXB1Mkw0OTVqaTNJCkNmeEw2OW9DNm1qcUJFeUYycE15
dmxsYnRyTnp5UkVnWWMzTU1yZTFBZTAKLS0tIGRjK1hrMVBUOTNxSGZ0WmsyRUEy
dWZjOEFQc2lUMnFQNnVLd3NDcjh4NWsKUFIzHvms3UCwDGvWT527vzE1sKPfdmD6
jXw6KUc/AhkVzVndbLxO1pyvP//oj5uPmhF6BwSYOhL/ZBnRtTF2JQ==
-----END AGE ENCRYPTED FILE-----
- recipient: age1ur5zpr325cv7w0yn49azz9f48xsxd73w2sytt22yrnw5qs9r34nsv3vl05
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUdjlZeFVnR1k3QzZXUnR5
UVdvTGlYNDdYY0pqV3dZeDFKUnY2Y1E3RUhBCm1UeEVpTEl5a2ExdnVKTllRbndQ
V244Z2FseVJrU3ZsV2k0RGdGWm5NZmsKLS0tIDVVOXU3b1ZMaFhoYXRja0VVNnM4
ZUs5KzQ0QXhCM2dtU29BaEtUUkRIV00KTmwcQmY3nZSNa305kwcKf4RcHMb9CSHr
N59taRkc81uKsMf/Tma5WasrnaHEtE2vd6Kl8rpPw3HcfnpcLjXBPA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1jr72q042ccgxpdgdaaev0arzc0vh3r02etv2tzhhsejl0mfaxs3q9hhlaz
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrcVlEQU5WcXVpMTdlUjU5
V2U1cXNwdkh6WjNLQVpIUGErZE9QeTIvM25FCmprU1Q3OVBBNFp6MTRZMkZWMjlQ
ZXdQemlXQWlIZk1WUFBZM090NlJ3OTAKLS0tIGtYZHYzZ0t6SmFQV3JoUEp6N2kr
MkZGai9DZ3ZzT0I2MmMwRzVkcFhXdlEKLbM/9kCpiXLW8Me4MDq+JFifG7FhwPZS
5t4zNtuLttY3NUwT9KK4g4P+Yl10oNsjcCbGNYTxlIARFEU+X6zwUQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-09-07T21:03:20Z"
mac: ENC[AES256_GCM,data:x8eIqQQGxtB5ukScesN1Lf4cFicTOi3VSOr/hFxKzccgwW7HLLEqwjai6e67KUFC2otaN9TR7ft0tUsTVwWRVRCHnpEoQ5KshLHy2zsk+CmPIpWTLCZJBpe154z3rRLlc10DCM7yhqArzepw0HgE4j1knADqLVwC7e0k+o/OmE8=,iv:uXeIv19J3LmYg7gtA2SGUSoMe9uccrvvztlDFSSs1V8=,tag:YTJpZdw1K+7//EARR+MviA==,type:str]
pgp: pgp:
- created_at: "2025-10-06T11:16:18Z" - created_at: "2025-06-08T12:35:30Z"
enc: |- enc: |-
-----BEGIN PGP MESSAGE----- -----BEGIN PGP MESSAGE-----
hF4DCvJ7ODFw5jQSAQdAebf7Ev93A/xdNTsw9ioAQTAehE14ZrIZiA9qNv9SjwIw hF4DCvJ7ODFw5jQSAQdAw5PIhSmghpU+R4d8A9FY1z9NwN2C1CQvnP0u/D6k9nEw
zT17RspkPejqo1K54zO3UkkocBZ30gzUkoIdxfISqd58QDHTNEsnoI7mVf8mod/c 4jYo133RBpSmZUEOPsrAIGDwcx5rAjIwXtYEUeH3ZR1/0imfyOh0iF0NhEqF5awG
0l4BUCEcibdn1XyQ9y55TbLhn/N6b+BxV9TKpRiFSLXSFIgHTe0PCSBxJkYgckFH 0l4BWb/AQFnokqiIuRGQPMqpO6X3m00C2kB79nodaxorhc/WBs4JX3qz89zozsLq
ZD0A4PtsylyuVYKKD5/2ZwAKLeAfY6nWBxoQrI6ZpT6i9040Rv2f8s5jJxrStLyx ao8WHHadtQJwBveKurCNHLcr2+vLatPZ93Oo3s/ky+5eB+HrottOC818TIP51tXx
=9nNP =8dKb
-----END PGP MESSAGE----- -----END PGP MESSAGE-----
fp: 22FB2CC03DC5292AB81CF67D0AF27B383170E634 fp: 22FB2CC03DC5292AB81CF67D0AF27B383170E634
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted

View File

@@ -1,18 +1,19 @@
pkgs: with pkgs; [ { pkgs, ... }: {
busybox environment.systemPackages = with pkgs; ([
# coreutils-full git
gitFull git-crypt
git-crypt lazygit # home-manager module is bugged
wget
curlHTTP3
zip
unzip
p7zip
unar
vim
htop
openssl
dmidecode
file
]);
wget }
curlHTTP3
zip
unzip
p7zip
unar
vim
htop
openssl
dmidecode
file
]

View File

@@ -1,4 +1,5 @@
{ pkgs, ... }@all: with all; let { pkgs, ... }@all: with all;
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea { grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.${hyper.domain}"; domain = "git.${hyper.domain}";
owner = "nx2"; owner = "nx2";
@@ -8,10 +9,6 @@
}); });
device-boot = if hyper.host == "NxNORTH" then { device-boot = if hyper.host == "NxNORTH" then {
kernelPackages = pkgs.linuxPackages_zen; kernelPackages = pkgs.linuxPackages_zen;
kernelParams = [
"fbcon=margin:1"
"fbcon=nodefer"
];
lanzaboote = { lanzaboote = {
enable = true; enable = true;
pkiBundle = "/var/lib/sbctl"; pkiBundle = "/var/lib/sbctl";
@@ -22,7 +19,7 @@
configurationLimit = 10; configurationLimit = 10;
}; };
} else if hyper.host == "NxXPS" then { } else if hyper.host == "NxXPS" then {
kernelPackages = pkgs.linuxPackages; kernelPackages = pkgs.linuxPackages_latest;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "v4l2loopback" ]; kernelModules = [ "v4l2loopback" ];
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1''; extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1'';
@@ -65,6 +62,8 @@ in {
] else []; ] else [];
config = { config = {
environment.systemPackages = with pkgs; lib.mkIf ( host == "NxNORTH" ) [ sbctl ]; environment.systemPackages = with pkgs; lib.mkIf ( host == "NxNORTH" ) [ sbctl ];
boot = { tmp.useTmpfs = false; } // device-boot; boot ={
tmp.useTmpfs = false;
} // device-boot;
}; };
} }

View File

@@ -1,4 +1,5 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
{
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = rec { settings = rec {
@@ -9,23 +10,15 @@
default_session = hyprland; default_session = hyprland;
vt = 2; vt = 2;
}; };
# useTextGreeter = true;
}; };
# services.displayManager.ly = { systemd.services.greetd.serviceConfig = {
# enable = true; Type = "idle";
# package = pkgs.ly; StandardInput = "tty";
# settings = { StandardOutput = "tty";
# # animation = "matrix"; Standarderror = "journal"; # Without this errors will spam on screen
# # clear_password = true; # Without these bootlogs will spam on screen
# clock = "%c"; TTYReset = true;
# lang = "de"; TTYVHangup = true;
# load = true; TTYVTDisallocate = true;
# # numlock = false; };
# save = true;
# };
# };
# environment.systemPackages = with pkgs; [
# cmatrix
# ];
} }

View File

@@ -1,8 +1,14 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
{
environment.systemPackages = with pkgs; [
gnupg
gpg-tui
];
programs.gnupg = { programs.gnupg = {
dirmngr.enable = true; dirmngr.enable = true;
agent = { agent = {
enable = false; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
enableExtraSocket = true; enableExtraSocket = true;
enableBrowserSocket = true; enableBrowserSocket = true;

View File

@@ -1,50 +1,54 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; {
environment = { imports = [
systemPackages = with pkgs; [ ntfs3g cryptsetup ]; (modulesPath + "/installer/scan/not-detected.nix")
variables = pkgs.lib.mkIf (hyper.host == "NxXPS") { ];
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
}; environment.systemPackages = with pkgs; [
}; ntfs3g
boot = { ];
initrd = {
availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
luks.devices = pkgs.lib.mkIf (hyper.host == "NxXPS") { # boot.initrd.kernelModules = [ ];
"vault".device = "/dev/nvme0n1p7"; boot.kernelModules = [ "kvm-intel" ];
}; boot.extraModulePackages = [ ];
kernelModules = pkgs.lib.mkIf (hyper.host == "NxXPS") [ "i915" "cryptd" ];
}; fileSystems = if hyper.host != "NxACE" then {
kernelModules = [ "kvm-intel" ]; "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
extraModulePackages = [ ]; "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
extraModprobeConfig = pkgs.lib.mkIf (hyper.host == "NxXPS") '' "/home/${hyper.user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
options iwlwifi 11n_disable=8 } else {
''; "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
}; "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
fileSystems = let "/vault" = { device = "/dev/disk/by-label/vault"; fsType = "ext4"; };
ntfs = { fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
in { };
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
} // (if hyper.host == "NxXPS" then { swapDevices = [
"${hyper.home}/shared" = { device = "/dev/disk/by-label/shared"; } // ntfs; { device = "/dev/disk/by-label/swap"; }
"${hyper.home}/vault" = { device = "/dev/disk/by-label/vault"; fsType = "ext4"; }; ];
} else if hyper.host == "NxNORTH" then {
"${hyper.home}/shared" = { device = "/dev/disk/by-label/shared"; } // ntfs;
} else if hyper.host == "NxACE" then {
"/vault" = { device = "/dev/disk/by-label/vault"; fsType = "ext4"; };
} else {});
hardware = {
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
graphics.extraPackages = with pkgs.lib; mkIf (hyper.host == "NxXPS") [
(if (versionOlder (versions.majorMinor version) "25.05") then pkgs.vaapiIntel else pkgs.intel-vaapi-driver)
pkgs.libvdpau-va-gl
pkgs.intel-media-driver
];
};
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
services = {
thermald.enable = lib.mkDefault true; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
upower.enable = true;
}; # from nixos-hardware
services.thermald.enable = lib.mkDefault true;
boot.extraModprobeConfig = if hyper.host == "NxXPS" then ''
options iwlwifi 11n_disable=8
'' else "";
boot.initrd.kernelModules = if hyper.host == "NxXPS" then [ "i915" ] else [];
environment.variables = if hyper.host == "NxXPS" then {
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
} else {};
hardware.graphics.extraPackages = if hyper.host == "NxXPS" then with pkgs; [
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "25.05") then vaapiIntel else intel-vaapi-driver)
libvdpau-va-gl
intel-media-driver
] else [];
services.upower.enable = true;
} }

View File

@@ -2,7 +2,7 @@
lib.mkIf (hyper.host != "NxACE") lib.mkIf (hyper.host != "NxACE")
{ {
systemd.timers."health_reminder" = { systemd.timers."health_reminder" = {
enable = false; enable = true;
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnBootSec = "30m"; OnBootSec = "30m";

View File

@@ -1,6 +1,11 @@
{ config, pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
{
# sops.secrets = {
# "wireless-networking.env" = {};
# };
networking = { networking = {
nameservers = pkgs.lib.mkIf (hyper.host != "NxDCS") [ # wsl manages resolv.conf nameservers = [
"1.1.1.1" "1.1.1.1"
"8.8.8.8" "8.8.8.8"
]; ];
@@ -10,7 +15,6 @@
}; };
enableIPv6 = true; enableIPv6 = true;
firewall.allowedTCPPorts = [ firewall.allowedTCPPorts = [
(pkgs.lib.mkIf config.services.ollama.enable 11434)
80 80
443 443
8000 8000

View File

@@ -1,4 +1,6 @@
{ pkgs, ... }@all: with all; lib.mkIf hyper.nvidia.enable { { pkgs, ... }@all: with all;
lib.mkIf hyper.nvidia.enable
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lshw lshw
glxinfo glxinfo

View File

@@ -8,21 +8,16 @@
package = pkgs.copyparty; package = pkgs.copyparty;
openFilesLimit = 8192; openFilesLimit = 8192;
settings = { settings = {
p = [ 3210 3211 ];
i = [ "0.0.0.0" "unix:770:copyparty:/dev/shm/party.sock" ]; i = [ "0.0.0.0" "unix:770:copyparty:/dev/shm/party.sock" ];
name = "NxCopyParty"; p = [ 3210 3211 ];
ignored-flag = false;
no-reload = true; no-reload = true;
no-robots = true; ignored-flag = false;
rproxy = 1;
xff-hdr = "X-Forwarded-For"; # so that cpp knows the real client ip behind nginx. Must match with nginx config
shr = "/shares"; shr = "/shares";
css-browser = "https://${hyper.domain}/copyparty/extra-browser.css"; css-browser = "https://nx2.site/copyparty/extra-browser.css";
theme = 6; theme = 6;
xff-hdr = "X-Forwarded-For"; # so that cpp knows the real client ip behind nginx. Must match with nginx config
rproxy = 1;
no-robots = true;
}; };
accounts = { accounts = {
"${hyper.user}" = { "${hyper.user}" = {

View File

@@ -90,22 +90,24 @@
default = true; default = true;
listen = dl; listen = dl;
locations = { locations = {
"/".extraConfig = '' "/" = {
index index.html; extraConfig = ''
''; index index.html;
"~ ^(/.well-known/matrix/client)$".return = "502"; '';
"~ ^(/.well-known/matrix/server)$".return = "502"; };
"~ ^(/phone)$".return = "301 /cards/phone"; "~^(/ba)$" = { return = "301 /BA.pdf"; };
"~ ^(/about-me)$".return = "301 /slides/about-me"; "/.well-known/matrix/client" = { return = "502"; };
"~ ^(/about-this-site)$".return = "301 /slides/about-this-site"; "/.well-known/matrix/server" = { return = "502"; };
"~ ^(/gpg)$".return = "301 /cards/gpg"; "/phone" = { return = "301 /cards/phone"; };
"~ ^(/contact)$".return = "301 /cards/contact"; "/about-me" = { return = "301 /slides/about-me"; };
"~ ^(/ba)$".return = "301 /BA.pdf"; "/about-this-site" = { return = "301 /slides/about-this-site"; };
"/gpg" = { return = "301 /cards/gpg"; };
"/contact" = { return = "301 /cards/contact"; };
}; };
}; };
"matrix.${hyper.domain}" = { "matrix.${hyper.domain}" = {
listen = dl; listen = dl;
locations."~.*".return = "502"; locations = { "~.*" = { return = "502"; }; };
}; };
# "pw.${hyper.domain}" = vh // { # "pw.${hyper.domain}" = vh // {
# listen = dl; # listen = dl;

View File

@@ -4,7 +4,7 @@
package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama; package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama;
enable = true; enable = true;
acceleration = lib.mkIf hyper.nvidia.enable "cuda"; acceleration = lib.mkIf hyper.nvidia.enable "cuda";
host = "0.0.0.0"; host = if hyper.host == "NxACE" then "0.0.0.0" else "127.0.0.1";
port = 11434; port = 11434;
environmentVariables = { environmentVariables = {
OLLAMA_ORIGINS = "*"; OLLAMA_ORIGINS = "*";

View File

@@ -1,39 +1,36 @@
{ pkgs, ... }@all: with all; { { pkgs, ... }@all: with all;
users = { {
defaultUserShell = pkgs.bash; # if interactive, itll switch to fish users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
users."${hyper.user}" = {
isNormalUser = true; users.users."${hyper.user}" = {
extraGroups = [ isNormalUser = true;
# TODO: actually put the groups into the relevant files extraGroups = [
"acme" # TODO: actually put the groups into the relevant files
"adbusers" "networkmanager"
"audio" "wheel"
"audiobookshelf" "audio"
"copyparty" "video"
"docker" "lp"
"input" "scanner"
"libvirtd" "docker"
"lp" "libvirtd"
"networkmanager" "uinput"
"nextcloud" "input"
"nginx" "ydotool"
"postgres" "acme"
"radicale" "nginx"
"scanner" "adbusers"
"uinput" "postgres"
"video" "radicale"
"wheel" "audiobookshelf"
"ydotool" "nextcloud"
]; ];
useDefaultShell = true; useDefaultShell = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE5sYVtPLHXatTjrpol46xr9R4TidcB4t8axO6/ReNNR nxxps-nx2@nxace" ];
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC/zcoYuYbamTPMOZPfsP1yQJ5Y6sDlPfBwui8MQjKWn nxnorth-nx2@nxace"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMnbJx7nVeVi5jK1Eybm+jQoopiCTslewuHFLv2yCt4f nxdcs-nx2@nxace"
];
};
}; };
programs = { programs = {
bash = { bash = {
interactiveShellInit = '' interactiveShellInit = ''