Merge branch 'master' of ssh://ssh.nx2.site:50022/nx2/dotfiles

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-05-31 13:48:40 +02:00
77 changed files with 1144 additions and 882 deletions

View File

@@ -1,4 +1,4 @@
{ pkgs, inputs, host, ... }:
{ pkgs, hyper, inputs, ... }:
{
imports = ([
inputs.sops-nix.nixosModules.sops
@@ -40,7 +40,7 @@
./system-modules/users.nix
./system-modules/virtualisation.nix
./system-modules/ydotool.nix
]) ++ (if (host == "NxACE") then [
]) ++ (if (hyper.host == "NxACE") then [
./system-modules/nx2site.nix
./system-modules/hugo.nix
./system-modules/postgres.nix
@@ -134,7 +134,7 @@
systemd.extraConfig = "DefaultLimitNOFILE=2048";
boot.tmp.useTmpfs = false;
system.stateVersion = "24.11";
system.stateVersion = "25.05";
nixpkgs.config.allowUnfree = true;

View File

@@ -1,13 +1,13 @@
{
"base": {
"foreground": "#dddddd",
"background": "#000000"
"foreground": "#dbd2f8",
"background": "#0f062c"
},
"to_alter": {
"accent": "#8888ff",
"secondary": "#4444ff",
"tertiary": "#44ff88",
"special": "#ff6666",
"weird": "#ff66ff"
"accent": "#724ce5",
"secondary": "#ff3271",
"tertiary": "#ffc932",
"special": "#bfe54b",
"weird": "#e54b8b"
}
}
}

View File

@@ -42,7 +42,7 @@ pkgs: rec {
font = {
code = {
name = "JetBrainsMono Nerd Font";
package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
package = pkgs.nerd-fonts.jetbrains-mono;
# name = "CascadiaCove-NF";
# package = (pkgs.nerdfonts.override { fonts = [ "CascadiaCode" ]; });
};

465
flake.lock generated
View File

@@ -1,26 +1,5 @@
{
"nodes": {
"Hyprspace": {
"inputs": {
"hyprland": [
"hyprland"
],
"systems": "systems"
},
"locked": {
"lastModified": 1742767019,
"narHash": "sha256-FdyHDbf31jl5rIU7IQtBVTbZ1ojGrrp5aFaRrE2819s=",
"owner": "KZDKM",
"repo": "Hyprspace",
"rev": "5b62529c2011ede6069445de9b5b3f8a1f10ecfe",
"type": "github"
},
"original": {
"owner": "KZDKM",
"repo": "Hyprspace",
"type": "github"
}
},
"aquamarine": {
"inputs": {
"hyprutils": [
@@ -41,11 +20,11 @@
]
},
"locked": {
"lastModified": 1742213273,
"narHash": "sha256-0l0vDb4anfsBu1rOs94bC73Hub+xEivgBAo6QXl2MmU=",
"lastModified": 1747864449,
"narHash": "sha256-PIjVAWghZhr3L0EFM2UObhX84UQxIACbON0IC0zzSKA=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "484b732195cc53f4536ce4bd59a5c6402b1e7ccf",
"rev": "389372c5f4dc1ac0e7645ed29a35fd6d71672ef5",
"type": "github"
},
"original": {
@@ -135,6 +114,22 @@
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
@@ -176,7 +171,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
@@ -216,7 +211,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_4"
"systems": "systems_3"
},
"locked": {
"lastModified": 1681202837,
@@ -234,7 +229,7 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
@@ -281,11 +276,11 @@
"zon2nix": "zon2nix"
},
"locked": {
"lastModified": 1743191728,
"narHash": "sha256-LrQd2IkfcmHdBh+pwPEPXzcosBerIEFzz/DbVNzBqig=",
"lastModified": 1748207486,
"narHash": "sha256-4kR7VyauWpNMrBePHMM8yzQvUzHHGRVkQpJ3DyoKcH0=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "1067cd3d8a061eb5b23bc1a4c46ca10af4481941",
"rev": "3f6c02b49e08aed51e4be85d87b79b9dbea34a85",
"type": "github"
},
"original": {
@@ -367,16 +362,37 @@
]
},
"locked": {
"lastModified": 1742655702,
"narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=",
"lastModified": 1748226808,
"narHash": "sha256-GaBRgxjWO1bAQa8P2+FDxG4ANBVhjnSjBms096qQdxo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0948aeedc296f964140d9429223c7e4a0702a1ff",
"rev": "83665c39fa688bd6a1f7c43cf7997a70f6a109f9",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nix-on-droid",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709445365,
"narHash": "sha256-DVv6nd9FQBbMWbOmhq0KVqmlc3y3FMSYl49UXmMcO+0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4de84265d7ec7634a69ba75028696d74de9a44a7",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
@@ -397,11 +413,11 @@
]
},
"locked": {
"lastModified": 1742215578,
"narHash": "sha256-zfs71PXVVPEe56WEyNi2TJQPs0wabU4WAlq0XV7GcdE=",
"lastModified": 1745948457,
"narHash": "sha256-lzTV10FJTCGNtMdgW5YAhCAqezeAzKOd/97HbQK8GTU=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "2fd36421c21aa87e2fe3bee11067540ae612f719",
"rev": "ac903e80b33ba6a88df83d02232483d99f327573",
"type": "github"
},
"original": {
@@ -426,11 +442,11 @@
]
},
"locked": {
"lastModified": 1739049071,
"narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=",
"lastModified": 1745015490,
"narHash": "sha256-apEJ9zoSzmslhJ2vOKFcXTMZLUFYzh1ghfB6Rbw3Low=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73",
"rev": "60754910946b4e2dc1377b967b7156cb989c5873",
"type": "github"
},
"original": {
@@ -451,15 +467,15 @@
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_3",
"systems": "systems_2",
"xdph": "xdph"
},
"locked": {
"lastModified": 1743297135,
"narHash": "sha256-4JgyJLuHxeoeSsSbi4MkpVYsI4R74Trov33sIg1fa/0=",
"lastModified": 1748295224,
"narHash": "sha256-yR8zw5bSEHd28fGfGM64nW8y72NOfxFvvrXcR2p4WUE=",
"ref": "refs/heads/main",
"rev": "da2d7c3971d40f841f2afd7def8e4bad9a351e41",
"revCount": 5948,
"rev": "be6ee6e55f08387a9e2fbf712c061fb238a70319",
"revCount": 6141,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -487,11 +503,11 @@
]
},
"locked": {
"lastModified": 1743339740,
"narHash": "sha256-G6a7R/gb1xH0yI2uevTmDpxZf6rvMh1lOu0gYrqVu5U=",
"lastModified": 1748271549,
"narHash": "sha256-MiVqB5DoHqxNSaQVbYmkaIDz02AJ4XS3oXHI1x2lEX0=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "6dca4ece21864e329394b81cfc767778089097e2",
"rev": "d81d96e9d68c182a202e0bbf14384d60929b4454",
"type": "github"
},
"original": {
@@ -512,11 +528,11 @@
]
},
"locked": {
"lastModified": 1738422629,
"narHash": "sha256-5v+bv75wJWvahyM2xcMTSNNxmV8a7hb01Eey5zYnBJw=",
"lastModified": 1743714874,
"narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "755aef8dab49d0fc4663c715fa4ad221b2aedaed",
"rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2",
"type": "github"
},
"original": {
@@ -580,11 +596,11 @@
]
},
"locked": {
"lastModified": 1739048983,
"narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=",
"lastModified": 1745951494,
"narHash": "sha256-2dModE32doiyQMmd6EDAQeZnz+5LOs6KXyE0qX76WIg=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8",
"rev": "4be1d324faf8d6e82c2be9f8510d299984dfdd2e",
"type": "github"
},
"original": {
@@ -609,11 +625,11 @@
]
},
"locked": {
"lastModified": 1741191527,
"narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=",
"lastModified": 1747484975,
"narHash": "sha256-+LAQ81HBwG0lwshHlWe0kfWg4KcChIPpnwtnwqmnoEU=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "72df3861f1197e41b078faa3e38eedd60e00018d",
"rev": "163c83b3db48a17c113729c220a60b94596c9291",
"type": "github"
},
"original": {
@@ -629,11 +645,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1741036724,
"narHash": "sha256-nCsqa5dXW1Qja+smRkVpNkGAHfYkBFJ6U3bVilY5pDo=",
"lastModified": 1745860672,
"narHash": "sha256-tJKLjWaOcJW4Ttu1noSY+lddlJvyX2eonTrgR5IycZo=",
"owner": "h3rmt",
"repo": "hyprswitch",
"rev": "3feeccf2f1d3d6c0fb7c79b965ccf382118651d2",
"rev": "313e7d5730af2e37ab73fe238b1bd3a2d3e5552f",
"type": "github"
},
"original": {
@@ -655,11 +671,11 @@
]
},
"locked": {
"lastModified": 1741534688,
"narHash": "sha256-EV3945SnjOCuRVbGRghsWx/9D89FyshnSO1Q6/TuQ14=",
"lastModified": 1746635225,
"narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "dd1f720cbc2dbb3c71167c9598045dd3261d27b3",
"rev": "674ea57373f08b7609ce93baff131117a0dfe70d",
"type": "github"
},
"original": {
@@ -680,11 +696,11 @@
]
},
"locked": {
"lastModified": 1739870480,
"narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=",
"lastModified": 1747584298,
"narHash": "sha256-PH9qZqWLHvSBQiUnA0NzAyQA3tu2no2z8kz0ZeHWj4w=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b",
"rev": "e511882b9c2e1d7a75d45d8fddd2160daeafcbc3",
"type": "github"
},
"original": {
@@ -718,13 +734,82 @@
"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-manager_2",
"nix-formatter-pack": "nix-formatter-pack",
"nixpkgs": [
"nixpkgs"
],
"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": {
"inputs": {
"flake-compat": "flake-compat_4",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1746453552,
"narHash": "sha256-r66UGha+7KVHkI7ksrcMjnw/mm9Sg4l5bQlylxHwdGU=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "be618645aa0adf461f778500172b6896d5ab2d01",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1742669843,
"narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=",
"lastModified": 1748026106,
"narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1e5b653dff12029333a6546c11e108ede13052eb",
"rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
"type": "github"
},
"original": {
@@ -734,13 +819,45 @@
"type": "github"
}
},
"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": {
"locked": {
"lastModified": 1743346368,
"narHash": "sha256-DJv361yCiMiMyKA1elFtgJ9CbK/nEXLKj7vY0zUBmTk=",
"lastModified": 1748330006,
"narHash": "sha256-g6dhnA/An7un00tBZ8MeC7V0lU9lLySP9+brMXrm3TU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e68c2965da5c7f149dd8543c63d7217753e00c32",
"rev": "68a7635955e17148449379318fefcb60b894e775",
"type": "github"
},
"original": {
@@ -812,11 +929,11 @@
},
"nixpkgs-unstable_2": {
"locked": {
"lastModified": 1743095683,
"narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=",
"lastModified": 1748190013,
"narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6",
"rev": "62b852f6c6742134ade1abdd2a21685fd617a291",
"type": "github"
},
"original": {
@@ -858,26 +975,42 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1743231893,
"narHash": "sha256-tpJsHMUPEhEnzySoQxx7+kA+KUtgWqvlcUBqROYNNt0=",
"lastModified": 1742937945,
"narHash": "sha256-lWc+79eZRyvHp/SqMhHTMzZVhpxkRvthsP1Qx6UCq0E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c570c1f5304493cafe133b8d843c7c1c4a10d3a6",
"rev": "d02d88f8de5b882ccdde0465d8fa2db3aa1169f7",
"type": "github"
},
"original": {
"id": "nixpkgs",
"owner": "NixOS",
"ref": "nixos-24.11",
"type": "indirect"
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1737003892,
"narHash": "sha256-RCzJE9wKByLCXmRBp+z8LK9EgdW+K+W/DXnJS4S/NVo=",
"lastModified": 1748162331,
"narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ae06b9c2d83cb5c8b12d7d0e32692e93d1379713",
"rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-25.05",
"type": "indirect"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1747312588,
"narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b1bebd0fe266bbd1820019612ead889e96a8fa2d",
"type": "github"
},
"original": {
@@ -887,7 +1020,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_7": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
@@ -903,6 +1036,60 @@
"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": {
"inputs": {
"flake-compat": "flake-compat_2",
@@ -913,11 +1100,11 @@
]
},
"locked": {
"lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"lastModified": 1747372754,
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
"type": "github"
},
"original": {
@@ -959,14 +1146,15 @@
},
"root": {
"inputs": {
"Hyprspace": "Hyprspace",
"ghostty": "ghostty",
"home-manager": "home-manager",
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
"hyprswitch": "hyprswitch",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_4",
"nix-on-droid": "nix-on-droid",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_5",
"nixpkgs-latest": "nixpkgs-latest",
"nixpkgs-unstable": "nixpkgs-unstable_2",
"sops-nix": "sops-nix",
@@ -1029,11 +1217,11 @@
]
},
"locked": {
"lastModified": 1737080704,
"narHash": "sha256-n+J2h9GM9ZpFOQUmtZoCr1+DFF/iO5UlmLJeHIxbZGY=",
"lastModified": 1747363019,
"narHash": "sha256-N4dwkRBmpOosa4gfFkFf/LTD8oOcNkAyvZ07JvRDEf0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "f9953fe89f8b65401fc4d4a288940bc2cb072949",
"rev": "0e624f2b1972a34be1a9b35290ed18ea4b419b6f",
"type": "github"
},
"original": {
@@ -1042,6 +1230,22 @@
"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": {
"inputs": {
"nixpkgs": [
@@ -1049,11 +1253,11 @@
]
},
"locked": {
"lastModified": 1743305778,
"narHash": "sha256-Ux/UohNtnM5mn9SFjaHp6IZe2aAnUCzklMluNtV6zFo=",
"lastModified": 1747603214,
"narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "8e873886bbfc32163fe027b8676c75637b7da114",
"rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd",
"type": "github"
},
"original": {
@@ -1063,21 +1267,6 @@
}
},
"systems": {
"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_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -1092,7 +1281,7 @@
"type": "github"
}
},
"systems_3": {
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@@ -1107,6 +1296,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
@@ -1137,21 +1341,6 @@
"type": "github"
}
},
"systems_6": {
"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"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
@@ -1180,11 +1369,11 @@
]
},
"locked": {
"lastModified": 1741934139,
"narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=",
"lastModified": 1745871725,
"narHash": "sha256-M24SNc2flblWGXFkGQfqSlEOzAGZnMc9QG3GH4K/KbE=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "150b0b6f52bb422a1b232a53698606fe0320dde0",
"rev": "76bbf1a6b1378e4ab5230bad00ad04bc287c969e",
"type": "github"
},
"original": {
@@ -1196,15 +1385,15 @@
"yazi": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1743344227,
"narHash": "sha256-Lp1JUMrhvAmCzftOSQ2Sr0+svemxSxcLeZ4HkmdLXbE=",
"lastModified": 1748249183,
"narHash": "sha256-I+JvW3752iZq4QrTOUDvhVA++0LHq974XxHjQrjA6lM=",
"owner": "sxyazi",
"repo": "yazi",
"rev": "1765aba68440f73c590cedac14ece6778fe88ff5",
"rev": "74a8ea9bc0289f093c34b15755c05fa25a1c5ace",
"type": "github"
},
"original": {
@@ -1221,14 +1410,14 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1742573336,
"narHash": "sha256-7cVQTyMA9V1YqqVXwaxmrsUKE8LjnBdIj6fvpKKuAxo=",
"lastModified": 1747505540,
"narHash": "sha256-wJTXPH8VellWNupRxMvv9kkIo+271t4XVupgvT1RkTU=",
"owner": "lordkekz",
"repo": "nix-yazi-plugins",
"rev": "76e0104f5bfc2517d86cae0332ede54c6d5ba4e8",
"rev": "f3daa56d0f9ea29bd1ecff557f3604ada00fbe31",
"type": "github"
},
"original": {
@@ -1239,7 +1428,7 @@
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1727721329,

122
flake.nix
View File

@@ -2,71 +2,111 @@
description = "Multisystem NixOS Flake of Lennart J. Kurzweg";
inputs = {
nixpkgs = { url = "nixpkgs/nixos-24.11"; };
nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; };
nixpkgs = { url = "nixpkgs/nixos-25.05"; };
nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; };
hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; };
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
home-manager = { url = "github:nix-community/home-manager/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; };
yazi.url = "github:sxyazi/yazi";
yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; };
zen-browser.url = "github:MarceColl/zen-browser-flake";
ghostty.url = "github:ghostty-org/ghostty";
nixos-wsl = { url = "github:nix-community/NixOS-WSL/main"; };
nix-on-droid = { url = "github:nix-community/nix-on-droid/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; };
hyprland = { url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; };
hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
yazi = { url = "github:sxyazi/yazi"; };
yazi-plugins = { url = "github:lordkekz/nix-yazi-plugins"; inputs.nixpkgs.follows = "nixpkgs"; };
zen-browser = { url = "github:MarceColl/zen-browser-flake"; };
ghostty = { url = "github:ghostty-org/ghostty"; };
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let
outputs = { self, ... }@inputs: with inputs; let
system = "x86_64-linux";
user = "nx2";
domain = "nx2.site";
config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
pkgs = import nixpkgs { inherit system config; };
pkgs-unstable = import nixpkgs-unstable { inherit system config; };
pkgs-latest = import nixpkgs-latest { inherit system config; };
nvidia-set = import ./flake-modules/nvidia.nix;
hyper-base = rec {
inherit system;
user = "nx2";
domain = "nx2.site";
home = "/home/${user}/";
};
pkgs = import nixpkgs { inherit system config; } // {
unstable = import nixpkgs-unstable { inherit system config; };
latest = import nixpkgs-latest { inherit system config; };
version = "25.05";
};
nvidia-base = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
rice = import ./flake-modules/rice.nix pkgs;
in {
nixosConfigurations = let
make-nixos-system = host: nixpkgs.lib.nixosSystem {
make-nixos-system = host: nvidia-settings: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./configuration.nix ];
specialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
in { inherit inputs user host domain pkgs-unstable pkgs-latest secrets rice nvidia; };
hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; };
in { inherit pkgs inputs hyper rice secrets; };
};
make-nixos-wsl-system = host: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./nixos-wsl.nix ];
specialArgs = let
hyper = hyper-base // { inherit host; };
in { inherit pkgs inputs hyper rice; };
};
make-nixondroid-system = host: nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./nix-on-droid.nix ];
specialArgs = let
pkgs.version = "24.05";
hyper = hyper-base // {
inherit host;
system = "aarch64-linux";
home = assert 1 == 2; "";
};
in { inherit pkgs inputs hyper rice; };
};
in {
NxXPS = make-nixos-system "NxXPS";
NxNORTH = make-nixos-system "NxNORTH";
NxACE = make-nixos-system "NxACE";
NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; };
NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; };
NxACE = make-nixos-system "NxACE" { enable = false; };
NxWSL = make-nixos-wsl-system "NxWSL";
NxS23U = make-nixondroid-system "NxS23U";
};
homeConfigurations = let
make-home-configuration = host: user: home-manager.lib.homeManagerConfiguration {
make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./home.nix ];
extraSpecialArgs = let
nvidia = nvidia-set // {
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
in { inherit inputs system user host domain pkgs-unstable pkgs-latest rice secrets nvidia; };
hyper = hyper-base // { inherit host; nvidia = nvidia-base // nvidia-settings; };
in { inherit pkgs inputs hyper rice secrets; };
};
make-shell-configuration = host: user: home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [ ./shell-only.nix ];
extraSpecialArgs = let
hyper = hyper-base // { inherit host; };
in { inherit pkgs inputs hyper rice secrets; };
};
in {
"${user}@NxXPS" = make-home-configuration "NxXPS" user;
"${user}@NxNORTH" = make-home-configuration "NxNORTH" user;
"${user}@NxACE" = make-home-configuration "NxACE" user;
"${hyper-base.user}@NxXPS" = make-home-configuration "NxXPS" hyper-base.user { enable = true; prime = true; };
"${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}@NxS23U" = make-shell-configuration "NxS23U" hyper-base.user;
"${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user;
};
};
}

