merge flake-parts rewrite into main #19

Open
Daholli wants to merge 6 commits from main-merge into main
43 changed files with 2650 additions and 135 deletions
Showing only changes of commit ebc8a545c8 - Show all commits

261
flake.lock generated
View file

@ -55,7 +55,8 @@
"devenv"
],
"flake-compat": [
"devenv"
"devenv",
"flake-compat"
],
"git-hooks": [
"devenv",
@ -67,11 +68,11 @@
]
},
"locked": {
"lastModified": 1752264895,
"narHash": "sha256-1zBPE/PNAkPNUsOWFET4J0cjlvziH8DOekesDmjND+w=",
"lastModified": 1760971495,
"narHash": "sha256-IwnNtbNVrlZIHh7h4Wz6VP0Furxg9Hh0ycighvL5cZc=",
"owner": "cachix",
"repo": "cachix",
"rev": "47053aef762f452e816e44eb9a23fbc3827b241a",
"rev": "c5bfd933d1033672f51a863c47303fc0e093c2d2",
"type": "github"
},
"original": {
@ -86,11 +87,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1760953099,
"narHash": "sha256-sOKx2YcHa+lWEvaEOIGqLN2WWk1Wf5z6KM02tdfhMtw=",
"lastModified": 1761553912,
"narHash": "sha256-3UOEQPBlZo9OixT9L1zoD67QheopTG8/EfRPGKyP9bg=",
"owner": "catppuccin",
"repo": "nix",
"rev": "f5b21876888265d2fee7fb0640d1b66a1c1c6503",
"rev": "7b42c91911c143ae3ea32a79cc8582b5920f24e3",
"type": "github"
},
"original": {
@ -109,11 +110,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1761156818,
"narHash": "sha256-IScY9PpnF48Q/Z17YG5/ZcYWiWOkY2zCKLqsx1CJESM=",
"lastModified": 1761583935,
"narHash": "sha256-vJ0ylFdPPESUCBYZvEtVmVemSp4G0WH8CbVIkboHIJs=",
"owner": "cachix",
"repo": "devenv",
"rev": "949fc6dc8f36f38e1cceb1bf1673c4e995a6a766",
"rev": "b7e3b2aeb90ce37517fb8da09ceff8ab587a9fcf",
"type": "github"
},
"original": {
@ -130,11 +131,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1761201787,
"narHash": "sha256-RQG899vzsoRIMQ6ZR5bi1W9HOomUgID7tk3COQf/OaY=",
"lastModified": 1761547629,
"narHash": "sha256-4OH1CVm2PdjKRqEJ3RLfkQMDSBdn7VId6iyYCwKOK+U=",
"owner": "nix-community",
"repo": "fenix",
"rev": "1ab39eca6ce37b1db23b595c2a754c81ebf49507",
"rev": "d82a7c64ea441e397914577c9a18f2867e5b364b",
"type": "github"
},
"original": {
@ -208,6 +209,22 @@
}
},
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_6": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -231,11 +248,11 @@
]
},
"locked": {
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
@ -293,11 +310,11 @@
]
},
"locked": {
"lastModified": 1758108966,
"narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=",
"lastModified": 1760663237,
"narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b",
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
"type": "github"
},
"original": {
@ -307,12 +324,34 @@
}
},
"git-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1760663237,
"narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"git-hooks_3": {
"inputs": {
"flake-compat": [
"simple-nixos-mailserver",
"flake-compat"
],
"gitignore": "gitignore_3",
"gitignore": "gitignore_4",
"nixpkgs": [
"simple-nixos-mailserver",
"nixpkgs"
@ -355,6 +394,27 @@
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_3": {
"inputs": {
"nixpkgs": [
"hyprland",
@ -376,7 +436,7 @@
"type": "github"
}
},
"gitignore_3": {
"gitignore_4": {
"inputs": {
"nixpkgs": [
"simple-nixos-mailserver",
@ -398,7 +458,7 @@
"type": "github"
}
},
"gitignore_4": {
"gitignore_5": {
"inputs": {
"nixpkgs": [
"zls",
@ -443,11 +503,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1761141169,
"narHash": "sha256-5IZjbTvP5dNTD8CbEYlNbicdGcbCN9SC9ksMm2ZEXH0=",
"lastModified": 1761440613,
"narHash": "sha256-eQTH5iTkEQptZqVGyTPgpMYL7zj6QkI/uGo+1/PkAQY=",
"owner": "helix-editor",
"repo": "helix",
"rev": "d79cce4e4bfc24dd204f1b294c899ed73f7e9453",
"rev": "7c4ff9c39dbd3dd7d6e2cb3e26cb34212202bb1b",
"type": "github"
},
"original": {
@ -463,11 +523,11 @@
]
},
"locked": {
"lastModified": 1761235135,
"narHash": "sha256-cux9xeceLIER1lBxUa1gMafkz7gg5ntcUmJBynWdBWI=",
"lastModified": 1761584077,
"narHash": "sha256-dISPEZahlfs5K6d58zR4akRRyogfE9P4WSyPPNT7HiE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0adf9ba3f567da2d53af581a857aacf671aaa547",
"rev": "e82585308aef3d4cc2c36c7b6946051c8cdf24ef",
"type": "github"
},
"original": {
@ -623,11 +683,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1761129162,
"narHash": "sha256-vJYlThaqdSYRKn1HcaMbkHeB95bXQwgG1ugrlSKQjHg=",
"lastModified": 1761572054,
"narHash": "sha256-NuDXgcyWa9EfQZXs+7mXKTimzlxEdLV0kJR6gGcFU/8=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "057695bc3f7de5e8841c15252fc51029590895e4",
"rev": "560c53d87dedf7df8185eb370cfbf3575826e85c",
"type": "github"
},
"original": {
@ -653,11 +713,11 @@
]
},
"locked": {
"lastModified": 1760659005,
"narHash": "sha256-wyS6tXYJuzbwckOeaCoRtT4qIG2UZ0YvSZx7EBNjTV0=",
"lastModified": 1761249285,
"narHash": "sha256-70dEwL5p3CB/00ODs2RHWUKTyafB+PF4Ld7IEMuO+no=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "a5a6f93d72d5fb37e78b98c756cfd8b340e71a19",
"rev": "81f6d1426537981fcbb921f8b5e470b1280ef8f3",
"type": "github"
},
"original": {
@ -985,11 +1045,11 @@
"rust-overlay": []
},
"locked": {
"lastModified": 1760940149,
"narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=",
"lastModified": 1761460429,
"narHash": "sha256-pJeM23DGMD5AK4gdNaDM1qsIv87NYQJgEh2E8tRd7es=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5",
"rev": "e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b",
"type": "github"
},
"original": {
@ -1012,11 +1072,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1761187190,
"narHash": "sha256-5ln16iOeWpEX5MO7M3jzFEBNFE42gpFsCvSvPjtF6tQ=",
"lastModified": 1761542689,
"narHash": "sha256-l4TQRcQyp6hoUVQL/R4UBHvYX9whHTntaz5NxHi0PH4=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "77a07f5d3b775fba67550c38122ebb8d3ee3ba1c",
"rev": "75768e54ca2591bb0be17fa310992628e5efce2d",
"type": "github"
},
"original": {
@ -1028,11 +1088,11 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1760940149,
"narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=",
"lastModified": 1761460429,
"narHash": "sha256-pJeM23DGMD5AK4gdNaDM1qsIv87NYQJgEh2E8tRd7es=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5",
"rev": "e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b",
"type": "github"
},
"original": {
@ -1088,11 +1148,11 @@
]
},
"locked": {
"lastModified": 1760948931,
"narHash": "sha256-guAocn26kDPdkl6tPXJt5pPaIIsrGI4taw+1U3+FM7E=",
"lastModified": 1761554027,
"narHash": "sha256-LMnsUobJtqhNnHc9FAp4V/MPMb82+YiXnjbUreg/0n8=",
"owner": "Mic92",
"repo": "nix-ld",
"rev": "a48b2dc9a256bcef9182f0f92c481de975302b1e",
"rev": "e7d1eba1d561ada0bdb1177ff5d7ce2f8447e974",
"type": "github"
},
"original": {
@ -1118,17 +1178,17 @@
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1760536587,
"narHash": "sha256-wfWqt+igns/VazjPLkyb4Z/wpn4v+XIjUeI3xY/1ENg=",
"lastModified": 1761563673,
"narHash": "sha256-d+1TpVAmRjcNBfjZsh2yQSdwUfN7Xgz1blJ185g73+A=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "f98ee1de1fa36eca63c67b600f5d617e184e82ea",
"rev": "a518cf710e5ebb935518dc7ac98e07e7ee5014c3",
"type": "github"
},
"original": {
@ -1202,11 +1262,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1761016216,
"narHash": "sha256-G/iC4t/9j/52i/nm+0/4ybBmAF4hzR8CNHC75qEhjHo=",
"lastModified": 1761468971,
"narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "481cf557888e05d3128a76f14c76397b7d7cc869",
"rev": "78e34d1667d32d8a0ffc3eba4591ff256e80576e",
"type": "github"
},
"original": {
@ -1234,11 +1294,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1761114652,
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=",
"lastModified": 1761373498,
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c",
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
"type": "github"
},
"original": {
@ -1250,11 +1310,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1758532697,
"narHash": "sha256-bhop0bR3u7DCw9/PtLCwr7GwEWDlBSxHp+eVQhCW9t4=",
"lastModified": 1761313199,
"narHash": "sha256-wCIACXbNtXAlwvQUo1Ed++loFALPjYUA3dpcUJiXO44=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "207a4cb0e1253c7658c6736becc6eb9cace1f25f",
"rev": "d1c30452ebecfc55185ae6d1c983c09da0c274ff",
"type": "github"
},
"original": {
@ -1266,11 +1326,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1761114652,
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=",
"lastModified": 1761373498,
"narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c",
"rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce",
"type": "github"
},
"original": {
@ -1313,6 +1373,22 @@
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1761236834,
"narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1755615617,
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
@ -1330,8 +1406,8 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"gitignore": "gitignore_2",
"flake-compat": "flake-compat_3",
"gitignore": "gitignore_3",
"nixpkgs": [
"hyprland",
"nixpkgs"
@ -1357,6 +1433,7 @@
"devenv": "devenv",
"fenix": "fenix",
"flake-parts": "flake-parts_2",
"git-hooks": "git-hooks_2",
"gpg-base-conf": "gpg-base-conf",
"helix": "helix",
"home-manager": "home-manager",
@ -1378,7 +1455,7 @@
"simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix",
"systems": "systems_3",
"tuya-vaccum-maps": "tuya-vaccum-maps",
"treefmt-nix": "treefmt-nix",
"zen-browser": "zen-browser",
"zig-overlay": "zig-overlay",
"zls": "zls"
@ -1387,11 +1464,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1761178311,
"narHash": "sha256-M5VeAtfip2zdqHKG9Su+5vlDG8AhtTk1ktxUGXdARc8=",
"lastModified": 1761500479,
"narHash": "sha256-syeBTCCU96qPJHcVpwHeCwmPCiLTDHHgYQYhpZ0iwLo=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "f362735f822fe66ed2e357db53717b3db69dc6c9",
"rev": "049767e6faa84b2d1a951d8f227e6ebd99d728a2",
"type": "github"
},
"original": {
@ -1425,8 +1502,8 @@
"simple-nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat_4",
"git-hooks": "git-hooks_2",
"flake-compat": "flake-compat_5",
"git-hooks": "git-hooks_3",
"nixpkgs": "nixpkgs_4",
"nixpkgs-25_05": "nixpkgs-25_05"
},
@ -1522,19 +1599,21 @@
"type": "github"
}
},
"tuya-vaccum-maps": {
"flake": false,
"treefmt-nix": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1752975474,
"narHash": "sha256-MTCOspRIjDKJkMPgwoKgTRtcc6rgJRGxDBwfMD/QZ7g=",
"owner": "jaidenlabelle",
"repo": "tuya-vacuum-maps",
"rev": "c8a96ff1afa62d6cec448f3b7cf6b869a50b20eb",
"lastModified": 1761311587,
"narHash": "sha256-Msq86cR5SjozQGCnC6H8C+0cD4rnx91BPltZ9KK613Y=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "2eddae033e4e74bf581c2d1dfa101f9033dbd2dc",
"type": "github"
},
"original": {
"owner": "jaidenlabelle",
"repo": "tuya-vacuum-maps",
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
@ -1599,11 +1678,11 @@
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1761173223,
"narHash": "sha256-FumZh+fPRaKXkl9Y1uTh5KV7Io/AyOZso+UkqLhLArs=",
"lastModified": 1761422250,
"narHash": "sha256-+pN8VAh8OVUSj8zPoI8QfC93JMIKPaAOABrbeeiO/Hk=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "bf745144acda1343934e9a094cf9458a54d57889",
"rev": "2dd40ecfe882c1659e0e46c761974702c7ab5fde",
"type": "github"
},
"original": {
@ -1615,14 +1694,14 @@
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_6"
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1761180075,
"narHash": "sha256-V4WLeUQ4gCGZiVihlXWBOZ/1FNcL0jM4zgTY1haJLvY=",
"lastModified": 1761535208,
"narHash": "sha256-E1PobJMiFmVUX2YdqYk/MpKb0LXavOYvlg8DCBBzlHc=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "771a2604606905d8c0ffe3b818dc2cc5bd1405d8",
"rev": "79a94872a3e6993a051c4e22a2dcb02c1d088acf",
"type": "github"
},
"original": {
@ -1633,7 +1712,7 @@
},
"zig-overlay": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-compat": "flake-compat_6",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
@ -1655,7 +1734,7 @@
},
"zls": {
"inputs": {
"gitignore": "gitignore_4",
"gitignore": "gitignore_5",
"nixpkgs": [
"nixpkgs"
],
@ -1664,11 +1743,11 @@
]
},
"locked": {
"lastModified": 1760550770,
"narHash": "sha256-MIz62mvGfANGn4pPQV1DVocZPb2JTzyi1xDFYKzZOvc=",
"lastModified": 1761562676,
"narHash": "sha256-yREsDfqZ7JIC2hxQm94DQfNCyhm/KPdxWd3IVJ6zJ2s=",
"owner": "zigtools",
"repo": "zls",
"rev": "f486e884f479dd816f1c57a4be7f445f3d3b279c",
"rev": "67177e3d64b8ab0f358303ee6ed4bac4654e2fdb",
"type": "github"
},
"original": {

View file

@ -14,6 +14,7 @@
flake-parts.url = "github:hercules-ci/flake-parts";
import-tree.url = "github:vic/import-tree";
treefmt-nix.url = "github:numtide/treefmt-nix";
nixpkgs-latest-factorio.url = "github:Daholli/nixpkgs/e880129391be2f558d6c205cfd931be338b3b707";
nixpkgs-tuya-vacuum.url = "github:Daholli/nixpkgs/84b34e39e7a0879367189f34401191f6a0364bcf";
@ -97,17 +98,13 @@
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
catppuccin.url = "github:catppuccin/nix";
###############
# homeassitant
tuya-vaccum-maps = {
url = "github:jaidenlabelle/tuya-vacuum-maps";
flake = false;
};
################
## inputs for dev shells
#
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
devenv = {
url = "github:cachix/devenv";
# inputs.nixpkgs.follows = "nixpkgs";

View file

@ -0,0 +1,30 @@
topLevel: {
flake.modules = {
nixos._1password =
{ ... }:
{
programs = {
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ topLevel.config.flake.meta.users.cholli.username ];
};
};
};
homeManager.cholli =
{ lib, osConfig, ... }:
{
home.file = lib.mkIf osConfig.programs._1password.enable {
".ssh/config".text = ''
Host *
ForwardAgent yes
IdentityAgent /home/cholli/.1password/agent.sock
Host loptland
Hostname christophhollizeck.dev
'';
};
};
};
}

73
modules/base/fish.nix Normal file
View file

@ -0,0 +1,73 @@
{
flake.modules = {
nixos.base =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
fastfetch
fd
tree
ripgrep
fzf
eza
#optional
pciutils
usbutils
btop
zip
unzip
nettools
];
};
homeManager.base =
{ lib, pkgs, ... }:
{
catppuccin.fish.enable = true;
programs = {
fish = {
enable = true;
shellInit = ''
set -x LESS_TERMCAP_mb \e'[01;32m'
set -x LESS_TERMCAP_md \e'[01;32m'
set -x LESS_TERMCAP_me \e'[0m'
set -x LESS_TERMCAP_se \e'[0m'
set -x LESS_TERMCAP_so \e'[01;47;34m'
set -x LESS_TERMCAP_ue \e'[0m'
set -x LESS_TERMCAP_us \e'[01;36m'
set -x LESS -R
set -x GROFF_NO_SGR 1
'';
shellAliases = {
vim = "hx";
ls = "eza -lah --icons --git";
lss = "ls --total-size";
lt = "ls -T --git-ignore";
};
functions = {
checkHash = "nix hash to-sri --type sha256 $(nix-prefetch-url --unpack $argv)";
deployNixberry = "nixos-rebuild switch --flake .#nixberry --target-host nixberry --sudo --ask-sudo-password";
deployLoptland = "nixos-rebuild switch --flake .#loptland --target-host christophhollizeck.dev --sudo --ask-sudo-password";
checkPR = ''cd /home/cholli/projects/nixpkgs && ${lib.getExe pkgs.nixpkgs-review} pr $argv --post-result --systems "x86_64-linux aarch64-linux"'';
};
plugins = with pkgs.fishPlugins; [
{
name = "forgit";
src = forgit.src;
}
];
};
zoxide = {
enable = true;
options = [ "--cmd cd" ];
};
};
};
};
}

