new wm, hyprland gone

This commit is contained in:
Reid 2025-05-18 23:05:26 -07:00
parent 003f37bfbd
commit cb4b22b4e5
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
41 changed files with 1145 additions and 1364 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 674 KiB

BIN
assets/lockscreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 575 KiB

View file

@ -5,25 +5,20 @@ let
inherit (lib.modules) mkDefault mkIf mkAliasOptionModule; inherit (lib.modules) mkDefault mkIf mkAliasOptionModule;
inherit (lib.my) mapModulesRec'; inherit (lib.my) mapModulesRec';
in { in {
imports = imports = [
[
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name]) (mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
inputs.nix-colors.homeManagerModules.default inputs.nix-colors.homeManagerModules.default # >home manager modules >in non-hm modules
inputs.hyprland.nixosModules.default inputs.niri.nixosModules.niri
] ]
++ (mapModulesRec' (toString ./modules) import); ++ (mapModulesRec' (toString ./modules) import);
hm.imports = [
inputs.hyprland.homeManagerModules.default
];
environment.variables = { environment.variables = {
NIXPKGS_ALLOW_UNFREE = "1"; NIXPKGS_ALLOW_UNFREE = "1";
}; };
nix = { nix = {
package = pkgs.nix; package = pkgs.nixVersions.latest;
# flake registry and nix path pinning # flake registry and nix path pinning
# might not be needed? see: https://github.com/NixOS/nixpkgs/commit/e456032addae76701eb17e6c03fc515fd78ad74f # might not be needed? see: https://github.com/NixOS/nixpkgs/commit/e456032addae76701eb17e6c03fc515fd78ad74f
@ -38,13 +33,15 @@ in {
substituters = [ substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org" "https://nixpkgs-wayland.cachix.org"
"https://hyprland.cachix.org" "https://wezterm.cachix.org"
"https://niri.cachix.org"
"https://cache.soopy.moe" "https://cache.soopy.moe"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
"cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo=" "cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="
]; ];
}; };
@ -57,6 +54,8 @@ in {
}; };
}; };
programs.nix-ld.enable = mkDefault true;
system.stateVersion = "23.11"; system.stateVersion = "23.11";
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev; system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
hm.home.stateVersion = config.system.stateVersion; hm.home.stateVersion = config.system.stateVersion;
@ -95,8 +94,6 @@ in {
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
programs.nix-ld.enable = mkDefault true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
openssh mosh openssh mosh
unrar unzip unrar unzip

617
flake.lock generated
View file

@ -1,38 +1,5 @@
{ {
"nodes": { "nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1738183445,
"narHash": "sha256-C1He3N1SA8D2u+TSlldbA9wiYwDvXI4GxX3zKaeD7qU=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "48a000cf35dd10bfeb231152735aebbe875f4b74",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"base16-schemes": { "base16-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -54,11 +21,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1716179347, "lastModified": 1742610849,
"narHash": "sha256-DPiP4yLRcPgWgrnCC/tRp5vUk9teZIfsCT2r8jr1V8A=", "narHash": "sha256-QrRM1wRBYs1g6D3nNw2IhjyxQUBCfrgXqd5qI0VMPrY=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "vscode", "repo": "vscode",
"rev": "b7a8806f7532a091b0170f281dbc7f35c3fc7761", "rev": "cf3ea3eb4b7b9eebf38800d8d975d9818f688273",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,51 +34,29 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat": { "fuzzel-catppuccin": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1730302879,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg=",
"owner": "edolstra", "owner": "catppuccin",
"repo": "flake-compat", "repo": "fuzzel",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "0af0e26901b60ada4b20522df739f032797b07c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "edolstra", "owner": "catppuccin",
"repo": "flake-compat", "repo": "fuzzel",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-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" "type": "github"
} }
}, },
"hardware": { "hardware": {
"locked": { "locked": {
"lastModified": 1733861262, "lastModified": 1742376361,
"narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=", "narHash": "sha256-VFMgJkp/COvkt5dnkZB4D2szVdmF6DGm5ZdVvTUy61c=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5", "rev": "daaae13dff0ecc692509a1332ff9003d9952d7a9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -127,11 +72,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734043726, "lastModified": 1742588233,
"narHash": "sha256-e9YAMReFV1fDPcZLFC2pa4k/8TloSXeX0z2VysNMAoA=", "narHash": "sha256-Fi5g8H5FXMSRqy+mU6gPG0v+C9pzjYbkkiePtz8+PpA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "3066cc58f552421a2c5414e78407fa5603405b1e", "rev": "296ddc64627f4a6a4eb447852d7346b9dd16197d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -140,65 +85,7 @@
"type": "github" "type": "github"
} }
}, },
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1738178255,
"narHash": "sha256-+D6Nu2ewXbMTFzx/Q4jDOo+LAOUPr0cxQJg5k33daIE=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "dcadd3398abe146d60c67e0d9ee6e27b301cae82",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprgraphics": { "hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1738018829,
"narHash": "sha256-5Ol5iahMlELx3lWuChyZsqqLk6sP6aqaJCJFw92OZGo=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "12cd7034e441a5ebfdef1a090c0788413b4a635b",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprgraphics_2": {
"inputs": { "inputs": {
"hyprutils": [ "hyprutils": [
"hyprlock", "hyprlock",
@ -214,11 +101,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733248371, "lastModified": 1737634889,
"narHash": "sha256-FFLJzFTyNhS7tBEEECx0B8Ye/bpmxhFVEKlECgMLc6c=", "narHash": "sha256-9JZE3KxcXOqZH9zs3UeadngDiK/yIACTiAR8HSA/TNI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprgraphics", "repo": "hyprgraphics",
"rev": "cc95e5babc6065bc3ab4cd195429a9900836ef13", "rev": "0d77b4895ad5f1bb3b0ee43103a5246c58b65591",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -229,17 +116,19 @@
}, },
"hypridle": { "hypridle": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprutils": "hyprutils", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1731958956, "lastModified": 1742397293,
"narHash": "sha256-21R5LD61oUqjdo9Vz0kLn0qSHCDMXyUMXbbod3kX+ho=", "narHash": "sha256-WVREToubLhIlogCoNJzo+HdatLKkEushwStDU1uyRnc=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hypridle", "repo": "hypridle",
"rev": "9f23e70bb494107df8f959c925d4521a298c65eb", "rev": "71e875e49e583c7b8b1364b55dfe494375c4e3ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -248,63 +137,14 @@
"type": "github" "type": "github"
} }
}, },
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-protocols": "hyprland-protocols",
"hyprland-qtutils": "hyprland-qtutils",
"hyprlang": "hyprlang_2",
"hyprutils": "hyprutils_2",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_2",
"xdph": "xdph"
},
"locked": {
"lastModified": 1738183538,
"narHash": "sha256-/7wLBH3JKijNWiD76xH7nnFeCq+hYmlqtW++NNDNp6w=",
"ref": "refs/heads/main",
"rev": "6fc9c8e4797a272c688fc74b872db5d828c21f02",
"revCount": 5758,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}
},
"hyprland-catppuccin": {
"flake": false,
"locked": {
"lastModified": 1718784939,
"narHash": "sha256-xSa/z0Pu+ioZ0gFH9qSo9P94NPkEMovstm1avJ7rvzM=",
"owner": "catppuccin",
"repo": "hyprland",
"rev": "c388ac55563ddeea0afe9df79d4bfff0096b146b",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "hyprland",
"type": "github"
}
},
"hyprland-protocols": { "hyprland-protocols": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hypridle",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hypridle",
"systems" "systems"
] ]
}, },
@ -322,74 +162,6 @@
"type": "github" "type": "github"
} }
}, },
"hyprland-qt-support": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprland-qtutils",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"hyprland-qtutils",
"nixpkgs"
],
"systems": [
"hyprland",
"hyprland-qtutils",
"systems"
]
},
"locked": {
"lastModified": 1737634706,
"narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=",
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"rev": "8810df502cdee755993cb803eba7b23f189db795",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"type": "github"
}
},
"hyprland-qtutils": {
"inputs": {
"hyprland-qt-support": "hyprland-qt-support",
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprland-qtutils",
"hyprlang",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1737981711,
"narHash": "sha256-lh6cL5D8nPplB3WovCQjLUZ7k7MViiBrMlpkfm4R7/c=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "96bf0677fa9cd13508294e3d4559dfbbc8beff73",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"type": "github"
}
},
"hyprlang": { "hyprlang": {
"inputs": { "inputs": {
"hyprutils": [ "hyprutils": [
@ -406,11 +178,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721324361, "lastModified": 1737634606,
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", "narHash": "sha256-W7W87Cv6wqZ9PHegI6rH1+ve3zJPiyevMFf0/HwdbCQ=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", "rev": "f41271d35cc0f370d300413d756c2677f386af9d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -422,15 +194,15 @@
"hyprlang_2": { "hyprlang_2": {
"inputs": { "inputs": {
"hyprutils": [ "hyprutils": [
"hyprland", "hyprlock",
"hyprutils" "hyprutils"
], ],
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprlock",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hyprlock",
"systems" "systems"
] ]
}, },
@ -448,51 +220,23 @@
"type": "github" "type": "github"
} }
}, },
"hyprlang_3": {
"inputs": {
"hyprutils": [
"hyprlock",
"hyprutils"
],
"nixpkgs": [
"hyprlock",
"nixpkgs"
],
"systems": [
"hyprlock",
"systems"
]
},
"locked": {
"lastModified": 1728168612,
"narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprlock": { "hyprlock": {
"inputs": { "inputs": {
"hyprgraphics": "hyprgraphics_2", "hyprgraphics": "hyprgraphics",
"hyprlang": "hyprlang_3", "hyprlang": "hyprlang_2",
"hyprutils": "hyprutils_3", "hyprutils": "hyprutils_2",
"hyprwayland-scanner": "hyprwayland-scanner_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_3" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1733672536, "lastModified": 1742460722,
"narHash": "sha256-bCtJwEmKG114e0y5GDj5fZ24KkgVVunbN9xgCjQa1OQ=", "narHash": "sha256-u23NzXN2yez0nO2zEtEaChE/4jhtC8WvpM8OpwUsls8=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlock", "repo": "hyprlock",
"rev": "8010b81e7b4100a1f2ef937be5268a13c27987e9", "rev": "f883e669d147ac189b64ce403300a5a3e4de2c66",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -513,11 +257,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721324102, "lastModified": 1737632363,
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", "narHash": "sha256-X9I8POSlHxBVjD0fiX1O2j7U9Zi1+4rIkrsyHP0uHXY=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "962582a090bc233c4de9d9897f46794280288989", "rev": "006620eb29d54ea9086538891404c78563d1bae1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -529,11 +273,11 @@
"hyprutils_2": { "hyprutils_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprlock",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hyprlock",
"systems" "systems"
] ]
}, },
@ -551,39 +295,14 @@
"type": "github" "type": "github"
} }
}, },
"hyprutils_3": {
"inputs": {
"nixpkgs": [
"hyprlock",
"nixpkgs"
],
"systems": [
"hyprlock",
"systems"
]
},
"locked": {
"lastModified": 1733502241,
"narHash": "sha256-KAUNC4Dgq8WQjYov5auBw/usaHixhacvb7cRDd0AG/k=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "104117aed6dd68561be38b50f218190aa47f2cd8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": { "hyprwayland-scanner": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hypridle",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hypridle",
"systems" "systems"
] ]
}, },
@ -601,6 +320,87 @@
"type": "github" "type": "github"
} }
}, },
"hyprwayland-scanner_2": {
"inputs": {
"nixpkgs": [
"hyprlock",
"nixpkgs"
],
"systems": [
"hyprlock",
"systems"
]
},
"locked": {
"lastModified": 1735493474,
"narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1742629677,
"narHash": "sha256-x3s8p2rTjB42PQR5yN49qYhEOx/AhykqiNNyDFHmAas=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "b6db5c8dc7e46864b090e01114a2b8b40e7b6c3b",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1740117926,
"narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b94a5db8790339cf9134873d8b490be69e02ac71",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.02",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1742627013,
"narHash": "sha256-GOp+thjLXji90Apk6yBhH/5+nuYKGdaG7gAaOQba8Lk=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "0d4f0f00c0cd83a72151468bc610ce230a550027",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix-colors": { "nix-colors": {
"inputs": { "inputs": {
"base16-schemes": "base16-schemes", "base16-schemes": "base16-schemes",
@ -622,11 +422,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1712963716, "lastModified": 1732837521,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -651,13 +451,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1721138476, "lastModified": 1742512142,
"narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=", "narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ad0b5eed1b6031efaed382844806550c3dcb4206", "rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1737469691,
"narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -669,11 +485,27 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1733759999, "lastModified": 1742422364,
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1742422364,
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -683,40 +515,34 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": { "rofi-catppuccin": {
"inputs": { "flake": false,
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1737465171, "lastModified": 1740075377,
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", "narHash": "sha256-WGYEA4Q7UvSaRDjP/DiEtfXjvmWbewtdyJWRpjhbZgg=",
"owner": "cachix", "owner": "catppuccin",
"repo": "git-hooks.nix", "repo": "rofi",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", "rev": "c24a212a6b07c2d45f32d01d7f10b4d88ddc9f45",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "cachix", "owner": "catppuccin",
"repo": "git-hooks.nix", "repo": "rofi",
"type": "github" "type": "github"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"catppuccin-vsc": "catppuccin-vsc", "catppuccin-vsc": "catppuccin-vsc",
"fuzzel-catppuccin": "fuzzel-catppuccin",
"hardware": "hardware", "hardware": "hardware",
"home-manager": "home-manager", "home-manager": "home-manager",
"hypridle": "hypridle", "hypridle": "hypridle",
"hyprland": "hyprland",
"hyprland-catppuccin": "hyprland-catppuccin",
"hyprlock": "hyprlock", "hyprlock": "hyprlock",
"niri": "niri",
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_4",
"rofi-catppuccin": "rofi-catppuccin",
"waybar-catppuccin": "waybar-catppuccin" "waybar-catppuccin": "waybar-catppuccin"
} }
}, },
@ -750,21 +576,6 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"waybar-catppuccin": { "waybar-catppuccin": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -781,44 +592,36 @@
"type": "github" "type": "github"
} }
}, },
"xdph": { "xwayland-satellite-stable": {
"inputs": { "flake": false,
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": { "locked": {
"lastModified": 1737634991, "lastModified": 1739246919,
"narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=", "narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
"owner": "hyprwm", "owner": "Supreeeme",
"repo": "xdg-desktop-portal-hyprland", "repo": "xwayland-satellite",
"rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a", "rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "hyprwm", "owner": "Supreeeme",
"repo": "xdg-desktop-portal-hyprland", "ref": "v0.5.1",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1742475924,
"narHash": "sha256-xe3tfHp1aisnUVrCbn1axwpeJzcrSOvQNn1bZt6k5DM=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "1d98ee089c8bad414a346028a7a0f539ad7cfb9d",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github" "type": "github"
} }
} }

