Compare commits
No commits in common. "cb4b22b4e5420ee32dafa69ff83f0adee2aa5f46" and "07ebf549508b3a5050b06ffdaa4e44e9361cee7d" have entirely different histories.
cb4b22b4e5
...
07ebf54950
46 changed files with 1371 additions and 1184 deletions
BIN
assets/lockscreen.jpg
Normal file
BIN
assets/lockscreen.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 674 KiB |
Binary file not shown.
Before Width: | Height: | Size: 575 KiB |
23
default.nix
23
default.nix
|
@ -5,20 +5,25 @@ let
|
|||
inherit (lib.modules) mkDefault mkIf mkAliasOptionModule;
|
||||
inherit (lib.my) mapModulesRec';
|
||||
in {
|
||||
imports = [
|
||||
imports =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
|
||||
inputs.nix-colors.homeManagerModules.default # >home manager modules >in non-hm modules
|
||||
inputs.niri.nixosModules.niri
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
inputs.hyprland.nixosModules.default
|
||||
]
|
||||
++ (mapModulesRec' (toString ./modules) import);
|
||||
|
||||
hm.imports = [
|
||||
inputs.hyprland.homeManagerModules.default
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
};
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixVersions.latest;
|
||||
package = pkgs.nix;
|
||||
|
||||
# flake registry and nix path pinning
|
||||
# might not be needed? see: https://github.com/NixOS/nixpkgs/commit/e456032addae76701eb17e6c03fc515fd78ad74f
|
||||
|
@ -33,15 +38,13 @@ in {
|
|||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nixpkgs-wayland.cachix.org"
|
||||
"https://wezterm.cachix.org"
|
||||
"https://niri.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://cache.soopy.moe"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
"wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
|
||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="
|
||||
];
|
||||
};
|
||||
|
@ -54,8 +57,6 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = mkDefault true;
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
system.configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
||||
hm.home.stateVersion = config.system.stateVersion;
|
||||
|
@ -94,6 +95,8 @@ in {
|
|||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
programs.nix-ld.enable = mkDefault true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
openssh mosh
|
||||
unrar unzip
|
||||
|
|
615
flake.lock
generated
615
flake.lock
generated
|
@ -1,5 +1,38 @@
|
|||
{
|
||||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -21,11 +54,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742610849,
|
||||
"narHash": "sha256-QrRM1wRBYs1g6D3nNw2IhjyxQUBCfrgXqd5qI0VMPrY=",
|
||||
"lastModified": 1716179347,
|
||||
"narHash": "sha256-DPiP4yLRcPgWgrnCC/tRp5vUk9teZIfsCT2r8jr1V8A=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "vscode",
|
||||
"rev": "cf3ea3eb4b7b9eebf38800d8d975d9818f688273",
|
||||
"rev": "b7a8806f7532a091b0170f281dbc7f35c3fc7761",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -34,29 +67,51 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fuzzel-catppuccin": {
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1730302879,
|
||||
"narHash": "sha256-XpItMGsYq4XvLT+7OJ9YRILfd/9RG1GMuO6J4hSGepg=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "fuzzel",
|
||||
"rev": "0af0e26901b60ada4b20522df739f032797b07c3",
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "fuzzel",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1742376361,
|
||||
"narHash": "sha256-VFMgJkp/COvkt5dnkZB4D2szVdmF6DGm5ZdVvTUy61c=",
|
||||
"lastModified": 1733861262,
|
||||
"narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "daaae13dff0ecc692509a1332ff9003d9952d7a9",
|
||||
"rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -72,11 +127,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742588233,
|
||||
"narHash": "sha256-Fi5g8H5FXMSRqy+mU6gPG0v+C9pzjYbkkiePtz8+PpA=",
|
||||
"lastModified": 1734043726,
|
||||
"narHash": "sha256-e9YAMReFV1fDPcZLFC2pa4k/8TloSXeX0z2VysNMAoA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "296ddc64627f4a6a4eb447852d7346b9dd16197d",
|
||||
"rev": "3066cc58f552421a2c5414e78407fa5603405b1e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -85,7 +140,65 @@
|
|||
"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": {
|
||||
"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": {
|
||||
"hyprutils": [
|
||||
"hyprlock",
|
||||
|
@ -101,11 +214,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737634889,
|
||||
"narHash": "sha256-9JZE3KxcXOqZH9zs3UeadngDiK/yIACTiAR8HSA/TNI=",
|
||||
"lastModified": 1733248371,
|
||||
"narHash": "sha256-FFLJzFTyNhS7tBEEECx0B8Ye/bpmxhFVEKlECgMLc6c=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"rev": "0d77b4895ad5f1bb3b0ee43103a5246c58b65591",
|
||||
"rev": "cc95e5babc6065bc3ab4cd195429a9900836ef13",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -116,19 +229,17 @@
|
|||
},
|
||||
"hypridle": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"hyprlang": "hyprlang",
|
||||
"hyprutils": "hyprutils",
|
||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742397293,
|
||||
"narHash": "sha256-WVREToubLhIlogCoNJzo+HdatLKkEushwStDU1uyRnc=",
|
||||
"lastModified": 1731958956,
|
||||
"narHash": "sha256-21R5LD61oUqjdo9Vz0kLn0qSHCDMXyUMXbbod3kX+ho=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hypridle",
|
||||
"rev": "71e875e49e583c7b8b1364b55dfe494375c4e3ea",
|
||||
"rev": "9f23e70bb494107df8f959c925d4521a298c65eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -137,14 +248,63 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hypridle",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hypridle",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
|
@ -162,6 +322,74 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
|
@ -178,11 +406,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737634606,
|
||||
"narHash": "sha256-W7W87Cv6wqZ9PHegI6rH1+ve3zJPiyevMFf0/HwdbCQ=",
|
||||
"lastModified": 1721324361,
|
||||
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "f41271d35cc0f370d300413d756c2677f386af9d",
|
||||
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -194,15 +422,15 @@
|
|||
"hyprlang_2": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
"hyprlock",
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprlock",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprlock",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
|
@ -220,23 +448,51 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"hyprgraphics": "hyprgraphics",
|
||||
"hyprlang": "hyprlang_2",
|
||||
"hyprutils": "hyprutils_2",
|
||||
"hyprwayland-scanner": "hyprwayland-scanner_2",
|
||||
"hyprgraphics": "hyprgraphics_2",
|
||||
"hyprlang": "hyprlang_3",
|
||||
"hyprutils": "hyprutils_3",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_2"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742460722,
|
||||
"narHash": "sha256-u23NzXN2yez0nO2zEtEaChE/4jhtC8WvpM8OpwUsls8=",
|
||||
"lastModified": 1733672536,
|
||||
"narHash": "sha256-bCtJwEmKG114e0y5GDj5fZ24KkgVVunbN9xgCjQa1OQ=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlock",
|
||||
"rev": "f883e669d147ac189b64ce403300a5a3e4de2c66",
|
||||
"rev": "8010b81e7b4100a1f2ef937be5268a13c27987e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -257,11 +513,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737632363,
|
||||
"narHash": "sha256-X9I8POSlHxBVjD0fiX1O2j7U9Zi1+4rIkrsyHP0uHXY=",
|
||||
"lastModified": 1721324102,
|
||||
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "006620eb29d54ea9086538891404c78563d1bae1",
|
||||
"rev": "962582a090bc233c4de9d9897f46794280288989",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -273,11 +529,11 @@
|
|||
"hyprutils_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hyprlock",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprlock",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
|
@ -295,14 +551,39 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"hypridle",
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hypridle",
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
|
@ -320,87 +601,6 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"base16-schemes": "base16-schemes",
|
||||
|
@ -422,11 +622,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1732837521,
|
||||
"narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=",
|
||||
"lastModified": 1712963716,
|
||||
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370",
|
||||
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -451,29 +651,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1742512142,
|
||||
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1737469691,
|
||||
"narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=",
|
||||
"lastModified": 1721138476,
|
||||
"narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab",
|
||||
"rev": "ad0b5eed1b6031efaed382844806550c3dcb4206",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -485,27 +669,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1742422364,
|
||||
"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=",
|
||||
"lastModified": 1733759999,
|
||||
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
|
||||
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -515,34 +683,40 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rofi-catppuccin": {
|
||||
"flake": false,
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740075377,
|
||||
"narHash": "sha256-WGYEA4Q7UvSaRDjP/DiEtfXjvmWbewtdyJWRpjhbZgg=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "rofi",
|
||||
"rev": "c24a212a6b07c2d45f32d01d7f10b4d88ddc9f45",
|
||||
"lastModified": 1737465171,
|
||||
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "rofi",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"catppuccin-vsc": "catppuccin-vsc",
|
||||
"fuzzel-catppuccin": "fuzzel-catppuccin",
|
||||
"hardware": "hardware",
|
||||
"home-manager": "home-manager",
|
||||
"hypridle": "hypridle",
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-catppuccin": "hyprland-catppuccin",
|
||||
"hyprlock": "hyprlock",
|
||||
"niri": "niri",
|
||||
"nix-colors": "nix-colors",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"rofi-catppuccin": "rofi-catppuccin",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"waybar-catppuccin": "waybar-catppuccin"
|
||||
}
|
||||
},
|
||||
|
@ -576,6 +750,21 @@
|
|||
"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": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -592,36 +781,44 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
"hyprland",
|
||||
"hyprland-protocols"
|
||||
],
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"hyprwayland-scanner": [
|
||||
"hyprland",
|
||||
"hyprwayland-scanner"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739246919,
|
||||
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
|
||||
"lastModified": 1737634991,
|
||||
"narHash": "sha256-dBAnb7Kbnier30cA7AgxVSxxARmxKZ1vHZT33THSIr8=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "e09dfe2726c8008f983e45a0aa1a3b7416aaeb8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"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",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
|
21
flake.nix
21
flake.nix
|
@ -10,19 +10,20 @@
|
|||
hardware.url = "github:nixos/nixos-hardware";
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
# waybar.url = "github:Alexays/Waybar";
|
||||
# waybar.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# input override due to mesa version mismatch
|
||||
# hypr suite
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
hyprland.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprlock.url = "github:hyprwm/hyprlock";
|
||||
hyprlock.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hypridle.url = "github:hyprwm/hypridle";
|
||||
|
||||
waybar-catppuccin.url = "github:catppuccin/waybar";
|
||||
waybar-catppuccin.flake = false;
|
||||
fuzzel-catppuccin.url = "github:catppuccin/fuzzel";
|
||||
fuzzel-catppuccin.flake = false;
|
||||
rofi-catppuccin.url = "github:catppuccin/rofi";
|
||||
rofi-catppuccin.flake = false;
|
||||
hyprland-catppuccin.url = "github:catppuccin/hyprland";
|
||||
hyprland-catppuccin.flake = false;
|
||||
|
||||
catppuccin-vsc.url = "github:catppuccin/vscode";
|
||||
};
|
||||
|
@ -36,14 +37,10 @@
|
|||
import pkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
config.allowAliases = true;
|
||||
config.allowAliases = false;
|
||||
overlays = extraOverlays ++ (lib.attrValues self.overlays);
|
||||
};
|
||||
pkgs = mkPkgs nixpkgs [
|
||||
self.overlays.default
|
||||
inputs.catppuccin-vsc.overlays.default
|
||||
inputs.niri.overlays.niri
|
||||
];
|
||||
pkgs = mkPkgs nixpkgs [ self.overlays.default inputs.catppuccin-vsc.overlays.default ];
|
||||
|
||||
lib = nixpkgs.lib.extend (final: prev: {
|
||||
my = import ./lib {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# support power features such as suspend to ram
|
||||
powerManagement.enable = true;
|
||||
|
@ -14,8 +14,35 @@
|
|||
# better performance than the actual intel driver
|
||||
services.xserver.videoDrivers = [ "modesetting" ];
|
||||
|
||||
hardware.apple-t2.kernelChannel = "latest";
|
||||
hardware.apple-t2.firmware.enable = true;
|
||||
# needed for our broadcom/brcm 4377b chip to work
|
||||
hardware.firmware = with pkgs; [
|
||||
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 = {
|
||||
LIBVA_DRIVER_NAME= "iHD";
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# debug
|
||||
strace ltrace lsof helvum
|
||||
# apps
|
||||
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
|
||||
firefox qalculate-gtk krita inkscape onlyoffice-desktopeditors vlc nicotine-plus transmission_4-gtk font-manager obs-studio imhex kdePackages.kdenlive
|
||||
# compatibility
|
||||
wineWowPackages.waylandFull winetricks
|
||||
# misc
|
||||
|
@ -28,6 +28,9 @@
|
|||
prismlauncher
|
||||
] ++ (with pkgs.my; [
|
||||
# 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 = {
|
||||
|
@ -38,7 +41,6 @@
|
|||
pipewire.enable = true;
|
||||
print.enable = true;
|
||||
pointer.enable = true;
|
||||
tablet.enable = true;
|
||||
};
|
||||
dev = {
|
||||
enable = true;
|
||||
|
@ -47,37 +49,28 @@
|
|||
# set to `x11` or `wayland`, improves compat
|
||||
envProto = "wayland";
|
||||
|
||||
# window manager / desktop environment
|
||||
niri.enable = true;
|
||||
|
||||
# accessories
|
||||
hyprland.enable = true;
|
||||
hyprlock.enable = true;
|
||||
hypridle.enable = true;
|
||||
|
||||
swww.enable = true;
|
||||
gnome-keyring.enable = true;
|
||||
mate-polkit.enable = true;
|
||||
dunst.enable = true;
|
||||
rofi.enable = true;
|
||||
fuzzel.enable = true;
|
||||
nwg-drawer.enable = true;
|
||||
waybar.enable = true;
|
||||
batsignal.enable = true;
|
||||
wob.enable = true;
|
||||
gammastep.enable = true;
|
||||
cliphist.enable = true;
|
||||
xwayland-satellite.enable = true;
|
||||
wl-clip-persist.enable = true;
|
||||
clipse.enable = true;
|
||||
|
||||
# display manager
|
||||
regreet.enable = true;
|
||||
# display manager + boot splash
|
||||
sddm.enable = true;
|
||||
plymouth.enable = true;
|
||||
|
||||
# theme, see `modules/desktop/themes`
|
||||
themes.active = "catppuccin";
|
||||
|
||||
# monitors, see `modules/desktop/monitors`
|
||||
monitors.enable = true;
|
||||
monitors.monitors = [
|
||||
{ name = "eDP-1"; scale = 2.0; }
|
||||
];
|
||||
};
|
||||
software = {
|
||||
# system
|
||||
|
@ -97,7 +90,6 @@
|
|||
distractions.discord.enable = true;
|
||||
distractions.discord.vesktop = true;
|
||||
distractions.steam.enable = true;
|
||||
distractions.steam.useGamescope = true;
|
||||
# tools
|
||||
tools.gpg.enable = true;
|
||||
tools.rbw.enable = true;
|
||||
|
|
|
@ -3,10 +3,13 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
inputs.hardware.nixosModules.apple-t2
|
||||
inputs.hardware.nixosModules.common-cpu-intel
|
||||
inputs.hardware.nixosModules.common-pc-laptop-ssd
|
||||
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")
|
||||
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
|
@ -2,20 +2,21 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.xwayland-satellite;
|
||||
cfg = config.modules.desktop.clipse;
|
||||
in {
|
||||
options.modules.desktop.xwayland-satellite = {
|
||||
enable = mkEnableOption "Enable xwayland-satellite, xwayland outside your wayland";
|
||||
options.modules.desktop.clipse = {
|
||||
enable = mkEnableOption "Enable clipse, a generic clipboard manager";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.xwayland-satellite-unstable;
|
||||
default = pkgs.clipse;
|
||||
example = "pkgs.clipse";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.systemd.user.services.xwayland-satellite = {
|
||||
hm.systemd.user.services.clipse = {
|
||||
Unit = {
|
||||
Description = "xwayland-satellite, xwayland outside your wayland";
|
||||
Description = "clipse, a generic clipboard manager";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
@ -26,7 +27,7 @@ in {
|
|||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${lib.getExe cfg.package}";
|
||||
ExecStart = "${lib.getExe cfg.package} --listen-shell";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
|
@ -18,8 +18,6 @@ in {
|
|||
|
||||
# enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager.wifi.backend = "iwd";
|
||||
networking.wireless.iwd.settings.Settings.AutoConnect = true;
|
||||
|
||||
# speed up boot
|
||||
# https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339
|
||||
|
@ -28,6 +26,13 @@ in {
|
|||
|
||||
# mounting, trash, and mtp support
|
||||
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") {
|
||||
environment.sessionVariables = {
|
||||
|
|
|
@ -17,7 +17,8 @@ in {
|
|||
follow = "mouse";
|
||||
width = 300;
|
||||
height = 145;
|
||||
frame_color = "#${base02}";
|
||||
# TODO: make more dynamic
|
||||
frame_color = "#f5c2e7"; # catppuccin pink
|
||||
|
||||
origin = "top-right";
|
||||
vertical_alignment = "center";
|
||||
|
|
|
@ -2,28 +2,24 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
# TODO: seperate into two functions?
|
||||
# one for the pt controlled fonts and one for the px controlled fonts
|
||||
mkFontOption = kind: default: {
|
||||
family = mkOption {
|
||||
type = types.str;
|
||||
default = default.family;
|
||||
description = "Family name for ${kind} font profile";
|
||||
example = "Cozette";
|
||||
example = "Fira Code";
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = default.package;
|
||||
description = "Package for ${kind} font profile";
|
||||
example = "pkgs.cozette";
|
||||
example = "pkgs.fira-code";
|
||||
};
|
||||
size = mkOption {
|
||||
type = types.number;
|
||||
default = default.size;
|
||||
description = ''
|
||||
${kind} font profile size, pt for sans/serif, px for monospace/bitmap fonts.
|
||||
'';
|
||||
example = "13";
|
||||
description = "${kind} font profile size, px";
|
||||
example = "11";
|
||||
};
|
||||
};
|
||||
cfg = config.modules.desktop.fonts;
|
||||
|
@ -34,16 +30,16 @@ in {
|
|||
|
||||
fonts = {
|
||||
sansSerif = mkFontOption "sansSerif" {
|
||||
package = pkgs.atkinson-hyperlegible-next;
|
||||
family = "Atkinson Hyperlegible Next";
|
||||
package = pkgs.my.lexica-ultralegible;
|
||||
family = "Lexica Ultralegible";
|
||||
|
||||
size = 10;
|
||||
size = 11;
|
||||
};
|
||||
serif = mkFontOption "serif" {
|
||||
package = pkgs.atkinson-hyperlegible-next;
|
||||
family = "Atkinson Hyperlegible Next";
|
||||
package = pkgs.my.lexica-ultralegible;
|
||||
family = "Lexica Ultralegible";
|
||||
|
||||
size = 10;
|
||||
size = 11;
|
||||
};
|
||||
monospace = mkFontOption "monospace" {
|
||||
package = pkgs.cozette;
|
||||
|
@ -115,9 +111,7 @@ in {
|
|||
mplus-outline-fonts.githubRelease
|
||||
dina-font
|
||||
proggyfonts
|
||||
atkinson-hyperlegible # old
|
||||
atkinson-hyperlegible-next
|
||||
atkinson-hyperlegible-mono
|
||||
atkinson-hyperlegible
|
||||
cozette
|
||||
twemoji-color-font
|
||||
noto-fonts-color-emoji
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -10,6 +10,7 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
user.packages = with pkgs; [ seahorse ];
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.login.enableGnomeKeyring = true;
|
||||
};
|
||||
|
|
|
@ -5,18 +5,12 @@ let
|
|||
cfg = config.modules.desktop.hypridle;
|
||||
in {
|
||||
options.modules.desktop.hypridle = {
|
||||
enable = mkEnableOption "Enable hypridle, a wayland idle daemon";
|
||||
enable = mkEnableOption "Enable hypridle, hyprland's idle daemon";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = inputs.hypridle.packages.${system}.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 {
|
||||
|
@ -33,31 +27,32 @@ in {
|
|||
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session"; # lock the screen before sleeping
|
||||
};
|
||||
|
||||
listener = let
|
||||
toDesktopTimeout = t: if cfg.desktop then t * cfg.desktopMultiplier else t;
|
||||
in [
|
||||
listener = [
|
||||
{
|
||||
timeout = toDesktopTimeout 60; # 1 min
|
||||
timeout = 60;
|
||||
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
|
||||
}
|
||||
{
|
||||
timeout = toDesktopTimeout 60; # 1 min
|
||||
timeout = 60;
|
||||
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
|
||||
}
|
||||
{
|
||||
timeout = toDesktopTimeout (60 * 2); # 2 min
|
||||
timeout = 60 * 2; # 2 min
|
||||
on-timeout = "${pkgs.systemd}/bin/loginctl lock-session"; # lock computer
|
||||
}
|
||||
{
|
||||
timeout = toDesktopTimeout (60 * 15); # 15 min
|
||||
timeout = 60 * 15; # 15 min
|
||||
on-timeout = "${pkgs.systemd}/bin/systemctl suspend"; # sleep/suspend
|
||||
}
|
||||
] ++ optional config.modules.desktop.niri.enable {
|
||||
timeout = toDesktopTimeout (60 + 30); # 1.5 min
|
||||
on-timeout = "niri msg action power-off-monitors";
|
||||
};
|
||||
] ++ optional config.modules.desktop.hyprland.enable (let
|
||||
hyprctl = "${config.modules.desktop.hyprland.package}/bin/hyprctl";
|
||||
in {
|
||||
timeout = 90; # 1.5 min
|
||||
on-timeout = "${hyprctl} dispatch dpms off"; # turn off screen
|
||||
on-resume = "${hyprctl} dispatch dpms on"; # turn it back on
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
410
modules/desktop/hyprland.nix
Normal file
410
modules/desktop/hyprland.nix
Normal file
|
@ -0,0 +1,410 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -5,7 +5,7 @@ let
|
|||
cfg = config.modules.desktop.hyprlock;
|
||||
in {
|
||||
options.modules.desktop.hyprlock = {
|
||||
enable = mkEnableOption "Enable hyprlock, a simple, fast, multithreaded screen lock for wayland compositors";
|
||||
enable = mkEnableOption "Enable hyprlock, a simple, fast, multithreaded screen lock for hyprland";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = inputs.hyprlock.packages.${system}.hyprlock;
|
||||
|
@ -26,11 +26,14 @@ in {
|
|||
no_fade_in = true;
|
||||
no_fade_out = 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;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
path = "${../../assets/lockscreen.png}";
|
||||
path = toString ../../assets/lockscreen.jpg;
|
||||
color = "rgb(${base00})";
|
||||
blur_passes = 3;
|
||||
blur_size = 6;
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
{ 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);
|
||||
};
|
||||
}
|
|
@ -1,421 +0,0 @@
|
|||
{ 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;
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
39
modules/desktop/nwg-drawer.nix
Normal file
39
modules/desktop/nwg-drawer.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
41
modules/desktop/plymouth.nix
Normal file
41
modules/desktop/plymouth.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
35
modules/desktop/sddm.nix
Normal file
35
modules/desktop/sddm.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# unlock the keyring on login, only if its enabled ofc
|
||||
security.pam.services.sddm.enableGnomeKeyring = config.modules.desktop.gnome-keyring.enable;
|
||||
};
|
||||
}
|
|
@ -36,7 +36,7 @@ in {
|
|||
|
||||
[ ! -f "$wallpaper" ] && exit 1
|
||||
|
||||
${lib.getExe cfg.package} img "$wallpaper" --transition-type grow --transition-fps 60 --transition-pos 1.0,1.0 --transition-duration 1.5
|
||||
${lib.getExe cfg.package} img "$wallpaper" --transition-type grow --transition-fps 60 --transition-pos 0.915,0.977 --transition-duration 1.5
|
||||
|
||||
echo "$file" > "${lastWallpaper}"
|
||||
'';
|
||||
|
@ -58,7 +58,7 @@ in {
|
|||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${cfg.package}/bin/swww-daemon --no-cache";
|
||||
ExecStart = "${cfg.package}/bin/swww-daemon";
|
||||
ExecStartPost = "${cfg.setScript}";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
|
|
|
@ -45,6 +45,24 @@ in {
|
|||
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 = {
|
||||
vscode = {
|
||||
colorTheme = {
|
||||
|
@ -66,13 +84,21 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
niri = with colorScheme.palette; {
|
||||
# TODO: make more dynamic
|
||||
# catppuccin pink
|
||||
accent = "#f5c2e7";
|
||||
inactive = "#${base02}";
|
||||
# catppuccin crust
|
||||
shadow = "#11111b";
|
||||
hyprland = {
|
||||
source = "${inputs.hyprland-catppuccin}/themes/${variant}.conf";
|
||||
extraConfig = ''
|
||||
general {
|
||||
col.active_border=''$${accent}
|
||||
col.inactive_border=$surface0
|
||||
}
|
||||
decoration:shadow {
|
||||
color=$crust
|
||||
color_inactive=$crust
|
||||
}
|
||||
misc {
|
||||
background_color=$crust
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
waybar = builtins.concatStringsSep "\n" [
|
||||
|
@ -87,17 +113,17 @@ in {
|
|||
barColor = "${base05}FF";
|
||||
};
|
||||
|
||||
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";
|
||||
rofi = ./rofi.rasi;
|
||||
|
||||
wezterm = ''
|
||||
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)
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
33
modules/desktop/themes/catppuccin/nwg-drawer.css
Normal file
33
modules/desktop/themes/catppuccin/nwg-drawer.css
Normal file
|
@ -0,0 +1,33 @@
|
|||
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);
|
||||
}
|
|
@ -1,4 +1,13 @@
|
|||
* {
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -11,25 +20,24 @@ window {
|
|||
height: 500px;
|
||||
border: 1px;
|
||||
border-radius: 1em;
|
||||
border-color: @accent;
|
||||
background-color: @base;
|
||||
/* TODO: make more dynamic */
|
||||
border-color: @pink;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @base;
|
||||
}
|
||||
mainbox {background-color: @bg-col;}
|
||||
|
||||
inputbar {
|
||||
margin: 10px 5px 5px 5px;
|
||||
children: [prompt, entry];
|
||||
background-color: @base;
|
||||
background-color: @bg-col;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
background-color: transparent;
|
||||
padding: 1px;
|
||||
text-color: @text;
|
||||
text-color: @fg-col;
|
||||
border-radius: 1.5em;
|
||||
}
|
||||
|
||||
|
@ -41,8 +49,8 @@ textbox-prompt-colon {
|
|||
entry {
|
||||
padding: 1px;
|
||||
margin: 0px;
|
||||
text-color: @text;
|
||||
background-color: @base;
|
||||
text-color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
listview {
|
||||
|
@ -50,26 +58,27 @@ listview {
|
|||
margin: 5px 0px 0px 10px;
|
||||
columns: 1;
|
||||
lines: 10;
|
||||
background-color: @base;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 1px;
|
||||
background-color: @base;
|
||||
text-color: @text;
|
||||
background-color: @bg-col;
|
||||
text-color: @fg-col;
|
||||
}
|
||||
|
||||
element-icon {size: 12px;}
|
||||
|
||||
element.selected {
|
||||
background-color: @surface1;
|
||||
text-color: @accent;
|
||||
background-color: @selected-col;
|
||||
text-color: @fg-col2;
|
||||
}
|
||||
|
||||
|
||||
scrollbar {
|
||||
width: 4px ;
|
||||
border: 0;
|
||||
handle-color: @text;
|
||||
handle-color: @fg-col;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -78,13 +87,13 @@ mode-switcher {spacing: 0;}
|
|||
|
||||
button {
|
||||
spacing: 0;
|
||||
background-color: @surface0;
|
||||
text-color: @subtext1;
|
||||
background-color: @bg-col-light;
|
||||
text-color: @grey;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
button.selected {
|
||||
background-color: @base;
|
||||
text-color: @accent;
|
||||
background-color: @bg-col;
|
||||
text-color: @pink;
|
||||
}
|
||||
|
|
|
@ -11,8 +11,7 @@ button, button:hover {
|
|||
window#waybar {
|
||||
color: @text;
|
||||
/* background: alpha(@base, 0.8); */
|
||||
/* background: @base; */
|
||||
background: alpha(@base, 0.9999999);
|
||||
background: @base;
|
||||
border-radius: 1em;
|
||||
/* font-family: 'Lexica Ultralegible', 'Atkinson Hyperlegible', "Font Awesome 6 Free", "Noto Sans CJK"; */
|
||||
font-family: "CozetteVector", monospace, "FontAwesome 6 Free", "Noto Sans CJK";
|
||||
|
|
|
@ -31,6 +31,14 @@ in {
|
|||
package = mkPackageOption pkgs "cursor" {};
|
||||
size = mkOpt int 24;
|
||||
};
|
||||
sddmTheme = {
|
||||
name = mkOpt str "";
|
||||
package = mkPackageOption pkgs "sddm" {};
|
||||
};
|
||||
plymouthTheme = {
|
||||
name = mkOpt str "";
|
||||
package = mkPackageOption pkgs "plymouth" {};
|
||||
};
|
||||
|
||||
editor = {
|
||||
vscode = {
|
||||
|
@ -45,10 +53,9 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
niri = {
|
||||
accent = mkOpt str "";
|
||||
inactive = mkOpt str "";
|
||||
shadow = mkOpt str "";
|
||||
hyprland = {
|
||||
source = mkOpt (nullOr str) null;
|
||||
extraConfig = mkOpt (nullOr str) null;
|
||||
};
|
||||
|
||||
waybar = mkOpt str "";
|
||||
|
@ -59,17 +66,15 @@ in {
|
|||
barColor = mkOpt (nullOr str) null;
|
||||
};
|
||||
|
||||
rofi = mkOpt (nullOr str) null;
|
||||
|
||||
fuzzel = mkOpt (nullOr str) null;
|
||||
rofi = mkOpt (nullOr path) null;
|
||||
|
||||
wezterm = mkOpt (nullOr str) null;
|
||||
|
||||
nwg-drawer = mkOpt (nullOr str) null;
|
||||
};
|
||||
|
||||
config = mkIf (cfg.active != null) {
|
||||
programs.dconf.enable = true;
|
||||
# i think this may be done by ohome-manager already??
|
||||
# better safe than sorry
|
||||
hm.dconf = {
|
||||
enable = true;
|
||||
settings."org/gnome/desktop/interface".color-scheme = mkIf cfg.dark "prefer-dark";
|
||||
|
@ -113,7 +118,7 @@ in {
|
|||
package = cfg.iconTheme.package;
|
||||
};
|
||||
|
||||
hm.programs.vscode.profiles.default = {
|
||||
hm.programs.vscode = {
|
||||
extensions = [
|
||||
cfg.editor.vscode.colorTheme.extension
|
||||
cfg.editor.vscode.iconTheme.extension
|
||||
|
@ -124,6 +129,11 @@ 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.services.wob.settings."" = {
|
||||
|
@ -132,23 +142,11 @@ in {
|
|||
bar_color = cfg.wob.barColor;
|
||||
};
|
||||
|
||||
# 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.programs.rofi.theme = cfg.rofi;
|
||||
|
||||
hm.xdg.configFile = let
|
||||
iniFmt = pkgs.formats.ini {};
|
||||
|
||||
# souls are forged in the fires of hell
|
||||
mkQtctConf = version: let
|
||||
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);
|
||||
|
@ -161,12 +159,21 @@ in {
|
|||
};
|
||||
|
||||
Fonts = with config.modules.desktop.fonts.fonts; {
|
||||
general = ''"${sansSerif.family},${toString sansSerif.size},-1,5,${toString weight},${zeros},1"'';
|
||||
fixed = ''"${monospace.family},-1,${toString monospace.size},5,${toString weight},${zeros},1"'';
|
||||
# i'm going to go on a rant here
|
||||
# this actually SUCKS omg
|
||||
# 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 {
|
||||
# technically could cause issues with KDE if we use that
|
||||
# technically could cause issues w KDE if we use that
|
||||
# not a concern for now
|
||||
"kdeglobals".text = ''
|
||||
[Icons]
|
||||
|
|
|
@ -8,6 +8,7 @@ in {
|
|||
enable = mkEnableOption "Enable Waybar, a highly customizable wayland bar for wlroots compositors.";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
# default = inputs.waybar.packages.${system}.default;
|
||||
default = pkgs.waybar;
|
||||
example = "pkgs.waybar";
|
||||
};
|
||||
|
@ -34,8 +35,8 @@ in {
|
|||
margin-right = 6;
|
||||
margin-bottom = 0;
|
||||
modules-left = [
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
|
@ -113,15 +114,24 @@ in {
|
|||
tooltip-format = "Change wallpaper";
|
||||
on-click = "${config.modules.desktop.swww.swapScript}";
|
||||
};
|
||||
"niri/workspaces" = {
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
urgent = "◈";
|
||||
focused = "◆";
|
||||
default = "◇";
|
||||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"4" = "";
|
||||
urgent = "";
|
||||
default = "•";
|
||||
};
|
||||
persistent-workspaces = {
|
||||
"1" = [];
|
||||
"2" = [];
|
||||
"3" = [];
|
||||
"4" = [];
|
||||
};
|
||||
};
|
||||
"niri/window" = {
|
||||
"hyprland/window" = {
|
||||
format = "{}";
|
||||
icon = true;
|
||||
icon-size = 16;
|
||||
|
@ -160,7 +170,7 @@ in {
|
|||
default = ["" "" ""];
|
||||
};
|
||||
scroll-step = 1;
|
||||
on-click = "${lib.getExe pkgs.pwvucontrol}";
|
||||
on-click = "${lib.getExe pkgs.pavucontrol}";
|
||||
ignored-sinks = ["Easy Effects Sink"];
|
||||
};
|
||||
backlight = {
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -9,8 +9,8 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
|
|
|
@ -10,10 +10,8 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
services.printing.enable = true;
|
||||
services.printing.startWhenNeeded = true;
|
||||
# this drains battery and everything i need is local
|
||||
# also happened to have an RCE in the past
|
||||
services.printing.browsed.enable = false;
|
||||
services.printing.startWhenNeeded = true; # i am not the avid printer user
|
||||
services.printing.browsed.enable = true;
|
||||
services.printing.drivers = with pkgs; [
|
||||
# gutenprint is very generic and supports a lot of printers
|
||||
gutenprint
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
|
@ -6,41 +6,10 @@ let
|
|||
in {
|
||||
options.modules.software.distractions.steam = {
|
||||
enable = mkEnableOption "Enable Steam, the game distribution software";
|
||||
useGamescope = mkEnableOption "Enable Gamescope, a tool to run games in a separate X session";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
package = pkgs.steam.override {
|
||||
# required for programs to run sometimes
|
||||
# see: https://github.com/NixOS/nixpkgs/issues/162562#issuecomment-1229444338
|
||||
extraPkgs = (pkgs: (lib.optional cfg.useGamescope pkgs.gamescope) ++ (with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
xorg.libXScrnSaver
|
||||
libpng
|
||||
libpulseaudio
|
||||
libvorbis
|
||||
stdenv.cc.cc.lib
|
||||
libkrb5
|
||||
keyutils
|
||||
]));
|
||||
};
|
||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
||||
protontricks.enable = true;
|
||||
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
programs.gamescope = {
|
||||
enable = cfg.useGamescope;
|
||||
# capSysNice = true; https://github.com/NixOS/nixpkgs/issues/351516
|
||||
};
|
||||
|
||||
user.packages = with pkgs; [ steam-run ];
|
||||
programs.steam.enable = true;
|
||||
programs.steam.protontricks.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,11 +11,6 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
hm.programs.vscode = {
|
||||
enable = true;
|
||||
mutableExtensionsDir = false;
|
||||
profiles.default = {
|
||||
enableExtensionUpdateCheck = false;
|
||||
enableUpdateCheck = false;
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# nix is *the* language here
|
||||
jnoortheen.nix-ide
|
||||
|
@ -47,7 +42,9 @@ in {
|
|||
sha256 = "sha256-IU/looiu6tluAp8u6MeSNCd7B8SSMZ6CEZ64mMsTNmU=";
|
||||
}
|
||||
];
|
||||
|
||||
mutableExtensionsDir = false;
|
||||
enableExtensionUpdateCheck = false;
|
||||
enableUpdateCheck = false;
|
||||
userSettings = with config.modules.desktop.fonts.fonts; {
|
||||
"editor.fontFamily" = "'${monospace.family}', monospace";
|
||||
"editor.fontSize" = monospace.size;
|
||||
|
@ -86,7 +83,6 @@ in {
|
|||
"terminal.integrated.minimumContrastRatio" = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# gnome-keyring, kwallet, etc. support
|
||||
# this is the generic libsecret library, should work for every store
|
||||
|
|
|
@ -10,7 +10,7 @@ in {
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
services.flatpak.enable = true;
|
||||
hm.home.packages = with pkgs; [ flatpak gnome-software ];
|
||||
hm.home.packages = [ pkgs.flatpak ];
|
||||
fonts.fontDir.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,8 +14,6 @@ in {
|
|||
|
||||
config = {
|
||||
hwdec = "auto";
|
||||
keep-open = "yes";
|
||||
no-keepaspect-window = ""; # tiling doesn't play nice..
|
||||
osc = "no";
|
||||
border = "no";
|
||||
};
|
||||
|
@ -24,16 +22,11 @@ in {
|
|||
visualizer = {
|
||||
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; [
|
||||
mpris
|
||||
modernz
|
||||
modernx
|
||||
thumbfast
|
||||
visualizer
|
||||
];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, config, pkgs, inputs, system, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
|
@ -9,11 +9,12 @@ in {
|
|||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.wezterm;
|
||||
example = "pkgs.wezterm";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.variables.TERM = "wezterm";
|
||||
|
||||
hm.programs.wezterm = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
|
@ -27,17 +28,14 @@ in {
|
|||
local config = {}
|
||||
|
||||
config.front_end = "WebGpu"
|
||||
config.font = wezterm.font '${fonts.monospace.family}'
|
||||
-- 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.font = wezterm.font '${fonts.monospaceBitmap.family}'
|
||||
config.font_size = ${toString fonts.monospaceBitmap.size}
|
||||
config.freetype_load_flags = 'MONOCHROME'
|
||||
config.enable_wayland = true
|
||||
config.enable_wayland = false
|
||||
config.use_fancy_tab_bar = false
|
||||
-- TODO: tiling acting WACK. these just make it even worse
|
||||
--config.use_resize_increments = true
|
||||
--config.initial_cols = 120
|
||||
--config.initial_rows = 40
|
||||
config.use_resize_increments = true
|
||||
config.initial_cols = 120
|
||||
config.initial_rows = 40
|
||||
config.window_background_opacity = 0.8
|
||||
${config.modules.desktop.themes.wezterm or ""}
|
||||
|
||||
|
|
26
packages/apple-firmware/default.nix
Normal file
26
packages/apple-firmware/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
30
packages/lexica-ultralegible/default.nix
Normal file
30
packages/lexica-ultralegible/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 668 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
Before Width: | Height: | Size: 575 KiB |
Loading…
Add table
Add a link
Reference in a new issue