129
modules/base/git.nix Normal file
View file

@ -0,0 +1,129 @@
topLevel: {
flake.modules = {
nixos.base =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
git
];
};
homeManager.cholli =
{
config,
lib,
...
}:
let
username = topLevel.config.flake.meta.users.cholli.username;
in
{
programs.git = {
enable = true;
lfs.enable = true;
signing = {
key = topLevel.config.flake.meta.users.cholli.key;
signByDefault = true;
};
ignores = [
".direnv/"
".devenv/"
"result"
];
settings = {
user = {
name = topLevel.config.flake.meta.users.cholli.name;
email = topLevel.config.flake.meta.users.cholli.email;
};
core = {
fsmonitor = true;
};
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
push = {
autoSetupRemote = true;
};
rebase = {
autoStash = true;
};
safe = {
directory = "/home/${username}/projects/config";
};
maintenance = {
repo = [
"home/${username}/projects/nixpkgs"
"home/${username}/projects/config"
];
strategy = "incremental";
};
lfs."https://git.christophhollizeck.dev/Daholli/nixos-config.git/info/lfs".locksverify = true;
};
};
systemd.user = {
services."git-maintenance@" = {
Unit = {
Description = "Optimize Git repositories data";
};
Service = {
Type = "oneshot";
ExecStart = ''"${lib.getExe config.programs.git.package}" --exec-path="${lib.getBin config.programs.git.package}/bin" -c credential.interactive=false -c core.askPass=true for-each-repo --config=maintenance.repo maintenance run --schedule=%i'';
LockPersonality = "yes";
MemoryDenyWriteExecute = "yes";
NoNewPrivileges = "yes";
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_VSOCK";
RestrictNamespaces = "yes";
RestrictRealtime = "yes";
RestrictSUIDSGID = "yes";
SystemCallArchitectures = "native";
SystemCallFilter = "@system-service";
};
};
timers = {
"git-maintenance@hourly" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "*-*-* *:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
"git-maintenance@daily" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "*-*-* 20:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
"git-maintenance@weekly" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "Sun *-*-* 20:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
};
};
};
}