View file

@ -10,20 +10,19 @@
hardware.url = "github:nixos/nixos-hardware"; hardware.url = "github:nixos/nixos-hardware";
nix-colors.url = "github:misterio77/nix-colors"; nix-colors.url = "github:misterio77/nix-colors";
# waybar.url = "github:Alexays/Waybar"; niri.url = "github:sodiboo/niri-flake";
# waybar.inputs.nixpkgs.follows = "nixpkgs";
# hypr suite # input override due to mesa version mismatch
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
hyprlock.url = "github:hyprwm/hyprlock"; hyprlock.url = "github:hyprwm/hyprlock";
hyprlock.inputs.nixpkgs.follows = "nixpkgs"; hyprlock.inputs.nixpkgs.follows = "nixpkgs";
hypridle.url = "github:hyprwm/hypridle"; hypridle.url = "github:hyprwm/hypridle";
waybar-catppuccin.url = "github:catppuccin/waybar"; waybar-catppuccin.url = "github:catppuccin/waybar";
waybar-catppuccin.flake = false; waybar-catppuccin.flake = false;
hyprland-catppuccin.url = "github:catppuccin/hyprland"; fuzzel-catppuccin.url = "github:catppuccin/fuzzel";
hyprland-catppuccin.flake = false; fuzzel-catppuccin.flake = false;
rofi-catppuccin.url = "github:catppuccin/rofi";
rofi-catppuccin.flake = false;
catppuccin-vsc.url = "github:catppuccin/vscode"; catppuccin-vsc.url = "github:catppuccin/vscode";
}; };
@ -37,10 +36,14 @@
import pkgs { import pkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
config.allowAliases = false; config.allowAliases = true;
overlays = extraOverlays ++ (lib.attrValues self.overlays); overlays = extraOverlays ++ (lib.attrValues self.overlays);
}; };
pkgs = mkPkgs nixpkgs [ self.overlays.default inputs.catppuccin-vsc.overlays.default ]; pkgs = mkPkgs nixpkgs [
self.overlays.default
inputs.catppuccin-vsc.overlays.default
inputs.niri.overlays.niri
];
lib = nixpkgs.lib.extend (final: prev: { lib = nixpkgs.lib.extend (final: prev: {
my = import ./lib { my = import ./lib {

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, lib, ... }:
{ {
# support power features such as suspend to ram # support power features such as suspend to ram
powerManagement.enable = true; powerManagement.enable = true;
@ -14,35 +14,8 @@
# better performance than the actual intel driver # better performance than the actual intel driver
services.xserver.videoDrivers = [ "modesetting" ]; services.xserver.videoDrivers = [ "modesetting" ];
# needed for our broadcom/brcm 4377b chip to work hardware.apple-t2.kernelChannel = "latest";
hardware.firmware = with pkgs; [ hardware.apple-t2.firmware.enable = true;
my.apple-firmware
];
# handle suspend issues (fuck you broadcom!)
powerManagement.powerDownCommands = ''
${pkgs.kmod}/bin/modprobe -r brcmfmac_wcc
${pkgs.kmod}/bin/modprobe -r brcmfmac
${pkgs.kmod}/bin/modprobe -r hci_bcm4377
'';
powerManagement.resumeCommands = ''
${pkgs.kmod}/bin/modprobe hci_bcm4377
${pkgs.kmod}/bin/modprobe brcmfmac
${pkgs.kmod}/bin/modprobe brcmfmac_wcc
'';
# VA-API and opengl
hardware.graphics = {
extraPackages = with pkgs; [
intel-media-driver
libvdpau-va-gl
];
extraPackages32 = with pkgs.pkgsi686Linux; [
intel-media-driver
libvdpau-va-gl
];
};
environment.variables = { environment.variables = {
LIBVA_DRIVER_NAME= "iHD"; LIBVA_DRIVER_NAME= "iHD";

View file

@ -19,7 +19,7 @@
# debug # debug
strace ltrace lsof helvum strace ltrace lsof helvum
# apps # apps
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex kdePackages.kdenlive firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex pwvucontrol nautilus gnome-disk-utility gnome-text-editor baobab file-roller gnome-system-monitor loupe gnome-weather kdePackages.kdenlive
# compatibility # compatibility
wineWowPackages.waylandFull winetricks wineWowPackages.waylandFull winetricks
# misc # misc
@ -28,9 +28,6 @@
prismlauncher prismlauncher
] ++ (with pkgs.my; [ ] ++ (with pkgs.my; [
# none yet # none yet
]) ++ (with pkgs.gnome; [
# yay gnomeware!!!!!!!!!!!!!! yum
nautilus gnome-disk-utility pkgs.gnome-text-editor pkgs.baobab file-roller gnome-system-monitor loupe pkgs.gnome-weather
]); ]);
modules = { modules = {
@ -41,6 +38,7 @@
pipewire.enable = true; pipewire.enable = true;
print.enable = true; print.enable = true;
pointer.enable = true; pointer.enable = true;
tablet.enable = true;
}; };
dev = { dev = {
enable = true; enable = true;
@ -49,28 +47,37 @@
# set to `x11` or `wayland`, improves compat # set to `x11` or `wayland`, improves compat
envProto = "wayland"; envProto = "wayland";
hyprland.enable = true; # window manager / desktop environment
niri.enable = true;
# accessories
hyprlock.enable = true; hyprlock.enable = true;
hypridle.enable = true; hypridle.enable = true;
swww.enable = true; swww.enable = true;
gnome-keyring.enable = true; gnome-keyring.enable = true;
mate-polkit.enable = true; mate-polkit.enable = true;
dunst.enable = true; dunst.enable = true;
rofi.enable = true; rofi.enable = true;
nwg-drawer.enable = true; fuzzel.enable = true;
waybar.enable = true; waybar.enable = true;
batsignal.enable = true; batsignal.enable = true;
wob.enable = true; wob.enable = true;
gammastep.enable = true; gammastep.enable = true;
clipse.enable = true; cliphist.enable = true;
xwayland-satellite.enable = true;
wl-clip-persist.enable = true;
# display manager + boot splash # display manager
sddm.enable = true; regreet.enable = true;
plymouth.enable = true;
# theme, see `modules/desktop/themes` # theme, see `modules/desktop/themes`
themes.active = "catppuccin"; themes.active = "catppuccin";
# monitors, see `modules/desktop/monitors`
monitors.enable = true;
monitors.monitors = [
{ name = "eDP-1"; scale = 2.0; }
];
}; };
software = { software = {
# system # system

View file

@ -3,13 +3,10 @@
{ {
imports = imports =
[ [
inputs.hardware.nixosModules.apple-t2
inputs.hardware.nixosModules.common-cpu-intel inputs.hardware.nixosModules.common-cpu-intel
inputs.hardware.nixosModules.common-pc-laptop-ssd inputs.hardware.nixosModules.common-pc-laptop-ssd
inputs.hardware.nixosModules.common-pc-laptop inputs.hardware.nixosModules.common-pc-laptop
# this will override your kernel!!!
# use this on macs with t2 chips to get screen, keyboard, trackpad,
# camera, touchbar, and experimental suspend and audio
inputs.hardware.nixosModules.apple-t2
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")

View file

@ -0,0 +1,39 @@
{ lib, config, pkgs, inputs, ... }:
with lib;
let
cfg = config.modules.desktop.cliphist;
in {
options.modules.desktop.cliphist = {
enable = mkEnableOption "enable cliphist, a clipboard manager for wayland";
package = mkOption {
type = types.package;
default = pkgs.cliphist;
};
summonScript = mkOption {
type = types.package;
default = pkgs.writeShellScript "cliphist-summon" ''
set -euo pipefail
${lib.getExe cfg.package} list | ${lib.getExe config.modules.desktop.fuzzel.package} --dmenu | ${lib.getExe cfg.package} decode | wl-copy
'';
};
};
config = mkIf cfg.enable {
hm.services.cliphist = {
enable = true;
allowImages = true;
package = cfg.package;
};
# home-manager recently did a huge upgrade and made it so wayland stuff doesn't break anymore
# however... they forgot to include cliphist
# https://github.com/nix-community/home-manager/pull/5785
# EDIT: i initially did this with `graphical-session-pre.target`, but that didn't work, pray this does
hm.systemd.user.services.cliphist.Unit.After = "graphical-session.target";
hm.systemd.user.services.cliphist-images.Unit.After = "graphical-session.target";
modules.desktop.rofi.enable = true;
};
}

View file

@ -18,6 +18,8 @@ in {
# enable networking # enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.networkmanager.wifi.backend = "iwd";
networking.wireless.iwd.settings.Settings.AutoConnect = true;
# speed up boot # speed up boot
# https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339 # https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339
@ -26,13 +28,6 @@ in {
# mounting, trash, and mtp support # mounting, trash, and mtp support
services.gvfs.enable = true; services.gvfs.enable = true;
# various evironment variables that are needed for everything desktop related
environment.sessionVariables = {
# automatic hidpi for qt apps
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_ENABLE_HIGHDPI_SCALING = "1";
};
} }
(mkIf (cfg.envProto == "wayland") { (mkIf (cfg.envProto == "wayland") {
environment.sessionVariables = { environment.sessionVariables = {

View file

@ -17,8 +17,7 @@ in {
follow = "mouse"; follow = "mouse";
width = 300; width = 300;
height = 145; height = 145;
# TODO: make more dynamic frame_color = "#${base02}";
frame_color = "#f5c2e7"; # catppuccin pink
origin = "top-right"; origin = "top-right";
vertical_alignment = "center"; vertical_alignment = "center";

View file

@ -2,24 +2,28 @@
with lib; with lib;
let let
# TODO: seperate into two functions?
# one for the pt controlled fonts and one for the px controlled fonts
mkFontOption = kind: default: { mkFontOption = kind: default: {
family = mkOption { family = mkOption {
type = types.str; type = types.str;
default = default.family; default = default.family;
description = "Family name for ${kind} font profile"; description = "Family name for ${kind} font profile";
example = "Fira Code"; example = "Cozette";
}; };
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = default.package; default = default.package;
description = "Package for ${kind} font profile"; description = "Package for ${kind} font profile";
example = "pkgs.fira-code"; example = "pkgs.cozette";
}; };
size = mkOption { size = mkOption {
type = types.number; type = types.number;
default = default.size; default = default.size;
description = "${kind} font profile size, px"; description = ''
example = "11"; ${kind} font profile size, pt for sans/serif, px for monospace/bitmap fonts.
'';
example = "13";
}; };
}; };
cfg = config.modules.desktop.fonts; cfg = config.modules.desktop.fonts;
@ -30,16 +34,16 @@ in {
fonts = { fonts = {
sansSerif = mkFontOption "sansSerif" { sansSerif = mkFontOption "sansSerif" {
package = pkgs.my.lexica-ultralegible; package = pkgs.atkinson-hyperlegible-next;
family = "Lexica Ultralegible"; family = "Atkinson Hyperlegible Next";
size = 11; size = 10;
}; };
serif = mkFontOption "serif" { serif = mkFontOption "serif" {
package = pkgs.my.lexica-ultralegible; package = pkgs.atkinson-hyperlegible-next;
family = "Lexica Ultralegible"; family = "Atkinson Hyperlegible Next";
size = 11; size = 10;
}; };
monospace = mkFontOption "monospace" { monospace = mkFontOption "monospace" {
package = pkgs.cozette; package = pkgs.cozette;
@ -111,7 +115,9 @@ in {
mplus-outline-fonts.githubRelease mplus-outline-fonts.githubRelease
dina-font dina-font
proggyfonts proggyfonts
atkinson-hyperlegible atkinson-hyperlegible # old
atkinson-hyperlegible-next
atkinson-hyperlegible-mono
cozette cozette
twemoji-color-font twemoji-color-font
noto-fonts-color-emoji noto-fonts-color-emoji

View file

@ -0,0 +1,33 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.fuzzel;
in {
options.modules.desktop.fuzzel = {
enable = mkEnableOption "Enable fuzzel, an application launcher similar to rofi's drun mode";
package = mkOption {
type = types.package;
default = pkgs.fuzzel;
};
};
config = mkIf cfg.enable {
hm.programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = "wezterm start";
font = with config.modules.desktop.fonts.fonts; "${monospace.family}:pixelsize=${toString monospace.size}";
prompt = "> ";
dpi-aware = "no";
lines = 20;
width = 28;
letter-spacing = 0.5;
horizontal-pad = 32;
vertical-pad = 8;
};
};
};
};
}

View file

@ -5,12 +5,18 @@ let
cfg = config.modules.desktop.hypridle; cfg = config.modules.desktop.hypridle;
in { in {
options.modules.desktop.hypridle = { options.modules.desktop.hypridle = {
enable = mkEnableOption "Enable hypridle, hyprland's idle daemon"; enable = mkEnableOption "Enable hypridle, a wayland idle daemon";
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = inputs.hypridle.packages.${system}.hypridle; default = inputs.hypridle.packages.${system}.hypridle;
example = "pkgs.hypridle"; example = "pkgs.hypridle";
}; };
desktop = mkEnableOption "Enable desktop tweaks (greatly extends the idle timeout)";
desktopMultiplier = mkOption {
type = types.int;
default = 10;
example = 10;
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -27,32 +33,31 @@ in {
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session"; # lock the screen before sleeping before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session"; # lock the screen before sleeping
}; };
listener = [ listener = let
toDesktopTimeout = t: if cfg.desktop then t * cfg.desktopMultiplier else t;
in [
{ {
timeout = 60; timeout = toDesktopTimeout 60; # 1 min
on-timeout = "${lib.getExe pkgs.brightnessctl} -c backlight -s set 20"; # dim screen, save brightness state on-timeout = "${lib.getExe pkgs.brightnessctl} -c backlight -s set 20"; # dim screen, save brightness state
on-resume = "${lib.getExe pkgs.brightnessctl} -c backlight -r"; # restore previous screen brightness state on-resume = "${lib.getExe pkgs.brightnessctl} -c backlight -r"; # restore previous screen brightness state
} }
{ {
timeout = 60; timeout = toDesktopTimeout 60; # 1 min
on-timeout = "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' -s set 0"; # turn off keyboard backlight, save state on-timeout = "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' -s set 0"; # turn off keyboard backlight, save state
on-resume = "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' -r"; # restore previous keyboard backlight state on-resume = "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' -r"; # restore previous keyboard backlight state
} }
{ {
timeout = 60 * 2; # 2 min timeout = toDesktopTimeout (60 * 2); # 2 min
on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock computer on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock computer
} }
{ {
timeout = 60 * 15; # 15 min timeout = toDesktopTimeout (60 * 15); # 15 min
on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; # sleep/suspend on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; # sleep/suspend
} }
] ++ optional config.modules.desktop.hyprland.enable (let ] ++ optional config.modules.desktop.niri.enable {
hyprctl = "${config.modules.desktop.hyprland.package}/bin/hyprctl"; timeout = toDesktopTimeout (60 + 30); # 1.5 min
in { on-timeout = "niri msg action power-off-monitors";
timeout = 90; # 1.5 min };
on-timeout = "${hyprctl} dispatch dpms off"; # turn off screen
on-resume = "${hyprctl} dispatch dpms on"; # turn it back on
});
}; };
}; };
}; };

View file

@ -1,410 +0,0 @@
{ inputs, lib, config, system, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.hyprland;
hyprpkgs = inputs.hyprland.packages.${system};
in {
options.modules.desktop.hyprland = {
enable = mkEnableOption "Enable hyprland, a dynamic tiling wayland compositor based on wlroots that doesn't sacrifice on its looks";
package = mkOption {
type = types.package;
default = hyprpkgs.hyprland;
example = "pkgs.hyprland";
};
portalPackage = mkOption {
type = types.package;
default = hyprpkgs.xdg-desktop-portal-hyprland;
example = "pkgs.xdg-desktop-portal-hyprland";
};
};
config = mkIf cfg.enable {
services.displayManager.sessionPackages = [ cfg.package ];
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk cfg.portalPackage ];
config = {
common = {
default = [ "hyprland" "gtk" ];
};
};
};
# fixes a few things, most notibly, xwayland
programs.hyprland = {
enable = true;
xwayland.enable = true;
package = cfg.package;
portalPackage = cfg.portalPackage;
};
hm.wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
package = cfg.package;
systemd.variables = [ "--all" ];
settings = let
wobSock = config.modules.desktop.wob.sockPath;
in {
source = [];
"$mod" = "SUPER";
bindm = [ # "bind mouse"
# move/resize windows with mod + lmb/rmb and dragging
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
bindel = (if config.modules.desktop.wob.enable then [ # "bind held & locked"
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}"
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}"
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5% | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}"
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%- | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}"
", XF86KbdBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s +5% | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}"
", XF86KbdBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s 5%- | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}"
] else [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s +5%"
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -c backlight s 5%-"
", XF86KbdBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s +5%"
", XF86KbdBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s 5%-"
]);
bindl = ([ # "bind locked"
",switch:Lid Switch,exec,${lib.getExe config.modules.desktop.hyprlock.package}"
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
] ++ (if config.modules.desktop.wob.enable then [
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && (wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q MUTED && echo 0 > ${wobSock}) || wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}"
] else [
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
]));
bindr = [ # "bind released"
"SUPER, Super_L, exec, ${lib.getExe config.modules.desktop.nwg-drawer.package}"
];
bind = let
screenshotScript = pkgs.writeShellScript "screenshot" ''
set -euo pipefail
temp_file=$(mktemp)
trap 'rm -f "$temp_file"' EXIT
mode="$1"
case "$mode" in
screen)
mode="output"
;;
area)
mode="area"
;;
window)
mode="active"
;;
*)
echo "usage: $0 [screen|area|window]" >&2
exit 2
;;
esac
${lib.getExe pkgs.grimblast} --freeze save "$mode" - > "$temp_file"
cat "$temp_file" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t image/png
action=$(${pkgs.libnotify}/bin/notify-send "Screenshot Captured" \
--app-name="Screenshot" \
--urgency="normal" \
--action="default=Edit Image" \
--icon="$temp_file" \
"Click to annotate image")
case "$action" in
default)
${lib.getExe pkgs.satty} --filename "$temp_file"
;;
esac
'';
pickerScript = pkgs.writeShellScript "picker" ''
set -euo pipefail
${lib.getExe pkgs.hyprpicker} --render-inactive --format hex | sed -z 's/\n//g' | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
${pkgs.libnotify}/bin/notify-send "Color Captured" \
--app-name="Picker" \
--urgency="normal" \
"Color copied to clipboard"
'';
ocrScript = pkgs.writeShellScript "ocr" ''
set -euo pipefail
output=$(${lib.getExe pkgs.grimblast} --freeze save area - | ${lib.getExe pkgs.tesseract5} - -)
echo "$output" | ${lib.getExe pkgs.wl-clipboard-x11} -selection clipboard -t text/plain
${pkgs.libnotify}/bin/notify-send "OCR Captured" \
--app-name="OCR" \
--urgency="normal" \
"Text copied to clipboard"
'';
in [
"$mod, Q, killactive, "
"$mod, F, togglefloating, "
"$mod, P, pseudo, "
"$mod, J, togglesplit, "
"$mod SHIFT, F, fullscreen, "
# move focus with mod + arrow keys
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
# move windows with mod + shift + arrow keys
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, down, movewindow, d"
# example special workspace (scratchpad)
"$mod, grave, togglespecialworkspace, magic"
"$mod SHIFT, grave, movetoworkspace, special:magic"
# scroll through workspaces with mod + scroll
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
# alternatively, scroll through workspaces with mod + brackets
"$mod, bracketleft, workspace, e-1"
"$mod, bracketright, workspace, e+1"
"$mod, R, exec, ${lib.getExe config.modules.desktop.rofi.package} -show run"
"$mod, T, exec, ${lib.getExe config.modules.software.system.wezterm.package}"
"$mod, L, exec, ${lib.getExe config.modules.desktop.hyprlock.package}"
"$mod, V, exec, ${lib.getExe config.modules.software.system.wezterm.package} start --class 'clipse' -e '${lib.getExe config.modules.desktop.clipse.package}'"
"$mod, E, exec, ${lib.getExe pkgs.nautilus}"
# screenshot
# area
", Print, exec, ${screenshotScript} area"
"$mod SHIFT, S, exec, ${screenshotScript} area"
# screen
"CTRL, Print, exec, ${screenshotScript} screen"
"$mod SHIFT CTRL, S, exec, ${screenshotScript} screen"
# window
"ALT, Print, exec, ${screenshotScript} window"
"$mod SHIFT ALT, S, exec, ${screenshotScript} window"
# pick color
"$mod SHIFT, C, exec, ${pickerScript}"
# ocr
"$mod SHIFT, T, exec, ${ocrScript}"
", XF86LaunchA, exec, ${screenshotScript} area"
", XF86LaunchB, exec, ${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20"
", XF86ScreenSaver, exec, ${lib.getExe config.modules.desktop.hyprlock.package}"
] ++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (builtins.genList (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
)
10)
);
input = {
kb_layout = "us";
follow_mouse = 1;
# uhm?? why do i have to do this here. should be automatic from libinput
# whatever. ill just hardcode for now
# TODO
touchpad = {
disable_while_typing = false;
natural_scroll = true;
};
};
monitor=",highrr,auto,auto";
exec-once = [
"${lib.getExe pkgs.wl-clip-persist} --clipboard regular" # to fix wl clipboards disappearing
];
env = [
"XCURSOR_THEME,${config.modules.desktop.themes.cursorTheme.name}"
"XCURSOR_SIZE,${toString config.modules.desktop.themes.cursorTheme.size}"
];
general = {
gaps_in = 6;
gaps_out = 6;
border_size = 1;
no_border_on_floating = false;
layout = "dwindle";
resize_on_border = true;
};
windowrulev2 = [
"tag +floater, class:^org.gnome.FileRoller$"
"tag +dimmedFloater, class:^org.gnome.Loupe$"
"tag +dimmedFloater, class:^com.gabm.satty$"
"tag +dimmedFloater, title:^Open.*$"
"tag +dimmedFloater, title:^Save As$"
"tag +dimmedFloater, title:^Select.*$"
"tag +dimmedFloater, title:^File Upload$"
# add dimmedFloater too, it's a large window!
"tag +dimmedFloater, class:^clipse$"
"tag +privatePopup, class:^clipse$"
"tag +privatePopup, class:^gcr-prompter$"
"tag +privatePopup, class:^.*pinentry-.*$"
"tag +privatePopup, class:^polkit-.*$"
"tag +pip, title:^Picture-in-Picture$"
"tag +pip, title:^Picture in picture$"
"tag +pip, title:^Discord Popout$"
"float, tag:floater"
"center, tag:floater"
"size 1100 650, tag:floater"
# why is this not monitor size and instead based on the window size..
# "size exact 60% 80%, tag:floater"
"float, tag:dimmedFloater"
"center, tag:dimmedFloater"
"size 1100 650, tag:dimmedFloater"
# "size exact 60% 80%, tag:dimmedFloater"
"dimaround, tag:dimmedFloater"
"float, tag:privatePopup"
"center, tag:privatePopup"
"stayfocused, tag:privatePopup"
"dimaround, tag:privatePopup"
"float, tag:pip"
"pin, tag:pip"
"keepaspectratio, tag:pip"
"noborder, tag:pip"
"noinitialfocus, tag:pip"
"nodim, tag:pip"
# this makes wine stuff better
"float, class:^.*\.exe$"
"rounding 0, class:^.*\.exe$"
# steam notifs
"rounding 0, title:^notificationtoasts_.*$"
"pin, title:^notificationtoasts_.*$"
"noborder, title:^notificationtoasts_.*$"
"nofocus, title:^notificationtoasts_.*$"
"noshadow, title:^notificationtoasts_.*$"
# workspace moving
"workspace 1 silent, class:^firefox$"
"workspace 2 silent, class:^code$"
"workspace 2 silent, class:^imhex$"
"workspace 4 silent, class:^vesktop$"
];
layerrule = [
"animation slide, notifications"
"animation slide, waybar"
"animation popin, rofi"
"dimaround, rofi"
"blur, nwg-drawer"
"blur, wob"
"blur, notifications"
"blur, waybar"
"blur, rofi"
"ignorezero, notifications" # fucks up the blur otherwise, rounded corners
"ignorezero, waybar"
"ignorezero, rofi"
];
decoration = {
rounding = 10;
blur = {
enabled = true;
size = 6;
passes = 3;
# these have blur disabled
popups = true;
special = true;
input_methods = true;
};
shadow = {
enabled = true;
range = 6;
render_power = 3;
ignore_window = true;
};
};
animations = {
enabled = true;
bezier = [
"outCubic, 0.33, 1, 0.68, 1"
"outExpo, 0.16, 1, 0.3, 1"
];
animation = [
"windows, 1, 5, outExpo, popin"
"windowsOut, 1, 5, outCubic, popin 80%"
"border, 1, 2, outExpo"
"fade, 1, 3, outCubic"
"workspaces, 1, 6, outExpo"
"specialWorkspace, 1, 2, outCubic, fade"
];
};
dwindle = {
pseudotile = "yes"; # master switch for pseudotiling. enabling is mod + P in the keybinds section
preserve_split = "yes";
};
gestures = {
workspace_swipe = true;
workspace_swipe_min_speed_to_force = 0;
workspace_swipe_cancel_ratio = 0.1;
};
misc = {
# disable default eye candy
force_default_wallpaper = 0;
disable_splash_rendering = true;
disable_hyprland_logo = true;
# there is zero reason to have this enabled
# what were they thinking
initial_workspace_tracking = 0;
vfr = true;
vrr = 2;
};
ecosystem = {
no_update_news = true;
no_donation_nag = true;
};
};
};
};
}

View file

@ -5,7 +5,7 @@ let
cfg = config.modules.desktop.hyprlock; cfg = config.modules.desktop.hyprlock;
in { in {
options.modules.desktop.hyprlock = { options.modules.desktop.hyprlock = {
enable = mkEnableOption "Enable hyprlock, a simple, fast, multithreaded screen lock for hyprland"; enable = mkEnableOption "Enable hyprlock, a simple, fast, multithreaded screen lock for wayland compositors";
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = inputs.hyprlock.packages.${system}.hyprlock; default = inputs.hyprlock.packages.${system}.hyprlock;
@ -26,14 +26,11 @@ in {
no_fade_in = true; no_fade_in = true;
no_fade_out = true; no_fade_out = true;
text_trim = true; text_trim = true;
# this will render the color we specified on the background before the image is loaded
# i like this because we will no longer see our screen for a split second before the image is ready
# extra security feature too
immediate_render = true; immediate_render = true;
}; };
background = [ background = [
{ {
path = toString ../../assets/lockscreen.jpg; path = "${../../assets/lockscreen.png}";
color = "rgb(${base00})"; color = "rgb(${base00})";
blur_passes = 3; blur_passes = 3;
blur_size = 6; blur_size = 6;

View file

@ -0,0 +1,32 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.monitors;
in {
options.modules.desktop.monitors = {
enable = mkEnableOption "Manually configure monitor settings, use if manual configuration is needed";
monitors = mkOption {
type = types.listOf types.attrs;
description = ''
a list of monitor configurations. each entry should be an attribute set with the following keys:
- `name`: The name of the monitor to configure
- `scale`: The scale factor to apply to the monitor
note: the first monitor in the list will be considered the "primary" monitor
'';
example = [
{ name = "eDP-1"; scale = 2.0; }
{ name = "HDMI-1"; scale = 1.0; }
];
};
};
config = mkIf cfg.enable {
hm.programs.niri.settings.outputs = builtins.listToAttrs (builtins.map (monitor: {
name = monitor.name;
value = {
scale = monitor.scale;
};
}) cfg.monitors);
};
}

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

@ -0,0 +1,421 @@
{ inputs, lib, config, system, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.niri;
in {
options.modules.desktop.niri = {
enable = mkEnableOption "Enable niri, a scrolling wayland compositor";
package = mkOption {
type = types.package;
default = pkgs.niri-unstable;
example = "pkgs.niri";
};
};
config = mkIf cfg.enable {
services.displayManager.sessionPackages = [ cfg.package ];
programs.niri = {
enable = true;
package = cfg.package;
};
systemd.user.services.niri-flake-polkit.enable = false; # niri-flake has its own polkit agent, disable it
hm.programs.niri = {
package = cfg.package;
settings = let
allCorners = r: { bottom-left = r; bottom-right = r; top-left = r; top-right = r; };
in {
input = {
power-key-handling.enable = false;
focus-follows-mouse.enable = true;
focus-follows-mouse.max-scroll-amount = "0%";
# TODO: uhm?? why do i have to do this here. should be automatic from libinput
# whatever. ill just hardcode for now
touchpad = {
click-method = "button-areas";
tap = true;
natural-scroll = true;
};
mouse = {
accel-profile = "flat";
};
};
clipboard = {
disable-primary = true;
};
cursor = {
theme = config.modules.desktop.themes.cursorTheme.name;
size = config.modules.desktop.themes.cursorTheme.size;
};
environment = {
DISPLAY = ":0";
};
prefer-no-csd = true;
layout = {
gaps = 6;
center-focused-column = "on-overflow";
focus-ring = {
enable = false;
width = 1;
active.color = config.modules.desktop.themes.niri.accent;
inactive.color = config.modules.desktop.themes.niri.inactive;
};
border = {
enable = true;
width = 1;
active.color = config.modules.desktop.themes.niri.accent;
inactive.color = config.modules.desktop.themes.niri.inactive;
};
shadow = {
enable = true;
# TODO: remove this?
# this is a way to make the shadow appear on rounded corners
# see: https://github.com/YaLTeR/niri/blob/e251ca7340bc71870c3a81a7ffc3d9bde58e685a/resources/default-config.kdl#L201
draw-behind-window = true;
offset.x = 0;
offset.y = 0;
softness = 30;
spread = 2;
color = config.modules.desktop.themes.niri.shadow;
};
};
hotkey-overlay.skip-at-startup = true;
screenshot-path = null;
animations = {
shaders.window-resize = ''
vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) {
vec3 coords_next_geo = niri_curr_geo_to_next_geo * coords_curr_geo;
vec3 coords_stretch = niri_geo_to_tex_next * coords_curr_geo;
vec3 coords_crop = niri_geo_to_tex_next * coords_next_geo;
// We can crop if the current window size is smaller than the next window
// size. One way to tell is by comparing to 1.0 the X and Y scaling
// coefficients in the current-to-next transformation matrix.
bool can_crop_by_x = niri_curr_geo_to_next_geo[0][0] <= 1.0;
bool can_crop_by_y = niri_curr_geo_to_next_geo[1][1] <= 1.0;
vec3 coords = coords_stretch;
if (can_crop_by_x)
coords.x = coords_crop.x;
if (can_crop_by_y)
coords.y = coords_crop.y;
vec4 color = texture2D(niri_tex_next, coords.st);
// However, when we crop, we also want to crop out anything outside the
// current geometry. This is because the area of the shader is unspecified
// and usually bigger than the current geometry, so if we don't fill pixels
// outside with transparency, the texture will leak out.
//
// When stretching, this is not an issue because the area outside will
// correspond to client-side decoration shadows, which are already supposed
// to be outside.
if (can_crop_by_x && (coords_curr_geo.x < 0.0 || 1.0 < coords_curr_geo.x))
color = vec4(0.0);
if (can_crop_by_y && (coords_curr_geo.y < 0.0 || 1.0 < coords_curr_geo.y))
color = vec4(0.0);
return color;
}
'';
window-close = {
easing = {
curve = "linear";
duration-ms = 600;
};
};
shaders.window-close = ''
vec4 fall_and_rotate(vec3 coords_geo, vec3 size_geo) {
float progress = niri_clamped_progress * niri_clamped_progress;
vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy;
coords.y -= progress * 1440.0;
float random = (niri_random_seed - 0.5) / 2.0;
random = sign(random) - random;
float max_angle = 0.5 * random;
float angle = progress * max_angle;
mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
coords = rotate * coords;
coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0);
vec3 coords_tex = niri_geo_to_tex * coords_geo;
vec4 color = texture2D(niri_tex, coords_tex.st);
return color;
}
vec4 close_color(vec3 coords_geo, vec3 size_geo) {
return fall_and_rotate(coords_geo, size_geo);
}
'';
};
window-rules = [
{
geometry-corner-radius = allCorners 10.0;
clip-to-geometry = true;
}
{
matches = [
{ app-id = "^org\.wezfurlong\.wezterm$"; }
];
# see earlier shadow config; this is here because it's a transparent window, special case
shadow.draw-behind-window = false;
}
{
matches = [
{ app-id = "^gcr-prompter$"; }
{ app-id = "^.*pinentry-.*$"; }
{ app-id = "^polkit-.*$"; }
{ app-id = "^org.gnome.seahorse.Application$"; }
];
block-out-from = "screen-capture";
}
{
matches = [
{ app-id = "^gcr-prompter$"; }
{ app-id = "^.*pinentry-.*$"; }
{ app-id = "^polkit-.*$"; }
{ app-id = "^org\.gnome\.Loupe$"; }
{ title = "^Open Folder$"; }
{ title = "^Open Files$"; }
{ title = "^Open File$"; }
{ title = "^Open$"; }
{ title = "^Save$"; }
{ title = "^Save As$"; }
];
open-floating = true;
focus-ring = {
enable = true;
width = 4000;
active.color = "${config.modules.desktop.themes.niri.shadow}65";
inactive.color = "${config.modules.desktop.themes.niri.shadow}65";
};
}
{
matches = [
{ app-id = "firefox$"; title = "^Picture-in-Picture$"; }
{ title = "^Picture in picture$"; }
{ title = "^Discord Popout$"; }
];
open-floating = true;
default-floating-position = {
x = 15;
y = 15;
relative-to = "top-right";
};
}
{
matches = [
{ app-id = "^gcr-prompter$"; }
{ app-id = "^.*pinentry-.*$"; }
{ app-id = "^polkit-.*$"; }
{ app-id = "^file-roller$"; }
{ app-id = "^org\.gnome\.FileRoller$"; }
{ app-id = "^org\.gnome\.Loupe$"; }
{ title = "^Open Folder$"; }
{ title = "^Open Files$"; }
{ title = "^Open File$"; }
{ title = "^Open$"; }
{ title = "^Save$"; }
{ title = "^Save As$"; }
];
open-floating = true;
default-column-width.proportion = 0.6;
default-window-height.proportion = 0.8;
}
];
layer-rules = [
{
matches = [
{ namespace = "^notifications$"; }
{ namespace = "^rofi$"; } # a bit silly, but we use rofi for clipboard history
];
block-out-from = "screencast";
}
{
matches = [
{ namespace = "^launcher$"; }
{ namespace = "^notifications$"; }
{ namespace = "^rofi$"; }
{ namespace = "^waybar$"; }
{ namespace = "^wob$"; }
];
shadow = {
enable = true;
};
}
{
matches = [
{ namespace = "^launcher$"; }
{ namespace = "^wob$"; }
];
# see earlier shadow config; this is here because it's a transparent window, special case
shadow.draw-behind-window = false;
}
];
binds = with config.hm.lib.niri.actions; let
sh = spawn "sh" "-c";
in {
"Mod+Shift+Slash".action = show-hotkey-overlay;
"Mod+D".action = spawn "fuzzel";
"Mod+Q".action = close-window;
"Mod+H".action = toggle-window-floating;
"Mod+Shift+H".action = switch-focus-between-floating-and-tiling;
"Mod+Left".action = focus-column-left;
"Mod+Down".action = focus-window-down;
"Mod+Up".action = focus-window-up;
"Mod+Right".action = focus-column-right;
"Mod+Shift+Left".action = move-column-left;
"Mod+Shift+Down".action = move-window-down;
"Mod+Shift+Up".action = move-window-up;
"Mod+Shift+Right".action = move-column-right;
"Mod+Ctrl+Left".action = focus-monitor-left;
"Mod+Ctrl+Down".action = focus-monitor-down;
"Mod+Ctrl+Up".action = focus-monitor-up;
"Mod+Ctrl+Right".action = focus-monitor-right;
"Mod+Home".action = focus-column-first;
"Mod+End".action = focus-column-last;
"Mod+Shift+Home".action = move-column-to-first;
"Mod+Shift+End".action = move-column-to-last;
"Mod+Page_Down".action = focus-workspace-down;
"Mod+Page_Up".action = focus-workspace-up;
"Mod+Shift+Page_Down".action = move-column-to-workspace-down;
"Mod+Shift+Page_Up".action = move-column-to-workspace-up;
"Mod+Ctrl+Page_Down".action = move-workspace-down;
"Mod+Ctrl+Page_Up".action = move-workspace-up;
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+0".action = focus-workspace 10;
"Mod+Shift+1".action = move-column-to-workspace 1;
"Mod+Shift+2".action = move-column-to-workspace 2;
"Mod+Shift+3".action = move-column-to-workspace 3;
"Mod+Shift+4".action = move-column-to-workspace 4;
"Mod+Shift+5".action = move-column-to-workspace 5;
"Mod+Shift+6".action = move-column-to-workspace 6;
"Mod+Shift+7".action = move-column-to-workspace 7;
"Mod+Shift+8".action = move-column-to-workspace 8;
"Mod+Shift+9".action = move-column-to-workspace 9;
"Mod+Shift+0".action = move-column-to-workspace 10;
"Mod+Comma".action = consume-window-into-column;
"Mod+Period".action = expel-window-from-column;
"Mod+BracketLeft".action = consume-or-expel-window-left;
"Mod+BracketRight".action = consume-or-expel-window-right;
"Mod+R".action = switch-preset-column-width;
"Mod+Shift+R".action = switch-preset-window-height;
"Mod+Ctrl+R".action = reset-window-height;
"Mod+F".action = maximize-column;
"Mod+Shift+F".action = fullscreen-window;
"Mod+C".action = center-column;
"Mod+Minus".action = set-column-width "-10%";
"Mod+Equal".action = set-column-width "+10%";
"Mod+Shift+Minus".action = set-window-height "-10%";
"Mod+Shift+Equal".action = set-window-height "+10%";
"Print".action = screenshot;
"Mod+Shift+E".action = quit;
"XF86AudioMicMute".action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
"XF86AudioMicMute".allow-when-locked = true;
"XF86LaunchA".action = screenshot;
"XF86LaunchB".action = sh "${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20";
"XF86ScreenSaver".action = sh "${pkgs.systemd}/bin/loginctl lock-session";
# substitutions for when not on laptop
"Mod+Shift+S".action = screenshot;
"Mod+Shift+P".action = sh "${lib.getExe pkgs.rofi-rbw-wayland} -a copy -t password --clear-after 20";
"Mod+L".action = sh "${pkgs.systemd}/bin/loginctl lock-session";
"Mod+T".action = spawn "wezterm";
"Mod+E".action = spawn "nautilus";
"XF86AudioPrev".action = sh "${lib.getExe pkgs.playerctl} previous";
"XF86AudioPlay".action = sh "${lib.getExe pkgs.playerctl} play-pause";
"XF86AudioNext".action = sh "${lib.getExe pkgs.playerctl} next";
"Mod+V".action = sh "${config.modules.desktop.cliphist.summonScript}";
"Mod+Shift+Control+T".action = toggle-debug-tint;
"Mod+Shift+Control+O".action = debug-toggle-opaque-regions;
"Mod+Shift+Control+D".action = debug-toggle-damage;
} // (if config.modules.desktop.wob.enable then let
wobSock = config.modules.desktop.wob.sockPath;
in {
"XF86AudioRaiseVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}";
"XF86AudioRaiseVolume".allow-when-locked = true;
"XF86AudioLowerVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%- && wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}";
"XF86AudioLowerVolume".allow-when-locked = true;
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && (wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q MUTED && echo 0 > ${wobSock}) || wpctl get-volume @DEFAULT_AUDIO_SINK@ | sed 's/[^0-9]//g' > ${wobSock}";
"XF86AudioMute".allow-when-locked = true;
"XF86MonBrightnessUp".action = sh "${lib.getExe pkgs.brightnessctl} -c backlight s +5% | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}";
"XF86MonBrightnessUp".allow-when-locked = true;
"XF86MonBrightnessDown".action = sh "${lib.getExe pkgs.brightnessctl} -c backlight s 5%- | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}";
"XF86MonBrightnessDown".allow-when-locked = true;
"XF86KbdBrightnessUp".action = sh "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s +5% | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}";
"XF86KbdBrightnessUp".allow-when-locked = true;
"XF86KbdBrightnessDown".action = sh "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s 5%- | sed -n 's/.*(\\([0-9]*\\)%).*/\\1/p' > ${wobSock}";
"XF86KbdBrightnessDown".allow-when-locked = true;
} else {
"XF86AudioRaiseVolume".action = sh "wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+";
"XF86AudioRaiseVolume".allow-when-locked = true;
"XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
"XF86AudioLowerVolume".allow-when-locked = true;
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"XF86AudioMute".allow-when-locked = true;
"XF86MonBrightnessUp".action = sh "${lib.getExe pkgs.brightnessctl} -c backlight s +5%";
"XF86MonBrightnessUp".allow-when-locked = true;
"XF86MonBrightnessDown".action = sh "${lib.getExe pkgs.brightnessctl} -c backlight s 5%-";
"XF86MonBrightnessDown".allow-when-locked = true;
"XF86KbdBrightnessUp".action = sh "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s +5%";
"XF86KbdBrightnessUp".allow-when-locked = true;
"XF86KbdBrightnessDown".action = sh "${lib.getExe pkgs.brightnessctl} -d '*:kbd_backlight' s 5%-";
"XF86KbdBrightnessDown".allow-when-locked = true;
});
};
};
};
}

View file

@ -1,39 +0,0 @@
{ lib, config, pkgs, inputs, ... }:
with lib;
let
cfg = config.modules.desktop.nwg-drawer;
in {
options.modules.desktop.nwg-drawer = {
enable = mkEnableOption "Enable nwg-drawer, a GTK based application launcher for wayland";
package = mkOption {
type = types.package;
default = pkgs.nwg-drawer;
example = "pkgs.nwg-drawer";
};
};
config = mkIf cfg.enable {
hm.systemd.user.services.nwg-drawer = {
Unit = {
Description = "nwg-drawer, a GTK based application launcher for wayland";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${lib.getExe cfg.package} -r -nofs -nocats -ovl -term wezterm -spacing 15 -fm nautilus -wm hyprland";
Restart = "on-failure";
RestartSec = 5;
};
};
hm.xdg.configFile."nwg-drawer/drawer.css".text = config.modules.desktop.themes.nwg-drawer;
};
}

View file

@ -1,41 +0,0 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.modules.desktop.plymouth;
in {
options.modules.desktop.plymouth = {
enable = mkEnableOption "Enable plymouth, a graphical boot splash screen";
};
config = mkIf cfg.enable {
boot.plymouth = {
enable = true;
themePackages = [ config.modules.desktop.themes.plymouthTheme.package ];
theme = config.modules.desktop.themes.plymouthTheme.name;
};
boot.kernelParams = [ "plymouth.use-simpledrm" ];
# smooth transition from plymouth to the login manager
# honestly, i have No Clue what this does, but it's in the arch wiki so it must be good
# https://wiki.archlinux.org/title/Plymouth#Smooth_transition
# we aren't actually replacing anything here, nix merges it into the existing service for us :3
systemd.services.display-manager = {
conflicts = [ "plymouth-quit.service" ];
after = [
"plymouth-quit.service"
"plymouth-start.service"
"systemd-user-sessions.service"
];
onFailure = [ "plymouth-quit.service" ];
serviceConfig = {
ExecStartPost = [
"-${pkgs.coreutils}/bin/sleep 30"
"-${pkgs.plymouth}/bin/plymouth quit --retain-splash"
];
};
};
};
}

View file

@ -0,0 +1,71 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.regreet;
in {
options.modules.desktop.regreet = {
enable = mkEnableOption "Enable regreet, a clean and customizable greeter for greetd";
};
config = mkIf cfg.enable {
services.greetd = {
enable = true;
vt = 7;
settings = {
# TODO: probably should rewrite somehow,,,
# this is ugly, but it SOMEHOW WORKS??
# kind of beautiful in its own way
default_session = let
swayConfig = let
monitors = config.modules.desktop.monitors;
monitorConfig = if monitors.enable && (builtins.length monitors.monitors > 0) then
let
# TODO: rewrite primary monitor system
# it will get repetitive..
firstMonitor = builtins.head monitors.monitors;
in
"output ${firstMonitor.name} scale ${toString firstMonitor.scale}"
else
"";
in command: pkgs.writeText "kiosk-sway-config" ''
${monitorConfig}
xwayland disable
exec '${command}; ${pkgs.sway}/bin/swaymsg exit'
'';
swayKiosk = command: "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.sway} --unsupported-gpu --config ${swayConfig command}";
in {
command = swayKiosk (lib.getExe pkgs.greetd.regreet);
};
};
};
programs.regreet = {
enable = true;
settings = {
background = {
path = "${../../assets/lockscreen.png}";
fit = "Cover";
};
};
# TODO: move to theme module
theme = with config.modules.desktop.themes.gtkTheme; {
name = name;
package = package;
};
iconTheme = with config.modules.desktop.themes.iconTheme; {
name = name;
package = package;
};
cursorTheme = with config.modules.desktop.themes.cursorTheme; {
name = name;
package = package;
};
font = with config.modules.desktop.fonts.fonts.sansSerif; {
name = family;
size = size;
package = package;
};
};
};
}

View file

@ -1,32 +0,0 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.sddm;
in {
options.modules.desktop.sddm = {
enable = mkEnableOption "Enable SDDM, a display manager for X11 and Wayland windowing systems";
};
config = mkIf cfg.enable {
environment.systemPackages = [
config.modules.desktop.themes.sddmTheme.package
config.modules.desktop.themes.cursorTheme.package # system wide is needed for sddm
];
# why do we need kwin for working hidpi
# huh????
services.displayManager.sddm = {
enable = true;
package = pkgs.kdePackages.sddm;
wayland.enable = config.modules.desktop.envProto == "wayland";
wayland.compositor = "kwin";
theme = config.modules.desktop.themes.sddmTheme.name;
settings = {
Theme = {
CursorTheme = config.modules.desktop.themes.cursorTheme.name;
CursorSize = config.modules.desktop.themes.cursorTheme.size;
};
};
};
};
}

View file

@ -36,7 +36,7 @@ in {
[ ! -f "$wallpaper" ] && exit 1 [ ! -f "$wallpaper" ] && exit 1
${lib.getExe cfg.package} img "$wallpaper" --transition-type grow --transition-fps 60 --transition-pos 0.915,0.977 --transition-duration 1.5 ${lib.getExe cfg.package} img "$wallpaper" --transition-type grow --transition-fps 60 --transition-pos 1.0,1.0 --transition-duration 1.5
echo "$file" > "${lastWallpaper}" echo "$file" > "${lastWallpaper}"
''; '';
@ -58,7 +58,7 @@ in {
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = "${cfg.package}/bin/swww-daemon"; ExecStart = "${cfg.package}/bin/swww-daemon --no-cache";
ExecStartPost = "${cfg.setScript}"; ExecStartPost = "${cfg.setScript}";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;

View file

@ -45,24 +45,6 @@ in {
size = 24; size = 24;
}; };
sddmTheme = {
name = "catppuccin-${variant}";
package = (pkgs.catppuccin-sddm.override {
flavor = variant;
font = config.modules.desktop.fonts.fonts.sansSerif.family;
fontSize = toString config.modules.desktop.fonts.fonts.sansSerif.size;
background = ../../../../assets/lockscreen.jpg;
loginBackground = true;
});
};
plymouthTheme = {
name = "catppuccin-${variant}";
package = (pkgs.catppuccin-plymouth.override {
variant = variant;
});
};
editor = { editor = {
vscode = { vscode = {
colorTheme = { colorTheme = {
@ -84,21 +66,13 @@ in {
}; };
}; };
hyprland = { niri = with colorScheme.palette; {
source = "${inputs.hyprland-catppuccin}/themes/${variant}.conf"; # TODO: make more dynamic
extraConfig = '' # catppuccin pink
general { accent = "#f5c2e7";
col.active_border=''$${accent} inactive = "#${base02}";
col.inactive_border=$surface0 # catppuccin crust
} shadow = "#11111b";
decoration:shadow {
color=$crust
color_inactive=$crust
}
misc {
background_color=$crust
}
'';
}; };
waybar = builtins.concatStringsSep "\n" [ waybar = builtins.concatStringsSep "\n" [
@ -113,17 +87,17 @@ in {
barColor = "${base05}FF"; barColor = "${base05}FF";
}; };
rofi = ./rofi.rasi; rofi = builtins.concatStringsSep "\n" [
"@theme \"${inputs.rofi-catppuccin}/themes/catppuccin-${variant}.rasi\""
"* { accent: @${accent}; }"
(lib.readFile ./rofi.rasi)
];
fuzzel = "${inputs.fuzzel-catppuccin}/themes/catppuccin-${variant}/${accent}.ini";
wezterm = '' wezterm = ''
config.color_scheme = 'Catppuccin ${pascalCase variant}' config.color_scheme = 'Catppuccin ${pascalCase variant}'
''; '';
nwg-drawer = builtins.concatStringsSep "\n" [
"@import \"${inputs.waybar-catppuccin}/themes/${variant}.css\";"
#"@define-color accent @${accent};" # gtk already does our styling here
(lib.readFile ./nwg-drawer.css)
];
}; };
}; };
} }

View file

@ -1,33 +0,0 @@
window {
background: alpha(@base, 0.5);
color: @text;
font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', "Font Awesome 6 Free", "Noto Sans CJK";
font-size: 13px;
font-style: normal;
}
/* search entry */
entry {
/* we don't actually need to specify accent color here */
/* this is a gtk app, remember? */
background-color: alpha(@surface0, 0.5);
color: @text;
}
button, box, widget, image {
background: none;
border: none;
color: @text;
text-shadow: 0 1px alpha(@base, 0.75);
box-shadow: none;
outline: none;
}
button {
padding: 1em 0.5em;
border-radius: 1em;
}
button:hover, button:active, box:hover, box:active {
background: alpha(@surface0, 0.5);
}

View file

@ -1,13 +1,4 @@
* { * {
bg-col: #24273a;
bg-col-light: #313244;
border-col: #363a4f;
selected-col: #45475a;
pink: #f5c2e7;
fg-col: #cdd6f4;
fg-col2: @pink;
grey: #bac2de;
width: 450px; width: 450px;
} }
@ -20,24 +11,25 @@ window {
height: 500px; height: 500px;
border: 1px; border: 1px;
border-radius: 1em; border-radius: 1em;
/* TODO: make more dynamic */ border-color: @accent;
border-color: @pink; background-color: @base;
background-color: @bg-col;
} }
mainbox {background-color: @bg-col;} mainbox {
background-color: @base;
}
inputbar { inputbar {
margin: 10px 5px 5px 5px; margin: 10px 5px 5px 5px;
children: [prompt, entry]; children: [prompt, entry];
background-color: @bg-col; background-color: @base;
padding: 1px; padding: 1px;
} }
prompt { prompt {
background-color: transparent; background-color: transparent;
padding: 1px; padding: 1px;
text-color: @fg-col; text-color: @text;
border-radius: 1.5em; border-radius: 1.5em;
} }
@ -49,8 +41,8 @@ textbox-prompt-colon {
entry { entry {
padding: 1px; padding: 1px;
margin: 0px; margin: 0px;
text-color: @fg-col; text-color: @text;
background-color: @bg-col; background-color: @base;
} }
listview { listview {
@ -58,27 +50,26 @@ listview {
margin: 5px 0px 0px 10px; margin: 5px 0px 0px 10px;
columns: 1; columns: 1;
lines: 10; lines: 10;
background-color: @bg-col; background-color: @base;
} }
element { element {
padding: 1px; padding: 1px;
background-color: @bg-col; background-color: @base;
text-color: @fg-col; text-color: @text;
} }
element-icon {size: 12px;} element-icon {size: 12px;}
element.selected { element.selected {
background-color: @selected-col; background-color: @surface1;
text-color: @fg-col2; text-color: @accent;
} }
scrollbar { scrollbar {
width: 4px ; width: 4px ;
border: 0; border: 0;
handle-color: @fg-col; handle-color: @text;
handle-width: 8px ; handle-width: 8px ;
padding: 0; padding: 0;
} }
@ -87,13 +78,13 @@ mode-switcher {spacing: 0;}
button { button {
spacing: 0; spacing: 0;
background-color: @bg-col-light; background-color: @surface0;
text-color: @grey; text-color: @subtext1;
vertical-align: 0.5; vertical-align: 0.5;
horizontal-align: 0.5; horizontal-align: 0.5;
} }
button.selected { button.selected {
background-color: @bg-col; background-color: @base;
text-color: @pink; text-color: @accent;
} }

View file

@ -11,7 +11,8 @@ button, button:hover {
window#waybar { window#waybar {
color: @text; color: @text;
/* background: alpha(@base, 0.8); */ /* background: alpha(@base, 0.8); */
background: @base; /* background: @base; */
background: alpha(@base, 0.9999999);
border-radius: 1em; border-radius: 1em;
/* font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', "Font Awesome 6 Free", "Noto Sans CJK"; */ /* font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', "Font Awesome 6 Free", "Noto Sans CJK"; */
font-family: "CozetteVector", monospace, "FontAwesome 6 Free", "Noto Sans CJK"; font-family: "CozetteVector", monospace, "FontAwesome 6 Free", "Noto Sans CJK";

View file

@ -31,14 +31,6 @@ in {
package = mkPackageOption pkgs "cursor" {}; package = mkPackageOption pkgs "cursor" {};
size = mkOpt int 24; size = mkOpt int 24;
}; };
sddmTheme = {
name = mkOpt str "";
package = mkPackageOption pkgs "sddm" {};
};
plymouthTheme = {
name = mkOpt str "";
package = mkPackageOption pkgs "plymouth" {};
};
editor = { editor = {
vscode = { vscode = {
@ -53,9 +45,10 @@ in {
}; };
}; };
hyprland = { niri = {
source = mkOpt (nullOr str) null; accent = mkOpt str "";
extraConfig = mkOpt (nullOr str) null; inactive = mkOpt str "";
shadow = mkOpt str "";
}; };
waybar = mkOpt str ""; waybar = mkOpt str "";
@ -66,11 +59,11 @@ in {
barColor = mkOpt (nullOr str) null; barColor = mkOpt (nullOr str) null;
}; };
rofi = mkOpt (nullOr path) null; rofi = mkOpt (nullOr str) null;
fuzzel = mkOpt (nullOr str) null;
wezterm = mkOpt (nullOr str) null; wezterm = mkOpt (nullOr str) null;
nwg-drawer = mkOpt (nullOr str) null;
}; };
config = mkIf (cfg.active != null) { config = mkIf (cfg.active != null) {
@ -120,7 +113,7 @@ in {
package = cfg.iconTheme.package; package = cfg.iconTheme.package;
}; };
hm.programs.vscode = { hm.programs.vscode.profiles.default = {
extensions = [ extensions = [
cfg.editor.vscode.colorTheme.extension cfg.editor.vscode.colorTheme.extension
cfg.editor.vscode.iconTheme.extension cfg.editor.vscode.iconTheme.extension
@ -131,11 +124,6 @@ in {
}; };
}; };
hm.wayland.windowManager.hyprland = {
settings.source = mkIf (cfg.hyprland.source != null) [ cfg.hyprland.source ];
extraConfig = mkIf (cfg.hyprland.extraConfig != null) cfg.hyprland.extraConfig;
};
hm.programs.waybar.style = cfg.waybar; hm.programs.waybar.style = cfg.waybar;
hm.services.wob.settings."" = { hm.services.wob.settings."" = {
@ -144,11 +132,23 @@ in {
bar_color = cfg.wob.barColor; bar_color = cfg.wob.barColor;
}; };
hm.programs.rofi.theme = cfg.rofi; # silly litle hack--rofi hm module doesn't play nice with strings
# so, we have to write the config to a file and then read it :P
# ...and then back to a string
hm.programs.rofi.theme = "${pkgs.writeTextFile {
name = "rofi-theme.rasi";
text = cfg.rofi;
}}";
hm.programs.fuzzel.settings.main = {
include = cfg.fuzzel;
icon-theme = cfg.iconTheme.name;
};
hm.xdg.configFile = let hm.xdg.configFile = let
iniFmt = pkgs.formats.ini {}; iniFmt = pkgs.formats.ini {};
# souls are forged in the fires of hell
mkQtctConf = version: let mkQtctConf = version: let
zeroCount = if version == 5 then 5 else if version == 6 then 10 else builtins.throw "invalid qtct version"; zeroCount = if version == 5 then 5 else if version == 6 then 10 else builtins.throw "invalid qtct version";
zeros = builtins.concatStringsSep "," (builtins.genList (_: "0") zeroCount); zeros = builtins.concatStringsSep "," (builtins.genList (_: "0") zeroCount);
@ -161,21 +161,12 @@ in {
}; };
Fonts = with config.modules.desktop.fonts.fonts; { Fonts = with config.modules.desktop.fonts.fonts; {
# i'm going to go on a rant here general = ''"${sansSerif.family},${toString sansSerif.size},-1,5,${toString weight},${zeros},1"'';
# this actually SUCKS omg fixed = ''"${monospace.family},-1,${toString monospace.size},5,${toString weight},${zeros},1"'';
# god is dead and The Qt Company killed him
# (for qt5, font weight is on a different scale where 50 is equivalent to 400 in qt6, even more fun)
# font weight is set to 400, this is the default weight for every font ever and it will fall back to something else if the font doesn't have a 400 weight (ex. cozette only has a 500 weight)
# setting the font style name is BAD!! i found it breaks font selection for others that aren't the weight that is given, and it's not required anyway
# technically this isn't perfect because we are setting the font size in points to the pixel size, but it doesn't matter since we define it in pixels right afterwards. this is a bit annoying but whatever man
# oh and, because why not, the qt5 font config has less zeros than the qt6 font config. the docs don't say anything about this. i am going to kill myself @The Qt Company
# yapping over. this is the best we can do for now
general = ''"${sansSerif.family},${toString sansSerif.size},${toString sansSerif.size},5,${toString weight},${zeros},1"'';
fixed = ''"${monospace.family},${toString monospace.size},${toString monospace.size},5,${toString weight},${zeros},1"'';
}; };
}; };
in { in {
# technically could cause issues w KDE if we use that # technically could cause issues with KDE if we use that
# not a concern for now # not a concern for now
"kdeglobals".text = '' "kdeglobals".text = ''
[Icons] [Icons]

View file

@ -8,7 +8,6 @@ in {
enable = mkEnableOption "Enable Waybar, a highly customizable wayland bar for wlroots compositors."; enable = mkEnableOption "Enable Waybar, a highly customizable wayland bar for wlroots compositors.";
package = mkOption { package = mkOption {
type = types.package; type = types.package;
# default = inputs.waybar.packages.${system}.default;
default = pkgs.waybar; default = pkgs.waybar;
example = "pkgs.waybar"; example = "pkgs.waybar";
}; };
@ -35,8 +34,8 @@ in {
margin-right = 6; margin-right = 6;
margin-bottom = 0; margin-bottom = 0;
modules-left = [ modules-left = [
"hyprland/workspaces" "niri/workspaces"
"hyprland/window" "niri/window"
]; ];
modules-center = [ modules-center = [
"clock" "clock"
@ -114,24 +113,15 @@ in {
tooltip-format = "Change wallpaper"; tooltip-format = "Change wallpaper";
on-click = "${config.modules.desktop.swww.swapScript}"; on-click = "${config.modules.desktop.swww.swapScript}";
}; };
"hyprland/workspaces" = { "niri/workspaces" = {
format = "{icon}"; format = "{icon}";
format-icons = { format-icons = {
"1" = ""; urgent = "";
"2" = ""; focused = "";
"3" = ""; default = "";
"4" = "";
urgent = "";
default = "";
};
persistent-workspaces = {
"1" = [];
"2" = [];
"3" = [];
"4" = [];
}; };
}; };
"hyprland/window" = { "niri/window" = {
format = "{}"; format = "{}";
icon = true; icon = true;
icon-size = 16; icon-size = 16;
@ -170,7 +160,7 @@ in {
default = ["" "" ""]; default = ["" "" ""];
}; };
scroll-step = 1; scroll-step = 1;
on-click = "${lib.getExe pkgs.pavucontrol}"; on-click = "${lib.getExe pkgs.pwvucontrol}";
ignored-sinks = ["Easy Effects Sink"]; ignored-sinks = ["Easy Effects Sink"];
}; };
backlight = { backlight = {

View file

@ -0,0 +1,40 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.desktop.wl-clip-persist;
in {
options.modules.desktop.wl-clip-persist = {
enable = mkEnableOption "Enable wl-clip-persist, keep clipboard contents after app exit";
package = mkOption {
type = types.package;
default = pkgs.wl-clip-persist;
};
clipboard = mkOption {
description = "clipboard type to persist";
default = "regular";
type = types.enum ["regular" "primary" "both"];
};
};
config = mkIf cfg.enable {
hm.systemd.user.services.wl-clip-persist = {
Unit = {
Description = "wl-clip-persist, keep clipboard contents after app exit";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${lib.getExe cfg.package} --clipboard ${cfg.clipboard}";
Restart = "on-failure";
RestartSec = 5;
};
};
};
}

View file

@ -2,21 +2,20 @@
with lib; with lib;
let let
cfg = config.modules.desktop.clipse; cfg = config.modules.desktop.xwayland-satellite;
in { in {
options.modules.desktop.clipse = { options.modules.desktop.xwayland-satellite = {
enable = mkEnableOption "Enable clipse, a generic clipboard manager"; enable = mkEnableOption "Enable xwayland-satellite, xwayland outside your wayland";
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.clipse; default = pkgs.xwayland-satellite-unstable;
example = "pkgs.clipse";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
hm.systemd.user.services.clipse = { hm.systemd.user.services.xwayland-satellite = {
Unit = { Unit = {
Description = "clipse, a generic clipboard manager"; Description = "xwayland-satellite, xwayland outside your wayland";
After = [ "graphical-session-pre.target" ]; After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
@ -27,7 +26,7 @@ in {
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = "${lib.getExe cfg.package} --listen-shell"; ExecStart = "${lib.getExe cfg.package}";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
}; };

View file

@ -9,8 +9,8 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
wireplumber.enable = true; wireplumber.enable = true;

View file

@ -0,0 +1,15 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.modules.hardware.tablet;
in {
options.modules.hardware.tablet = {
enable = mkEnableOption "Enable drawing tablet support";
};
config = mkIf cfg.enable {
hardware.opentabletdriver.enable = true;
hardware.opentabletdriver.daemon.enable = true;
};
}

View file

@ -37,7 +37,7 @@ in {
}; };
programs.gamescope = { programs.gamescope = {
enable = true; enable = cfg.useGamescope;
# capSysNice = true; https://github.com/NixOS/nixpkgs/issues/351516 # capSysNice = true; https://github.com/NixOS/nixpkgs/issues/351516
}; };

View file

@ -11,6 +11,11 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
hm.programs.vscode = { hm.programs.vscode = {
enable = true; enable = true;
mutableExtensionsDir = false;
profiles.default = {
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
extensions = with pkgs.vscode-extensions; [ extensions = with pkgs.vscode-extensions; [
# nix is *the* language here # nix is *the* language here
jnoortheen.nix-ide jnoortheen.nix-ide
@ -42,9 +47,7 @@ in {
sha256 = "sha256-IU/looiu6tluAp8u6MeSNCd7B8SSMZ6CEZ64mMsTNmU="; sha256 = "sha256-IU/looiu6tluAp8u6MeSNCd7B8SSMZ6CEZ64mMsTNmU=";
} }
]; ];
mutableExtensionsDir = false;
enableExtensionUpdateCheck = false;
enableUpdateCheck = false;
userSettings = with config.modules.desktop.fonts.fonts; { userSettings = with config.modules.desktop.fonts.fonts; {
"editor.fontFamily" = "'${monospace.family}', monospace"; "editor.fontFamily" = "'${monospace.family}', monospace";
"editor.fontSize" = monospace.size; "editor.fontSize" = monospace.size;
@ -83,6 +86,7 @@ in {
"terminal.integrated.minimumContrastRatio" = 1; "terminal.integrated.minimumContrastRatio" = 1;
}; };
}; };
};
# gnome-keyring, kwallet, etc. support # gnome-keyring, kwallet, etc. support
# this is the generic libsecret library, should work for every store # this is the generic libsecret library, should work for every store

View file

@ -10,7 +10,7 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.flatpak.enable = true; services.flatpak.enable = true;
hm.home.packages = [ pkgs.flatpak ]; hm.home.packages = with pkgs; [ flatpak gnome-software ];
fonts.fontDir.enable = true; fonts.fontDir.enable = true;
}; };
} }

View file

@ -14,6 +14,8 @@ in {
config = { config = {
hwdec = "auto"; hwdec = "auto";
keep-open = "yes";
no-keepaspect-window = ""; # tiling doesn't play nice..
osc = "no"; osc = "no";
border = "no"; border = "no";
}; };
@ -22,11 +24,16 @@ in {
visualizer = { visualizer = {
mode = "noalbumart"; mode = "noalbumart";
}; };
modernz = with config.colorScheme.palette; {
bottomhover = "no";
hover_effect = ""; # these are weird lookin
seekbarfg_color = "#${base0D}"; # blue is a sane default
};
}; };
scripts = with pkgs.mpvScripts; [ scripts = with pkgs.mpvScripts; [
mpris mpris
modernx modernz
thumbfast thumbfast
visualizer visualizer
]; ];

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, inputs, system, ... }:
with lib; with lib;
let let
@ -9,12 +9,11 @@ in {
package = mkOption { package = mkOption {
type = types.package; type = types.package;
default = pkgs.wezterm; default = pkgs.wezterm;
example = "pkgs.wezterm";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.variables.TERM = "wezterm";
hm.programs.wezterm = { hm.programs.wezterm = {
enable = true; enable = true;
package = cfg.package; package = cfg.package;
@ -28,14 +27,17 @@ in {
local config = {} local config = {}
config.front_end = "WebGpu" config.front_end = "WebGpu"
config.font = wezterm.font '${fonts.monospaceBitmap.family}' config.font = wezterm.font '${fonts.monospace.family}'
config.font_size = ${toString fonts.monospaceBitmap.size} -- this is a hack to get the font size to be the same as the bitmap font
-- the size is in px, but wezterm uses pt, so we use a conversion
config.font_size = ${toString fonts.monospace.size} / (4 / 3)
config.freetype_load_flags = 'MONOCHROME' config.freetype_load_flags = 'MONOCHROME'
config.enable_wayland = false config.enable_wayland = true
config.use_fancy_tab_bar = false config.use_fancy_tab_bar = false
config.use_resize_increments = true -- TODO: tiling acting WACK. these just make it even worse
config.initial_cols = 120 --config.use_resize_increments = true
config.initial_rows = 40 --config.initial_cols = 120
--config.initial_rows = 40
config.window_background_opacity = 0.8 config.window_background_opacity = 0.8
${config.modules.desktop.themes.wezterm or ""} ${config.modules.desktop.themes.wezterm or ""}

View file

@ -1,26 +0,0 @@
{ lib, stdenvNoCC, fetchFromGitHub }:
stdenvNoCC.mkDerivation {
pname = "apple-firmware";
version = "unstable";
src = fetchFromGitHub {
owner = "AdityaGarg8";
repo = "Apple-Firmware";
rev = "70bdd14a778abade95544fc625f3cc2b9eef272a";
hash = "sha256-ktXMIgyfSgx/l+QQqKc9B7+SZkbZ1/ut7hH7ffjUTLc=";
};
installPhase = ''
mkdir -p "$out/lib/firmware/brcm"
cp -r "$src/lib/firmware/brcm/." "$out/lib/firmware/brcm/"
'';
meta = with lib; {
description = "Various apple broadcom drivers, ripped from a runner image";
homepage = "https://github.com/adityagarg8/apple-firmware";
# not sure about the licenses on these, questionable legality
# license = licenses.unfree;
platforms = platforms.all;
};
}

View file

@ -1,30 +0,0 @@
{ lib, stdenvNoCC, fetchFromGitHub }:
stdenvNoCC.mkDerivation {
pname = "lexica-ultralegible";
version = "1.0.0-unstable";
src = fetchFromGitHub {
owner = "jacobxperez";
repo = "lexica-ultralegible";
rev = "109729403ce6f5d9d74c6c6d8debc3380f3e3c10";
hash = "sha256-+mHIsmj2TL/sUVxUBsIqTK6D6GLgK4DgaiU9PTkgmUA=";
};
installPhase = ''
runHook preInstall
install -Dm644 -t $out/share/fonts/opentype fonts/otf/*
install -Dm644 -t $out/share/fonts/truetype fonts/ttf/*
install -Dm644 -t $out/share/fonts/woff2 fonts/web/*
runHook postInstall
'';
meta = with lib; {
description = "Maintained version of Atkinson Hyperlegible";
homepage = "https://jacobxperez.github.io/lexica-ultralegible/";
license = licenses.ofl;
platforms = platforms.all;
};
}