View File

@@ -1,33 +1,6 @@
{ config, pkgs, lib, host, secrets, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, ... }:
{
home.packages = with pkgs; [
bitwarden
bitwarden-cli
];
# home.file.".config/Bitwarden CLI/data.json".text = ''
# {
# "stateVersion": 9,
# "global": {
# "theme": "system",
# "window": {},
# "environmentUrls": {
# "base": "https://pw.nx2.site",
# "api": null,
# "identity": null,
# "webVault": null,
# "icons": null,
# "notifications": null,
# "events": null,
# "keyConnector": null
# },
# "region": "Self-hosted",
# "installedVersion": "2023.12.0"
# }
# }
# '';
# home.sessionVariables.BW_SESSION = secrets.bitwarden.env.bw-session;
}

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, user, secrets, domain, ... }: let
calendars = [
{ pkgs, hyper, secrets, ... }: let
calendars = with hyper; [
{
name = "Preservation";
primary = true;
@@ -82,10 +82,10 @@ in {
inherit primary;
remote = {
inherit url name;
userName = user; # my globally set username
userName = hyper.user; # my globally set username
};
};
in lib.attrsets.mergeAttrsList (
in pkgs.lib.attrsets.mergeAttrsList (
map (calendar: {
"${calendar.name}" = transform_caledar_set ( default_set // calendar );
}) calendars
@@ -93,7 +93,7 @@ in {
programs.thunderbird.settings = let
to_safe_name = name: (builtins.replaceStrings ["."] ["-"]) name;
in (lib.attrsets.mergeAttrsList (
in (pkgs.lib.attrsets.mergeAttrsList (
map (calendar: with ( default_set // calendar ); {
"calendar.registry.${to_safe_name calendar.name}.cache.enabled" = true;
"calendar.registry.${to_safe_name calendar.name}.calendar-main-default" = primary;
@@ -102,11 +102,11 @@ in {
"calendar.registry.${to_safe_name calendar.name}.name" = name;
"calendar.registry.${to_safe_name calendar.name}.type" = type;
"calendar.registry.${to_safe_name calendar.name}.uri" = url;
"calendar.registry.${to_safe_name calendar.name}.username" = user;
"calendar.registry.${to_safe_name calendar.name}.username" = hyper.user;
"calendar.registry.${to_safe_name calendar.name}.readOnly" = read-only;
}) calendars
) // {
"calendar.list.sortOrder" = lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars;
"calendar.list.sortOrder" = pkgs.lib.fold (calendar: acc: calendar.name + " " + acc) "" calendars;
"calendar.week.start" = 1;
});
}

View File

@@ -1,4 +1,4 @@
{ lib, user, ... }:
{ ... }:
{
programs = {
direnv = {

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{
home = {
packages = with pkgs; [

View File

@@ -1,19 +1,19 @@
{ pkgs, lib, host, user, rice, secrets, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, rice, secrets, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{
home.packages = with pkgs; [
thunderbird
];
programs.thunderbird = let
inherit (lib.generators) toJSON;
inherit (pkgs.lib.generators) toJSON;
extensions = toJSON {} {
"addon@darkreader.org" = "71d6c69d-55f9-4c56-888c-abdcf6efd73d";
};
in {
enable = true;
profiles = {
"${user}" = {
"${hyper.user}" = {
isDefault = true;
settings = with rice.color; {
"calendar.alarms.showmissed" = false;

View File

@@ -1,258 +1,262 @@
# { pkgs-unstable, secrets, user, system, inputs, ...}:
{ rice, user, ... }:
{ pkgs, hyper, rice, ... }:
# browser.tabs.allow_transparent_browser
# https://www.reddit.com/r/FirefoxCSS/comments/1dqws4b/firefox_128_will_allow_the_main_browser_content/
{
home.file = with rice.color; let
blur = builtins.toString 20;
in {
".mozilla/firefox/${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;
home = {
packages = with pkgs; [
firefox
];
file = with rice.color; let
blur = builtins.toString 20;
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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
/* 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;
}
--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/${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 {
#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;
}
.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{
window, #nav-bar{
background-color: transparent !important;
}
}
-moz-appearance: none !important;
background-image: none !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;
".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;
}
}
}
@-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);
/* Sets up minimal incognito scrollbar */
@-moz-document url(about:privatebrowsing) {
:root{
scrollbar-width: thin !important;
scrollbar-color: rgb(161, 161, 161) transparent !important;
}
}
body, html, div#search > * {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
/* 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;
}
}
.g, .appbar {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
@-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;
}
}
div#rso {
* {
@-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};
}
}
div#cnt > div {
.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}
@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;
@-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;
}
}
.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(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;
@-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;
}
}
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;
@-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!
}
}
.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("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: 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 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;
@-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;
}
}
.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

@@ -17,7 +17,7 @@
TFM
PROMPT
" | lolcat --force)
" | lolcat --force 2> /dev/null)
msg="
$(echo -e "$logo" | sed -n 3p): $(cat /etc/*-release | grep PRETTY_NAME | cut -c 14- | rev | cut -c 2- | rev)

View File

@@ -1,9 +1,8 @@
{ pkgs-unstable, pkgs, lib, host, ... }:
lib.mkIf (host == "NxNORTH" || host == "NxACE")
# lib.mkIf (host == "NxNORTH")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxNORTH")
{
home = {
packages = (with pkgs-unstable; [
packages = (with pkgs.unstable; [
protonup
mangohud

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host == "NxXPS")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxXPS")
{
home.packages = with pkgs; [
libinput-gestures

View File

@@ -1,7 +1,7 @@
{ config, rice, inputs, system, ... }:
{ config, rice, hyper, inputs, ... }:
{
home = {
packages = [ inputs.ghostty.packages.${system}.default ];
packages = [ inputs.ghostty.packages.${hyper.system}.default ];
file."${config.xdg.configHome}/ghostty/config".text = with rice.color; /* ini */ ''
font-family="${rice.font.code.name}"
clipboard-read=allow

View File

@@ -1,6 +1,6 @@
{ pkgs-latest, ... }:
{ pkgs, ... }:
{
home.packages = with pkgs-latest; [
home.packages = with pkgs; [
# (gimp-with-plugins.override {
# plugins = with gimpPlugins; [ bimp ];
# })

View File

@@ -1,42 +1,15 @@
{ pkgs, rice, ... }:
{ pkgs, hyper, rice, ... }:
{
home.packages = with pkgs; [
git
delta
(pkgs.writeShellScriptBin "git_monitor" ''
#!/bin/bash
# List of directories to check
directories=(
"$HOME/nix-dots"
"$HOME/obsidian-vault"
"$HOME/Pictures/wallpapers"
)
echo ""
for dir in "''${directories[@]}"; do
if [ -d "$dir" ]; then
cd "$dir" || { echo "Cannot change directory to $dir"; exit 1; }
echo "$(echo $dir | rev | cut -f 1 -d'/' | rev):"
if [[ $* == *--fetch* ]]; then
git fetch
fi
gst
echo ""
cd - > /dev/null || { echo "Cannot change back to the original directory"; exit 1; }
else
echo "Directory $dir does not exist."
fi
done
'')
(writeShellScriptBin "gst" "awk -vOFS='' 'NR==FNR {all[i++] = $0; difffiles[$1] = $0; next;} ! ($2 in difffiles) {print; next;} {gsub($2, difffiles[$2]); print;} END {if (NR != FNR) {exit;} for (i in all) {print all[i];}}' <(git diff --color --stat=$(($(tput cols) - 3)) HEAD | sed '$d; s/^ //') <(git -c color.status=always status -sb)")
];
programs.git = {
enable = true;
package = pkgs.gitFull;
userName = ''Lennart J. Kurzweg (Nx2)'';
userEmail = "git@nx2.site";
userEmail = "git@${hyper.domain}";
delta = {
enable = true;
options = {
@@ -46,6 +19,14 @@
whitespace-error-style = "22 reverse";
};
};
extraConfig = {
credential = {
"https://git.da.dicos.de".username = pkgs.lib.mkIf (hyper.host =="NxWSL") "lkurzweg";
"https://git.da.dicos.de".password = pkgs.lib.mkIf (hyper.host =="NxWSL") "Test";
};
url."ssh://git@git.da.dicos.de/".insteadOf = pkgs.lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/";
pull.rebase = false; # true
};
};
programs.lazygit = {
enable = true;

View File

@@ -1,12 +1,11 @@
{ pkgs, pkgs-unstable, ... }:
{ pkgs, ... }:
{
# there also is a system module
home.packages = (with pkgs; [
home.packages = with pkgs; [
gnupg
gpg-tui
]) ++ ( with pkgs-unstable; [
pinentry-all
]);
];
# services.pcscd.enable = true;
services.gpg-agent = let

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, lib, rice, ... }:
{ pkgs, hyper, rice, ... }:
{
home = {
packages = with pkgs; [
@@ -10,7 +10,7 @@
python311Packages.python-lsp-server
jdt-language-server
ruff
ruff-lsp
# ruff-lsp
pyright
lldb # debugger for llvm stuff
yaml-language-server # yaml
@@ -18,10 +18,8 @@
vale-ls # style-checker lsp (needs vale)
ltex-ls # Ltex (language tool)
vscode-langservers-extracted
] ++ (with pkgs-unstable; [
bash-language-server
helix
]);
];
sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
@@ -30,7 +28,7 @@
programs.helix = {
enable = true;
defaultEditor = true;
package = pkgs-unstable.helix;
package = pkgs.unstable.helix;
settings = {
# theme = "base16_terminal";
theme = "base16";
@@ -53,7 +51,7 @@
preview-completion-insert = true;
completion-trigger-len = 1;
auto-info = true;
true-color = false; # is detected automatically if set to false
true-color = true; # is detected automatically if set to false
undercurl = false; # is detected automatically if set to false
rulers = [];
bufferline = "always";
@@ -274,7 +272,7 @@
command = "nixd";
};
"style-check" = {
command = lib.getExe pkgs.vale-ls;
command = pkgs.lib.getExe pkgs.vale-ls;
};
"language-tool" = {
command = "${pkgs.ltex-ls}/bin/ltex-ls";
@@ -290,7 +288,7 @@
];
};
"llm" = {
command = lib.getExe pkgs.helix-gpt;
command = pkgs.lib.getExe pkgs.helix-gpt;
args = [
"--handler"
"ollama"

View File

@@ -1,4 +1,4 @@
{config, pkgs, pkgs-unstable, inputs, host, user, nvidia, rice, lib, ... }:
{ config, pkgs, hyper, inputs, rice, ... }:
let
animation-speed = "5";
transparency = builtins.toString rice.transparency;
@@ -83,10 +83,10 @@ in {
settings = {
monitor =
if host == "NxXPS" then (with monitors.xps; [
if hyper.host == "NxXPS" then (with monitors.xps; [
"${main.name}, ${main.resolution}, ${main.position}, ${main.scale}"
"${second.name}, ${second.resolution}, ${second.position}, ${second.scale}"
]) else (if host == "NxNORTH" then (with monitors.north; [
]) else (if hyper.host == "NxNORTH" then (with monitors.north; [
"${main.name}, ${main.resolution}, ${main.position}, ${main.scale}"
"${left.name}, ${left.resolution}, ${left.position}, ${left.scale}"
# "${right.name}, ${right.resolution}, ${right.position}, ${right.scale}"
@@ -95,10 +95,10 @@ in {
]));
workspace = let
d1 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name);
d2 = if host == "NxXPS" then monitors.xps.second.name else (if host == "NxNORTH" then monitors.north.left.name else monitors.ace.main.name);
d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.main.name else monitors.ace.main.name);
# d3 = if host == "NxXPS" then monitors.xps.main.name else (if host == "NxNORTH" then monitors.north.right.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.hyper.host == "NxNORTH" then monitors.north.left.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);
compact = "gapsin:0, gapsout:0, bordersize:1, rounding:false";
in [
"11, monitor:${d1}, default:true"
@@ -122,7 +122,7 @@ in {
"28, monitor:${d2}"
"29, monitor:${d2}"
"20, monitor:${d2}"
"31, monitor:${d3}, default:${let x = if host == "NxNORTH" then "true" else "false"; in x}"
"31, monitor:${d3}, default:${let x = if hyper.host == "NxNORTH" then "true" else "false"; in x}"
"32, monitor:${d3}"
"33, monitor:${d3}"
"34, monitor:${d3}"
@@ -143,7 +143,7 @@ in {
# };
env = if nvidia.enable == true then [
env = if hyper.nvidia.enable == true then [
"LIBVA_DRIVER_NAME,nvidia"
"XDG_SESSION_TYPE,wayland"
"GBM_BACKEND,nvidia-drm"
@@ -209,7 +209,7 @@ in {
# bezier = "myBezier, 0.01, 0.9, 0.1, 1.0"; #o
# bezier = "myBezier, 0.83, 0, 0.17, 1"; # io
bezier = "myBezier, 0.33, 1, 0.68, 1";
animation = let direction = if host == "NxXPS" then "slide" else "slidevert"; in [
animation = let direction = if hyper.host == "NxXPS" then "slide" else "slidevert"; in [
"windows, 1, ${animation-speed}, myBezier, slide"
"border, 1, ${animation-speed}, myBezier"
"fade, 1, ${animation-speed}, myBezier"
@@ -409,8 +409,7 @@ in {
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace""
"SUPER, T, exec, SESSION_FROM_DE=TRUE ${terminal}"
"SUPER SHIFT, T, exec, ${terminal-exec}'ssh nxace'"
"SUPER, Z, exec, waybar_mode set ' '"
"SUPER, Z, submap, tuda"
"SUPER, Z, exec, zathura"
"SUPER, U, exec, [tile] thunderbird "
"SUPER, I, exec, ${terminal-exec}'hx ~/nix-dots/ && fish'"
"SUPER SHIFT, I, exec, ${terminal-exec}'nh home switch || read'"
@@ -428,7 +427,7 @@ in {
"SUPER, A, execr, waybar_mode set ' 󰹑 '"
"SUPER, A, submap, scrL"
"SUPER, S, exec, spotify"
"SUPER, D, exec, vesktop"
"SUPER, D, exec, vesktop --disable-gpu-compositing"
"SUPER, F, fullscreen"
# "SUPER, G,"
"SUPER, H, movefocus, l"
@@ -564,8 +563,12 @@ in {
${action_simple { key = "X"; cmd = "exec,firefox https://nx2.site";}}
${action_simple { key = "Y"; cmd = "exec,firefox https://youtube.com";}}
${action_simple { key = "P"; cmd = "exec,firefox https://pw.nx2.site";}}
bind = , Escape, exec, waybar_mode unset
bind = , Escape, submap, reset
${action_simple { key = "P"; cmd = "exec,firefox https://pw.nx2.site";}}
bind=,Z,exec,waybar_mode set ' '
bind=,Z,submap,tuda
bind=,Z,submap,reset
bind=,Escape,exec,waybar_mode unset
bind=,Escape,submap,reset
submap = reset
@@ -588,7 +591,7 @@ in {
submap = color
${action_simple { key = "W"; cmd = ''exec,swww query | sed -n 1p | sed -E 's-.*image: (.*)-"\1"-g' | xargs change_colors_json img && notify-send 'change_colors_json img successfull' ''; }}
${action_simple { key = "M"; cmd = ''exec,change_colors_json manual && notify-send 'change_colors_json manual successfull' ''; }}
${action_simple { key = "D"; cmd = ''exec,firefox /home/${user}/.config/color-pallete.html''; }}
${action_simple { key = "D"; cmd = ''exec,firefox ${hyper.home}/.config/color-pallete.html''; }}
bind = , Escape, execr, waybar_mode unset
bind = , Escape, submap, reset
submap = reset
@@ -606,7 +609,7 @@ in {
};
home.file = let
m = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name;
m = if hyper.host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name;
in {
".config/hypr/hyprlock.conf".text = ''
background {

View File

@@ -1,5 +1,5 @@
{ config, pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{
home.packages = with pkgs; [
texlab # LSP

View File

@@ -3,14 +3,16 @@
home.packages = with pkgs; [ libnotify ];
services.mako = with rice; {
enable = true;
defaultTimeout = 10000; # in ms
backgroundColor = color.background;
textColor = color.foreground;
borderColor = color.border;
borderSize = border-width;
font = font.code.name;
borderRadius = rounding;
anchor = "top-right";
margin = builtins.toString (gap-size * 2) ;
settings = {
defaultTimeout = 10000; # in ms
backgroundColor = color.background;
textColor = color.foreground;
borderColor = color.border;
borderSize = border-width;
font = font.code.name;
borderRadius = rounding;
anchor = "top-right";
margin = builtins.toString (gap-size * 2) ;
};
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, host, ... }:
{ pkgs, hyper, ... }:
{
home.packages = with pkgs; [
# cinny-desktop
@@ -79,7 +79,7 @@
nx2site.ssl_verify = on
nx2site.username = "nx2"
nx2site.password = "''${sec.data.matrix_nx2site_password}"
nx2site.device_name = "Weechat@${host}"
nx2site.device_name = "Weechat@${hyper.host}"
nx2site.autoreconnect_delay = 10
nx2site.sso_helper_listening_port = 0
'';

View File

@@ -1,13 +1,13 @@
{ config, pkgs-unstable, ... }:
{ pkgs, hyper, ... }:
{
home = {
packages = with pkgs-unstable; [
packages = with pkgs; [
nh
nix-output-monitor
nvd
];
sessionVariables = {
FLAKE = "${config.home.homeDirectory}/nix-dots";
NH_FLAKE = "${hyper.home}/nix-dots";
};
};
}

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, nvidia, ... }:
lib.mkIf (nvidia.enable == true)
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.nvidia.enable == true)
{
home = {
packages = with pkgs; [

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{
# home.packages = with pkgs; [
# obs-studio

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, user, ... }:
{ pkgs, ... }:
{
home.packages = with pkgs; [
libreoffice

View File

@@ -1,6 +1,7 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
ollama
(writers.writePython3Bin "ooo" {
libraries = [ pkgs.python3Packages.ollama ];
flakeIgnore = [ "E501" "E305" "E701" "E704" "E302" "E114" "F841" "E121" ];

View File

@@ -0,0 +1,38 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
bat
browsh
cmake
dig
du-dust
exiftool
eza
ffmpeg
figlet
fzf
glib
glow
gnumake
htop
imagemagick
jq
lolcat
lynx
mediainfo
mpv
neofetch
pdfgrep
pipes
pv
reflex
ripgrep
screen
speedtest-go
sssnake
systemctl-tui
tldr
w3m
yt-dlp
];
}

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, secrets, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, secrets, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{
home.packages = [
pkgs.remmina
@@ -7,7 +7,7 @@ lib.mkIf (host != "NxACE")
(pkgs.writeShellScriptBin "connect_to_pnx" ''
pushd ~/.vpn/
sudo openvpn --config /home/nx2/.vpn/ljk-pnx.ovpn --auth-user-pass ~/.vpn/ljk-pnx-pass.txt #gets put there by home-manager
sudo openvpn --config ${hyper.home}/.vpn/ljk-pnx.ovpn --auth-user-pass ~/.vpn/ljk-pnx-pass.txt #gets put there by home-manager
popd
'')

View File

@@ -1,10 +1,9 @@
{ pkgs, pkgs-unstable, lib, host, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{
home.packages = with pkgs; [
erlang
rebar3
] ++ (with pkgs-unstable; [
gleam
]);
];
}

View File

@@ -1,7 +1,7 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, ... }:
{
home.packages = with pkgs; [
nodejs
typescript-language-server
];
}

View File

@@ -3,8 +3,6 @@ let
my-sent = pkgs.sent.override {
patches = [
./sent.patch
# /home/${user}/.local/share/sent.patch
# (builtins.toFile "/home/${user}/
];
};
in

View File

@@ -1,4 +1,4 @@
{ user, inputs, ... }:
{ hyper, inputs, ... }:
{
imports = [
inputs.sops-nix.homeManagerModules.sops
@@ -6,7 +6,7 @@
sops = {
# age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
gnupg.home = "/home/${user}/.gnupg";
gnupg.home = "${hyper.home}/.gnupg";
defaultSopsFile = ../sops-secrets.yaml;
# %r is $XDG_RUNTIME_DIR

View File

@@ -1,25 +1,25 @@
{ pkgs, domain, ... }:
{ pkgs, hyper, ... }:
{
home = {
packages = with pkgs; [ sshfs ];
file.".ssh/config".text = ''
HOST nxace
HostName ssh.${domain}
User nx2
HostName ssh.${hyper.domain}
User ${hyper.user}
Port 50022
HOST nxacel
HostName 10.0.1.1
User nx2
User ${hyper.user}
Port 50022
HOST nxrpil
HostName 10.0.1.31
User nx2
User ${hyper.user}
Port 22
HOST nxgit
HostName ssh.${domain}
HostName ssh.${hyper.domain}
User git
Port 50022
'';

View File

@@ -1,12 +1,13 @@
{ lib, rice, ... }:
{ pkgs, rice, ... }:
{
programs.starship = {
enable = true;
package = pkgs.starship;
# enableBashIntegration = true;
enableFishIntegration = true;
settings = with rice.color; {
add_newline = false;
format = lib.strings.concatMapStrings (x: "$" + x) [
format = pkgs.lib.strings.concatMapStrings (x: "$" + x) [
"jobs"
"battery"
"username"
@@ -154,5 +155,5 @@
vlang.format = "[\\[$symbol($version)\\]](fg:${foreground})";
zig.format = "[\\[$symbol($version)\\]](fg:${foreground})";
};
};
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{ pkgs, ... }:
{
home.packages = with pkgs; [
(writeShellApplication {

View File

@@ -1,5 +1,5 @@
{ config, pkgs, lib, host, ... }:
lib.mkIf (host == "NxNORTH")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxNORTH")
{
home.packages = with pkgs; [
virt-manager

View File

@@ -1,6 +1,6 @@
{ config, pkgs, lib, user, host, rice, allowed, ... }:
{ config, pkgs, hyper, rice, ... }:
{
config = lib.mkIf (host != "NxACE") {
config = pkgs.lib.mkIf (hyper.host != "NxACE") {
home.packages = [
pkgs.vscodium
pkgs.nixpkgs-fmt
@@ -8,108 +8,97 @@
programs.vscode = {
enable = true;
package = pkgs.vscodium;
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
ms-python.python
ms-python.black-formatter
redhat.vscode-yaml
redhat.vscode-xml
ms-python.python
mhutchie.git-graph
github.vscode-pull-request-github
esbenp.prettier-vscode
gencer.html-slim-scss-css-class-completion
donjayamanne.githistory
mads-hartmann.bash-ide-vscode
bungcip.better-toml
arrterian.nix-env-selector
# ms-vscode-remote.remote-ssh
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "just-black";
publisher = "nur";
version = "3.1.1";
sha256 = "sha256-fatJZquCDsLDFGVzBol2D6LIZUbZ6GzqcVEFAwLodW0=";
}
{
name = "vscode-sshfs";
publisher = "Kelvin";
version = "1.26.1";
sha256 = "sha256-WO9vYELNvwmuNeI05sUBE969KAiKYtrJ1fRfdZx3OYU=";
}
{
name = "color-highlight";
publisher = "naumovs";
version = "2.8.0";
sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE=";
}
{
name = "dancehelix";
publisher = "silverquark";
version = "0.5.16";
sha256 = "sha256-oHwtlbB18ctEnfStDOpJ+2/Kq41JZog8FVhTa1/s7m0=";
}
# {
# name = "remote-ssh-edit";
# publisher = "ms-vscode-remote";
# version = "0.86.0";
# sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
# }
# {
# name = "remote-ssh";
# publisher = "ms-vscode-remote";
# version = "0.110.2024030715";
# sha256 = "sha256-gkxrBwPRDdLFaxc1/vYFBsv4Z0JOhDzb8LrLhkToC/g=";
# }
];
userSettings = {
workbench.colorTheme = "Just Black";
editor.fontFamily = "'${rice.font.code.name}', 'monospace', monospace";
remote.SSH.useLocalServer = false;
profiles.default ={
userSettings = {
workbench.colorTheme = "Just Black";
editor.fontFamily = "'${rice.font.code.name}', 'monospace', monospace";
remote.SSH.useLocalServer = false;
};
keybindings = [
{
key = "ctrl+d";
command = "editor.action.deleteLines";
when = "textInputFocus";
}
{
key = "ctrl+shift+d";
command = "editor.action.duplicateSelection";
when = "textInputFocus";
}
{
# unset so that ctrl d is not set twice
key = "";
command = "editor.action.addSelectionToNextFindMatch";
when = "editorFocus";
}
{
# unset so that ctrl shift d is not set twice
key = "";
command = "workbench.view.debug";
}
];
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
ms-python.python
ms-python.black-formatter
redhat.vscode-yaml
redhat.vscode-xml
ms-python.python
mhutchie.git-graph
github.vscode-pull-request-github
esbenp.prettier-vscode
gencer.html-slim-scss-css-class-completion
donjayamanne.githistory
mads-hartmann.bash-ide-vscode
bungcip.better-toml
arrterian.nix-env-selector
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "just-black";
publisher = "nur";
version = "3.1.1";
sha256 = "sha256-fatJZquCDsLDFGVzBol2D6LIZUbZ6GzqcVEFAwLodW0=";
}
{
name = "vscode-sshfs";
publisher = "Kelvin";
version = "1.26.1";
sha256 = "sha256-WO9vYELNvwmuNeI05sUBE969KAiKYtrJ1fRfdZx3OYU=";
}
{
name = "color-highlight";
publisher = "naumovs";
version = "2.8.0";
sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE=";
}
{
name = "dancehelix";
publisher = "silverquark";
version = "0.5.16";
sha256 = "sha256-oHwtlbB18ctEnfStDOpJ+2/Kq41JZog8FVhTa1/s7m0=";
}
];
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
};
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
keybindings = [
{
key = "ctrl+d";
command = "editor.action.deleteLines";
when = "textInputFocus";
}
{
key = "ctrl+shift+d";
command = "editor.action.duplicateSelection";
when = "textInputFocus";
}
{
# unset so that ctrl d is not set twice
key = "";
command = "editor.action.addSelectionToNextFindMatch";
when = "editorFocus";
}
{
# unset so that ctrl shift d is not set twice
key = "";
command = "workbench.view.debug";
}
];
};
};
imports = if host != "NxACE" then [
# Make vscode settings writable
(import
(builtins.fetchurl {
url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix";
sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8";
})
{ inherit config lib; })
# imports = if hyper.host != "NxACE" then [
# # Make vscode settings writable
# (import
# (builtins.fetchurl {
# url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/mutability.nix";
# sha256 = "4b5ca670c1ac865927e98ac5bf5c131eca46cc20abf0bd0612db955bfc979de8";
# })
# { inherit config pkgs; lib = pkgs.lib; })
(import
(builtins.fetchurl {
url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix";
sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f";
})
{ inherit config lib pkgs; })
] else [];
# (import
# (builtins.fetchurl {
# url = "https://gist.githubusercontent.com/piousdeer/b29c272eaeba398b864da6abf6cb5daa/raw/41e569ba110eb6ebbb463a6b1f5d9fe4f9e82375/vscode.nix";
# sha256 = "fed877fa1eefd94bc4806641cea87138df78a47af89c7818ac5e76ebacbd025f";
# })
# { inherit config pkgs; lib = pkgs.lib; })
# ] else [];
}

View File

@@ -1,6 +1,6 @@
{ pkgs-unstable, ... }:
{ pkgs, ... }:
{
home.packages = with pkgs-unstable; [
home.packages = with pkgs; [
(writers.writePython3Bin "change_colors_json" {
libraries = with python3Packages; [ numpy pillow scikit-learn ];
flakeIgnore = [ "E302" "E305" "E226" "E501" ];

View File

@@ -1,4 +1,4 @@
{ config, pkgs, rice, domain, user, ... }:
{ pkgs, hyper, rice, ... }:
let
sep = " ";
in {
@@ -121,8 +121,8 @@ def get_ongoing_or_next_event(url, username, password):
if __name__ == "__main__":
password_file = "/home/nx2/.config/sops-nix/secrets/nx2site/radicale/password" # Path to password file
cache_file = "/tmp/caldav_event_cache.json" # Path to cache file
url = "https://dav.${domain}/"
username = "${user}"
url = "https://dav.${hyper.domain}/"
username = "${hyper.user}"
password = get_password(password_file)
event_dict = load_cache(cache_file)
@@ -175,6 +175,7 @@ if __name__ == "__main__":
margin-bottom = 0;
margin-right = 0;
spacing = 10;
fixed-center = true;
modules-left = [
# "cpu"
# "memory"
@@ -189,7 +190,7 @@ if __name__ == "__main__":
];
modules-right = [
"custom/mode"
"custom/caldav_event"
# "custom/caldav_event"
"custom/cclock"
"tray"
];
@@ -212,6 +213,7 @@ if __name__ == "__main__":
format = "󰃰${sep}{}";
exec = "caldav_event";
restart-interval = 60;
max-width = 60;
};
"custom/mode" = {
exec = "cat /tmp/waybar-mode";
@@ -311,6 +313,10 @@ if __name__ == "__main__":
color: rgb(${f accent.bright});
}
#workspaces {
font-family: ${rice.font.code.name};
}
#workspaces button {
color: rgb(${f accent.base});
padding-left: 15px;
@@ -335,7 +341,7 @@ if __name__ == "__main__":
color: rgb(${f red.base});
}
#window, #custom-ctimeremaining {
#window, #custom-caldav_event {
font-family: ${rice.font.base.name}, ${rice.font.code.name};
color: rgb(${f tertiary.bright});
}

View File

@@ -1,18 +1,16 @@
{ pkgs, system, rice, inputs, ... }:
{ pkgs, hyper, rice, inputs, ... }:
{
home.packages = with pkgs; [
# yazi
# dragon
unar
];
];
programs.yazi = {
enable = true;
# package = pkgs.yazi;
package = inputs.yazi.packages.${system}.default;
package = inputs.yazi.packages.${hyper.system}.default;
enableFishIntegration = true;
shellWrapperName = "ya";
plugins = with inputs.yazi-plugins.packages.${system}; {
plugins = with inputs.yazi-plugins.packages.${hyper.system}; {
inherit
# chmod
starship;
@@ -271,6 +269,7 @@
{ mime = "audio/*"; use = "play"; }
{ mime = "application/x-httpd-php"; use = [ "edit" "browser" ]; }
{ mime = "application/javascript"; use = "edit"; }
{ mime = "application/json"; use = "edit"; }
{ mime = "application/ld+json"; use = "edit"; }
{ mime = "application/pdf"; use = "document"; }

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, lib, host, user, inputs, ... }:
{ pkgs, hyper, inputs, ... }:
{
imports = [
./home-modules/auto-mount.nix
@@ -12,7 +12,6 @@
./home-modules/email.nix
./home-modules/firefox.nix
./home-modules/fish.nix
# ./home-modules/foot.nix
./home-modules/games.nix
./home-modules/gestures.nix
./home-modules/ghostty.nix
@@ -32,7 +31,6 @@
./home-modules/nixd.nix
./home-modules/nvidia.nix
./home-modules/nxgs.nix
# ./home-modules/nx-gcal-event.nix
./home-modules/obs.nix
./home-modules/office.nix
./home-modules/ollama.nix
@@ -61,13 +59,14 @@
./home-modules/yazi.nix
./home-modules/zathura.nix
./home-modules/zoxide.nix
] ++ (if (host == "NxACE") then [
] ++ (if (hyper.host == "NxACE") then [
./home-modules/nx2site.nix
./home-modules/nx2site-backup.nix
] else []);
home.username = user;
home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05";
home.username = hyper.user;
# home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here
home.homeDirectory = "/home/${hyper.user}";
home.stateVersion = pkgs.version;
home.packages = with pkgs; [
bat
brightnessctl
@@ -110,41 +109,38 @@
swww
systemctl-tui
tldr
unstable.firefox
unstable.spotify
w3m
wev
wl-clipboard
xclip
xfce.thunar
xournal
# xournal
yt-dlp
inputs.zen-browser.packages."${system}".default
] ++ (with pkgs-unstable; [
firefox
spotify
]) ++ (if host != "NxACE" then (with pkgs; [
] ++ (if hyper.host != "NxACE" then [
signal-desktop
obsidian
zoom-us
inkscape
]) else (with pkgs-unstable; [
] else {
]));
});
xdg = {
enable = true;
configHome = /home/${user}/.config;
cacheHome = /home/${user}/.cache;
dataHome = /home/${user}/.local/share;
stateHome = /home/${user}/.local/state;
configHome = "${hyper.home}.config";
cacheHome = "${hyper.home}.cache";
dataHome = "${hyper.home}.local/share";
stateHome = "${hyper.home}.local/state";
mimeApps = {
enable = true;
defaultApplications =
let
defaultApplications = let
browser = "firefox.desktop";
in
{
in {
"default-web-browser" = [ browser ];
"text/html" = [ browser ];
"text/htm" = [ browser ];

22
nixos-wsl.nix Normal file
View File

@@ -0,0 +1,22 @@
{ pkgs, hyper, inputs, ... }:
{
imports = [
inputs.nixos-wsl.nixosModules.default
./system-modules/users.nix
./system-modules/gc.nix
./system-modules/docker.nix
./system-modules/gpg.nix
./system-modules/networking.nix
./system-modules/nixd.nix
# ./system-modules/sops.nix
# ./system-modules/sshd.nix
# ./system-modules/syncthing.nix
];
system.stateVersion = pkgs.version;
# system.stateVersion = "24.11";
wsl = {
defaultUser = hyper.user;
enable = true;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

44
shell-only.nix Normal file
View File

@@ -0,0 +1,44 @@
{ pkgs, hyper, ... }:
{
imports = [
./home-modules/bash.nix
./home-modules/color-pallete.nix
./home-modules/direnv.nix
./home-modules/fish.nix
./home-modules/git.nix
./home-modules/gpg.nix
./home-modules/helix.nix
./home-modules/latex.nix
./home-modules/nh.nix
./home-modules/nixd.nix
./home-modules/nxgs.nix
./home-modules/pandoc.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/sops.nix
./home-modules/ssh.nix
./home-modules/starship.nix
./home-modules/vale.nix
./home-modules/yazi.nix
./home-modules/zoxide.nix
./home-modules/pkgs-list/shell.nix
];
home.username = hyper.user;
# home.homeDirectory = hyper.home; # for some reason you cant use hyper.home here
home.homeDirectory = "/home/${hyper.user}";
home.stateVersion = pkgs.version;
xdg = {
enable = true;
configHome = "${hyper.home}/.config";
cacheHome = "${hyper.home}/.cache";
dataHome = "${hyper.home}/.local/share";
stateHome = "${hyper.home}/.local/state";
};
programs.home-manager.enable = true;
}

View File

@@ -47,10 +47,6 @@ eduroam:
hsmw-vpn-secret: ENC[AES256_GCM,data:3bKxRGTQcbhRjzARSpYBW5ekQW/U/ixzNiFmO36gw0NKyDMLlbVbJBqXvi71M0GXgmo/FA==,iv:7bVDA8u9apDNXFY/vEMbz/0HywG5Pyrl5JfZrcNCr8w=,tag:xz4j7cEc5hvLwrItWjkx0Q==,type:str]
postgres-pw: ENC[AES256_GCM,data:D9b7IbvLshmRuSyF9+V3WqVf/95+OhCJm0g=,iv:D4tpzEBzcCatbnQwtOGn8X0QSrXOye20rXaw8TSB7Gk=,tag:Q0B/86eDKkhu0Jnln1sUyg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1vkqn2nars5qmpr35tac0x9vshphrq6nnzjfyxwusgn27kt3zualssv0u8e
enc: |
@@ -88,8 +84,8 @@ sops:
SHJLR3lvdlFiRmJuU25RUHFFTmpjamMKbzycdDvQBAuOiRROTZEQSnaXoPapz73L
yVS9EUP25FSx/sGqRqaCefbeaybuM1aso6LDnlomv4Bib7zjugWKSw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-03-07T17:02:01Z"
mac: ENC[AES256_GCM,data:js375bjy8Z4ApUXbw4eIqNl5BBgeX2bwMFBCx63LNCsb56OlHyYobQGtL1CwcDGW/+hwVLJSxbEDwqzJiu5vQ/2Cp00nVwvumHrvqZi/Ka4r87uNd6psE4nMq6ROHP0kJm6STKqd6MDyuLRjfX5zrki7ZhYTWsYS90/d9SUHUj8=,iv:W3w1f7lkL3fuOWmNhLUsOTKG18+wLhWA04GjygDIUEc=,tag:AYy9O7OcsY2W4VbOzyM5oA==,type:str]
lastmodified: "2025-05-27T09:47:30Z"
mac: ENC[AES256_GCM,data:B+XFym/hSq5ntjm7N2b2026tyX8jVfUcHBIbe+UIPtVNoT9Mx95vlcBnF/6+KrsI1VIe2x1rraIt0KyVVg6g3S0LVfDZumMvgjTtGQIJsLwz0UOOnkX1CBJYpca+Ec1ojtp/7xKFxBuBTuQIPsrDWF+myqvdkYF9Gb0mjMvGbdo=,iv:WAGuWuFBVwY39SBoW5JXtZMAKmzqaQSV7rBcWYQzQ1s=,tag:rQuoAh22DgFTx7iilgT74A==,type:str]
pgp:
- created_at: "2024-06-09T19:44:41Z"
enc: |-
@@ -104,4 +100,4 @@ sops:
-----END PGP MESSAGE-----
fp: 22FB2CC03DC5292AB81CF67D0AF27B383170E634
unencrypted_suffix: _unencrypted
version: 3.9.4
version: 3.10.2

View File

@@ -1,5 +1,5 @@
{ pkgs, host, lib, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, lib, ... }:
lib.mkIf (hyper.host != "NxACE")
{
environment.systemPackages = with pkgs; [
adbfs-rootless

View File

@@ -1,7 +1,7 @@
{ config, pkgs, pkgs-unstable, lib, host, domain, inputs, ... }:
{ config, pkgs, hyper, inputs, ... }:
let
grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.${domain}";
domain = "git.${hyper.domain}";
owner = "nx2";
repo = "grub-theme-ascii-diana";
rev = "0.5.0";
@@ -9,10 +9,10 @@ let
});
in
{
imports = if host == "NxNORTH" then [
imports = if hyper.host == "NxNORTH" then [
inputs.lanzaboote.nixosModules.lanzaboote
] else [];
config = if host == "NxNORTH" then {
config = if hyper.host == "NxNORTH" then {
# I have to boot with secureboot becasue of the chinese spyware called Vanguard
environment.systemPackages = with pkgs; [ sbctl ];
@@ -22,7 +22,7 @@ in
in {
enable = true;
pkiBundle = "/etc/secureboot";
package = lib.mkForce (pkgs.writeShellApplication {
package = pkgs.lib.mkForce (pkgs.writeShellApplication {
name = "lzbt";
runtimeInputs = [
inputs.lanzaboote.packages.x86_64-linux.tool
@@ -74,13 +74,13 @@ in
# '';
# };
};
kernelPackages = pkgs-unstable.linuxPackages_zen;
kernelPackages = pkgs.linuxPackages_zen;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1'';
};
security.polkit.enable = true;
} else if host == "NxXPS" then {
} else if hyper.host == "NxXPS" then {
boot = {
loader = {
efi.canTouchEfiVariables = true;
@@ -103,7 +103,7 @@ in
'';
};
};
kernelPackages = pkgs-unstable.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_latest;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
kernelModules = [ "v4l2loopback" ];
extraModprobeConfig = ''options v4l2loopback devices=1 video_nr=1 card_label="OBS VCam" exclusive_caps=1'';

View File

@@ -1,4 +1,4 @@
{ config, pkgs, user, domain, ... }:
{ config, pkgs, hyper, ... }:
{
systemd.timers."nx_cal_lec" = {
enable = true;
@@ -74,7 +74,7 @@ def fetch_and_save_ical_events(ical_url, save_path):
if __name__ == "__main__":
# Replace with your iCal URL and target file path
ICAL_URL = "https://zlypher.github.io/lol-events/cal/league-of-legends-lec.ical"
SAVE_PATH = "${config.services.nginx.virtualHosts."${domain}".root}/lec.ics"
SAVE_PATH = "${config.services.nginx.virtualHosts."${hyper.domain}".root}/lec.ics"
fetch_and_save_ical_events(ICAL_URL, SAVE_PATH)
'');
@@ -83,7 +83,7 @@ if __name__ == "__main__":
'';
serviceConfig = {
Type = "oneshot";
User = "nx2";
User = hyper.user;
};
};
}

View File

@@ -1,4 +1,4 @@
{ config, pkgs, domain, ... }:
{ config, pkgs, hyper, ... }:
{
systemd.timers."nx_cal_lr" = {
enable = true;
@@ -59,7 +59,7 @@ def fetch_and_save_ical_events(ical_url, save_path):
if __name__ == "__main__":
# Replace with your iCal URL and target file path
ICAL_URL = "https://zlypher.github.io/lol-events/cal/league-of-legends-nlc.ical"
SAVE_PATH = "${config.services.nginx.virtualHosts."${domain}".root}/lr.ics"
SAVE_PATH = "${config.services.nginx.virtualHosts."${hyper.domain}".root}/lr.ics"
fetch_and_save_ical_events(ICAL_URL, SAVE_PATH)
'');
@@ -68,7 +68,7 @@ if __name__ == "__main__":
'';
serviceConfig = {
Type = "oneshot";
User = "nx2";
User = hyper.user;
};
};
}

View File

@@ -1,4 +1,4 @@
{ config, pkgs, user, ... }:
{ pkgs, hyper, ... }:
let
radicale-root = "/var/lib/radicale";
web-root = "/var/nginx/webroot";
@@ -115,11 +115,11 @@ def combine_ics_from_directories(directories, output_file):
if __name__ == "__main__":
# List of directories containing .ics files
DIRECTORIES = [
"${radicale-root}/collections/collection-root/${user}/preservation",
"${radicale-root}/collections/collection-root/${user}/effort",
"${radicale-root}/collections/collection-root/${user}/experience",
"${radicale-root}/collections/collection-root/${user}/exposure",
"${radicale-root}/collections/collection-root/${user}/engagement",
"${radicale-root}/collections/collection-root/${hyper.user}/preservation",
"${radicale-root}/collections/collection-root/${hyper.user}/effort",
"${radicale-root}/collections/collection-root/${hyper.user}/experience",
"${radicale-root}/collections/collection-root/${hyper.user}/exposure",
"${radicale-root}/collections/collection-root/${hyper.user}/engagement",
]
# Path to the output .ics file
@@ -132,7 +132,7 @@ if __name__ == "__main__":
'';
serviceConfig = {
Type = "oneshot";
User = "nx2";
User = hyper.user;
};
};
}

View File

@@ -1,11 +1,11 @@
{ pkgs, user, ... }:
{ pkgs, hyper, ... }:
{
services.greetd = {
enable = true;
settings = rec {
hyprland = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --cmd Hyprland --remember-user-session --window-padding 5";
user = user;
user = hyper.user;
};
default_session = hyprland;
vt = 2;

View File

@@ -1,4 +1,4 @@
{ config, pkgs, user, ... }:
{ pkgs, hyper, ... }:
{
environment.systemPackages = with pkgs; [
@@ -12,7 +12,7 @@
# vpnKitMaxPortIdleTime = 0;
# };
};
users.users."${user}".extraGroups = [ "docker" ];
users.users."${hyper.user}".extraGroups = [ "docker" ];
networking.firewall.allowedTCPPorts = [
80
443

View File

@@ -1,9 +1,4 @@
{
pkgs,
# pkgs-unstable,
rice,
...
}:
{ pkgs, rice, ... }:
{
fonts.packages = with pkgs; [
noto-fonts
@@ -12,10 +7,14 @@
noto-fonts-emoji
newcomputermodern
atkinson-hyperlegible
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
nerd-fonts.jetbrains-mono
nerd-fonts.zed-mono
nerd-fonts.profont
nerd-fonts.proggy-clean-tt
nerd-fonts.heavy-data
nerd-fonts._3270
] ++ (with rice.font; [
base.package
code.package
# ]) ++ (with pkgs-unstable; [
]);
}

View File

@@ -1,6 +1,5 @@
{ lib, host, ... }:
lib.mkIf (host == "NxNORTH" || host == "NxACE")
# lib.mkIf (host == "NxNORTH")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxNORTH" || hyper.host == "NxACE")
{
programs = {
steam = {

View File

@@ -1,4 +1,4 @@
{ config, lib, user, host, pkgs, modulesPath, ... }:
{ config, pkgs, hyper, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
@@ -13,10 +13,10 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems = if host != "NxACE" then {
fileSystems = if hyper.host != "NxACE" then {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
"/home/${hyper.user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
} else {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
@@ -29,24 +29,24 @@
{ device = "/dev/disk/by-label/swap"; }
];
networking.useDHCP = lib.mkDefault true;
networking.useDHCP = pkgs.lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = pkgs.lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = pkgs.lib.mkDefault config.hardware.enableRedistributableFirmware;
# from nixos-hardware
services.thermald.enable = lib.mkDefault true;
boot.extraModprobeConfig = if host == "NxXPS" then ''
services.thermald.enable = pkgs.lib.mkDefault true;
boot.extraModprobeConfig = if hyper.host == "NxXPS" then ''
options iwlwifi 11n_disable=8
'' else "";
boot.initrd.kernelModules = if host == "NxXPS" then [ "i915" ] else [];
boot.initrd.kernelModules = if hyper.host == "NxXPS" then [ "i915" ] else [];
environment.variables = if host == "NxXPS" then {
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
environment.variables = if hyper.host == "NxXPS" then {
VDPAU_DRIVER = pkgs.lib.mkIf config.hardware.graphics.enable (pkgs.lib.mkDefault "va_gl");
} else {};
hardware.graphics.extraPackages = if host == "NxXPS" then with pkgs; [
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "24.11") then vaapiIntel else intel-vaapi-driver)
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 [];

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host != "NxACE")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host != "NxACE")
{
systemd.timers."health_reminder" = {
enable = true;
@@ -56,7 +56,7 @@ lib.mkIf (host != "NxACE")
'';
serviceConfig = {
Type = "oneshot";
User = "nx2";
User = hyper.user;
};
};
}

View File

@@ -1,5 +1,5 @@
{ pkgs-unstable, user, ... }:
let p = pkgs-unstable; in
{ pkgs, hyper, ... }:
let p = pkgs; in
{
environment.systemPackages = with p; [
hugo
@@ -11,7 +11,7 @@ let p = pkgs-unstable; in
"hugo".name = "hugo";
};
users = {
"${user}".extraGroups = [ "hugo" ];
"${hyper.user}".extraGroups = [ "hugo" ];
"nginx".extraGroups = [ "hugo" ];
"hugo" = {
isSystemUser = true;

View File

@@ -1,4 +1,4 @@
{ pkgs, lib, host, secrets, ... }:
{ pkgs, hyper, secrets, ... }:
{
# sops.secrets = {
# "wireless-networking.env" = {};
@@ -9,7 +9,7 @@
"1.1.1.1"
"8.8.8.8"
];
hostName = host;
hostName = hyper.host;
networkmanager = {
enable = true;
};
@@ -21,14 +21,4 @@
8080
];
};
environment.etc = {
"ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt";
};
sops.secrets = {
"eduroam/tuda_nmconnection" = {
mode = "0600";
owner = "root";
path = "/etc/NetworkManager/system-connections/eduroam.nmconnection";
};
};
}

View File

@@ -1,5 +1,5 @@
{ config, pkgs, lib, nvidia, ... }:
lib.mkIf nvidia.enable
{ config, pkgs, hyper, ... }:
pkgs.lib.mkIf hyper.nvidia.enable
{
environment.systemPackages = with pkgs; [
lshw
@@ -21,7 +21,7 @@ lib.mkIf nvidia.enable
hardware = {
nvidia = {
prime = lib.mkIf nvidia.prime {
prime = pkgs.lib.mkIf hyper.nvidia.prime {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
@@ -41,7 +41,7 @@ lib.mkIf nvidia.enable
# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
powerManagement.finegrained = nvidia.prime;
powerManagement.finegrained = hyper.nvidia.prime;
# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).

View File

@@ -1,4 +1,4 @@
{ config, pkgs, user, domain, secrets, ... }:
{ config, pkgs, hyper, secrets, ... }:
let dns-user = "cloudflare"; in
{
sops.secrets = {
@@ -15,7 +15,7 @@ let dns-user = "cloudflare"; in
isSystemUser = true;
group = dns-user;
};
"${user}".extraGroups = [ dns-user ];
"${hyper.user}".extraGroups = [ dns-user ];
};
groups."${dns-user}" = {};
};
@@ -85,14 +85,14 @@ def main():
# Perform DNS updates
# https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record
print(f"${domain}: {update_record(record_id="${record_id.base}", record_name="${domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}", end=", ")
print(f"*.${domain}: {update_record(record_id="${record_id.sub}", record_name="*.${domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}", end=", ")
print(f"ssh.${domain}: {update_record(record_id="${record_id.ssh}", record_name="ssh.${domain}", ip=my_ip, type="A", proxied=False, pw=pw).status_code}", end=", ")
print(f"dev.${domain}: {update_record(record_id="${record_id.dev}", record_name="dev.${domain}", ip=my_ip, type="A", proxied=False, pw=pw).status_code}", end=", ")
print(f"${hyper.domain}: {update_record(record_id="${record_id.base}", record_name="${hyper.domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}", end=", ")
print(f"*.${hyper.domain}: {update_record(record_id="${record_id.sub}", record_name="*.${hyper.domain}", ip=my_ip, type="A", proxied=True, pw=pw).status_code}", end=", ")
print(f"ssh.${hyper.domain}: {update_record(record_id="${record_id.ssh}", record_name="ssh.${hyper.domain}", ip=my_ip, type="A", proxied=False, pw=pw).status_code}", end=", ")
print(f"dev.${hyper.domain}: {update_record(record_id="${record_id.dev}", record_name="dev.${hyper.domain}", ip=my_ip, type="A", proxied=False, pw=pw).status_code}", end=", ")
print(f"${domain}: {update_record(record_id="${record_id.base6}", record_name="${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}", end=", ")
print(f"*.${domain}: {update_record(record_id="${record_id.sub6}", record_name="*.${domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}", end=", ")
print(f"ssh.${domain}: {update_record(record_id="${record_id.ssh6}", record_name="ssh.${domain}", ip=my_ip6, type="AAAA", proxied=False, pw=pw).status_code}", end="")
print(f"${hyper.domain}: {update_record(record_id="${record_id.base6}", record_name="${hyper.domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}", end=", ")
print(f"*.${hyper.domain}: {update_record(record_id="${record_id.sub6}", record_name="*.${hyper.domain}", ip=my_ip6, type="AAAA", proxied=True, pw=pw).status_code}", end=", ")
print(f"ssh.${hyper.domain}: {update_record(record_id="${record_id.ssh6}", record_name="ssh.${hyper.domain}", ip=my_ip6, type="AAAA", proxied=False, pw=pw).status_code}", end="")
if __name__ == "__main__":
main()

View File

@@ -1,4 +1,4 @@
{ config, pkgs, domain, ... }:
{ config, pkgs, hyper, ... }:
{
sops.secrets = {
# "nx2site/namecheap.pw" = { };
@@ -8,13 +8,14 @@
};
};
services.cloudflare-dyndns = {
pkgs = pkgs.cloudflare-dyndns;
enable = true;
ipv4 = true;
ipv6 = config.networking.enableIPv6;
domains = [
"${domain}"
"*.${domain}"
"ssh.${domain}"
"${hyper.domain}"
"*.${hyper.domain}"
"ssh.${hyper.domain}"
];
proxied = true;
apiTokenFile = config.sops.secrets."nx2site/cloudflare/global-api-key-env".path;

View File

@@ -1,4 +1,4 @@
{ config, pkgs, secrets, user, domain, ... }:
{ config, pkgs, hyper, secrets, ... }:
let git-user = "git"; in
{
sops.secrets = {
@@ -7,13 +7,13 @@ let git-user = "git"; in
users = {
users = {
"${user}".extraGroups = [ git-user ];
"${hyper.user}".extraGroups = [ git-user ];
"${git-user}" = {
isSystemUser = true;
group = git-user;
useDefaultShell = true;
home = config.services.gitea.stateDir;
openssh.authorizedKeys.keys = config.users.users."${user}".openssh.authorizedKeys.keys;
openssh.authorizedKeys.keys = config.users.users."${hyper.user}".openssh.authorizedKeys.keys;
};
};
groups."${git-user}" = {};
@@ -63,12 +63,12 @@ let git-user = "git"; in
START_SSH_SERVER = false; # default
SSH_LISTEN_HOST = "0.0.0.0";
SSH_PORT = secrets.ssh.port;
DOMAIN = "git.${domain}";
SSH_DOMAIN = "ssh.${domain}";
DOMAIN = "git.${hyper.domain}";
SSH_DOMAIN = "ssh.${hyper.domain}";
# HTTP_ADDR = "${config.services.gitea.settings.server.DOMAIN}";
# HTTP_PORT = 3000; # default
# PROTOCOL = "http"; # default
ROOT_URL = "https://git.${domain}/"; # default
ROOT_URL = "https://git.${hyper.domain}/"; # default
};
session = {
COOKIE_SECURE = true;
@@ -90,7 +90,7 @@ let git-user = "git"; in
# hash = "sha256-Eibgoc3BJUXWdq8irgXea09fAvfKx2eQrJotp3P5DTg=";
# };
theme = pkgs.fetchFromGitea {
domain = "git.${domain}";
domain = "git.${hyper.domain}";
owner = "nx2";
repo = "Gitea-Pitch-Black";
rev = "0.1.1";

View File

@@ -1,4 +1,4 @@
{ config, domain, ... }:
{ config, hyper, ... }:
{
sops.secrets = {
"nx2site/nextcloud/admin-pass" = { owner = "nextcloud"; };
@@ -9,7 +9,7 @@
services = {
nextcloud = {
enable = true;
hostName = "nc.${domain}";
hostName = "nc.${hyper.domain}";
https = true;
configureRedis = true;
config = {

View File

@@ -1,15 +1,14 @@
{ pkgs, domain, ... }:
{ pkgs, hyper, ... }:
{
services = {
open-web-calendar = {
enable = true;
domain = "cal.${domain}";
domain = "cal.${hyper.domain}";
package = pkgs.open-web-calendar;
settings = {
# PORT = 21342;
};
calendarSettings = {
};
calendarSettings = { };
};
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, config, secrets, domain, user, ... }:
{ config, pkgs, hyper, secrets, ... }:
let paperless-user = "paperless"; in
{
sops.secrets = {
@@ -8,7 +8,7 @@ let paperless-user = "paperless"; in
};
users.users = {
"${user}".extraGroups = [ paperless-user ];
"${hyper.user}".extraGroups = [ paperless-user ];
"${paperless-user}".extraGroups = [ "redis-paperless" ];
};
@@ -64,7 +64,7 @@ let paperless-user = "paperless"; in
# PAPERLESS_LOGROTATE_MAX_SIZE= 1 MiB.
# PAPERLESS_LOGROTATE_MAX_BACKUPS= 20.
# PAPERLESS_SECRET_KEY=
PAPERLESS_URL = "https://doc.${domain}";
PAPERLESS_URL = "https://doc.${hyper.domain}";
# PAPERLESS_CSRF_TRUSTED_ORIGINS=
# PAPERLESS_ALLOWED_HOSTS=
# PAPERLESS_CORS_ALLOWED_HOSTS=

View File

@@ -1,4 +1,4 @@
{ config, pkgs, lib, domain, ... }:
{ config, hyper, pkgs, ... }:
{
sops.secrets = {
"nx2site/sslCertificate.pem" = { owner = config.services.nginx.user; };
@@ -8,13 +8,13 @@
security.acme = {
acceptTerms = true;
defaults = {
email = "acme@${domain}";
email = "acme@${hyper.domain}";
webroot = "/var/nginx/webroot";
group = "nginx";
};
certs = {
"${domain}" = {
extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "sync" ];
"${hyper.domain}" = {
extraDomainNames = builtins.map (subd: "${subd}.${hyper.domain}") [ "sync" ];
};
};
};
@@ -76,7 +76,7 @@
enableACME = true;
};
in {
"${domain}" = vh // {
"${hyper.domain}" = vh // {
root = "/var/nginx/webroot";
default = true;
listen = dl;
@@ -95,11 +95,11 @@
"/.well-known/matrix/server" = { return = "502"; };
};
};
"matrix.${domain}" = {
"matrix.${hyper.domain}" = {
listen = dl;
locations = { "~.*" = { return = "502"; }; };
};
# "pw.${domain}" = vh // {
# "pw.${hyper.domain}" = vh // {
# listen = dl;
# locations = let d = "pw.docker:80"; in {
# "/" = { proxyPass = "http://${d}"; };
@@ -108,7 +108,7 @@
# "/notifications/hub/negotiate" = { proxyPass = "http://${d}"; };
# };
# };
"pw.${domain}" = vh // {
"pw.${hyper.domain}" = vh // {
listen = dl;
locations = let
d = with config.services.vaultwarden.config; "${ROCKET_ADDRESS}:${builtins.toString ROCKET_PORT}";
@@ -119,49 +119,48 @@
"/notifications/hub/negotiate" = { proxyPass = "http://${d}"; };
};
};
"sync.${domain}" = vh // {
"sync.${hyper.domain}" = vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:11434"; }; };
};
# "git.${domain}" = vh // {
# "git.${hyper.domain}" = vh // {
# listen = dl;
# locations = { "/" = { proxyPass = "http://git.docker:3000"; }; };
# };
"git.${domain}" = vh // {
"git.${hyper.domain}" = vh // {
http2 = false;
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:3000"; }; };
};
"doc.${domain}" = vh // {
"doc.${hyper.domain}" = vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:8441"; }; };
};
"dav.${domain}" = lib.mkIf config.services.radicale.enable (vh // {
"dav.${hyper.domain}" = pkgs.lib.mkIf config.services.radicale.enable (vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:5232"; }; };
});
# "nc.${domain}" = vh // {
# "nc.${hyper.domain}" = vh // {
# # directly to nc
# };
"abs.${domain}" = vh // {
"abs.${hyper.domain}" = vh // {
listen = dl;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString config.services.audiobookshelf.port}";
proxyWebsockets = true;
};
};
"pnx.${domain}" = vh // {
"pnx.${hyper.domain}" = vh // {
listen = dl;
locations."/" = {
proxyPass = "http://127.0.0.1:8040";
proxyWebsockets = true;
};
};
"wip.${domain}" = vh // {
"wip.${hyper.domain}" = vh // {
listen = dl;
root = "/var/lib/hugo/nx2site/public";
};
"dev.${domain}" = vh // {
"dev.${hyper.domain}" = vh // {
listen = dl;
locations."/" = {
proxyPass = "http://127.0.0.1:8080";
@@ -169,17 +168,17 @@
};
};
# is done atomatically
# "cal.${domain}" = vh // {
# "cal.${hyper.domain}" = vh // {
# listen = dl;
# locations = { "/" = {
# proxyPass = "http://unix:///run/open-web-calendar/socket";
# proxyWebsockets = true;
# }; };
# };
"~^(.*).${domain}$" = {
"~^(.*).${hyper.domain}$" = {
listen = dl;
root = "/var/nginx/webroot";
locations = { "~.*" = { return = "301 https://${domain}/502.html"; }; };
locations = { "~.*" = { return = "301 https://${hyper.domain}/502.html"; }; };
};
};
};

View File

@@ -1,4 +1,4 @@
{ config, domain, ... }:
{ config, hyper, ... }:
{
sops.secrets = {
"nx2site/radicale/htpasswd" = {
@@ -15,7 +15,7 @@
port = builtins.toString 5232;
in [
"0.0.0.0:${port}"
"${domain}:${port}"
"${hyper.domain}:${port}"
# "192.168.178.32:${port}"
];
auth = {

View File

@@ -1,4 +1,4 @@
{ config, pkgs, secrets, domain, ... }:
{ config, pkgs, hyper, secrets, ... }:
{
sops.secrets = {
"nx2site/vaultwarden.env" = {
@@ -27,7 +27,7 @@
SMTP_PASSWORD = "@SMTP_PASSWORD@";
LOGIN_RATELIMIT_MAX_BURST = 10;
LOGIN_RATELIMIT_SECONDS = 60;
DOMAIN = "https://pw.${domain}";
DOMAIN = "https://pw.${hyper.domain}";
INVITATION_ORG_NAME = "NxPW";
INVITATIONS_ALLOWED = true;
ADMIN_TOKEN = "@ADMIN_TOKEN@";

View File

@@ -1,14 +1,10 @@
{ pkgs, lib, host, nvidia, ... }:
let
p = if nvidia.enable then pkgs.ollama-cuda else pkgs.ollama;
in {
environment.systemPackages = [ p ];
{ pkgs, hyper, ... }:
{
services.ollama = {
package = p;
package = if hyper.nvidia.enable then pkgs.ollama-cuda else pkgs.ollama;
enable = true;
acceleration = lib.mkIf nvidia.enable "cuda";
host = if host == "NxACE" then "0.0.0.0" else "127.0.0.1";
acceleration = pkgs.lib.mkIf hyper.nvidia.enable "cuda";
host = if hyper.host == "NxACE" then "0.0.0.0" else "127.0.0.1";
port = 11434;
environmentVariables = {
OLLAMA_ORIGINS = "*";

View File

@@ -1,4 +1,4 @@
{ pkgs, user, ... }:
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
age
@@ -8,15 +8,10 @@
sops = {
defaultSopsFile = ../sops-secrets.yaml;
defaultSopsFormat = "yaml";
# age = {
# sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
# generateKey = true;
# };
# gnupg = {
# sshKeyPaths = [];
# home = "/home/${user}/.gnupg";
# home = "${hyper.user}/.gnupg";
# };
secrets.example = {};
};
}

View File

@@ -1,13 +1,13 @@
{ host, secrets, ... }:
{ hyper, secrets, ... }:
{
environment.etc."ssh/ssh_host_ed25519_key.pub".text = if (host == "NxNORTH") then
environment.etc."ssh/ssh_host_ed25519_key.pub".text = if (hyper.host == "NxNORTH") then
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1r5gUQPPS/dGB0SsvWtP6WdNWoxMwhhHRrqlO19cJt root@NxNORTH"
else if ( host == "NxXPS" ) then
else if ( hyper.host == "NxXPS" ) then
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPf+08+t8a0lY2+nR1mhIU3vuksStiJOlojJjzCwFk7r root@NxXPS"
else
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBFfZpWVPlujsz3FklSVAM+tuYn4pzDSijhp5CeYNOZk root@NxACE";
sops.secrets."ssh/${host}-ssh_host_ed25519_key" = {
sops.secrets."ssh/${hyper.host}-ssh_host_ed25519_key" = {
mode = "0600";
path = "/etc/ssh/ssh_host_ed25519_key.shadow";
};

View File

@@ -1,10 +1,5 @@
{
config,
lib,
user,
host,
secrets,
... }: let
{ config, pkgs, hyper, secrets, ... }:
let
# helper funcitons
conv = _: device: with device; { "${name}" = {id = id;};};
justname = devices: (builtins.map (device: device.name)) devices;
@@ -22,7 +17,7 @@
};
dirs = {
default = { name = "sync"; path = "/home/${user}/sync"; };
default = { name = "sync"; path = "/home/${hyper.user}/sync"; };
s21u-dcim = { name = "s21u-dcim"; path = "/vault/Pictures/Lennart"; };
diane-dcim = { name = "diane-dcim"; path = "/vault/Pictures/Diane"; };
dianesd-dcim = { name = "dianesd-dcim"; path = "/vault/Pictures/Diane-SD"; };
@@ -31,34 +26,35 @@
};
in {
sops.secrets = {
"syncthing/${host}/cert.pem" = { owner = user; };
"syncthing/${host}/key.pem" = { owner = user; };
"syncthing/${hyper.host}/cert.pem" = { owner = hyper.user; };
"syncthing/${hyper.host}/key.pem" = { owner = hyper.user; };
};
services.syncthing = with (builtins.mapAttrs conv devices); {
enable = true;
user = "${user}";
dataDir = "/home/${user}/.local/share/syncthing"; # useless ?
configDir = "/home/${user}/.config/syncthing";
key = config.sops.secrets."syncthing/${host}/key.pem".path;
cert = config.sops.secrets."syncthing/${host}/cert.pem".path;
user = "${hyper.user}";
package = pkgs.syncthing;
dataDir = "/home/${hyper.user}/.local/share/syncthing"; # useless ?
configDir = "/home/${hyper.user}/.config/syncthing";
key = config.sops.secrets."syncthing/${hyper.host}/key.pem".path;
cert = config.sops.secrets."syncthing/${hyper.host}/cert.pem".path;
overrideDevices = true;
overrideFolders = true;
# guiAddress = "127.0.0.1:8384";
guiAddress = if ( host == "NxACE" ) then "0.0.0.0:8384" else "127.0.0.1:8384";
guiAddress = if ( hyper.host == "NxACE" ) then "0.0.0.0:8384" else "127.0.0.1:8384";
settings = {
devices = with (builtins.mapAttrs conv devices); if (host == "NxXPS") then (
devices = with (builtins.mapAttrs conv devices); if (hyper.host == "NxXPS") then (
north // ace // s21u
) else if (host == "NxNORTH") then (
) else if (hyper.host == "NxNORTH") then (
xps // ace // s21u
) else (
north // xps // s21u // diane // daniel // tessa // georg
);
folders = with dirs; if (host == "NxXPS") then {
folders = with dirs; if (hyper.host == "NxXPS") then {
"${default.name}" = {
path = default.path;
devices = with devices; (justname [ north ace s21u ]);
};
} else if (host == "NxNORTH") then {
} else if (hyper.host == "NxNORTH") then {
"${default.name}" = {
path = default.path;
devices = with devices; (justname [ xps ace s21u ]);
@@ -91,7 +87,7 @@ in {
};
gui = {
theme = "black";
user = user;
user = hyper.user;
password = secrets.syncthing.gui-password; # option to use a file is till in the works... https://github.com/NixOS/nixpkgs/issues/85336
};
};

13
system-modules/tuda.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
environment.etc = {
"ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt";
};
sops.secrets = {
"eduroam/tuda_nmconnection" = {
mode = "0600";
owner = "root";
path = "/etc/NetworkManager/system-connections/eduroam.nmconnection";
};
};
}

View File

@@ -1,9 +1,8 @@
{ pkgs, user, ... }:
{ pkgs, hyper, ... }:
{
users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
users.users."${user}" = {
users.users."${hyper.user}" = {
isNormalUser = true;
extraGroups = [
# TODO: actually put the groups into the relevant files

View File

@@ -1,12 +1,12 @@
{ config, pkgs, lib, user, host, ... }:
{ pkgs, hyper, ... }:
{
config = lib.mkIf (host == "NxNORTH") {
config = pkgs.lib.mkIf (hyper.host == "NxNORTH") {
environment.systemPackages = with pkgs; [
virtiofsd
];
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
users.users."${user}".extraGroups = [ "libvirtd" ];
users.users."${hyper.user}".extraGroups = [ "libvirtd" ];
};
}

View File

@@ -1,5 +1,5 @@
{ pkgs, lib, host, ... }:
lib.mkIf (host == "NxXPS")
{ pkgs, hyper, ... }:
pkgs.lib.mkIf (hyper.host == "NxXPS")
{
programs.ydotool.enable = true;
}