View file

@ -1,12 +1,23 @@
{
flake.modules.homeManager.base = {
programs.home-manager.enable = true;
flake.modules = {
nixos.base = {
nixpkgs.config.allowUnFree = true;
home-manager = {
backupFileExtension = "bak";
useUserPackages = true;
useGlobalPkgs = true;
};
};
services = {
home-manager.autoExpire = {
enable = true;
frequency = "weekly";
store.cleanup = true;
homeManager.base = {
programs.home-manager.enable = true;
services = {
home-manager.autoExpire = {
enable = true;
frequency = "weekly";
store.cleanup = true;
};
};
};
};

49
modules/base/kitty.nix Normal file
View file

@ -0,0 +1,49 @@
{
flake.modules = {
homeManager.cholli =
{ pkgs, ... }:
{
catppuccin.kitty.enable = true;
home.packages = [
pkgs.kitty
pkgs.xfce.thunar
];
home.sessionVariables.TERMINAL = "kitty";
home.file.".config/Thunar/uca.xml".text = ''
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon>kitty</icon>
<name>Open Kitty here</name>
<submenu></submenu>
<unique-id>1726095927116900-1</unique-id>
<command>${pkgs.kitty}/bin/kitty %f</command>
<description>Example for a custom action</description>
<range></range>
<patterns>*</patterns>
<startup-notify/>
<directories/>
</action>
</actions>
'';
programs.kitty = {
enable = true;
# themeFile = "tokyo_night_night";
font = {
name = "FiraCode Nerd Font";
size = 15;
};
shellIntegration.enableFishIntegration = true;
settings = {
"background_opacity" = "0.90";
"shell" = "fish";
"confirm_os_window_close" = "0";
};
};
};
};
}

View file

@ -8,14 +8,12 @@
networkmanager = {
enable = true;
};
useDHCP = false;
};
systemd = {
services.NetworkManager-wait-online.enable = false;
network.wait-online.enable = false;
};
# systemd = {
# services.NetworkManager-wait-online.enable = false;
# network.wait-online.enable = false;
# };
services.resolved = {
enable = true;

57
modules/base/starship.nix Normal file
View file

@ -0,0 +1,57 @@
{
flake.modules.homeManager.cholli =
{ ... }:
{
catppuccin.starship.enable = false;
programs = {
starship = {
enable = true;
enableTransience = true;
settings = {
character = {
error_symbol = "[ ](bold red)";
};
time = {
disabled = false;
time_format = "%T";
utc_time_offset = "+2";
};
username = {
style_user = "#00de00";
style_root = "red";
format = "[$user]($style) ";
disabled = false;
show_always = true;
};
hostname = {
ssh_only = false;
format = "@ [$hostname](bold yellow) ";
disabled = false;
};
directory = {
home_symbol = "󰋞 ~";
read_only_style = "197";
read_only = " ";
format = "at [$path]($style)[$read_only]($read_only_style) ";
};
git_metrics = {
disabled = false;
added_style = "bold blue";
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
};
git_status = {
format = "([$all_status$ahead_behind]($style) )";
ahead = "[$count](bold green)";
behind = "[$count](bold red)";
diverged = "[$ahead_count$behind_count](red)";
deleted = "[$count](red) ";
modified = "[!$count](yellow) ";
staged = "[+$count](green) ";
renamed = "[$count](green) ";
untracked = "[?$count](blue) ";
};
};
};
};
};
}

View file

@ -40,6 +40,13 @@
ssh-to-age
];
services.gnome.gnome-keyring.enable = true;
services.dbus.packages = [
pkgs.gnome-keyring
pkgs.gcr
];
sops = {
defaultSopsFile = ../../../secrets/secrets.yaml;
defaultSopsFormat = "yaml";

View file

@ -0,0 +1,22 @@
{
flake.modules.nixos.base =
{ pkgs, ... }:
{
environment.variables = {
# Enable icons in tooling since we have nerdfonts.
LOG_ICONS = "true";
};
fonts.packages = with pkgs; [
font-awesome
powerline-fonts
powerline-symbols
nerd-fonts.code-new-roman
nerd-fonts.fira-code
nerd-fonts.symbols-only
fira
];
};
}

View file

@ -0,0 +1,61 @@
{
flake.modules = {
nixos.base =
{ pkgs, ... }:
let
reload-yubikey = pkgs.writeShellScriptBin "reload-yubikey" ''
${pkgs.gnupg}/bin/gpg-connect-agent "scd serialno" "learn --force" /bye
'';
in
{
services.pcscd.enable = true;
services.udev.packages = with pkgs; [ yubikey-personalization ];
environment.systemPackages = with pkgs; [
cryptsetup
paperkey
gnupg
pinentry-curses
pinentry-qt
yubikey-manager
yubioath-flutter
reload-yubikey
];
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
enableExtraSocket = true;
};
};
};
homeManager.base =
{ inputs, pkgs, ... }:
let
gpgConf = "${inputs.gpg-base-conf}/gpg.conf";
gpgAgentConf = ''
enable-ssh-support
default-cache-ttl 60
max-cache-ttl 120
pinentry-program ${pkgs.pinentry-qt}/bin/pinentry-qt
'';
in
{
home.file = {
".gnupg/.keep".text = "";
".gnupg/gpg.conf".source = gpgConf;
".gnupg/gpg-agent.conf".text = gpgAgentConf;
".gnupg/scdeamon.conf".text = "disable-ccid";
};
};
};
}

View file

@ -18,7 +18,7 @@
};
homeManager.base =
homeManager.cholli =
{ inputs, pkgs, ... }:
let
helix-pkg = inputs.helix.packages.${pkgs.system}.default;

View file

@ -0,0 +1,27 @@
{
flake.modules.nixos.base =
{ lib, ... }:
{
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
console = {
keyMap = lib.mkForce "us";
useXkbConfig = true;
};
};
}

View file

@ -0,0 +1,61 @@
{
flake.modules.nixos.base =
{
config,
inputs,
lib,
pkgs,
...
}:
let
username = "cholli";
in
{
environment.systemPackages = with pkgs; [
nixfmt-rfc-style
nix-prefetch-git
nix-index
nix-output-monitor
];
programs.nh = {
enable = true;
package = inputs.nh-flake.packages.${pkgs.system}.nh;
flake = "/home/${username}/projects/config";
};
nix = {
settings =
let
users = [
"root"
username
]
++ lib.optional (builtins.hasAttr "native" config.services.gitea-actions-runner) "gitea-runner"
++ lib.optional config.services.hydra.enable "hydra hydra-www hydra-evaluator hydra-queue-runner";
in
{
experimental-features = "nix-command flakes";
http-connections = 50;
warn-dirty = false;
log-lines = 50;
sandbox = "relaxed";
auto-optimise-store = true;
trusted-users = users;
allowed-users = users;
allowed-uris = "github: https://github.com/ git+https://github.com/ gitlab: https://gitlab.com/ git+https://gitlab.com/";
}
// (lib.optionalAttrs config.programs.direnv.enable {
keep-outputs = true;
keep-derivations = true;
});
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
};
};
}

