From 760a0edc2937fab375898bbd2f2a3011eb8c9756 Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 11 Jan 2026 20:53:40 +0100 Subject: way too many changes to describe --- flake.lock | 320 +++++++-------------------------------- flake.nix | 14 +- hm/env/awww.nix | 3 +- hm/env/cursor.nix | 30 ++++ hm/env/env.nix | 1 + hm/env/niri/binds.nix | 20 +-- hm/env/niri/niri.nix | 2 - hm/env/swayidle.nix | 4 +- hm/env/theme.nix | 9 +- hm/shell/cli.nix | 1 + hm/soft/kdeconnect.nix | 6 +- hm/soft/media.nix | 3 + hm/soft/yt-dlp.nix | 16 +- hosts/desktop/configuration.nix | 9 +- hosts/desktop/disko.nix | 14 +- hosts/desktop/home.nix | 40 ++--- hosts/laptop/home.nix | 2 + hosts/thinkpad/configuration.nix | 63 ++++++++ hosts/thinkpad/disko.nix | 58 +++++++ hosts/thinkpad/home.nix | 50 ++++++ os/core/bootloader.nix | 3 + os/core/drivers.nix | 10 +- os/srv/files.nix | 7 - os/srv/gaming.nix | 3 +- os/srv/kvm.nix | 2 + os/srv/nix-helper.nix | 4 + os/wm/niri.nix | 10 +- os/wm/wm.nix | 4 + 28 files changed, 349 insertions(+), 359 deletions(-) create mode 100644 hm/env/cursor.nix create mode 100644 hosts/thinkpad/configuration.nix create mode 100644 hosts/thinkpad/disko.nix create mode 100644 hosts/thinkpad/home.nix diff --git a/flake.lock b/flake.lock index 7305538..0cc4e64 100644 --- a/flake.lock +++ b/flake.lock @@ -1,50 +1,5 @@ { "nodes": { - "awww": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1766518114, - "narHash": "sha256-3zIOjIidbrHXTxEzjPVrwSd19Mwdfw58VvSnTWtlunc=", - "ref": "refs/heads/main", - "rev": "138c4ebdbe0c3eead5656373ea8837a5bd49c40b", - "revCount": 1329, - "type": "git", - "url": "https://codeberg.org/LGFae/awww" - }, - "original": { - "type": "git", - "url": "https://codeberg.org/LGFae/awww" - } - }, - "chaotic": { - "inputs": { - "flake-schemas": "flake-schemas", - "home-manager": "home-manager", - "jovian": "jovian", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay_2" - }, - "locked": { - "lastModified": 1765204341, - "narHash": "sha256-7xd45skcuLCu2DHxVvU+W/z+7CUOjyv+QPtT4PLZaIU=", - "owner": "chaotic-cx", - "repo": "nyx", - "rev": "aacb796ccd42be1555196c20013b9b674b71df75", - "type": "github" - }, - "original": { - "owner": "chaotic-cx", - "ref": "nyxpkgs-unstable", - "repo": "nyx", - "type": "github" - } - }, "disko": { "inputs": { "nixpkgs": [ @@ -67,22 +22,6 @@ } }, "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { "locked": { "lastModified": 1733328505, "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", @@ -96,14 +35,14 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_3": { + "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", "owner": "edolstra", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { @@ -172,20 +111,6 @@ "type": "github" } }, - "flake-schemas": { - "locked": { - "lastModified": 1721999734, - "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", - "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", - "revCount": 75, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" - } - }, "flake-utils": { "inputs": { "systems": "systems_3" @@ -207,36 +132,15 @@ "home-manager": { "inputs": { "nixpkgs": [ - "chaotic", "nixpkgs" ] }, "locked": { - "lastModified": 1764998300, - "narHash": "sha256-fZatn/KLfHLDXnF0wy7JxXqGaZmGDTVufT4o/AOlj44=", + "lastModified": 1768068402, + "narHash": "sha256-bAXnnJZKJiF7Xr6eNW6+PhBf1lg2P1aFUO9+xgWkXfA=", "owner": "nix-community", "repo": "home-manager", - "rev": "27a6182347ccae90a88231ae0dc5dfa7d15815bb", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1767898632, - "narHash": "sha256-ZpkiMJahNh5Xo1Lqxy2e2SEwyhWDwxrlv4zUO99OIrc=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "40deed4ffe019874309b3eef429e4830346b0aa9", + "rev": "8bc5473b6bc2b6e1529a9c4040411e1199c43b4c", "type": "github" }, "original": { @@ -246,28 +150,6 @@ "type": "github" } }, - "jovian": { - "inputs": { - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "chaotic", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1764922999, - "narHash": "sha256-LSvUxKm6S6ZAd/otQSkAHd3+8KJhi8OwGJGSe0K//B8=", - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", - "rev": "9b9ead1b5591b68f4048e7205ba1397bc85ce6c4", - "type": "github" - }, - "original": { - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", - "type": "github" - } - }, "neovim-nightly-overlay": { "inputs": { "flake-parts": "flake-parts", @@ -277,11 +159,11 @@ ] }, "locked": { - "lastModified": 1767830720, - "narHash": "sha256-QkoscipfDnwclEnVughLSycbkv69yYbxzBLeSWWVAvM=", + "lastModified": 1768089909, + "narHash": "sha256-ZhOqOA935D9Nt9jVZpvna0AoyLDyrqgHs7ZpRCFXads=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "bc28e1651ac22277c1b8d77916944a3a462d875b", + "rev": "da3ebf6278515f20c5ad3c65d11cce833acdf73c", "type": "github" }, "original": { @@ -293,11 +175,11 @@ "neovim-src": { "flake": false, "locked": { - "lastModified": 1767829782, - "narHash": "sha256-ZICnwVq/gDcG8KjRTLFk4fI9nvrVJNGORnNdHEG5iZI=", + "lastModified": 1768087477, + "narHash": "sha256-oGeGdfuUv1ZMeITtElyxCOmiRmSuIquwP8fb6OSDDt4=", "owner": "neovim", "repo": "neovim", - "rev": "89960e27d6f131587e6e97602be947fdedd8de7a", + "rev": "ba7e17160df2088251217d059ad3441253b74993", "type": "github" }, "original": { @@ -318,11 +200,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1767833217, - "narHash": "sha256-HLr9k8g1Geq40PLsNw7I5N8TZkBYtQVjkgDPV/Kehxk=", + "lastModified": 1768153577, + "narHash": "sha256-iR54iiyM4UtQCfAZVsI/BRwIrDUO1oNeiA1h/Jp+nro=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "a789aa1512a9157d5d3392b27e60621fd0d83438", + "rev": "c65d3c7adfe488122c2c9b7ececb1d7fc893dc5b", "type": "github" }, "original": { @@ -351,11 +233,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1767792726, - "narHash": "sha256-qS4tdG2iUQwSld9dTH1gk8GcIOrRi9umMgPv8MGDIA0=", + "lastModified": 1768150783, + "narHash": "sha256-1gtx2la5f8RphvN+BUZuZjiGh25WdO0Hf9+kJKIu3rA=", "owner": "YaLTeR", "repo": "niri", - "rev": "10df9f4717cbd4efd20ae796eb6b0aa400127bdc", + "rev": "e9d888cd52f8a783b07e0d6c0ec9a341a81031ca", "type": "github" }, "original": { @@ -364,43 +246,20 @@ "type": "github" } }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "chaotic", - "jovian", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729697500, - "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", - "owner": "zhaofengli", - "repo": "nix-github-actions", - "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", - "type": "github" - }, - "original": { - "owner": "zhaofengli", - "ref": "matrix-name", - "repo": "nix-github-actions", - "type": "github" - } - }, "nixcord": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat", "flake-parts": "flake-parts_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1767859386, - "narHash": "sha256-AWL0ju7OKKMyvxHolmJ0KhXhQ1NkSKZO5e4OJel+egc=", + "lastModified": 1768118572, + "narHash": "sha256-EzvShHuEAPrwlKgWL6iiNZY4xGNYLac1Wo9nTgbdy+4=", "owner": "KaylorBen", "repo": "nixcord", - "rev": "ba59974679accf680b1f16a74ea72e18dea31ecb", + "rev": "dc9193f6e968af926440fda523376109f4d3f915", "type": "github" }, "original": { @@ -411,11 +270,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1764950072, - "narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=", + "lastModified": 1767892417, + "narHash": "sha256-dhhvQY67aboBk8b0/u0XB6vwHdgbROZT3fJAjyNh5Ww=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f61125a668a320878494449750330ca58b78c557", + "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", "type": "github" }, "original": { @@ -442,11 +301,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1767799921, - "narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=", + "lastModified": 1768028080, + "narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d351d0653aeb7877273920cd3e823994e7579b0b", + "rev": "d03088749a110d52a4739348f39a63f84bb0be14", "type": "github" }, "original": { @@ -456,39 +315,7 @@ "type": "github" } }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1767313136, - "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_2": { - "locked": { - "lastModified": 1767767207, - "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5912c1772a44e31bf1c63c0390b90501e5026886", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1744536153, "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", @@ -513,11 +340,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1767608728, - "narHash": "sha256-kmSJCTgrx+BxgqQOTPHAOkohvO+lbRsPWqu+PSPcz3I=", + "lastModified": 1767906546, + "narHash": "sha256-AoSWS8+P+7hQ/jIdv0wBjgH1MvnerdWBFXO4GV3JoQs=", "owner": "nix-community", "repo": "nixvim", - "rev": "851399eebd0fb383d2fd76269d859f16021dc7a8", + "rev": "7eb8f36f085b85a2aeff929aff52d0f6aa14e000", "type": "github" }, "original": { @@ -528,15 +355,12 @@ }, "root": { "inputs": { - "awww": "awww", - "chaotic": "chaotic", "disko": "disko", - "home-manager": "home-manager_2", + "home-manager": "home-manager", "neovim-nightly-overlay": "neovim-nightly-overlay", "niri": "niri", "nixcord": "nixcord", - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable_2", + "nixpkgs": "nixpkgs", "nixvim": "nixvim", "satty": "satty", "spicetify-nix": "spicetify-nix", @@ -546,49 +370,7 @@ }, "rust-overlay": { "inputs": { - "nixpkgs": [ - "awww", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1764038373, - "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "nixpkgs": [ - "chaotic", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765075567, - "narHash": "sha256-KFDCdQcHJ0hE3Nt5Gm5enRIhmtEifAjpxgUQ3mzSJpA=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "769156779b41e8787a46ca3d7d76443aaf68be6f", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_3": { - "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1748140821, @@ -604,7 +386,7 @@ "type": "github" } }, - "rust-overlay_4": { + "rust-overlay_2": { "inputs": { "nixpkgs": [ "yazi", @@ -630,7 +412,7 @@ "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_3" + "rust-overlay": "rust-overlay" }, "locked": { "lastModified": 1767597267, @@ -654,11 +436,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1767502559, - "narHash": "sha256-om0IPjW850vhhIrNZ5tiXjsYuqyoI44IdE+I9AwZ96I=", + "lastModified": 1768107098, + "narHash": "sha256-mSthw4k7jkB5S8+NYZwrQFItLj+17Se7Wn0pIfdASbc=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "806c1fdeb7af3e013215d14f5d9f06685fa6650f", + "rev": "2e40e07527f9d724b1578f0af590ab345e836ec3", "type": "github" }, "original": { @@ -714,17 +496,17 @@ }, "waybar": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1766959964, - "narHash": "sha256-4wJqxX8VggW+nrXDvES0iHvLsZkyNZ6W6Z03sJXasXw=", + "lastModified": 1767985335, + "narHash": "sha256-JDeI7oyjibtX7FKQYMCBP6l0Q2aSdSephIb74X6tASM=", "owner": "Alexays", "repo": "Waybar", - "rev": "06484547d182057159c4bd58d14871c0b7a7f3dc", + "rev": "a02180a815b651f1bc08a359f23241c941bfafed", "type": "github" }, "original": { @@ -753,11 +535,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1767830382, - "narHash": "sha256-0PgS7M1SV6JCN3MugFZPaP8J+Mr2o7lSDFTPVYZSIAY=", + "lastModified": 1768106915, + "narHash": "sha256-HlLo9zH4ULRXlmlIK948cHmdVhxyHgTHxGaoCRlW4k8=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "74cf1a95a35fd7aec76432bc2cd9b310e0d908c5", + "rev": "72245e108f3b03c3c4474d2de9de2d1830849603", "type": "github" }, "original": { @@ -772,14 +554,14 @@ "nixpkgs": [ "nixpkgs" ], - "rust-overlay": "rust-overlay_4" + "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1767863093, - "narHash": "sha256-1EM8n49TOj9xHUqO4xtrdcRQx7kQ79q+DMOlzTxMZJg=", + "lastModified": 1768129250, + "narHash": "sha256-jsccfsJpyvkZ8dUMR4rS141vnmHT3qh6HtnP+jE2qq4=", "owner": "sxyazi", "repo": "yazi", - "rev": "ebedab3e29c5e7c2b422e9c671ca46625c70cba5", + "rev": "41e5717930141c574442ecc53bd4db5f96188d50", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e49c997..1059a42 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,6 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05"; - chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; home-manager = { url = "github:nix-community/home-manager/master"; @@ -31,11 +29,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - awww = { - url = "git+https://codeberg.org/LGFae/awww"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - satty = { url = "github:gabm/Satty"; inputs.nixpkgs.follows = "nixpkgs"; @@ -62,7 +55,7 @@ }; }; - outputs = inputs @ { nixpkgs, ... }: + outputs = inputs @ { self, nixpkgs, ... }: let username = "adam"; mkHost = { hostname, path }: @@ -70,7 +63,6 @@ specialArgs = { inherit inputs username; }; modules = [ path - inputs.chaotic.nixosModules.default { networking.hostName = hostname; } ]; }; @@ -84,6 +76,10 @@ hostname = "laptop"; path = ./hosts/laptop/configuration.nix; }; + thinkpad = mkHost { + hostname = "thinkpad"; + path = ./hosts/thinkpad/configuration.nix; + }; }; }; } diff --git a/hm/env/awww.nix b/hm/env/awww.nix index d666742..a25f4e6 100644 --- a/hm/env/awww.nix +++ b/hm/env/awww.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, inputs, ... }: +{ config, lib, ... }: let cfg = config.hm.env.awww; in @@ -7,7 +7,6 @@ in config = lib.mkIf cfg.enable { services.swww = { enable = true; - package = inputs.awww.packages.${pkgs.stdenv.hostPlatform.system}.awww; }; }; } diff --git a/hm/env/cursor.nix b/hm/env/cursor.nix new file mode 100644 index 0000000..49e8313 --- /dev/null +++ b/hm/env/cursor.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.hm.env.cursor; + + miyabi-cursor-pkg = pkgs.runCommand "miyabi" {} '' + mkdir -p $out/share/icons/miyabi + cp -rv ${../../resources/cursors/miyabi}/* $out/share/icons/miyabi/ + ''; +in +{ + options.hm.env.cursor = { + enableMiyabi = lib.mkEnableOption "Enables the Miyabi cursor"; + + size = lib.mkOption { + type = lib.types.int; + default = 24; + description = "The size of the mouse cursor"; + }; + }; + + config = lib.mkIf cfg.enableMiyabi { + home.pointerCursor = { + gtk.enable = true; + x11.enable = true; + package = miyabi-cursor-pkg; + name = "miyabi"; + size = cfg.size; + }; + }; +} diff --git a/hm/env/env.nix b/hm/env/env.nix index 2f0fab1..80e19f8 100644 --- a/hm/env/env.nix +++ b/hm/env/env.nix @@ -4,6 +4,7 @@ ./niri/niri.nix ./awww.nix + ./cursor.nix ./fuzzel.nix ./screenshot.nix ./swayidle.nix diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index d22d0e7..cfa15e8 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -68,16 +68,16 @@ in "Mod+BracketLeft".action = consume-or-expel-window-left; "Mod+BracketRight".action = consume-or-expel-window-right; - "XF86Tools" = { - action = spawn "sh" "-c" '' - pkill -9 firefox || true - swaylock -f - wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 - wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1 - niri msg action power-off-monitors - ''; - repeat = false; - }; + # "XF86Tools" = { + # action = spawn "sh" "-c" '' + # pkill -9 firefox || true + # swaylock -f + # wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 + # wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1 + # niri msg action power-off-monitors + # ''; + # repeat = false; + # }; "Mod+R".action = switch-preset-column-width; "Mod+Shift+R".action = reset-window-height; diff --git a/hm/env/niri/niri.nix b/hm/env/niri/niri.nix index 577e52c..b751d3d 100644 --- a/hm/env/niri/niri.nix +++ b/hm/env/niri/niri.nix @@ -91,8 +91,6 @@ in ]; gestures.hot-corners.enable = false; spawn-at-startup = [ - { command = [ "${lib.getExe pkgs.xwayland-satellite}" ]; } - { command = [ "awww-daemon" ]; } { command = [ "waybar" ]; } { command = [ "obs" "--disable-missing-files-check" "--startreplaybuffer" ]; } ]; diff --git a/hm/env/swayidle.nix b/hm/env/swayidle.nix index 1d703cc..94e819a 100644 --- a/hm/env/swayidle.nix +++ b/hm/env/swayidle.nix @@ -16,8 +16,8 @@ in { timeout = 300; command = "${pkgs.swaylock-effects}/bin/swaylock -f"; } { timeout = 600; - command = "${pkgs.niri-unstable}/bin/niri msg action power-off-monitors"; - resumeCommand = "${pkgs.niri-unstable}/bin/niri msg action power-on-monitors"; + command = "niri msg action power-off-monitors"; + resumeCommand = "niri msg action power-on-monitors"; } ]; }; diff --git a/hm/env/theme.nix b/hm/env/theme.nix index 0915024..285e263 100644 --- a/hm/env/theme.nix +++ b/hm/env/theme.nix @@ -4,10 +4,16 @@ let in { options.hm.env.themes = { + enable = lib.mkEnableOption "enables global dark mode"; gtk.enable = lib.mkEnableOption "GTK theming"; qt.enable = lib.mkEnableOption "QT theming"; }; + config = lib.mkMerge [ + (lib.mkIf cfg.enable { + dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; + }) + (lib.mkIf cfg.gtk.enable { gtk = { enable = true; @@ -24,9 +30,8 @@ in (lib.mkIf cfg.qt.enable { qt = { enable = true; + platformTheme.name = "gtk"; style.name = "adwaita-dark"; - style.package = pkgs.adwaita-qt; - platformTheme.name = "adwaita"; }; }) ]; diff --git a/hm/shell/cli.nix b/hm/shell/cli.nix index c20b9c2..4a66405 100644 --- a/hm/shell/cli.nix +++ b/hm/shell/cli.nix @@ -30,6 +30,7 @@ in }; home.packages = with pkgs; [ + magic-wormhole srm file mediainfo diff --git a/hm/soft/kdeconnect.nix b/hm/soft/kdeconnect.nix index 07a5d9e..fbaea82 100644 --- a/hm/soft/kdeconnect.nix +++ b/hm/soft/kdeconnect.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hm.soft.kdeconnect; in @@ -7,9 +7,5 @@ in config = lib.mkIf cfg.enable { services.kdeconnect.enable = true; - - home.packages = [ - pkgs.kdePackages.dolphin - ]; }; } diff --git a/hm/soft/media.nix b/hm/soft/media.nix index b330908..0d18595 100644 --- a/hm/soft/media.nix +++ b/hm/soft/media.nix @@ -6,6 +6,9 @@ in options.hm.soft.media.enable = lib.mkEnableOption "media cli tools"; config = lib.mkIf cfg.enable { home.packages = with pkgs; [ + gimp + zathura + pinta ffmpeg imagemagick syncplay-nogui diff --git a/hm/soft/yt-dlp.nix b/hm/soft/yt-dlp.nix index 4773464..e50f313 100644 --- a/hm/soft/yt-dlp.nix +++ b/hm/soft/yt-dlp.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.hm.soft.yt-dlp; in @@ -7,9 +7,21 @@ in config = lib.mkIf cfg.enable { programs.yt-dlp = { enable = true; - package = pkgs.yt-dlp_git; settings = { + format = "bestvideo+bestaudio/best"; + merge-output-format = "webm"; + prefer-free-formats = true; + paths = "~/dl/yt"; + output = "\"%(uploader)s - %(title)s.%(ext)s\""; + download-archive = "~/.config/yt-dlp/archive.txt"; + # restrict-filenames = true; + + embed-subs = true; + sub-langs = "en.*"; + + embed-metadata = true; + embed-chapters = true; }; }; }; diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index e09c622..4505408 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -1,4 +1,4 @@ -{ config, inputs, pkgs, username, ... }: +{ config, inputs, username, ... }: { system.stateVersion = "25.05"; @@ -71,6 +71,13 @@ }; }; + xdg.terminal-exec = { + enable = true; + settings = { + default = [ "foot.desktop" ]; + }; + }; + boot = { kernelParams = [ "video=DP-1:2560x1440@240" ]; kernelModules = [ "nct6687" ]; diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix index d492ca6..edc4008 100644 --- a/hosts/desktop/disko.nix +++ b/hosts/desktop/disko.nix @@ -41,11 +41,11 @@ }; "@games" = { mountpoint = "/games"; - mountOptions = [ "noatime" ]; + mountOptions = [ "compress=zstd:1" "noatime" ]; }; "@llms" = { mountpoint = "/llms"; - mountOptions = [ "noatime"]; + mountOptions = [ "nodatacow" "noatime"]; }; "@vms" = { mountpoint = "/vms"; @@ -75,19 +75,19 @@ subvolumes = { "@archive" = { mountpoint = "/media/archive"; - mountOptions = [ "compress=zstd:3" "autodefrag" "noatime" ]; + mountOptions = [ "compress=zstd:1" "autodefrag" "noatime" ]; }; "@movies" = { mountpoint = "/media/movies"; - mountOptions = [ "compress=zstd:3" "autodefrag" "noatime" ]; + mountOptions = [ "autodefrag" "noatime" ]; }; "@anime" = { - mountpoint = "/media/movies"; - mountOptions = [ "compress=zstd:3" "autodefrag" "noatime" ]; + mountpoint = "/media/anime"; + mountOptions = [ "autodefrag" "noatime" ]; }; "@pictures" = { mountpoint = "/media/pics"; - mountOptions = [ "compress=zstd:3" "autodefrag" "noatime" ]; + mountOptions = [ "autodefrag" "noatime" ]; }; "@videos" = { mountpoint = "/media/vids"; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index b485217..8431d37 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -1,10 +1,4 @@ -{ pkgs, username, ... }: -let - miyabi-cursor-pkg = pkgs.runCommand "miyabi" {} '' - mkdir -p $out/share/icons/miyabi - cp -rv ${../../resources/cursors/miyabi}/* $out/share/icons/miyabi/ - ''; -in +{ username, ... }: { imports = [ ../../hm/default.nix ]; @@ -23,15 +17,20 @@ in git.enable = true; xdg-dirs = { enable = true; - mediaPath = /media; + mediaPath = /storage; }; }; editors.nixvim.enable = true; env = { niri.enable = true; + cursor = { + size = 48; + enableMiyabi = true; + }; waybar.enable = true; themes = { + enable = true; gtk.enable = true; qt.enable = true; }; @@ -62,24 +61,17 @@ in }; }; - home.packages = with pkgs; [ - simplex-chat-desktop - magic-wormhole - gimp - ]; - - programs.firefox.enable = true; - - programs.nix-index = { + xdg.mimeApps = { enable = true; - enableFishIntegration = true; + defaultApplications = { + "x-scheme-handler/terminal" = [ "foot.desktop" ]; + "inode/directory" = [ "thunar.desktop" ]; + }; }; - home.pointerCursor = { - gtk.enable = true; - x11.enable = true; - package = miyabi-cursor-pkg; - name = "miyabi"; - size = 48; + home.sessionVariables = { + XDG_UTILS_TERMINAL = "foot"; }; + + programs.firefox.enable = true; } diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 777e270..bfcf58a 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -20,9 +20,11 @@ editors.nixvim.enable = true; env = { niri.enable = true; + cursor.enableMiyabi = true; waybar.enable = true; themes = { + enable = true; gtk.enable = true; qt.enable = true; }; diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix new file mode 100644 index 0000000..69134eb --- /dev/null +++ b/hosts/thinkpad/configuration.nix @@ -0,0 +1,63 @@ +{ inputs, username, ... }: +{ + system.stateVersion = "25.05"; + + imports = [ + inputs.disko.nixosModules.disko + ./disko.nix + + ./hardware-configuration.nix + ../../os/default.nix + ]; + + os = { + core = { + allowUnfree.enable = true; + + audio.enable = true; + bootloader = "systemd-boot"; + drivers.enable = true; + fonts.enable = true; + greet.enable = true; + home-manager = { + enable = true; + users.${username}.path = ./home.nix; + }; + locale.enable = true; + memory = { + zram = { + enable = true; + percent = 25; + }; + swapfile = { + enable = true; + size = 8; + }; + }; + network.enable = true; + power.enable = true; + security.enable = true; + ssh.enable = true; + storage.enable = true; + users.enable = true; + }; + srv = { + bluetooth.enable = true; + files = { + thunar.enable = true; + utils.enable = true; + }; + # gaming = { + # enable = true; + # steam.enable = true; + # vr.enable = true; + # }; + # kvm.enable = true; + nix-helper.enable = true; + }; + wm = { + enable = true; + niri.enable = true; + }; + }; +} diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix new file mode 100644 index 0000000..120efbc --- /dev/null +++ b/hosts/thinkpad/disko.nix @@ -0,0 +1,58 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "@" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@log" = { + mountpoint = "/var/log"; + mountOptions = [ "compress=zstd:1" "noatime" ]; + }; + "@vms" = { + mountpoint = "/vms"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + "@swap" = { + mountpoint = "/.swapvol"; + mountOptions = [ "nodatacow" "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/thinkpad/home.nix b/hosts/thinkpad/home.nix new file mode 100644 index 0000000..666a3b0 --- /dev/null +++ b/hosts/thinkpad/home.nix @@ -0,0 +1,50 @@ +{ username, ... }: +{ + imports = [ ../../hm/default.nix ]; + + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "25.05"; + }; + + hm = { + conf = { + clip = { + enable = true; + backend = "wayland"; + }; + git.enable = true; + xdg-dirs.enable = true; + }; + editors.nixvim.enable = true; + env = { + niri.enable = true; + cursor.enableMiyabi = true; + + waybar.enable = true; + themes = { + enable = true; + gtk.enable = true; + qt.enable = true; + }; + }; + shell = { + cli.enable = true; + fish.enable = true; + foot.enable = true; + starship.enable = true; + }; + soft = { + browser.brave.enable = true; + kdeconnect.enable = true; + media.enable = true; + mpv.enable = true; + nixcord.enable = true; + obsidian.enable = true; + spicetify.enable = true; + torrent.enable = true; + yt-dlp.enable = true; + }; + }; +} diff --git a/os/core/bootloader.nix b/os/core/bootloader.nix index da43050..8ba9406 100644 --- a/os/core/bootloader.nix +++ b/os/core/bootloader.nix @@ -13,6 +13,9 @@ in boot.loader.efi.canTouchEfiVariables = true; boot.supportedFilesystems = [ "ntfs" ]; boot.kernelParams = [ "quiet" "splash" ]; + systemd.settings.Manager = { + DefaultTimeoutStopSec = "5s"; + }; } (lib.mkIf (cfg == "systemd-boot") { diff --git a/os/core/drivers.nix b/os/core/drivers.nix index 8c22940..3bb2291 100644 --- a/os/core/drivers.nix +++ b/os/core/drivers.nix @@ -34,18 +34,10 @@ in initrd.enable = true; overdrive.enable = true; }; - boot.kernelParams = [ "amdgpu.gpu_recovery=1" ]; + # boot.kernelParams = [ "amdgpu.gpu_recovery=1" ]; }) (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "unstable") { - boot.kernelPackages = pkgs.linuxPackages_latest; - chaotic.mesa-git = { - enable = true; - fallbackSpecialisation = false; - extraPackages = with pkgs; [ - rocmPackages.clr.icd - ]; - }; }) (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "stable") { diff --git a/os/srv/files.nix b/os/srv/files.nix index 049ec48..2e8faff 100644 --- a/os/srv/files.nix +++ b/os/srv/files.nix @@ -18,8 +18,6 @@ in plugins = with pkgs; [ thunar-volman thunar-archive-plugin - thunar-vcs-plugin - thunar-media-tags-plugin ]; }; services = { @@ -33,13 +31,8 @@ in services.gvfs.enable = true; environment.systemPackages = with pkgs; [ - nautilus trashy gdu - - unzip - p7zip - unrar pxz pigz ]; diff --git a/os/srv/gaming.nix b/os/srv/gaming.nix index ffa80fd..16ef9f1 100644 --- a/os/srv/gaming.nix +++ b/os/srv/gaming.nix @@ -18,6 +18,7 @@ in }; environment.systemPackages = with pkgs; [ + openmw protonup-rs heroic clinfo @@ -42,7 +43,7 @@ in protontricks.enable = true; extraCompatPackages = with pkgs; [ - proton-ge-custom + proton-ge-bin ]; }; }) diff --git a/os/srv/kvm.nix b/os/srv/kvm.nix index 47a4265..93a1eed 100644 --- a/os/srv/kvm.nix +++ b/os/srv/kvm.nix @@ -11,6 +11,8 @@ in qemu.swtpm.enable = true; }; + systemd.services.libvirt-guests.enable = false; + programs.virt-manager.enable = true; boot.initrd.kernelModules = lib.optional (config.os.core.drivers.amd.enable or false) "kvm-amd"; diff --git a/os/srv/nix-helper.nix b/os/srv/nix-helper.nix index 4999908..63b3182 100644 --- a/os/srv/nix-helper.nix +++ b/os/srv/nix-helper.nix @@ -15,6 +15,10 @@ in flake = "/etc/nixos"; }; + environment.sessionVariables = { + NH_OS_FLAKE = "/etc/nixos"; + }; + environment.systemPackages = with pkgs; [ nix-output-monitor nvd diff --git a/os/wm/niri.nix b/os/wm/niri.nix index c876dd1..248ab9e 100644 --- a/os/wm/niri.nix +++ b/os/wm/niri.nix @@ -1,4 +1,4 @@ -{ inputs, config, lib, pkgs, username, ... }: +{ inputs, config, lib, username, ... }: let cfg = config.os.wm.niri; in @@ -8,17 +8,13 @@ in options.os.wm.niri.enable = lib.mkEnableOption "Niri"; config = lib.mkIf cfg.enable { - nixpkgs.overlays = [ inputs.niri.overlays.niri ]; + # nixpkgs.overlays = [ inputs.niri.overlays.niri ]; programs.niri = { enable = true; - package = pkgs.niri-unstable; + # package = pkgs.niri-unstable; }; - environment.systemPackages = with pkgs; [ - wl-restart - ]; - os.srv.compat.enable = true; home-manager.users.${username}.hm.env.niri.enable = true; }; diff --git a/os/wm/wm.nix b/os/wm/wm.nix index 8254722..3d72103 100644 --- a/os/wm/wm.nix +++ b/os/wm/wm.nix @@ -15,6 +15,10 @@ in enable = true; xdgOpenUsePortal = true; extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + config.common = { + "org.freedesktop.impl.portal.ScreenCast" = "gnome"; + "default" = [ "gtk" ]; + }; }; }; } -- cgit v1.3