diff options
| -rw-r--r-- | flake.lock | 431 | ||||
| -rw-r--r-- | flake.nix | 23 | ||||
| -rw-r--r-- | hosts/base.nix | 2 | ||||
| -rw-r--r-- | hosts/local/gui.nix | 5 | ||||
| -rw-r--r-- | hosts/local/keyboards/thinkpad-numpad.kbd | 102 | ||||
| -rw-r--r-- | hosts/local/niri.nix | 49 | ||||
| -rw-r--r-- | hosts/local/p16/configuration.nix | 68 | ||||
| -rw-r--r-- | hosts/local/p16/default.nix | 7 | ||||
| -rw-r--r-- | hosts/local/p16/home.nix | 61 | ||||
| -rw-r--r-- | hosts/local/p16/keyboard.nix | 42 | ||||
| -rw-r--r-- | hosts/local/sway.nix | 4 | ||||
| -rw-r--r-- | hosts/local/syncthing.nix | 54 | ||||
| -rw-r--r-- | hosts/pkgs.nix | 17 | ||||
| -rw-r--r-- | hosts/unfree.nix | 4 |
14 files changed, 613 insertions, 256 deletions
@@ -1,53 +1,5 @@ { "nodes": { - "agenix": { - "inputs": { - "agenix": "agenix_2", - "crane": "crane", - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1744897914, - "narHash": "sha256-GIVU92o2TZBnKQXTb76zpQbWR4zjU2rFqWKNIIpXnqA=", - "owner": "yaxitech", - "repo": "ragenix", - "rev": "40f2e17ecaeab4d78ec323e96a04548c0aaa5223", - "type": "github" - }, - "original": { - "owner": "yaxitech", - "repo": "ragenix", - "type": "github" - } - }, - "agenix_2": { - "inputs": { - "darwin": "darwin", - "home-manager": "home-manager", - "nixpkgs": [ - "agenix", - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1736955230, - "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=", - "owner": "ryantm", - "repo": "agenix", - "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c", - "type": "github" - }, - "original": { - "owner": "ryantm", - "repo": "agenix", - "type": "github" - } - }, "blobs": { "flake": false, "locked": { @@ -98,21 +50,6 @@ }, "crane": { "locked": { - "lastModified": 1741481578, - "narHash": "sha256-JBTSyJFQdO3V8cgcL08VaBUByEU6P5kXbTJN6R0PFQo=", - "owner": "ipetkov", - "repo": "crane", - "rev": "bb1c9567c43e4434f54e9481eb4b8e8e0d50f0b5", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "crane_2": { - "locked": { "lastModified": 1754269165, "narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=", "owner": "ipetkov", @@ -126,26 +63,30 @@ "type": "github" } }, - "darwin": { + "dankMaterialShell": { "inputs": { + "dgop": [ + "dgop" + ], + "dms-cli": [ + "dms-cli" + ], "nixpkgs": [ - "agenix", - "agenix", "nixpkgs" - ] + ], + "quickshell": "quickshell" }, "locked": { - "lastModified": 1700795494, - "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "lastModified": 1761106450, + "narHash": "sha256-vneqm8FGC68+bMerG9N772cpJio+ZkVxlqdRhaf1XqE=", + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "rev": "479868718e7396a2e5a552e8e766ec4333f3377b", "type": "github" }, "original": { - "owner": "lnl7", - "ref": "master", - "repo": "nix-darwin", + "owner": "AvengeMedia", + "repo": "DankMaterialShell", "type": "github" } }, @@ -172,6 +113,26 @@ "type": "github" } }, + "dgop": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760238269, + "narHash": "sha256-7CeGZM/Z/5Qt3AYByCRohGYGR1MRuXYzTTbkV/JxyAs=", + "owner": "AvengeMedia", + "repo": "dgop", + "rev": "95acdfce2d323e28fa8f5a4f345160962034f2b5", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "dgop", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -192,6 +153,27 @@ "type": "github" } }, + "dms-cli": { + "inputs": { + "gomod2nix": "gomod2nix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1761107165, + "narHash": "sha256-mYC+2YQKjxAIiuO9PLAu27P4AFUoinEy1s4MSnU35+o=", + "owner": "AvengeMedia", + "repo": "danklinux", + "rev": "942f89c393ea63bbb7ce3bb86121f512129c847f", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "danklinux", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -404,7 +386,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems" }, "locked": { "lastModified": 1731533236, @@ -422,7 +404,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, @@ -440,7 +422,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_4" + "systems": "systems_3" }, "locked": { "lastModified": 1731533236, @@ -473,7 +455,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_5" + "systems": "systems_4" }, "locked": { "lastModified": 1701680307, @@ -491,7 +473,7 @@ }, "flake-utils_6": { "inputs": { - "systems": "systems_6" + "systems": "systems_5" }, "locked": { "lastModified": 1731533236, @@ -705,10 +687,33 @@ "type": "github" } }, + "gomod2nix": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "dms-cli", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756047880, + "narHash": "sha256-JeuGh9kA1SPL70fnvpLxkIkCWpTjtoPaus3jzvdna0k=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "47d628dc3b506bd28632e47280c6b89d3496909d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "v1.7.0", + "repo": "gomod2nix", + "type": "github" + } + }, "helix": { "inputs": { "nixpkgs": "nixpkgs_3", - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay" }, "locked": { "lastModified": 1761055346, @@ -727,17 +732,15 @@ "home-manager": { "inputs": { "nixpkgs": [ - "agenix", - "agenix", "nixpkgs" ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1761081701, + "narHash": "sha256-IwpfaKg5c/WWQiy8b5QGaVPMvoEQ2J6kpwRFdpVpBNQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "9b4a2a7c4fbd75b422f00794af02d6edb4d9d315", "type": "github" }, "original": { @@ -781,7 +784,9 @@ }, "kmonad": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { "dir": "nix", @@ -801,12 +806,12 @@ }, "lanzaboote": { "inputs": { - "crane": "crane_2", + "crane": "crane", "flake-compat": "flake-compat_3", "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_5", "pre-commit-hooks-nix": "pre-commit-hooks-nix", - "rust-overlay": "rust-overlay_3" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1756744479, @@ -844,7 +849,7 @@ "microvm": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_6", "spectrum": "spectrum" }, "locked": { @@ -861,6 +866,64 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1760950171, + "narHash": "sha256-E2ySTu/oK7cYBdAI3tlGP9zVjF4mZgWJ1OZInBCMb00=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "f851a923137c0a54719412146fd63d24b3214e60", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1760940149, + "narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix": { "inputs": { "flake-compat": [ @@ -924,7 +987,7 @@ "nix-gaming": { "inputs": { "flake-parts": "flake-parts_4", - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1761082499, @@ -1078,7 +1141,7 @@ "inputs": { "flake-utils": "flake-utils_5", "nixos-generators": "nixos-generators_2", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_8", "pre-commit-hooks": "pre-commit-hooks" }, "locked": { @@ -1098,7 +1161,7 @@ "nixos-wsl": { "inputs": { "flake-compat": "flake-compat_5", - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_9" }, "locked": { "lastModified": 1760536587, @@ -1228,6 +1291,22 @@ "locked": { "lastModified": 1760862643, "narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1760862643, + "narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=", "owner": "nixos", "repo": "nixpkgs", "rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c", @@ -1242,7 +1321,7 @@ }, "nixpkgs-unfree": { "inputs": { - "nixpkgs": "nixpkgs_12" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1760970213, @@ -1283,22 +1362,6 @@ }, "nixpkgs_10": { "locked": { - "lastModified": 1759733170, - "narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8913c168d1c56dc49a7718685968f38752171c3b", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_11": { - "locked": { "lastModified": 1760878510, "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", "owner": "nixos", @@ -1313,7 +1376,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_11": { "locked": { "lastModified": 1760878510, "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", @@ -1327,7 +1390,7 @@ "type": "indirect" } }, - "nixpkgs_13": { + "nixpkgs_12": { "locked": { "lastModified": 1760878510, "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", @@ -1393,22 +1456,6 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1744157173, - "narHash": "sha256-bWSjxDwq7iVePrhmA7tY2dyMWHuNJo8knkO4y+q4ZkY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "6a39c6e495eefabc935d8ddf66aa45d85b85fa3f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { - "locked": { "lastModified": 1754243818, "narHash": "sha256-sEPw2W01UPf0xNGnMGNZIaE1XHkk7O+lLLetYEXVZHk=", "owner": "NixOS", @@ -1423,7 +1470,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_6": { "locked": { "lastModified": 1759381078, "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", @@ -1439,7 +1486,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_7": { "locked": { "lastModified": 1760596604, "narHash": "sha256-J/i5K6AAz/y5dBePHQOuzC7MbhyTOKsd/GLezSbEFiM=", @@ -1455,7 +1502,7 @@ "type": "github" } }, - "nixpkgs_9": { + "nixpkgs_8": { "locked": { "lastModified": 1729256560, "narHash": "sha256-/uilDXvCIEs3C9l73JTACm4quuHUsIHcns1c+cHUJwA=", @@ -1471,10 +1518,26 @@ "type": "github" } }, + "nixpkgs_9": { + "locked": { + "lastModified": 1759733170, + "narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8913c168d1c56dc49a7718685968f38752171c3b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": "flake-parts_5", - "nixpkgs": "nixpkgs_13" + "nixpkgs": "nixpkgs_12" }, "locked": { "lastModified": 1761114294, @@ -1585,21 +1648,46 @@ "type": "github" } }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "dankMaterialShell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760228179, + "narHash": "sha256-4Z6k7lv3Zcgk3K+4h60LpqB9wCkR+utkYERU735U068=", + "ref": "refs/heads/master", + "rev": "c9d3ffb6043c5bf3f3009202bad7e0e5132c4a25", + "revCount": 693, + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + } + }, "root": { "inputs": { - "agenix": "agenix", + "dankMaterialShell": "dankMaterialShell", "devenv": "devenv", + "dgop": "dgop", "disko": "disko", + "dms-cli": "dms-cli", "flake-parts": "flake-parts_2", "flake-utils": "flake-utils_2", "gemini-cli": "gemini-cli", "git-hooks": "git-hooks_2", "helix": "helix", + "home-manager": "home-manager", "homix": "homix", "impermanence": "impermanence", "kmonad": "kmonad", "lanzaboote": "lanzaboote", "microvm": "microvm", + "niri": "niri", "nix-darwin": "nix-darwin", "nix-gaming": "nix-gaming", "nixos-cn": "nixos-cn", @@ -1608,10 +1696,10 @@ "nixos-mailserver": "nixos-mailserver", "nixos-rk3588": "nixos-rk3588", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_10", "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-old": "nixpkgs-old", - "nixpkgs-stable": "nixpkgs-stable", + "nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-unfree": "nixpkgs-unfree", "nixpkgs-wayland": "nixpkgs-wayland", "nur": "nur", @@ -1627,27 +1715,6 @@ "rust-overlay": { "inputs": { "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1741400194, - "narHash": "sha256-tEpgT+q5KlGjHSm8MnINgTPErEl8YDzX3Eps8PVc09g=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "16b6045a232fea0e9e4c69e55a6e269607dd8e3f", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "nixpkgs": [ "helix", "nixpkgs" ] @@ -1666,7 +1733,7 @@ "type": "github" } }, - "rust-overlay_3": { + "rust-overlay_2": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -1778,21 +1845,6 @@ "type": "github" } }, - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "waybar": { "inputs": { "flake-compat": "flake-compat_7", @@ -1846,6 +1898,39 @@ "type": "github" } }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1759707084, + "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, "yek": { "inputs": { "nixpkgs": [ @@ -12,7 +12,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; flake-utils.url = "github:numtide/flake-utils"; - + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; nixos-hardware.url = "github:nixos/nixos-hardware/master"; #secure book @@ -28,6 +31,24 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + dgop = { + url = "github:AvengeMedia/dgop"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + dms-cli = { + url = "github:AvengeMedia/danklinux"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + dankMaterialShell = { + url = "github:AvengeMedia/DankMaterialShell"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.dgop.follows = "dgop"; + inputs.dms-cli.follows = "dms-cli"; + }; # claude-desktop = { # url = "git:file:/home/y/code/nix/claude-desktop-linux-flake"; # inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/base.nix b/hosts/base.nix index 054a967..0f574ea 100644 --- a/hosts/base.nix +++ b/hosts/base.nix @@ -28,12 +28,14 @@ "https://polwex.cachix.org" "https://nix-community.cachix.org" "https://nix-gaming.cachix.org" + "https://nixpkgs-wayland.cachix.org" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "polwex.cachix.org-1:6Qk8lW0wZ9omwmURpPQUEDUHAb6Nsb+f+pdH2hppBZY=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" + "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" ]; keep-outputs = true; diff --git a/hosts/local/gui.nix b/hosts/local/gui.nix index 26adeb1..a57ab1e 100644 --- a/hosts/local/gui.nix +++ b/hosts/local/gui.nix @@ -18,8 +18,6 @@ ffmpeg-full nv-codec-headers # - obsidian - # smplayer #browsers brave @@ -55,5 +53,8 @@ # xdg whatever bs glib # gio desktop-file-utils + # + xorg.xhost + gparted ]; } diff --git a/hosts/local/keyboards/thinkpad-numpad.kbd b/hosts/local/keyboards/thinkpad-numpad.kbd new file mode 100644 index 0000000..ed4bf8b --- /dev/null +++ b/hosts/local/keyboards/thinkpad-numpad.kbd @@ -0,0 +1,102 @@ +;; one liner comments ';;' +#| Multiline + comments |# + +(defcfg ;; For linux & by-id lists pluggable devices +;; If a key is not bound/left_empty(_) then it will fall back to the previous +;; layer's binding if not then default. +fallthrough true +;; To run system commands. You MIGHT face issues with tiling window managers due to command helpers. +;; allow-cmd true +;; use 'ls /dev/input/by-id/' for detachable keyboards and +;; 'ls /dev/input/by-path/' for builtin keyboards location' +input (device-file "/dev/input/by-id/usb-Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-event-kbd") +;; Not sure what this does. Please check the docs. +output (uinput-sink "My KMonad output") +) + +;; This is the real representation of your actual keyboard. We haven't started +;; customizing layouts yet. +(defsrc + esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del f13 f14 f15 f16 + ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp- + tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+ + caps a s d f g h j k l ; ' ret kp4 kp5 kp6 + lsft z x c v b n m , . / rsft kp1 kp2 kp3 kprt + lctl lmet lalt spc ralt ssrq rctl pgup up pgdn kp0 kp. + left down rght +);; Aliases + +(defalias +;; Layer toggles +sym (layer-toggle syms) +sym2 (layer-toggle syms2) +cords (sticky-key 1000 (layer-toggle mods)) +;; +hrt (layer-switch homerowmods) +back (layer-switch qwerty) + +;; Homerow keys +a (tap-hold-next-release 280 a lctl) +s (tap-hold-next-release 280 s lalt) +d (tap-hold-next-release 280 d lmet) +f (tap-hold-next-release 280 f lsft) +;; +j (tap-hold-next-release 280 j rsft) +k (tap-hold-next-release 280 k lmet) +l (tap-hold-next-release 280 l lalt) +semi (tap-hold-next-release 280 ; rctl) + +;; button to launch brave browser +;; veeb (cmd-button "brave") +;; ssf (sticky-key 500 (layer-toggle rshift)) +;; rsf (layer-toggle rshift) +) + +;; The first custom layer is the one that gets activated when kmonad is started +(deflayer qwerty + esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc + ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp- + tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+ + esc a s d f g h j k l ; ' ret kp4 kp5 kp6 + @sym z x c v b n m , . / rsft kp1 kp2 kp3 kprt + lctl lmet lalt spc @cords ssrq @hrt pgup up pgdn kp0 kp. + left down rght +) +(deflayer homerowmods + esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc + ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp- + tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+ + esc @a @s @d @f g h @j @k @l @semi ' ret kp4 kp5 kp6 + @sym z x c v b n m , . / rsft kp1 kp2 kp3 kprt + caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp. + left down rght +) +(deflayer mods + esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc + ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp- + tab q w e r t y u i o p [ ] \ kp7 kp8 kp9 kp+ + esc lctl lalt lmet lsft g h rsft rmet ralt rctl ' ret kp4 kp5 kp6 + @sym z x c v b n m , . / rsft kp1 kp2 kp3 kprt + caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp. + left down rght +) +;; A layer dedicated to symbols +(deflayer syms + esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc + ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp- + tab q up e r t ! @ # $ % [ ] \ kp7 kp8 kp9 kp+ + esc left down right @sym2 g ' ^ & - = ' ret kp4 kp5 kp6 + @sym z x c v b \( [ { < \ rsft kp1 kp2 kp3 kprt + caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp. + left down rght +) +(deflayer syms2 + esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 home end insert del = \( \) bspc + ` 1 2 3 4 5 6 7 8 9 0 - = bspc nlck kp/ kp* kp- + tab q up e r t ! @ # $ % [ ] \ kp7 kp8 kp9 kp+ + esc left down right @sym2 g ` ~ * \_ + ' ret kp4 kp5 kp6 + @sym z x c v b \) ] } > | rsft kp1 kp2 kp3 kprt + caps lmet @sym spc lalt ssrq @back pgup up pgdn kp0 kp. + left down rght +) diff --git a/hosts/local/niri.nix b/hosts/local/niri.nix index 7db141e..be92df0 100644 --- a/hosts/local/niri.nix +++ b/hosts/local/niri.nix @@ -3,6 +3,9 @@ pkgs, ... }: { + # nixpkgs.overlays = [ + # inputs.nixpkgs-wayland.overlay + # ]; nixpkgs.config.packageOVerrides = pkgs: { intel-vaapi-driver = pkgs.intel-vaapi-driver.override {enableHybridCodec = true;}; vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;}; @@ -64,23 +67,28 @@ }; }; environment.systemPackages = with pkgs; [ - quickshell - cosmic-panel + # niri specific + # xwayland + xwayland-satellite + # not used if using dank + # quickshell fuzzel + # hypridle + # hyprlock + # cliphist # - cliphist - hypridle - hyprlock - networkmanagerapplet - playerctl - qalculate-gtk - swaynotificationcenter - swayosd - syncthingtray - wl-clipboard - wl-clip-persist - wl-color-picker - wofi-power-menu + # networkmanagerapplet + # playerctl + # qalculate-gtk + # swaynotificationcenter + # swayosd + # syncthingtray + # wl-clipboard + # wl-clip-persist + # wl-color-picker + # wofi-power-menu + # + # cosmic-panel # xdg-utils # xdg-desktop-portal @@ -118,8 +126,8 @@ # gtk_engines # gsettings-desktop-schemas # lxappearance - # adwaita-qt - # adwaita-icon-theme + adwaita-qt + adwaita-icon-theme # libcamera # pipewire seems to want this # easyeffects # tigervnc @@ -132,9 +140,9 @@ # # speechd # # espeak-ng # # espeak-ng-data - # wineWowPackages.waylandFull - # libcamera # pipewire seems to want this - # tracy # cool system watcher + wineWowPackages.waylandFull + libcamera # pipewire seems to want this + # tracy # colinuxol system watcher ]; services.speechd.enable = true; @@ -152,6 +160,7 @@ fcitx5-configtool fcitx5-chinese-addons fcitx5-gtk + libsForQt5.fcitx5-qt ]; waylandFrontend = true; }; diff --git a/hosts/local/p16/configuration.nix b/hosts/local/p16/configuration.nix index e0b81ca..47d7aaa 100644 --- a/hosts/local/p16/configuration.nix +++ b/hosts/local/p16/configuration.nix @@ -5,49 +5,20 @@ inputs, pkgs, ... -}: -# let -# wrappers = -# inputs.wrapper-manager.lib.build -# { -# inherit pkgs; -# modules = [ -# ../../../wrappers/chromium -# ../../../wrappers/brave -# ../../../wrappers/zellij -# ../../../wrappers/alacritty -# ]; -# }; -# in -{ +}: { imports = [ # Include the results of the hardware scan. ../../base.nix ../../linux.nix # ../../syncthing.nix - # ../../unfree.nix - ../wayland.nix + ../../unfree.nix + ../niri.nix ../gui.nix - # ./keyboard.nix + ./keyboard.nix + ../syncthing.nix # ../android.nix ]; - # environment.systemPackages = [ - # wrappers - # ]; - # - - nixpkgs.config = { - allowUnfree = true; - }; - environment = { - etc = { - "sway/config".source = ./swayconfig; - "xdg/waybar/config".source = ./waybarconfig; - "xdg/waybar/styles.css".source = ./waybarstyle.css; - }; - }; - # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -57,7 +28,19 @@ networking = { hostName = "p16"; # Define your hostname. - firewall.enable = false; + # firewall = { + # allowedTCPPorts = [80 443]; + # allowedUDPPortRanges = [ + # { + # from = 4000; + # to = 4007; + # } + # { + # from = 8000; + # to = 8010; + # } + # ]; + # }; }; nix.settings.trusted-users = ["root" "y"]; @@ -65,23 +48,16 @@ time.timeZone = "Asia/Bangkok"; # time.timeZone = "Europe/Madrid"; - # List services that you want to enable: + services.fwupd.enable = true; + # environment.systemPackages = [pkgs.linuxKernel.packages.linux_6_17.tp_smapi]; + services.fprintd.enable = true; services.openssh.enable = true; services.openssh.ports = [5555]; - #flatpak - # services.flatpak.enable = true; - # xdg.portal.enable = true; - #/flatpak - # don't sleep if closed lid; - #services.logind.lidSwitchExternalPower = "ignore"; - #services.logind.lidSwitchDocked = "ignore"; - #services.logind.lidSwitch = "ignore"; - services.tailscale = { enable = true; - useRoutingFeatures = "both"; + useRoutingFeatures = "client"; }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/hosts/local/p16/default.nix b/hosts/local/p16/default.nix index edd555a..2ce8fd6 100644 --- a/hosts/local/p16/default.nix +++ b/hosts/local/p16/default.nix @@ -3,4 +3,11 @@ inputs: [ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-p16s-amd-gen4 ./hardware-configuration.nix ./configuration.nix + inputs.home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = {inputs = inputs;}; + home-manager.users.y = ./home.nix; + } ] diff --git a/hosts/local/p16/home.nix b/hosts/local/p16/home.nix new file mode 100644 index 0000000..99be68a --- /dev/null +++ b/hosts/local/p16/home.nix @@ -0,0 +1,61 @@ +{ + inputs, + config, + pkgs, + lib, + ... +}: { + imports = [ + inputs.niri.homeModules.niri + inputs.dankMaterialShell.homeModules.dankMaterialShell.default + inputs.dankMaterialShell.homeModules.dankMaterialShell.niri + ]; + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = "y"; + home.homeDirectory = "/home/y"; + # xdg = { + # enable = true; + # autostart.enable = true; + # userDirs = { + # enable = true; + # createDirectories = true; + # }; + # portal = { + # enable = true; + # }; + # }; + + programs.dankMaterialShell = { + enable = true; + + enableClipboard = true; + enableSystemd = true; + enableSystemMonitoring = true; + enableVPN = true; + enableBrightnessControl = true; + # enableNightMode = true; + enableAudioWavelength = true; + enableCalendarEvents = true; + enableDynamicTheming = true; + }; + + # gtk.theme.package = pkgs.colloid-gtk-theme; + # gtk.theme.name = "Colloid"; + # gtk.iconTheme = { + # package = lib.mkForce pkgs.colloid-icon-theme; + # name = lib.mkForce "Colloid"; + # }; + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "25.05"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} diff --git a/hosts/local/p16/keyboard.nix b/hosts/local/p16/keyboard.nix new file mode 100644 index 0000000..f6cfa8c --- /dev/null +++ b/hosts/local/p16/keyboard.nix @@ -0,0 +1,42 @@ +{_pkgs, ...}: { + services.logind.settings.Login = { + # don’t shutdown when power button is short-pressed + HandlePowerKey = "ignore"; + }; + + # config file keeps getting rewritten but I don't know by who + # i18n.inputMethod = { + # enable = true; + # type = "fcitx5"; + # fcitx5.addons = with pkgs; [ + # fcitx5-mozc + # # mozc-ut is better, wat do + # fcitx5-gtk + # libsForQt5.fcitx5-qt + # fcitx5-lua + # fcitx5-configtool + # fcitx5-rime + # ]; + # }; + environment.variables = { + QT_IM_MODULE = "fcitx"; + XMODIFIERS = "@im=fcitx"; + FCITX_SOCKET = "default"; + }; + + #kmonad + services.kmonad = { + enable = true; + keyboards = { + myKmonadOutput = { + device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd"; + config = builtins.readFile ../keyboards/thinkpad-numpad.kbd; + }; + usbThinkpad = { + # device = "/dev/input/by-id/usb-Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-event-kbd"; + device = "/dev/input/by-id/usb-Lenovo_TrackPoint_Keyboard_II-event-kbd"; + config = builtins.readFile ../keyboards/thinkpad-usb.kbd; + }; + }; + }; +} diff --git a/hosts/local/sway.nix b/hosts/local/sway.nix index 4a91216..0fb8020 100644 --- a/hosts/local/sway.nix +++ b/hosts/local/sway.nix @@ -43,8 +43,8 @@ playerctl blueman wdisplays - # inputs.waybar.packages.x86_64-linux.default - waybar + # inputs.waybar.packages.x86_64-linux.default + waybar glxinfo vulkan-tools glmark2 diff --git a/hosts/local/syncthing.nix b/hosts/local/syncthing.nix new file mode 100644 index 0000000..5497bc9 --- /dev/null +++ b/hosts/local/syncthing.nix @@ -0,0 +1,54 @@ +{ + inputs, + pkgs, + ... +}: { + services.syncthing = { + enable = true; + openDefaultPorts = true; + user = "y"; + dataDir = "/home/y/sync"; # default location for new folders + # configDir = "/home/myusername/.config/syncthing"; + key = "/home/y/sync/key.pem"; + cert = "/home/y/sync/cert.pem"; + settings = { + devices = { + "phone" = {id = "TOBQJTK-QWVMMCN-7SJWXTL-FUKM4FB-ZTLGEL7-KEBTTB3-PC3WZOO-FLBW5A2 ";}; + "laptop" = {id = "INHTOYO-WNCIVPD-M27N2DY-2PJWVCV-FWYOCTQ-AWHBVIJ-4PRVAWR-E7PUTQ4";}; + # "desktop" = {id = "DEVICE-ID-GOES-HERE";}; + }; + folders = { + "memes" = { + path = "/home/y/sync/memes"; + devices = ["phone" "laptop"]; + }; + "creds" = { + path = "/home/y/sync/creds"; + devices = ["phone" "laptop"]; + # By default, Syncthing doesn't sync file permissions. This line enables it for this folder. + # ignorePerms = false; + }; + "docs" = { + path = "/home/y/sync/docs"; + devices = ["phone" "laptop"]; + }; + # "Sensitive" = { + # path = "/home/myusername/Sensitive"; + # devices = [ + # # We trust this device to have access + # # to the decrypted contents of this folder. + # "device1" + # # We do not trust this device, but we want to have another + # # (encrypted) copy of the data for redundancy/backup/sync purposes. + # { + # name = "device2"; + # # encryptionPasswordFile is a path to a file containing the encryption password. + # # See below for information about managing secrets on NixOS. + # encryptionPasswordFile = "/run/secrets/st-sensitive-password"; + # } + # ]; + # }; + }; + }; + }; +} diff --git a/hosts/pkgs.nix b/hosts/pkgs.nix index 436851a..0100e4f 100644 --- a/hosts/pkgs.nix +++ b/hosts/pkgs.nix @@ -55,9 +55,10 @@ #nixfmt direnv nix-direnv - # devenv + cachix + devenv devbox - inputs.devenv.packages.${pkgs.system}.default + # inputs.devenv.packages.${pkgs.system}.default bun # scraping python312Packages.yt-dlp @@ -68,28 +69,22 @@ # electrum # yacreader - # ai stuff! - # aider-chat # inputs.yek.packages.x86_64-linux.default - # python312Packages.google-generativeai bun - claude-code - codex nushell ast-grep diffsitter - # inputs.gemini-cli.packages.x86_64-linux.default # - # ai - lmstudio ] ++ lib.optionals pkgs.stdenv.isLinux [ # linuxKernel.packages.linux_latest_libre.cpupower - gparted + parted moreutils busybox usbutils xdg-utils + exfat + exfatprogs #hardware problems lm_sensors linuxKernel.packages.linux_hardened.cpupower diff --git a/hosts/unfree.nix b/hosts/unfree.nix index 30c4a62..9614aa8 100644 --- a/hosts/unfree.nix +++ b/hosts/unfree.nix @@ -13,8 +13,9 @@ # https://stackoverflow.com/questions/77585228/how-to-allow-unfree-packages-in-nix-for-each-situation-nixos-nix-nix-wit environment.systemPackages = with pkgs; [ # opera + obsidian spotify - vscode + # vscode # fonts corefonts # symbola @@ -32,6 +33,7 @@ # fucking vscode requires this for github copilot services.gnome.gnome-keyring.enable = true; + programs.steam = { enable = true; # package = pkgs.steam.override { |