View file

@ -0,0 +1,9 @@
{
flake.modules.homeManager.desktop =
{ pkgs, ... }:
{
home.packages = with pkgs; [
fuzzel
];
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -0,0 +1,28 @@
{
flake.modules.homeManager.cholli =
{ ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock-blur";
};
listener = [
{
timeout = 600;
on-timeout = "loginctl lock-session";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
};
}

View file

@ -0,0 +1,118 @@
{
flake.modules = {
nixos.desktop =
{ pkgs, ... }:
let
hyprlock-blur = pkgs.writeShellScriptBin "hyprlock-blur" ''
${pkgs.grim}/bin/grim -o DP-1 -l 0 /tmp/screenshot1.png &
${pkgs.grim}/bin/grim -o HDMI-A-1 -l 0 /tmp/screenshot2.png &
wait &&
hyprlock
'';
in
{
security.pam.services.hyprlock = {
allowNullPassword = false;
startSession = false;
text = ''
auth include login
account include login
'';
};
environment.systemPackages = [ hyprlock-blur ];
};
homeManager.cholli =
{ inputs, pkgs, ... }:
let
hyprlock-package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
in
{
programs.hyprlock = {
enable = true;
package = hyprlock-package;
settings = {
# inspiration from https://github.com/justinmdickey/publicdots/blob/main/.config/hypr/hyprlock.conf
background = [
{
monitor = "DP-1";
path = "/tmp/screenshot1.png";
blur_passes = 1; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
{
monitor = "HDMI-A-1";
path = "/tmp/screenshot2.png";
blur_passes = 2; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
];
label = [
{
monitor = "DP-1";
text = "$TIME";
color = "rgba(242, 243, 244, 0.75)";
font_size = 95;
font_family = "JetBrains Mono";
position = "0, 300";
halign = "center";
valign = "center";
}
{
monitor = "DP-1";
text = ''cmd[update:1000] echo $(date +"%A, %B %d")'';
color = "rgba(242, 243, 244, 0.75)";
font_size = 22;
font_family = "JetBrains Mono";
position = "0, 200";
halign = "center";
valign = "center";
}
];
image = {
monitor = "DP-1";
path = "/home/cholli/Pictures/profile.png";
position = "0, 50";
halign = "center";
valign = "center";
};
input-field = {
monitor = "DP-1";
size = "200,50";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.35; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.2)";
font_color = "rgb(111, 45, 104)";
fade_on_empty = false;
rounding = -1;
check_color = "rgb(30, 107, 204)";
placeholder_text = ''<i><span foreground="##cdd6f4">Input Password...</span></i>'';
hide_input = false;
position = "0, -100";
halign = "center";
valign = "center";
};
general = {
auth_method = "pam";
};
};
};
};
};
}

View file

@ -0,0 +1,494 @@
{
flake.modules.homeManager.cholli =
{
lib,
osConfig,
pkgs,
...
}:
{
config = lib.mkIf osConfig.programs.hyprland.enable {
wayland.windowManager.hyprland.settings.exec-once = [
"${pkgs.hyprpanel}/bin/hyprpanel"
];
programs.hyprpanel = {
enable = true;
settings = {
menus.dashboard.powermenu.avatar.image = "/home/cholli/Pictures/profile.png";
bar = {
launcher.autoDetectIcon = true;
workspaces = {
show_icons = false;
show_numbered = true;
};
layouts = {
"0" = {
"left" = [
"dashboard"
"workspaces"
];
"middle" = [
"windowtitle"
];
"right" = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
"left" = [
"workspaces"
];
"right" = [
"clock"
];
};
};
customModules = {
ram = {
icon = " ";
labelType = "used/total";
};
cpu = {
icon = " ";
leftClick = "kitty --hold btop";
};
cpuTemp = {
sensor = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp3_input";
unit = "metric";
showUnit = true;
};
};
clock.format = "%a %b %d %H:%M:%S";
notifications = {
show_total = true;
hideCountWhenZero = false;
};
};
layouts = {
"0" = {
left = [
"dashboard"
"workspaces"
];
middle = [ "windowtitle" ];
right = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
left = [ "workspaces" ];
right = [ "clock" ];
};
};
theme = {
bar = {
floating = true;
background = "#11111b";
border.color = "#b4befe";
buttons = {
background = "#242438";
battery.background = "#242438";
battery.border = "#f9e2af";
battery.icon = "#242438";
battery.icon_background = "#f9e2af";
battery.text = "#f9e2af";
bluetooth.background = "#242438";
bluetooth.border = "#89dceb";
bluetooth.icon = "#1e1e2e";
bluetooth.icon_background = "#89dbeb";
bluetooth.text = "#89dceb";
borderColor = "#b4befe";
clock.background = "#242438";
clock.border = "#f5c2e7";
clock.icon = "#232338";
clock.icon_background = "#f5c2e7";
clock.text = "#f5c2e7";
dashboard.background = "#f9e2af";
dashboard.border = "#f9e2af";
dashboard.icon = "#1e1e2e";
hover = "#45475a";
icon = "#242438";
icon_background = "#b4befe";
media.background = "#242438";
media.border = "#b4befe";
media.icon = "#1e1e2e";
media.icon_background = "#b4befe";
media.text = "#b4befe";
modules.cava.background = "#242438";
modules.cava.border = "#94e2d5";
modules.cava.icon = "#242438";
modules.cava.icon_background = "#94e2d5";
modules.cava.text = "#94e2d5";
modules.cpu.background = "#242438";
modules.cpu.border = "#f38ba8";
modules.cpu.icon = "#181825";
modules.cpu.icon_background = "#f38ba8";
modules.cpu.text = "#f38ba8";
modules.hypridle.background = "#242438";
modules.hypridle.border = "#f5c2e7";
modules.hypridle.icon = "#242438";
modules.hypridle.icon_background = "#f5c2e7";
modules.hypridle.text = "#f5c2e7";
modules.hyprsunset.background = "#242438";
modules.hyprsunset.border = "#fab387";
modules.hyprsunset.icon = "#242438";
modules.hyprsunset.icon_background = "#fab387";
modules.hyprsunset.text = "#fab387";
modules.kbLayout.background = "#242438";
modules.kbLayout.border = "#89dceb";
modules.kbLayout.icon = "#181825";
modules.kbLayout.icon_background = "#89dceb";
modules.kbLayout.text = "#89dceb";
modules.microphone.background = "#242438";
modules.microphone.border = "#a6e3a1";
modules.microphone.icon = "#242438";
modules.microphone.icon_background = "#a6e3a1";
modules.microphone.text = "#a6e3a1";
modules.netstat.background = "#242438";
modules.netstat.border = "#a6e3a1";
modules.netstat.icon = "#181825";
modules.netstat.icon_background = "#a6e3a1";
modules.netstat.text = "#a6e3a1";
modules.power.background = "#242438";
modules.power.border = "#f38ba8";
modules.power.icon = "#181825";
modules.power.icon_background = "#f38ba8";
modules.ram.background = "#242438";
modules.ram.border = "#f9e2af";
modules.ram.icon = "#181825";
modules.ram.icon_background = "#f9e2af";
modules.ram.text = "#f9e2af";
modules.storage.background = "#242438";
modules.storage.border = "#f5c2e7";
modules.storage.icon = "#181825";
modules.storage.icon_background = "#f5c2e7";
modules.storage.text = "#f5c2e7";
modules.submap.background = "#242438";
modules.submap.border = "#94e2d5";
modules.submap.icon = "#181825";
modules.submap.icon_background = "#94e2d5";
modules.submap.text = "#94e2d5";
modules.updates.background = "#242438";
modules.updates.border = "#cba6f7";
modules.updates.icon = "#181825";
modules.updates.icon_background = "#cba6f7";
modules.updates.text = "#cba6f7";
modules.weather.background = "#242438";
modules.weather.border = "#b4befe";
modules.weather.icon = "#242438";
modules.weather.icon_background = "#b4befe";
modules.weather.text = "#b4befe";
modules.worldclock.background = "#242438";
modules.worldclock.border = "#f5c2e7";
modules.worldclock.icon = "#242438";
modules.worldclock.icon_background = "#f5c2e7";
modules.worldclock.text = "#f5c2e7";
network.background = "#242438";
network.border = "#cba6f7";
network.icon = "#242438";
network.icon_background = "#caa6f7";
network.text = "#cba6f7";
notifications.background = "#242438";
notifications.border = "#b4befe";
notifications.icon = "#1e1e2e";
notifications.icon_background = "#b4befe";
notifications.total = "#b4befe";
style = "split";
systray.background = "#242438";
systray.border = "#b4befe";
systray.customIcon = "#cdd6f4";
text = "#b4befe";
volume.background = "#242438";
volume.border = "#eba0ac";
volume.icon = "#242438";
volume.icon_background = "#eba0ac";
volume.text = "#eba0ac";
windowtitle.background = "#242438";
windowtitle.border = "#f5c2e7";
windowtitle.icon = "#1e1e2e";
windowtitle.icon_background = "#f5c2e7";
windowtitle.text = "#f5c2e7";
workspaces.active = "#f5c2e7";
workspaces.available = "#89dceb";
workspaces.background = "#242438";
workspaces.border = "#f5c2e7";
workspaces.hover = "#f5c2e7";
workspaces.numbered_active_highlighted_text_color = "#181825";
workspaces.numbered_active_underline_color = "#f5c2e7";
workspaces.occupied = "#f2cdcd";
y_margins = "0.2em";
};
menus = {
background = "#11111b";
border.color = "#313244";
buttons.active = "#f5c2e6";
buttons.default = "#b4befe";
buttons.disabled = "#585b71";
buttons.text = "#181824";
cards = "#1e1e2e";
check_radio_button.active = "#b4beff";
check_radio_button.background = "#45475a";
dimtext = "#585b70";
dropdownmenu.background = "#11111b";
dropdownmenu.divider = "#1e1e2e";
dropdownmenu.text = "#cdd6f4";
feinttext = "#313244";
iconbuttons.active = "#b4beff";
iconbuttons.passive = "#cdd6f3";
icons.active = "#b4befe";
icons.passive = "#585b70";
label = "#b4befe";
listitems.active = "#b4befd";
listitems.passive = "#cdd6f4";
menu = {
battery.background.color = "#11111b";
battery.border.color = "#313244";
battery.card.color = "#1e1e2e";
battery.icons.active = "#f9e2af";
battery.icons.passive = "#9399b2";
battery.label.color = "#f9e2af";
battery.listitems.active = "#f9e2af";
battery.listitems.passive = "#cdd6f3";
battery.slider.background = "#585b71";
battery.slider.backgroundhover = "#45475a";
battery.slider.primary = "#f9e2af";
battery.slider.puck = "#6c7086";
battery.text = "#cdd6f4";
bluetooth.background.color = "#11111b";
bluetooth.border.color = "#313244";
bluetooth.card.color = "#1e1e2e";
bluetooth.iconbutton.active = "#89dceb";
bluetooth.iconbutton.passive = "#cdd6f4";
bluetooth.icons.active = "#89dceb";
bluetooth.icons.passive = "#9399b2";
bluetooth.label.color = "#89dceb";
bluetooth.listitems.active = "#89dcea";
bluetooth.listitems.passive = "#cdd6f4";
bluetooth.scroller.color = "#89dceb";
bluetooth.status = "#6c7086";
bluetooth.switch.disabled = "#313245";
bluetooth.switch.enabled = "#89dceb";
bluetooth.switch.puck = "#454759";
bluetooth.switch_divider = "#45475a";
bluetooth.text = "#cdd6f4";
clock.background.color = "#11111b";
clock.border.color = "#313244";
clock.calendar.contextdays = "#585b70";
clock.calendar.currentday = "#f5c2e7";
clock.calendar.days = "#cdd6f4";
clock.calendar.paginator = "#f5c2e6";
clock.calendar.weekdays = "#f5c2e7";
clock.calendar.yearmonth = "#94e2d5";
clock.card.color = "#1e1e2e";
clock.text = "#cdd6f4";
clock.time.time = "#f5c2e7";
clock.time.timeperiod = "#94e2d5";
clock.weather.hourly.icon = "#f5c2e7";
clock.weather.hourly.temperature = "#f5c2e7";
clock.weather.hourly.time = "#f5c2e7";
clock.weather.icon = "#f5c2e7";
clock.weather.stats = "#f5c2e7";
clock.weather.status = "#94e2d5";
clock.weather.temperature = "#cdd6f4";
clock.weather.thermometer.cold = "#89b4fa";
clock.weather.thermometer.extremelycold = "#89dceb";
clock.weather.thermometer.extremelyhot = "#f38ba8";
clock.weather.thermometer.hot = "#fab387";
clock.weather.thermometer.moderate = "#b4befe";
dashboard.background.color = "#11111b";
dashboard.border.color = "#313244";
dashboard.card.color = "#1e1e2e";
dashboard.controls.bluetooth.background = "#89dceb";
dashboard.controls.bluetooth.text = "#181824";
dashboard.controls.disabled = "#585b70";
dashboard.controls.input.background = "#f5c2e7";
dashboard.controls.input.text = "#181824";
dashboard.controls.notifications.background = "#f9e2af";
dashboard.controls.notifications.text = "#181824";
dashboard.controls.volume.background = "#eba0ac";
dashboard.controls.volume.text = "#181824";
dashboard.controls.wifi.background = "#cba6f7";
dashboard.controls.wifi.text = "#181824";
dashboard.directories.left.bottom.color = "#eba0ac";
dashboard.directories.left.middle.color = "#f9e2af";
dashboard.directories.left.top.color = "#f5c2e7";
dashboard.directories.right.bottom.color = "#b4befe";
dashboard.directories.right.middle.color = "#cba6f7";
dashboard.directories.right.top.color = "#94e2d5";
dashboard.monitors.bar_background = "#45475a";
dashboard.monitors.cpu.bar = "#eba0ad";
dashboard.monitors.cpu.icon = "#eba0ac";
dashboard.monitors.cpu.label = "#eba0ac";
dashboard.monitors.disk.bar = "#f5c2e8";
dashboard.monitors.disk.icon = "#f5c2e7";
dashboard.monitors.disk.label = "#f5c2e7";
dashboard.monitors.gpu.bar = "#a6e3a2";
dashboard.monitors.gpu.icon = "#a6e3a1";
dashboard.monitors.gpu.label = "#a6e3a1";
dashboard.monitors.ram.bar = "#f9e2ae";
dashboard.monitors.ram.icon = "#f9e2af";
dashboard.monitors.ram.label = "#f9e2af";
dashboard.powermenu.confirmation.background = "#11111b";
dashboard.powermenu.confirmation.body = "#cdd6f4";
dashboard.powermenu.confirmation.border = "#313244";
dashboard.powermenu.confirmation.button_text = "#11111a";
dashboard.powermenu.confirmation.card = "#1e1e2e";
dashboard.powermenu.confirmation.confirm = "#a6e3a1";
dashboard.powermenu.confirmation.deny = "#f38ba8";
dashboard.powermenu.confirmation.label = "#b4befe";
dashboard.powermenu.logout = "#a6e3a1";
dashboard.powermenu.restart = "#fab387";
dashboard.powermenu.shutdown = "#f38ba8";
dashboard.powermenu.sleep = "#89dceb";
dashboard.profile.name = "#f5c2e7";
dashboard.shortcuts.background = "#b4befe";
dashboard.shortcuts.recording = "#a6e3a1";
dashboard.shortcuts.text = "#181824";
media.album = "#f5c2e8";
media.artist = "#94e2d6";
media.background.color = "#11111b";
media.border.color = "#313244";
media.buttons.background = "#b4beff";
media.buttons.enabled = "#94e2d4";
media.buttons.inactive = "#585b70";
media.buttons.text = "#11111b";
media.card.color = "#1e1e2e";
media.slider.background = "#585b71";
media.slider.backgroundhover = "#45475a";
media.slider.primary = "#f5c2e7";
media.slider.puck = "#6c7086";
media.song = "#b4beff";
media.timestamp = "#cdd6f4";
network.background.color = "#11111b";
network.border.color = "#313244";
network.card.color = "#1e1e2e";
network.iconbuttons.active = "#cba6f7";
network.iconbuttons.passive = "#cdd6f4";
network.icons.active = "#cba6f7";
network.icons.passive = "#9399b2";
network.label.color = "#cba6f7";
network.listitems.active = "#cba6f6";
network.listitems.passive = "#cdd6f4";
network.scroller.color = "#cba6f7";
network.status.color = "#6c7086";
network.switch.disabled = "#313245";
network.switch.enabled = "#cba6f7";
network.switch.puck = "#454759";
network.text = "#cdd6f4";
notifications.background = "#11111b";
notifications.border = "#313244";
notifications.card = "#1e1e2e";
notifications.clear = "#f38ba8";
notifications.label = "#b4befe";
notifications.no_notifications_label = "#313244";
notifications.pager.background = "#11111b";
notifications.pager.button = "#b4befe";
notifications.pager.label = "#9399b2";
notifications.scrollbar.color = "#b4befe";
notifications.switch.disabled = "#313245";
notifications.switch.enabled = "#b4befe";
notifications.switch.puck = "#454759";
notifications.switch_divider = "#45475a";
power.background.color = "#11111b";
power.border.color = "#313244";
power.buttons.logout.background = "#1e1e2e";
power.buttons.logout.icon = "#181824";
power.buttons.logout.icon_background = "#a6e3a1";
power.buttons.logout.text = "#a6e3a1";
power.buttons.restart.background = "#1e1e2e";
power.buttons.restart.icon = "#181824";
power.buttons.restart.icon_background = "#fab387";
power.buttons.restart.text = "#fab387";
power.buttons.shutdown.background = "#1e1e2e";
power.buttons.shutdown.icon = "#181824";
power.buttons.shutdown.icon_background = "#f38ba7";
power.buttons.shutdown.text = "#f38ba8";
power.buttons.sleep.background = "#1e1e2e";
power.buttons.sleep.icon = "#181824";
power.buttons.sleep.icon_background = "#89dceb";
power.buttons.sleep.text = "#89dceb";
systray.dropdownmenu.background = "#11111b";
systray.dropdownmenu.divider = "#1e1e2e";
systray.dropdownmenu.text = "#cdd6f4";
volume.audio_slider.background = "#585b71";
volume.audio_slider.backgroundhover = "#45475a";
volume.audio_slider.primary = "#eba0ac";
volume.audio_slider.puck = "#585b70";
volume.background.color = "#11111b";
volume.border.color = "#313244";
volume.card.color = "#1e1e2e";
volume.iconbutton.active = "#eba0ac";
volume.iconbutton.passive = "#cdd6f4";
volume.icons.active = "#eba0ac";
volume.icons.passive = "#9399b2";
volume.input_slider.background = "#585b71";
volume.input_slider.backgroundhover = "#45475a";
volume.input_slider.primary = "#eba0ac";
volume.input_slider.puck = "#585b70";
volume.label.color = "#eba0ac";
volume.listitems.active = "#eba0ab";
volume.listitems.passive = "#cdd6f4";
volume.text = "#cdd6f4";
};
popover.background = "#181824";
popover.border = "#181824";
popover.text = "#b4befe";
progressbar.background = "#45475a";
progressbar.foreground = "#b4befe";
slider.background = "#585b71";
slider.backgroundhover = "#45475a";
slider.primary = "#b4befe";
slider.puck = "#6c7086";
switch.disabled = "#313245";
switch.enabled = "#b4befe";
switch.puck = "#454759";
text = "#cdd6f4";
tooltip.background = "#11111b";
tooltip.text = "#cdd6f4";
};
outer_spacing = "0.0em";
transparent = true;
};
notification.actions.background = "#b4befd";
notification.actions.text = "#181825";
notification.background = "#181826";
notification.border = "#313243";
notification.close_button.background = "#f38ba7";
notification.close_button.label = "#11111b";
notification.label = "#b4befe";
notification.labelicon = "#b4befe";
notification.text = "#cdd6f4";
notification.time = "#7f849b";
osd.bar_color = "#b4beff";
osd.bar_container = "#11111b";
osd.bar_empty_color = "#313244";
osd.bar_overflow_color = "#f38ba7";
osd.icon = "#11111b";
osd.icon_container = "#b4beff";
osd.label = "#b4beff";
};
};
};
};
};
}

View file

@ -0,0 +1,26 @@
{
flake.modules.homeManager.cholli =
{ ... }:
let
picture-path = "/home/cholli/Pictures/firewatch.jpg";
in
{
home.file = {
# https://www.reddit.com/r/WidescreenWallpaper/comments/13hib3t/purple_firewatch_3840x1620/
"Pictures/firewatch.jpg".source = ./firewatch.jpg;
};
wayland.windowManager.hyprland.settings.exec-once = [
''hyprctl hyprpaper wallpaper "DP-1,${picture-path}"''
];
services.hyprpaper = {
enable = true;
settings = {
preload = [ picture-path ];
wallpaper = "DP-1,${picture-path}";
};
};
};
}

View file

@ -0,0 +1,3 @@
{
}

View file

@ -0,0 +1,62 @@
{
flake.modules = {
nixos.desktop =
{
config,
inputs,
lib,
pkgs,
...
}:
let
zenbrowser = inputs.zen-browser.packages."${pkgs.system}".default;
in
{
environment = {
systemPackages = [
zenbrowser
];
sessionVariables = {
DEFAULT_BROWSER = "${zenbrowser}/bin/zen-beta";
BROWSER = "zen-beta";
};
etc = lib.mkIf config.programs._1password.enable {
"1password/custom_allowed_browsers" = {
text = ''
zen
'';
mode = "0755";
};
};
};
};
homeManager.cholli =
{ pkgs, osConfig, ... }:
{
dconf = {
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
# qt = {
# enable = true;
# platformTheme.name = "gnome";
# style.name = "adwaita-dark";
# };
systemd.user.sessionVariables = osConfig.home-manager.users.cholli.home.sessionVariables;
};
};
}

View file

@ -0,0 +1,345 @@
{
flake.modules = {
nixos.hyprland =
{
config,
inputs,
pkgs,
...
}:
let
hyprland-package = inputs.hyprland.packages.${pkgs.system}.hyprland;
focus-1password = pkgs.writeShellScriptBin "focus-or-open-1pass" ''
running=$(hyprctl -j clients | jq -r '.[] | select(.class == "1password") | .workspace.id')
if [[ $running != "" ]]; then
hyprctl dispatch workspace $running
else
# always open on w/space 4
hyprctl dispatch workspace 9
ELECTRON_OZONE_PLATFORM_HINT=x11 1password&
fi
'';
in
{
environment.systemPackages =
with pkgs;
[
# Auth Agent
hyprpolkitagent
# Notification daemon
libnotify
# Wayland Utilities
wlr-randr
# Clipboard Stuff
wl-clipboard
xclip
clipnotify
# clipsync
# Screenshot Utility
grimblast
# File Manager
xfce.thunar
# clean sddm theme
elegant-sddm
# json cli parser for bash script to focus 1password
jq
hyprpanel
#####
xdg-dbus-proxy
]
++ lib.optional config.programs._1password.enable focus-1password;
programs = {
hyprland = {
enable = true;
package = hyprland-package;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
withUWSM = true;
};
};
xdg = {
autostart.enable = true;
portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
config = {
common = {
default = [ "*" ];
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
};
hyprland = {
default = [
"hyprland"
"gtk"
];
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
};
};
};
};
security.pam.services.gdm.enableGnomeKeyring = true;
services.displayManager.gdm = {
enable = true;
wayland = true;
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
ELECTRON_OZONE_PLATFORM_HINT = "auto";
XDG_SESSION_TYPE = "wayland";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORM = "wayland;xcb";
};
};
homeManager.cholli =
{
inputs,
lib,
pkgs,
osConfig,
...
}:
let
hyprland-package = inputs.hyprland.packages.${pkgs.system}.hyprland;
in
{
config = lib.mkIf osConfig.programs.hyprland.enable {
wayland.windowManager.hyprland = {
enable = true;
package = hyprland-package;
plugins = [ inputs.hy3.packages.${pkgs.system}.hy3 ];
systemd.variables = [ "--all" ];
settings = {
"$mod" = "SUPER";
exec-once = [
"systemctl --user start hyprpolkitagent"
"[workspace 1 silent] zen-beta"
"[workspace 2 silent] steam"
"[workspace 7 silent] obsidian"
"[workspace 8 silent] discord"
"[workspace 9 silent] ELECTRON_OZONE_PLATFORM_HINT=x11 1password" # fix for promts not showing up anymore
"${pkgs.xorg.xhost}/bin/xhost +"
"${lib.getExe pkgs.xorg.xrandr} --output DP-1 --primary"
];
windowrulev2 = [
#steam is a bit wierd, since it opens in multiple phases, so just move the last window to the workspace
"workspace 2 silent, class:^(steam)$, title:^(Steam)"
"workspace 7 silent, class:^(com.obsproject.Studio)$"
"workspace 8 silent, class:^(steam)$, title:^(Friends List)"
"workspace 8 silent, class:^(discord)$, title:^(Discord)"
];
monitor = lib.mkIf (osConfig.networking.hostName == "yggdrasil") [
#Ultrawide
"DP-1,3440x1440@144, 0x0, 1"
#Vertical
"HDMI-A-1, 1920x1080@144, auto-right, 1, transform, 1"
];
workspace = lib.mkIf (osConfig.networking.hostName == "yggdrasil") [
"1, monitor:DP-1"
"2, monitor:DP-1"
"3, monitor:DP-1"
"4, monitor:DP-1"
"5, monitor:DP-1"
"6, monitor:DP-1"
"7, monitor:HDMI-A-1"
"8, monitor:HDMI-A-1"
"9, monitor:HDMI-A-1"
];
general = {
layout = "hy3";
gaps_in = 5;
gaps_out = 5;
border_size = 1;
"col.active_border" = "rgba(88888888)";
"col.inactive_border" = "rgba(00000088)";
allow_tearing = true;
resize_on_border = true;
};
misc = {
# hyprchan
force_default_wallpaper = 2;
# focus new windows that want to be focused
focus_on_activate = true;
};
decoration = {
rounding = 16;
blur = {
enabled = true;
brightness = 1.0;
contrast = 1.0;
noise = 1.0e-2;
vibrancy = 0.2;
vibrancy_darkness = 0.5;
passes = 4;
size = 7;
popups = true;
popups_ignorealpha = 0.2;
};
shadow = {
enabled = true;
range = 100;
render_power = 2;
ignore_window = true;
color = "rgba(00000055)";
offset = "0 15";
scale = 0.97;
};
};
animations = {
enabled = true;
animation = [
"border, 1, 2, default"
"fade, 1, 4, default"
"windows, 1, 3, default, popin 80%"
"workspaces, 1, 2, default, slide"
];
};
bind = [
# compositor commands
"$mod SHIFT, R, exec, hyprctl reload"
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, E, exec, pkill Hyprland"
"$mod CTRL, l, exec, hyprlock-blur"
"$mod, F, fullscreen,"
"$mod, G, togglegroup,"
"$mod SHIFT, N, changegroupactive, f"
"$mod SHIFT, P, changegroupactive, b"
"$mod, R, togglesplit,"
"$mod, T, togglefloating,"
"$mod ALT, ,resizeactive,"
"$mod CTRL, left, movecurrentworkspacetomonitor, l"
"$mod CTRL, right, movecurrentworkspacetomonitor, r"
# move focus
"$mod, h, hy3:movefocus, l"
"$mod, j, hy3:movefocus, d"
"$mod, k, hy3:movefocus, u"
"$mod, l, hy3:movefocus, r"
"$mod, left, hy3:movefocus, l"
"$mod, down, hy3:movefocus, d"
"$mod, up, hy3:movefocus, u"
"$mod, right, hy3:movefocus, r"
# move focus
"$mod SHIFT, h, hy3:movewindow, l, once"
"$mod SHIFT, j, hy3:movewindow, d, once"
"$mod SHIFT, k, hy3:movewindow, u, once"
"$mod SHIFT, l, hy3:movewindow, r, once"
"$mod SHIFT, left, hy3:movewindow, l, once"
"$mod SHIFT, down, hy3:movewindow, d, once"
"$mod SHIFT, up, hy3:movewindow, u, once"
"$mod SHIFT, right, hy3:movewindow, r, once"
#run important programs
"$mod, Return, exec, kitty"
"$mod, D, exec, rofi -show drun"
"$mod, P, exec, focus-or-open-1pass"
# "$mod, D, exec, rofi -show combi"
#screenshot
", Print, exec, grimblast copy area"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, hy3:movetoworkspace, ${toString ws}"
]
) 9
)
);
# mouse movements
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
bindl = [
# volume
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindle = [
# volume
", XF86AudioRaiseVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
];
input = {
kb_layout = "us";
# focus change on cursor move
follow_mouse = 2;
force_no_accel = 1;
accel_profile = "flat";
};
plugin = {
hy3 = {
autotile = {
enable = true;
trigger_width = 800;
trigger_height = 500;
};
};
};
};
};
};
};
};
}

3
modules/desktop/niri.nix Normal file
View file

@ -0,0 +1,3 @@
{
flake.modules.nixos.niri = { ... }: { };
}

9
modules/dev/devenv.nix Normal file
View file

@ -0,0 +1,9 @@
{
flake.modules.nixos.dev =
{ inputs, pkgs, ... }:
{
environment.systemPackages = [
inputs.devenv.packages.${pkgs.system}.devenv
];
};
}

20
modules/dev/direnv.nix Normal file
View file

@ -0,0 +1,20 @@
{
flake.modules = {
nixos.dev =
{ ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
};
homeManager.dev =
{ ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
};
};
}

64
modules/dev/gh.nix Normal file
View file

@ -0,0 +1,64 @@
{
flake.modules = {
homeManager.dev =
{ pkgs, ... }:
{
programs = {
gh-dash = {
enable = true;
settings = {
prSections = [
{
title = "To review";
filters = "repo:NixOS/nixpkgs is:open draft:false status:success";
}
{
title = "1st contribution";
filters = ''repo:NixOS/nixpkgs is:open draft:false label:"12. first-time contribution"'';
}
{
title = "1st approval";
filters = ''repo:NixOS/nixpkgs is:open draft:false status:success label:"12.approvals: 1"'';
}
{
title = "From r-ryantm only";
filters = ''repo:NixOS/nixpkgs is:open draft:false status:success base:master -label:"1.severity: mass-rebuild" -label:"1.severity: mass-darwin-rebuild" author:r-ryantm'';
}
{
title = "My PRs";
filters = "is:open author:@me";
}
{
title = "Needs my review";
filters = "is:open review-requested:@me";
}
{
title = "Involved";
filters = "is:open involves:@me -author:@me";
}
];
defaults = {
prsLimit = 25;
issuesLimit = 10;
view = "prs";
preview = {
open = false;
width = 100;
};
refetchIntervalMinutes = 10;
};
theme.ui.table.showSeparator = false;
};
};
gh = {
enable = true;
extensions = [
pkgs.gh-dash
pkgs.gh-copilot
];
};
};
};
};
}

View file

@ -0,0 +1,50 @@
{
inputs,
lib,
...
}:
{
imports = [
inputs.treefmt-nix.flakeModule
inputs.git-hooks.flakeModule
];
perSystem =
{ self', ... }:
{
treefmt = {
projectRootFile = "flake.nix";
programs = {
deadnix.enable = true;
jsonfmt.enable = true;
nixfmt.enable = true;
prettier.enable = true;
shfmt.enable = true;
statix.enable = true;
yamlfmt.enable = true;
};
settings = {
on-unmatched = "fatal";
global.excludes = [
"*.envrc"
".editorconfig"
"*.directory"
"*.face"
"*.fish"
"*.png"
"*.toml"
"*.svg"
"*.xml"
"*/.gitignore"
"_to_migrate/*"
"LICENSE"
];
};
};
pre-commit.settings.hooks.nix-fmt = {
enable = true;
entry = lib.getExe self'.formatter;
};
};
}

View file

@ -0,0 +1,18 @@
{
flake.modules.nixos.games =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
discord
teamspeak6-client
];
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-move-transition
];
};
};
}

16
modules/games/steam.nix Normal file
View file

@ -0,0 +1,16 @@
{
flake.modules.nixos.games =
{ pkgs, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
environment.systemPackages = with pkgs; [
protontricks
];
};
}

View file

@ -0,0 +1,10 @@
{
flake.modules.nixos.games =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
prismlauncher
starsector
];
};
}

View file

@ -8,11 +8,45 @@ in
flake.modules.nixos."hosts/yggdrasil" =
{ lib, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
teamviewer
teams-for-linux
pyfa
obsidian
diebahn
path-of-building
];
services.teamviewer.enable = true;
environment.pathsToLink = [ "/libexec" ];
programs.ssh.extraConfig = ''
AddressFamily inet
'';
imports =
with config.flake.modules.nixos;
[
# System modules
base
dev
desktop
games
# hardware
audio
bluetooth
amdgpu
# dektops
hyprland
# apps
_1password
# Users
cholli
@ -22,12 +56,36 @@ in
home-manager.users.cholli = {
imports = with config.flake.modules.homeManager; [
base
dev
# Activate all user based config
cholli
];
};
}
];
nix = {
distributedBuilds = true;
settings.builders-use-substitutes = true;
buildMachines = [
{
hostName = "nixberry";
sshUser = "remotebuild";
sshKey = "/root/.ssh/remotebuild";
systems = [ "aarch64-linux" ];
protocol = "ssh-ng";
supportedFeatures = [
"nixos-test"
"big-parallel"
"kvm"
];
}
];
};
boot = {
kernelPackages = pkgs.linuxPackages_latest;
@ -69,6 +127,16 @@ in
device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd";
fsType = "ext4";
};
"/var/lib/bluetooth" = {
device = "/persist/var/lib/bluetooth";
options = [
"bind"
"noauto"
"x-systemd.automount"
];
noCheck = true;
};
};
swapDevices = [

60
modules/server/acme.nix Normal file
View file

@ -0,0 +1,60 @@
{
flake.modules.nixos.server =
{
config,
lib,
...
}:
let
sopsFile = ../../secrets/secrets-loptland.yaml;
domainname = "christophhollizeck.dev";
in
{
sops = {
secrets = {
"netcup/customer_number" = {
inherit sopsFile;
};
"netcup/api/key" = {
inherit sopsFile;
};
"netcup/api/password" = {
inherit sopsFile;
};
};
templates = {
"netcup.env" = {
content = ''
NETCUP_CUSTOMER_NUMBER=${config.sops.placeholder."netcup/customer_number"}
NETCUP_API_KEY=${config.sops.placeholder."netcup/api/key"}
NETCUP_API_PASSWORD=${config.sops.placeholder."netcup/api/password"}
NETCUP_PROPAGATION_TIMEOUT=1200
'';
};
};
};
security.acme = {
acceptTerms = true;
defaults = {
inherit (config.flake.meta.users.cholli) email;
group = lib.optional config.services.nginx.enable "nginx";
reloadServices = lib.optional config.services.nginx.enable "nginx.service";
dnsProvider = "netcup";
environmentFile = config.sops.templates."netcup.env".path;
};
certs."${domainname}" = {
dnsResolver = "1.1.1.1:53";
extraDomainNames = [ "*.${domainname}" ];
};
};
};
}

View file

@ -0,0 +1,63 @@
{
flake.modules.nixos.factorio-server =
{ config, ... }:
let
sopsFile = ../../secrets/secrets-loptland.yaml;
in
{
sops = {
secrets = {
"factorio/token" = {
restartUnits = [ "factorio.service" ];
inherit sopsFile;
};
"factorio/username" = {
restartUnits = [ "factorio.service" ];
inherit sopsFile;
};
"factorio/game_password" = {
restartUnits = [ "factorio.service" ];
inherit sopsFile;
};
};
templates."extraSettingsFile.json".content = ''
{
"name": "Pyanodons Holli",
"description": "Trying to run a factorio-headless-server on my nix system",
"tags": ["vanilla"],
"max_players": 10,
"game_password": "${config.sops.placeholder."factorio/game_password"}",
"allow_commands": "admins-only",
"autosave_slots": 5,
"ignore_player_limit_for_returning_players": true,
"username" : "${config.sops.placeholder."factorio/username"}",
"token": "${config.sops.placeholder."factorio/token"}"
}
'';
templates."extraSettingsFile.json".mode = "0444";
};
systemd.tmpfiles.rules = [
"Z /var/lib/factorio/mods 770 65400 65400 - -"
"Z /var/lib/factorio/saves 770 65400 65400 - -"
];
services.factorio = {
enable = true;
openFirewall = true;
public = true;
lan = true;
nonBlockingSaving = true;
autosave-interval = 5;
saveName = "Pyanodons";
loadLatestSave = true;
admins = [
"daholli"
"galbrain"
"geigeabc"
];
extraSettingsFile = config.sops.templates."extraSettingsFile.json".path;
};
};
}

25
modules/server/hydra.nix Normal file
View file

@ -0,0 +1,25 @@
{
flake.modules.nixos.hydra =
{ ... }:
let
httpPort = 2000;
in
{
services.nix-serve = {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
services.hydra = {
enable = true;
hydraURL = "http://localhost:${toString httpPort}";
port = httpPort;
notificationSender = "hydra@localhost";
useSubstitutes = true;
extraConfig = ''
allow-import-from-derivation = 1
'';
};
};
}

View file

@ -0,0 +1,41 @@
{
flake.modules.nixos.server =
{ lib, ... }:
{
users.users.remotebuild = {
isNormalUser = true;
createHome = false;
group = "remotebuild";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZjG+XPNoVHVdCel5MK4mwvtoFCqDY1WMI1yoU71Rd root@yggdrasil"
];
};
users.groups.remotebuild = { };
nix = {
nrBuildUsers = 64;
settings = {
trusted-users = [ "remotebuild" ];
min-free = 10 * 1024 * 1024;
max-free = 200 * 1024 * 1024;
max-jobs = "auto";
cores = 0;
};
daemonIOSchedClass = lib.mkDefault "idle";
daemonCPUSchedPolicy = lib.mkDefault "idle";
};
systemd.services.nix-daemon.serviceConfig = {
MemoryAccounting = true;
MemoryMax = "90%";
OOMScoreAdjust = 500;
Slice = "-.slice";
};
};
}

17
modules/server/ssh.nix Normal file
View file

@ -0,0 +1,17 @@
{
flake.modules.nixos.server =
{ ... }:
{
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
services.fail2ban = {
enable = true;
};
};
}

View file

@ -0,0 +1,16 @@
{
flake.modules.nixos.amdgpu =
{ ... }:
{
hardware.graphics = {
enable = true;
enable32Bit = true;
};
environment = {
variables = {
AMD_VULKAN_ICD = "RADV";
};
};
};
}

307
modules/systems/audio.nix Normal file
View file

@ -0,0 +1,307 @@
{
flake.modules = {
nixos.audio =
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
pavucontrol
easyeffects
];
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" ''
wireplumber.settings = {
bluetooth.autoswitch-to-headset-profile = false
}
'')
(pkgs.writeTextDir "share/wireplumber/policy.lua.d/11-bluetooth-policy.conf" ''
bluetooth_policy.policy["media-role.use-headset-profile"] = false
'')
];
};
};
homeManager.cholli =
{ lib, osConfig, ... }:
{
services.easyeffects = lib.mkIf osConfig.services.pipewire.enable {
enable = true;
preset = "jtrv-preset";
extraPresets = {
jtrv-preset = {
input = {
blocklist = [
];
"compressor#0" = {
attack = 5;
boost-amount = 6;
boost-threshold = -72;
bypass = false;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
input-gain = 0;
knee = -6;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 0;
mode = "Downward";
output-gain = 0;
ratio = 4;
release = 75;
release-threshold = -40;
sidechain = {
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
type = "Feed-forward";
};
stereo-split = false;
threshold = -20;
wet = 0;
};
"deesser#0" = {
bypass = false;
detection = "RMS";
f1-freq = 3000.0;
f1-level = -6.0;
f2-freq = 5000.0;
f2-level = -6.0;
f2-q = 1.5000000000000004;
input-gain = 0.0;
laxity = 15;
makeup = 0;
mode = "Wide";
output-gain = 0;
ratio = 5;
sc-listen = false;
threshold = -20;
};
"equalizer#0" = {
balance = 0;
bypass = false;
input-gain = 0;
left = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
mode = "IIR";
num-bands = 5;
output-gain = 0;
pitch-left = 0;
pitch-right = 0;
right = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
split-channels = false;
};
"gate#0" = {
attack = 1;
bypass = false;
curve-threshold = -50;
curve-zone = -2;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
hysteresis = true;
hysteresis-threshold = -3;
hysteresis-zone = -1;
input-gain = 0;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 1;
output-gain = 0;
reduction = -15;
release = 200;
sidechain = {
input = "Internal";
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
};
stereo-split = false;
wet = -1;
};
"limiter#0" = {
alr = false;
alr-attack = 5;
alr-knee = 0;
alr-release = 50;
attack = 1;
bypass = false;
dithering = "16bit";
external-sidechain = false;
gain-boost = true;
input-gain = 0;
lookahead = 5;
mode = "Herm Wide";
output-gain = 0;
oversampling = "Half x2(2L)";
release = 5;
sidechain-preamp = 0;
stereo-link = 100;
threshold = -1;
};
plugins_order = [
"rnnoise#0"
"gate#0"
"deesser#0"
"compressor#0"
"equalizer#0"
"speex#0"
"limiter#0"
];
"rnnoise#0" = {
bypass = false;
enable-vad = false;
input-gain = 0;
model-path = "";
output-gain = 0;
release = 20;
vad-thres = 50;
wet = 0;
};
"speex#0" = {
bypass = false;
enable-agc = false;
enable-denoise = false;
enable-dereverb = false;
input-gain = 0;
noise-suppression = -70;
output-gain = 0;
vad = {
enable = true;
probability-continue = 90;
probability-start = 95;
};
};
};
};
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{
flake.modules.nixos.bluetooth =
{ ... }:
{
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
KernelExperimental = true;
Enable = "Source,Sink,Media,Socket";
};
};
};
};
}

View file

@ -19,29 +19,53 @@
};
};
modules.nixos.cholli =
{ pkgs, ... }:
{
programs.fish.enable = true;
modules = {
nixos.cholli =
{ pkgs, ... }:
{
programs.fish.enable = true;
users.users.cholli = {
description = config.flake.meta.users.cholli.name;
isNormalUser = true;
createHome = true;
extraGroups = [
"audio"
"input"
"networkmanager"
"sound"
"tty"
"wheel"
];
shell = pkgs.fish;
# TODO: fix this with sops
initialPassword = "asdf";
};
nix.settings.trusted-users = [ config.flake.meta.users.cholli.username ];
users.users.cholli = {
description = config.flake.meta.users.cholli.name;
isNormalUser = true;
createHome = true;
extraGroups = [
"audio"
"input"
"networkmanager"
"sound"
"tty"
"wheel"
];
shell = pkgs.fish;
# TODO: fix this with sops
initialPassword = "asdf";
};
nix.settings.trusted-users = [ config.flake.meta.users.cholli.username ];
};
homeManager.cholli =
{ ... }:
let
defaultIconFileName = "profile.png";
in
{
home = {
file = {
"Desktop/.keep".text = "";
"Documents/.keep".text = "";
"Downloads/.keep".text = "";
"Music/.keep".text = "";
"Pictures/.keep".text = "";
"Videos/.keep".text = "";
"projects/.keep".text = "";
".face".source = ./${defaultIconFileName};
"Pictures/${defaultIconFileName}".source = ./${defaultIconFileName};
};
};
};
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB