Kieran's opinionated (and probably slightly dumb) nix config

Compare changes

Choose any two refs to compare.

.github/images/github.png

This is a binary file and will not be displayed.

.github/images/nautilus.png

This is a binary file and will not be displayed.

.github/images/neofetch.png

This is a binary file and will not be displayed.

.github/images/spotify.png

This is a binary file and will not be displayed.

+16 -1
README.md
···
# Kieran's Dots
+
![spotify with cava next to it](.github/images/spotify.png)
+
> [!CAUTION]
> These dots are highly prone to change / breakage. I am not a nix os expert (this is my first time touching nix), so I'm not sure if this will work or not. I'm just trying to get my dots up on github. If you have any suggestions, please let me know.
···
14. Move the config to your local directory with `mkdir ~/etc; sudo mv /etc/nixos ~/etc`
15. Link the config back to `/etc/nixos` with `sudo ln -s ~/etc/nixos /etc`
16. Change the config permissions: `sudo chown -R $(id -un):users ~/etc/nixos`, `sudo chown kierank -R ~/etc/nixos`, and `sudo chown kierank -R ~/etc/nixos/.*`
+
17. Setup the fingerprint reader with `sudo fprintd-enroll -f right-index-finger kierank` and then verify it worked with `sudo fprintd-verify kierank` (you may need to swipe your finger across the fingerprint sensor instead of simply laying it there)
## Screenshots
+
<details>
+
<summary>I've stuck the rest of the screenshots in a spoiler to preserve space</summary>
-
🫡 Will report back!
+
![the github page of this repo](.github/images/github.png)
+
![nautilus file manager](.github/images/nautilus.png)
+
![neofetch](.github/images/neofetch.png)
+
</details>
## Credits
···
- [Daru-san/spicetify-nix](https://github.com/Daru-san/spicetify-nix)
- [agenix](https://nixos.wiki/wiki/Agenix)
- [wpa_supplicant env file docs](https://search.nixos.org/options?show=networking.wireless.environmentFile&from=0&size=50&sort=relevance&type=packages&query=networking.wireless)
+
- [escaping nix variables](https://www.reddit.com/r/NixOS/comments/jmlohf/escaping_interpolation_in_bash_string/)
+
- [nerd fonts cheat sheet](https://www.nerdfonts.com/cheat-sheet)
+
- [setting the default shell in nix](https://www.reddit.com/r/NixOS/comments/z16mt8/cant_seem_to_set_default_shell_using_homemanager/)
+
- [hyprwm/contrib](https://github.com/hyprwm/contrib)
+
- [gtk with home manager](https://hoverbear.org/blog/declarative-gnome-configuration-in-nixos/)
+
- [setting up the proper portals](https://github.com/NixOS/nixpkgs/issues/274554)
+
- [tuigreet setup](https://github.com/sjcobb2022/nixos-config/blob/29077cee1fc82c5296908f0594e28276dacbe0b0/hosts/common/optional/greetd.nix)
+341 -179
flake.lock
···
"type": "github"
}
},
+
"aquamarine": {
+
"inputs": {
+
"hyprutils": [
+
"hyprnix",
+
"hyprutils"
+
],
+
"hyprwayland-scanner": [
+
"hyprnix",
+
"hyprwayland-scanner"
+
],
+
"nixpkgs": [
+
"hyprnix",
+
"nixpkgs"
+
],
+
"systems": [
+
"hyprnix",
+
"systems"
+
]
+
},
+
"locked": {
+
"lastModified": 1722705009,
+
"narHash": "sha256-U/FTS7uJVPy9jEcHdPfnIhq7e14TXOoxX9xlKltoQdY=",
+
"owner": "hyprwm",
+
"repo": "aquamarine",
+
"rev": "a70fc6a2fd53fc82f0cbb464fd8e91f00511cfc1",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hyprwm",
+
"repo": "aquamarine",
+
"type": "github"
+
}
+
},
"bird-nix-lib": {
"inputs": {
-
"nixpkgs": "nixpkgs_2",
-
"systems": "systems_2"
+
"nixpkgs": [
+
"hyprnix",
+
"nixpkgs"
+
],
+
"systems": [
+
"hyprnix",
+
"systems"
+
]
},
"locked": {
"lastModified": 1718015582,
···
"type": "github"
}
},
+
"catppuccin": {
+
"locked": {
+
"lastModified": 1721784420,
+
"narHash": "sha256-bgF6fN4Qgk7NErFKGuuqWXcLORsiykTYyqMUFRiAUBY=",
+
"owner": "catppuccin",
+
"repo": "nix",
+
"rev": "8bdb55cc1c13f572b6e4307a3c0d64f1ae286a4f",
+
"type": "github"
+
},
+
"original": {
+
"owner": "catppuccin",
+
"repo": "nix",
+
"type": "github"
+
}
+
},
+
"catppuccin-vsc": {
+
"inputs": {
+
"nixpkgs": "nixpkgs_2"
+
},
+
"locked": {
+
"lastModified": 1713966373,
+
"narHash": "sha256-8bMRH+z426e6zWcS15QZsQ8moSAKbEDjtBnAE10+DW8=",
+
"rev": "4b857d9b86cbb393e121f0f2544a6efb549dbbf4",
+
"revCount": 482,
+
"type": "tarball",
+
"url": "https://api.flakehub.com/f/pinned/catppuccin/vscode/3.14.0/018f15b6-7a7e-7bae-80f2-cf902f1db7fe/source.tar.gz"
+
},
+
"original": {
+
"type": "tarball",
+
"url": "https://flakehub.com/f/catppuccin/vscode/%2A.tar.gz"
+
}
+
},
"darwin": {
"inputs": {
"nixpkgs": [
···
"type": "github"
}
},
+
"flake-compat_2": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1696426674,
+
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+
"type": "github"
+
},
+
"original": {
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"type": "github"
+
}
+
},
+
"flake-utils": {
+
"inputs": {
+
"systems": "systems_3"
+
},
+
"locked": {
+
"lastModified": 1710146030,
+
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+
"type": "github"
+
},
+
"original": {
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"type": "github"
+
}
+
},
"hardware": {
"locked": {
-
"lastModified": 1721754224,
-
"narHash": "sha256-JEVfxzZRo+/zdWKBjHpAUG905SDZL9fmoLJxf9b5CGU=",
+
"lastModified": 1721839713,
+
"narHash": "sha256-apTv16L9h5ONS2VTPbKEgwAOVmWGku0MsfprjgwBFHo=",
"owner": "NixOS",
"repo": "nixos-hardware",
-
"rev": "405b654893aba16c8014de6a17e84439d3fb8e46",
+
"rev": "a7432ebaefc9a400dcda399d48b949230378d784",
"type": "github"
},
"original": {
···
]
},
"locked": {
-
"lastModified": 1719827415,
-
"narHash": "sha256-pvh+1hStXXAZf0sZ1xIJbWGx4u+OGBC1rVx6Wsw0fBw=",
+
"lastModified": 1720042825,
+
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "f2e3c19867262dbe84fdfab42467fc8dd83a2005",
+
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github"
},
"original": {
"owner": "nix-community",
-
"ref": "release-23.11",
+
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
-
"hyprland": {
+
"hyprcursor": {
"inputs": {
-
"hyprland-protocols": "hyprland-protocols",
-
"hyprlang": "hyprlang",
+
"hyprlang": [
+
"hyprnix",
+
"hyprlang"
+
],
"nixpkgs": [
-
"hyprland-nix",
+
"hyprnix",
"nixpkgs"
],
"systems": [
-
"hyprland-nix",
+
"hyprnix",
"systems"
-
],
-
"wlroots": "wlroots",
-
"xdph": "xdph"
+
]
},
"locked": {
-
"lastModified": 1708870181,
-
"narHash": "sha256-SRgG4MR7GXzZxgP0rMHxIkGp0yLEoVCV50nL8TKe+mA=",
+
"lastModified": 1722623071,
+
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=",
"owner": "hyprwm",
-
"repo": "hyprland",
-
"rev": "54a8329936d31537411c7a1a4d1815820b98316a",
+
"repo": "hyprcursor",
+
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c",
"type": "github"
},
"original": {
"owner": "hyprwm",
-
"repo": "hyprland",
+
"repo": "hyprcursor",
"type": "github"
}
},
-
"hyprland-nix": {
+
"hyprland": {
"inputs": {
-
"bird-nix-lib": "bird-nix-lib",
-
"hyprland": "hyprland",
-
"hyprland-protocols": "hyprland-protocols_2",
-
"hyprland-xdph": "hyprland-xdph",
-
"hyprlang": "hyprlang_3",
-
"nixpkgs": "nixpkgs_3",
-
"systems": "systems_4"
+
"aquamarine": [
+
"hyprnix",
+
"aquamarine"
+
],
+
"hyprcursor": [
+
"hyprnix",
+
"hyprcursor"
+
],
+
"hyprlang": [
+
"hyprnix",
+
"hyprlang"
+
],
+
"hyprutils": [
+
"hyprnix",
+
"hyprutils"
+
],
+
"hyprwayland-scanner": [
+
"hyprnix",
+
"hyprwayland-scanner"
+
],
+
"nixpkgs": [
+
"hyprnix",
+
"nixpkgs"
+
],
+
"systems": [
+
"hyprnix",
+
"systems"
+
],
+
"xdph": [
+
"hyprnix",
+
"xdg-desktop-portal-hyprland"
+
]
},
"locked": {
-
"lastModified": 1718089837,
-
"narHash": "sha256-E4Q+ruDcE1S+CrHLwdpB32NvcITKOJWrg9LhMs+/Of0=",
-
"owner": "hyprland-community",
-
"repo": "hyprnix",
-
"rev": "cfb8fb276e605699589c578e27f0ddd8dbba102b",
-
"type": "github"
+
"lastModified": 1722707408,
+
"narHash": "sha256-hyTuWhcid8UklJBC4Yh3dpf7Xhx4oJDyM/3n10E1wSk=",
+
"ref": "refs/heads/main",
+
"rev": "51ffd7fa6f186419276e5d3d5fe141a3fdb3c55c",
+
"revCount": 5048,
+
"submodules": true,
+
"type": "git",
+
"url": "https://github.com/hyprwm/Hyprland"
},
"original": {
-
"owner": "hyprland-community",
-
"repo": "hyprnix",
-
"type": "github"
+
"submodules": true,
+
"type": "git",
+
"url": "https://github.com/hyprwm/Hyprland"
}
},
-
"hyprland-protocols": {
+
"hyprland-contrib": {
"inputs": {
-
"nixpkgs": [
-
"hyprland-nix",
-
"hyprland",
-
"nixpkgs"
-
],
-
"systems": [
-
"hyprland-nix",
-
"hyprland",
-
"systems"
-
]
+
"nixpkgs": "nixpkgs_3"
},
"locked": {
-
"lastModified": 1691753796,
-
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
+
"lastModified": 1720709712,
+
"narHash": "sha256-78j/cY+AXoMIqqiNc1vWx237EPfpERAcYsb57ABUbwQ=",
"owner": "hyprwm",
-
"repo": "hyprland-protocols",
-
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
+
"repo": "contrib",
+
"rev": "65d42dcbfde2229a75ccdb195c318dfe241f9ade",
"type": "github"
},
"original": {
"owner": "hyprwm",
-
"repo": "hyprland-protocols",
+
"repo": "contrib",
"type": "github"
}
},
-
"hyprland-protocols_2": {
+
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
-
"hyprland-nix",
+
"hyprnix",
"nixpkgs"
],
"systems": [
-
"hyprland-nix",
+
"hyprnix",
"systems"
]
},
"locked": {
-
"lastModified": 1691753796,
-
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
+
"lastModified": 1721326555,
+
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
-
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
+
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
"type": "github"
},
"original": {
···
"type": "github"
}
},
-
"hyprland-xdph": {
+
"hyprlang": {
"inputs": {
-
"hyprland-protocols": [
-
"hyprland-nix",
-
"hyprland-protocols"
+
"hyprutils": [
+
"hyprnix",
+
"hyprutils"
],
-
"hyprlang": "hyprlang_2",
"nixpkgs": [
-
"hyprland-nix",
+
"hyprnix",
"nixpkgs"
],
"systems": [
-
"hyprland-nix",
+
"hyprnix",
"systems"
]
},
"locked": {
-
"lastModified": 1708696469,
-
"narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=",
+
"lastModified": 1721324361,
+
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
"owner": "hyprwm",
-
"repo": "xdg-desktop-portal-hyprland",
-
"rev": "1b713911c2f12b96c2574474686e4027ac4bf826",
+
"repo": "hyprlang",
+
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
"type": "github"
},
"original": {
"owner": "hyprwm",
-
"repo": "xdg-desktop-portal-hyprland",
+
"repo": "hyprlang",
"type": "github"
}
},
-
"hyprlang": {
+
"hyprnix": {
"inputs": {
-
"nixpkgs": [
-
"hyprland-nix",
-
"hyprland",
-
"nixpkgs"
-
],
-
"systems": [
-
"hyprland-nix",
-
"hyprland",
-
"systems"
-
]
+
"aquamarine": "aquamarine",
+
"bird-nix-lib": "bird-nix-lib",
+
"hyprcursor": "hyprcursor",
+
"hyprland": "hyprland",
+
"hyprland-protocols": "hyprland-protocols",
+
"hyprlang": "hyprlang",
+
"hyprutils": "hyprutils",
+
"hyprwayland-scanner": "hyprwayland-scanner",
+
"nixpkgs": "nixpkgs_4",
+
"systems": "systems_2",
+
"xdg-desktop-portal-hyprland": "xdg-desktop-portal-hyprland"
},
"locked": {
-
"lastModified": 1708681732,
-
"narHash": "sha256-ULZZLZ9C33G13IaXLuAc4oTzHUvnATI8Fj2u6gzMfT0=",
-
"owner": "hyprwm",
-
"repo": "hyprlang",
-
"rev": "f4466367ef0a92a6425d482050dc2b8840c0e644",
+
"lastModified": 1722829543,
+
"narHash": "sha256-fUY2Z3GsiS2ID9LLiB7sCarkdlTjLVzORg+RItuqSOs=",
+
"owner": "hyprland-community",
+
"repo": "hyprnix",
+
"rev": "c061b6086210e635a906837947ccd5bbfce50c28",
"type": "github"
},
"original": {
-
"owner": "hyprwm",
-
"repo": "hyprlang",
+
"owner": "hyprland-community",
+
"ref": "rewrite",
+
"repo": "hyprnix",
"type": "github"
}
},
-
"hyprlang_2": {
+
"hyprutils": {
"inputs": {
"nixpkgs": [
-
"hyprland-nix",
-
"hyprland-xdph",
+
"hyprnix",
"nixpkgs"
],
-
"systems": "systems_3"
+
"systems": [
+
"hyprnix",
+
"systems"
+
]
},
"locked": {
-
"lastModified": 1708681732,
-
"narHash": "sha256-ULZZLZ9C33G13IaXLuAc4oTzHUvnATI8Fj2u6gzMfT0=",
+
"lastModified": 1722098849,
+
"narHash": "sha256-D3wIZlBNh7LuZ0NaoCpY/Pvu+xHxIVtSN+KkWZYvvVs=",
"owner": "hyprwm",
-
"repo": "hyprlang",
-
"rev": "f4466367ef0a92a6425d482050dc2b8840c0e644",
+
"repo": "hyprutils",
+
"rev": "5dcbbc1e3de40b2cecfd2007434d86e924468f1f",
"type": "github"
},
"original": {
"owner": "hyprwm",
-
"repo": "hyprlang",
+
"repo": "hyprutils",
"type": "github"
}
},
-
"hyprlang_3": {
+
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
-
"hyprland-nix",
+
"hyprnix",
"nixpkgs"
],
"systems": [
-
"hyprland-nix",
+
"hyprnix",
"systems"
]
},
"locked": {
-
"lastModified": 1708787654,
-
"narHash": "sha256-7ACgM3ZuAhPqurXHUvR2nWMRcnmzGGPjLK6q4DSTelI=",
+
"lastModified": 1721324119,
+
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=",
"owner": "hyprwm",
-
"repo": "hyprlang",
-
"rev": "0fce791ba2334aca183f2ed42399518947550d0d",
+
"repo": "hyprwayland-scanner",
+
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30",
"type": "github"
},
"original": {
"owner": "hyprwm",
-
"repo": "hyprlang",
+
"repo": "hyprwayland-scanner",
+
"type": "github"
+
}
+
},
+
"nix-vscode-extensions": {
+
"inputs": {
+
"flake-compat": "flake-compat",
+
"flake-utils": "flake-utils",
+
"nixpkgs": "nixpkgs_5"
+
},
+
"locked": {
+
"lastModified": 1722302960,
+
"narHash": "sha256-byZl18UZCHy3vLhxrXp8THzlzmwNfil93ZQLY30i7/Q=",
+
"owner": "nix-community",
+
"repo": "nix-vscode-extensions",
+
"rev": "e1a1e6cabd0140ed353e173290e6d92510f5fd66",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "nix-vscode-extensions",
"type": "github"
}
},
···
"type": "github"
}
},
-
"nixpkgs_2": {
+
"nixpkgs-unstable": {
"locked": {
-
"lastModified": 1717868076,
-
"narHash": "sha256-c83Y9t815Wa34khrux81j8K8ET94ESmCuwORSKm2bQY=",
+
"lastModified": 1722185531,
+
"narHash": "sha256-veKR07psFoJjINLC8RK4DiLniGGMgF3QMlS4tb74S6k=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9",
+
"rev": "52ec9ac3b12395ad677e8b62106f0b98c1f8569d",
"type": "github"
},
"original": {
"owner": "nixos",
-
"ref": "nixpkgs-unstable",
+
"ref": "nixos-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs_2": {
+
"locked": {
+
"lastModified": 1712963716,
+
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
+
"type": "github"
+
},
+
"original": {
+
"owner": "NixOS",
+
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
-
"lastModified": 1697723726,
-
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
+
"lastModified": 1712163089,
+
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5",
+
"type": "github"
+
},
+
"original": {
+
"owner": "NixOS",
+
"ref": "nixos-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs_4": {
+
"locked": {
+
"lastModified": 1722421184,
+
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
+
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
"type": "github"
},
"original": {
···
"type": "github"
}
},
-
"nixpkgs_4": {
+
"nixpkgs_5": {
+
"locked": {
+
"lastModified": 1713805509,
+
"narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "1e1dc66fe68972a76679644a5577828b6a7e8be4",
+
"type": "github"
+
},
+
"original": {
+
"owner": "NixOS",
+
"ref": "nixpkgs-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs_6": {
"locked": {
-
"lastModified": 1720535198,
-
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
+
"lastModified": 1721686456,
+
"narHash": "sha256-nw/BnNzATDPfzpJVTnY8mcSKKsz6BJMEFRkJ332QSN0=",
"owner": "nixos",
"repo": "nixpkgs",
-
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
+
"rev": "575f3027caa1e291d24f1e9fb0e3a19c2f26d96b",
"type": "github"
},
"original": {
"owner": "nixos",
-
"ref": "nixos-23.11",
+
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
···
"root": {
"inputs": {
"agenix": "agenix",
+
"catppuccin": "catppuccin",
+
"catppuccin-vsc": "catppuccin-vsc",
"disko": "disko",
"hardware": "hardware",
"home-manager": "home-manager_2",
-
"hyprland-nix": "hyprland-nix",
+
"hyprland-contrib": "hyprland-contrib",
+
"hyprnix": "hyprnix",
+
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-hardware": "nixos-hardware",
-
"nixpkgs": "nixpkgs_4",
+
"nixpkgs": "nixpkgs_6",
+
"nixpkgs-unstable": "nixpkgs-unstable",
"spicetify-nix": "spicetify-nix"
}
},
"spicetify-nix": {
"inputs": {
-
"flake-compat": "flake-compat",
+
"flake-compat": "flake-compat_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
-
"lastModified": 1721727694,
-
"narHash": "sha256-X3qaEUG5zgJi9G1ceLpjuvlC9euTVNGlnJilfCgWJu4=",
+
"lastModified": 1721794305,
+
"narHash": "sha256-Sb4v/LAc8Pl0sOZf/LwT3QFZp+MAdtHF3cHswuxQDtQ=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
-
"rev": "597ae057680ac250083166efab806dcc2e47dd6b",
+
"rev": "8056338fca46716159d5d54f59ed04d6cf7b771f",
"type": "github"
},
"original": {
···
}
},
"systems_2": {
-
"locked": {
-
"lastModified": 1681028828,
-
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
-
"owner": "nix-systems",
-
"repo": "default",
-
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
-
"type": "github"
-
},
-
"original": {
-
"owner": "nix-systems",
-
"repo": "default",
-
"type": "github"
-
}
-
},
-
"systems_3": {
+
"flake": false,
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
···
"type": "github"
}
},
-
"systems_4": {
+
"systems_3": {
"locked": {
-
"lastModified": 1689347949,
-
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
+
"lastModified": 1681028828,
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
-
"repo": "default-linux",
-
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
+
"repo": "default",
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
-
"repo": "default-linux",
+
"repo": "default",
"type": "github"
}
},
-
"wlroots": {
-
"flake": false,
-
"locked": {
-
"host": "gitlab.freedesktop.org",
-
"lastModified": 1708558866,
-
"narHash": "sha256-Mz6hCtommq7RQfcPnxLINigO4RYSNt23HeJHC6mVmWI=",
-
"owner": "wlroots",
-
"repo": "wlroots",
-
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
-
"type": "gitlab"
-
},
-
"original": {
-
"host": "gitlab.freedesktop.org",
-
"owner": "wlroots",
-
"repo": "wlroots",
-
"rev": "0cb091f1a2d345f37d2ee445f4ffd04f7f4ec9e5",
-
"type": "gitlab"
-
}
-
},
-
"xdph": {
+
"xdg-desktop-portal-hyprland": {
"inputs": {
"hyprland-protocols": [
-
"hyprland-nix",
-
"hyprland",
+
"hyprnix",
"hyprland-protocols"
],
"hyprlang": [
-
"hyprland-nix",
-
"hyprland",
+
"hyprnix",
"hyprlang"
],
"nixpkgs": [
-
"hyprland-nix",
-
"hyprland",
+
"hyprnix",
"nixpkgs"
],
"systems": [
-
"hyprland-nix",
-
"hyprland",
+
"hyprnix",
"systems"
]
},
"locked": {
-
"lastModified": 1708696469,
-
"narHash": "sha256-shh5wmpeYy3MmsBfkm4f76yPsBDGk6OLYRVG+ARy2F0=",
+
"lastModified": 1722365976,
+
"narHash": "sha256-Khdm+mDzYA//XaU0M+hftod+rKr5q9SSHSEuiQ0/9ow=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
-
"rev": "1b713911c2f12b96c2574474686e4027ac4bf826",
+
"rev": "7f2a77ddf60390248e2a3de2261d7102a13e5341",
"type": "github"
},
"original": {
+29 -3
flake.nix
···
inputs = {
# Nixpkgs
-
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
+
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# NixOS hardware configuration
hardware.url = "github:NixOS/nixos-hardware/master";
# Home manager
-
home-manager.url = "github:nix-community/home-manager/release-23.11";
+
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# hyprland nix
-
hyprland-nix.url = "github:hyprland-community/hyprnix";
+
hyprnix.url = "github:hyprland-community/hyprnix/rewrite";
+
hyprland-contrib = {
+
url = "github:hyprwm/contrib";
+
};
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
···
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+
# catppuccin
+
catppuccin.url = "github:catppuccin/nix";
+
catppuccin-vsc.url = "https://flakehub.com/f/catppuccin/vscode/\*.tar.gz";
+
+
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
};
outputs = {
self,
nixpkgs,
+
nixpkgs-unstable,
agenix,
home-manager,
nixos-hardware,
+
hyprland-contrib,
...
} @ inputs: let
inherit (self) outputs;
+
system = "x86_64-linux";
+
unstable-overlays = {
+
nixpkgs.overlays = [
+
(final: prev: {
+
unstable = import nixpkgs-unstable {
+
inherit system;
+
config.allowUnfree = true;
+
};
+
})
+
];
+
};
in {
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
moonlark = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
+
specialArgs = {inherit inputs outputs;};
+
# > Our main nixos configuration file <
modules = [
inputs.disko.nixosModules.disko
{ disko.devices.disk.disk1.device = "/dev/vda"; }
agenix.nixosModules.default
./moonlark/configuration.nix
+
unstable-overlays
];
};
};
home-manager/dots/face.png

This is a binary file and will not be displayed.

+197
home-manager/dots/hyprland.conf
···
+
+
# See https://wiki.hyprland.org/Configuring/Monitors/
+
monitor = ,preferred,auto,1
+
monitor = ,addreserved,52,0,0,0
+
+
xwayland {
+
force_zero_scaling = true
+
}
+
+
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
+
+
# Execute your favorite apps at launch
+
exec-once = sunpaper -d
+
exec-once = wluma
+
exec-once = waybar
+
exec-once = hypridle
+
exec-once = udiskie
+
+
exec-once=[workspace 8 silent] slack
+
exec-once=[workspace 9 silent] spotify
+
exec-once=[workspace 1 silent] firefox
+
+
# Source a file (multi-file configs)
+
source = ~/.config/hypr/themes/frappe.conf
+
+
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
+
input {
+
kb_layout = us
+
+
follow_mouse = 1
+
+
touchpad {
+
natural_scroll = yes
+
}
+
+
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
+
}
+
+
general {
+
# See https://wiki.hyprland.org/Configuring/Variables/ for more
+
+
gaps_in = 2
+
gaps_out = 8
+
border_size = 2
+
col.inactive_border = $base
+
col.active_border = $blue
+
+
layout = dwindle
+
}
+
+
decoration {
+
# See https://wiki.hyprland.org/Configuring/Variables/ for more
+
+
rounding = 7
+
+
drop_shadow = true
+
shadow_render_power = 3
+
col.shadow = rgba(1a1a1aee)
+
+
dim_inactive = true
+
dim_strength = 0.2
+
}
+
+
decoration:blur {
+
size = 3
+
passes = 1
+
}
+
+
animations {
+
enabled = true
+
+
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
+
+
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
+
+
animation = windows, 1, 7, myBezier
+
animation = windowsOut, 1, 7, default, popin 80%
+
animation = border, 1, 10, default
+
animation = fade, 1, 7, default
+
animation = workspaces, 1, 6, default
+
}
+
+
dwindle {
+
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
+
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
+
preserve_split = yes # you probably want this
+
}
+
+
gestures {
+
# See https://wiki.hyprland.org/Configuring/Variables/ for more
+
workspace_swipe = on
+
workspace_swipe_create_new = true
+
}
+
+
# Floating Windows
+
windowrulev2 = float, class:^(Rofi)$
+
# Positioning Windows
+
windowrule = center, ^(Rofi)$
+
+
# Tiled Windows
+
windowrulev2 = tile, class:^(Spotify)$
+
+
# Example windowrule v2
+
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
+
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
+
+
# Layer Rules
+
layerrule = animation fade,waybar
+
layerrule = blur,waybar
+
layerrule = ignorezero,waybar
+
+
+
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
+
$mainMod = SUPER
+
+
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
+
+
# Terminal
+
bind = $mainMod, RETURN, exec, xfce4-terminal
+
+
# Applications
+
bind = CTRL + SHIFT, B, exec, nautilus
+
bind = CTRL + SHIFT, F, exec, firefox
+
bind = CTRL + SHIFT, S, exec, spotify
+
bind = CTRL + SHIFT, L, exec, slack
+
bind = CTRL + SHIFT, O, exec, obs
+
bind = CTRL + SHIFT, K, exec, export GTK_THEME=Adwaita:dark && kicad
+
+
bind = $mainMod, RETURN, exec, alacritty
+
+
# System
+
bind = $mainMod, Q, killactive,
+
bind = $mainMod, M, exit
+
bind = $mainMod, L, exec, hyprlock
+
bind = $mainMod, ESC, exec, hyprlock
+
bind = $mainMod, V, togglefloating,
+
bind = $mainMod, S, exec, tofi-run | xargs xargs hyprctl dispatch exec --
+
bind = $mainMod, P, pseudo, # dwindle
+
bind = $mainMod, J, togglesplit, # dwindle
+
+
# Tools
+
bind=CTRL,PRINT,exec,grimblast copy area; notify-desktop "copied screenshot of selection to the clipboard"
+
bind=ALT,PRINT,exec,grimblast copy active; notify-desktop "copied screenshot of active window to clipboard"
+
bind=,PRINT,exec,grimblast copy output; notify-desktop "copied screenshot of screen to the clipboard"
+
+
bind=$mainMod, O, exec, hyprpicker -a -f hex
+
+
# Controls
+
bindel =,XF86MonBrightnessDown, exec, brightnessctl set 5%-; notify-desktop "brightness decreased 5%" "Curretly; $(echo "scale=1; 100 * $(brightnessctl g) / $(brightnessctl m)" | bc)%" -t 1200
+
bindel =,XF86MonBrightnessUp, exec, brightnessctl set 5%+; notify-desktop "brightness increased 5%" "Curretly; $(echo "scale=1; 100 * $(brightnessctl g) / $(brightnessctl m)" | bc)%" -t 1200
+
+
bindl =,XF86AudioPlay, exec, playerctl play-pause; notify-desktop "toggled media playback" -t 1800
+
bindl =,XF86AudioPrev, exec, playerctl previous; notify-desktop "Skipping back" -t 1800
+
bindl =,XF86AudioNext, exec, playerctl next
+
+
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; notify-desktop "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -t 800
+
+
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; notify-desktop "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -t 800
+
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; notify-desktop "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -t 800
+
+
# Move focus with mainMod + arrow keys
+
bind = $mainMod, left, movefocus, l
+
bind = $mainMod, right, movefocus, r
+
bind = $mainMod, up, movefocus, u
+
bind = $mainMod, down, movefocus, d
+
+
# Switch workspaces with mainMod + [0-9]
+
bind = $mainMod, 1, workspace, 1
+
bind = $mainMod, 2, workspace, 2
+
bind = $mainMod, 3, workspace, 3
+
bind = $mainMod, 4, workspace, 4
+
bind = $mainMod, 5, workspace, 5
+
bind = $mainMod, 6, workspace, 6
+
bind = $mainMod, 7, workspace, 7
+
bind = $mainMod, 8, workspace, 8
+
bind = $mainMod, 9, workspace, 9
+
bind = $mainMod, 0, workspace, 10
+
+
# Move active window to a workspace with mainMod + SHIFT + [0-9]
+
bind = $mainMod SHIFT, 1, movetoworkspace, 1
+
bind = $mainMod SHIFT, 2, movetoworkspace, 2
+
bind = $mainMod SHIFT, 3, movetoworkspace, 3
+
bind = $mainMod SHIFT, 4, movetoworkspace, 4
+
bind = $mainMod SHIFT, 5, movetoworkspace, 5
+
bind = $mainMod SHIFT, 6, movetoworkspace, 6
+
bind = $mainMod SHIFT, 7, movetoworkspace, 7
+
bind = $mainMod SHIFT, 8, movetoworkspace, 8
+
bind = $mainMod SHIFT, 9, movetoworkspace, 9
+
bind = $mainMod SHIFT, 0, movetoworkspace, 10
+
+
# Scroll through existing workspaces with mainMod + scroll
+
bind = $mainMod, mouse_down, workspace, e+1
+
bind = $mainMod, mouse_up, workspace, e-1
+
+
# Move/resize windows with mainMod + LMB/RMB and dragging
+
bindm = $mainMod, mouse:272, movewindow
+
bindm = $mainMod, mouse:273, resizewindow
+78
home-manager/dots/hyprlock.conf
···
+
source = $HOME/.config/hypr/macchiato.conf
+
+
$accent = $blue
+
$accentAlpha = $blueAlpha
+
$font = FiraCode Nerd Font
+
+
# GENERAL
+
general {
+
disable_loading_bar = true
+
hide_cursor = true
+
}
+
+
# BACKGROUND
+
background {
+
monitor =
+
blur_passes = 0
+
color = $base
+
}
+
+
# TIME
+
label {
+
monitor =
+
text = cmd[update:30000] echo "$(date +"%R")"
+
color = $text
+
font_size = 90
+
font_family = $font
+
position = -30, 0
+
halign = right
+
valign = top
+
}
+
+
# DATE
+
label {
+
monitor =
+
text = cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"
+
color = $text
+
font_size = 25
+
font_family = $font
+
position = -30, -150
+
halign = right
+
valign = top
+
}
+
+
# USER AVATAR
+
+
image {
+
monitor =
+
path = ~/.config/face.png
+
size = 100
+
border_color = $accent
+
+
position = 0, 75
+
halign = center
+
valign = center
+
}
+
+
# INPUT FIELD
+
input-field {
+
monitor =
+
size = 300, 60
+
outline_thickness = 4
+
dots_size = 0.2
+
dots_spacing = 0.2
+
dots_center = true
+
outer_color = $accent
+
inner_color = $surface0
+
font_color = $text
+
fade_on_empty = false
+
placeholder_text = <span foreground="##$textAlpha"><i>󰌾 Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>
+
hide_input = false
+
check_color = $accent
+
fail_color = $red
+
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i>
+
capslock_color = $yellow
+
position = 0, -35
+
halign = center
+
valign = center
+
}
+78
home-manager/dots/macchiato.conf
···
+
+
$rosewater = rgb(f4dbd6)
+
$rosewaterAlpha = f4dbd6
+
+
$flamingo = rgb(f0c6c6)
+
$flamingoAlpha = f0c6c6
+
+
$pink = rgb(f5bde6)
+
$pinkAlpha = f5bde6
+
+
$mauve = rgb(c6a0f6)
+
$mauveAlpha = c6a0f6
+
+
$red = rgb(ed8796)
+
$redAlpha = ed8796
+
+
$maroon = rgb(ee99a0)
+
$maroonAlpha = ee99a0
+
+
$peach = rgb(f5a97f)
+
$peachAlpha = f5a97f
+
+
$yellow = rgb(eed49f)
+
$yellowAlpha = eed49f
+
+
$green = rgb(a6da95)
+
$greenAlpha = a6da95
+
+
$teal = rgb(8bd5ca)
+
$tealAlpha = 8bd5ca
+
+
$sky = rgb(91d7e3)
+
$skyAlpha = 91d7e3
+
+
$sapphire = rgb(7dc4e4)
+
$sapphireAlpha = 7dc4e4
+
+
$blue = rgb(8aadf4)
+
$blueAlpha = 8aadf4
+
+
$lavender = rgb(b7bdf8)
+
$lavenderAlpha = b7bdf8
+
+
$text = rgb(cad3f5)
+
$textAlpha = cad3f5
+
+
$subtext1 = rgb(b8c0e0)
+
$subtext1Alpha = b8c0e0
+
+
$subtext0 = rgb(a5adcb)
+
$subtext0Alpha = a5adcb
+
+
$overlay2 = rgb(939ab7)
+
$overlay2Alpha = 939ab7
+
+
$overlay1 = rgb(8087a2)
+
$overlay1Alpha = 8087a2
+
+
$overlay0 = rgb(6e738d)
+
$overlay0Alpha = 6e738d
+
+
$surface2 = rgb(5b6078)
+
$surface2Alpha = 5b6078
+
+
$surface1 = rgb(494d64)
+
$surface1Alpha = 494d64
+
+
$surface0 = rgb(363a4f)
+
$surface0Alpha = 363a4f
+
+
$base = rgb(24273a)
+
$baseAlpha = 24273a
+
+
$mantle = rgb(1e2030)
+
$mantleAlpha = 1e2030
+
+
$crust = rgb(181926)
+
$crustAlpha = 181926
+45
home-manager/dots/sunpaperconfig
···
+
#################################################
+
# BASIC CONFIGURATION
+
#################################################
+
+
# Set your local latitude and longitude for sun calculations
+
# latitude="44.906658N"
+
# longitude="-86.033386W"
+
+
# Set full path to the wallpaper theme folder
+
# Theme folder names:grep
+
#
+
# Blake Watson & Sunpaper: Corporate-Synergy
+
# Apple: The-Beach The-Cliffs The-Lake The-Desert
+
# Louis Coyle: Lakeside
+
#
+
wallpaperPath="$SUNPAPERDIR/share/images/Lakeside"
+
+
#################################################
+
# Animate transitions with SWWW MODE
+
# requires (https://github.com/Horus645/swww)
+
# and Wayland
+
#################################################
+
#
+
# For smooth low memory animated transitions between
+
# images.
+
#
+
# This also resolves the gray flash in Sway whenever changing
+
# wallpaper. (https://github.com/swaywm/sway/issues/3693)
+
#
+
# enable this mode here with
+
# swww_enable="true"
+
swww_enable="true"
+
+
# swww should already be installed and configured.
+
# sunpaper will launch the swww daemon if it's not
+
# already started.
+
+
# swww takes two options for animation control of the
+
# transition between images: frame rate and step (more
+
# info: https://github.com/Horus645/swww/issues/51)
+
#
+
# swww_fps <1 to 255>
+
# swww_step <1 to 255>
+
swww_fps="4"
+
swww_step="1"
+364 -2
home-manager/home.nix
···
# spicetify
inputs.spicetify-nix.homeManagerModules.default
+
+
# catpuccin
+
inputs.catppuccin.homeManagerModules.catppuccin
+
+
# inputs.Hyprnix.homeManagerModules.hyprland
+
+
# ./hyprland.nix
+
./hyprland
+
+
./waybar.nix
+
+
./neovim.nix
];
nixpkgs = {
+
overlays = [
+
inputs.nix-vscode-extensions.overlays.default
+
inputs.catppuccin-vsc.overlays.default
+
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
···
# Enable home-manager and git
programs.home-manager.enable = true;
+
# catppuccin
+
catppuccin = {
+
enable = true;
+
accent = "green";
+
flavor = "macchiato";
+
pointerCursor = {
+
enable = true;
+
accent = "blue";
+
flavor = "macchiato";
+
};
+
};
+
+
dconf.settings = {
+
"org/gnome/desktop/interface" = {
+
color-scheme = "prefer-dark";
+
};
+
};
+
+
xdg.portal = {
+
enable = true;
+
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
+
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
+
};
+
+
gtk = {
+
enable = true;
+
catppuccin = {
+
enable = true;
+
tweaks = [ "normal" ];
+
};
+
};
+
+
+
qt = {
+
style.name = "kvantum";
+
platformTheme.name = "kvantum";
+
enable = true;
+
};
+
+
services.udiskie = {
+
enable = true;
+
settings = {
+
program_options = {
+
udisks_version = 2;
+
tray = false;
+
};
+
notifications = {
+
device_unmounted = false;
+
device_added = -1;
+
device_removed = -1;
+
device_mounted = -1;
+
};
+
};
+
};
+
# git config
programs.git = {
enable = true;
···
aliases = {
c = "commit";
p = "push";
-
pl = "pull";
};
extraConfig = {
commit.gpgsign = true;
gpg.format = "ssh";
gpg.ssh.allowedSignersFile = "~/.ssh/allowedSigners";
user.signingKey = "~/.ssh/id_rsa.pub";
+
pull.rebase = true;
};
};
···
theme = spicePkgs.themes.catppuccin;
colorScheme = "macchiato";
};
-
+
+
programs.starship = {
+
enable = true;
+
enableZshIntegration = true;
+
# Configuration written to ~/.config/starship.toml
+
settings = {
+
add_newline = false;
+
+
# Change command timeout from 500 to 1000 ms
+
command_timeout = 1000;
+
+
format = lib.concatStrings [
+
"\n"
+
"$env_var"
+
"$all$character"
+
];
+
+
character = {
+
success_symbol = "[](bold purple)";
+
error_symbol = "[](bold red)";
+
};
+
+
username = {
+
style_user = "green";
+
style_root = "red";
+
format = "[󱄅 $user]($style) ";
+
disabled = false;
+
show_always = true;
+
};
+
+
hostname = {
+
ssh_only = false;
+
format = "on [$hostname](bold yellow) ";
+
disabled = false;
+
};
+
+
directory = {
+
truncation_length = 1;
+
truncation_symbol = "…/";
+
home_symbol = " ~";
+
read_only_style = "197";
+
read_only = "  ";
+
format = "at [$path]($style)[$read_only]($read_only_style) ";
+
};
+
+
git_branch = {
+
symbol = "󰊢 ";
+
format = "via [$symbol$branch]($style) ";
+
truncation_length = 6;
+
truncation_symbol = "…/";
+
style = "bold green";
+
};
+
+
git_status = {
+
format = "[《$all_status$ahead_behind》]($style) ";
+
style = "bold green";
+
conflicted = " ";
+
up_to_date = " ";
+
untracked = " ";
+
ahead = "⇡$count ";
+
diverged = "⇡$ahead_count⇣$behind_count ";
+
behind = "⇣$count ";
+
stashed = "󱑿 ";
+
modified = " ";
+
staged = "[⟨++$count⟩ ](green)";
+
renamed = "󱅄 ";
+
deleted = " ";
+
};
+
+
docker_context = {
+
symbol = " ";
+
disabled = false;
+
};
+
+
python = {
+
symbol = "󰌠 ";
+
python_binary = "python3";
+
disabled = false;
+
};
+
+
nodejs = {
+
symbol = " ";
+
detect_files = ["package.json" ".node-version" "!bunfig.toml" "!bun.lockb"];
+
disabled = false;
+
};
+
+
bun = {
+
symbol = "󰟈 ";
+
disabled = false;
+
};
+
};
+
};
+
+
programs.zsh = {
+
enable = true;
+
enableCompletion = true;
+
syntaxHighlighting.enable = true;
+
+
shellAliases = {
+
ll = "ls -l";
+
la = "ls -la";
+
update = "sudo nixos-rebuild switch";
+
gc = "git commit";
+
gp = "git push";
+
rr = "rm -Rf";
+
ghrpc = "gh repo create -c";
+
};
+
initExtra = ''
+
#ssh auto reconnect
+
assh() {
+
local host=$1
+
local port=$2
+
while true; do
+
ssh -p $port -o "BatchMode yes" $host || sleep 1
+
done
+
}
+
'';
+
history = {
+
size = 10000;
+
path = "${config.xdg.dataHome}/zsh/history";
+
};
+
+
oh-my-zsh = {
+
enable = true;
+
plugins = [ "git" "sudo" "docker" "git" "command-not-found" "colored-man-pages" ];
+
};
+
+
plugins = [
+
{
+
# will source zsh-autosuggestions.plugin.zsh
+
name = "zsh-autosuggestions";
+
src = pkgs.fetchFromGitHub {
+
owner = "zsh-users";
+
repo = "zsh-autosuggestions";
+
rev = "v0.7.0";
+
sha256 = "sha256-KLUYpUu4DHRumQZ3w59m9aTW6TBKMCXl2UcKi4uMd7w=";
+
};
+
}
+
{
+
# will source zsh-sytax-highlighting
+
name = "zsh-sytax-highlighting";
+
src = pkgs.fetchFromGitHub {
+
owner = "zsh-users";
+
repo = "zsh-syntax-highlighting";
+
rev = "0.8.0";
+
sha256 = "sha256-iJdWopZwHpSyYl5/FQXEW7gl/SrKaYDEtTH9cGP7iPo=";
+
};
+
}
+
];
+
};
+
+
programs.zoxide = {
+
enable = true;
+
enableZshIntegration = true;
+
};
+
+
# alacritty
+
programs.alacritty = {
+
enable = true;
+
settings = {
+
live_config_reload = true;
+
cursor = {
+
unfocused_hollow = true;
+
style = {
+
blinking = "On";
+
};
+
};
+
window = {
+
opacity = 0.75;
+
padding = {
+
x = 12;
+
y = 12;
+
};
+
};
+
font = {
+
size = 13;
+
normal = {
+
family = "JetBrainsMono Nerd Font";
+
};
+
};
+
colors = {
+
primary = {
+
background = lib.mkForce "#1E2128";
+
};
+
};
+
};
+
};
+
+
services.mako = {
+
enable = true;
+
defaultTimeout = 4000;
+
margin = "58,6";
+
font = "Fira Sans 12";
+
borderRadius = 5;
+
};
+
+
programs.tofi = {
+
enable = true;
+
catppuccin.enable = false;
+
settings = {
+
font = "Fira Sans";
+
font-size = 24;
+
+
prompt-text = ''"> "'';
+
placeholder-text = "search for something";
+
hide-cursor = true;
+
+
corner-radius = 10;
+
outline-width = 3;
+
border-width = 0;
+
padding-left = "4%";
+
padding-top = "2%";
+
padding-right = 0;
+
padding-bottom = 0;
+
+
outline-color = "#1E2030";
+
text-color = "#cad3f5";
+
prompt-color = "#ed8796";
+
placeholder-color = "#8087A2";
+
selection-color = "#eed49f";
+
background-color = "#24273a";
+
+
width = "35%";
+
height = "15%";
+
};
+
};
+
+
programs.vscode = {
+
enable = true;
+
extensions = with pkgs.vscode-marketplace; [
+
ms-vscode.live-server
+
formulahendry.auto-rename-tag
+
edwinkofler.vscode-assorted-languages
+
golang.go
+
catppuccin.catppuccin-vsc-icons
+
eamodio.gitlens
+
yzhang.markdown-all-in-one
+
github.vscode-github-actions
+
yoavbls.pretty-ts-errors
+
esbenp.prettier-vscode
+
vsciot-vscode.vscode-arduino
+
ms-vscode.cpptools
+
ms-vscode.vscode-serial-monitor
+
prisma.prisma
+
ms-azuretools.vscode-docker
+
astro-build.astro-vscode
+
github.copilot
+
github.copilot-chat
+
dotjoshjohnson.xml
+
johnpapa.vscode-cloak
+
mikestead.dotenv
+
]
+
++ [(pkgs.catppuccin-vsc.override {
+
accent = "blue";
+
})];
+
+
userSettings = {
+
"editor.semanticHighlighting.enabled" = true;
+
"terminal.integrated.minimumContrastRatio" = 1;
+
"window.titleBarStyle" = "custom";
+
+
"gopls" = {
+
"ui.semanticTokens" = true;
+
};
+
"workbench.colorTheme" = "Catppuccin Macchiato";
+
"workbench.iconTheme" = "catppuccin-macchiato";
+
"catppuccin.accentColor" = "blue";
+
"editor.fontFamily" = "'FiraCode Nerd Font', 'monospace', monospace";
+
"git.autofetch" = true;
+
"git.confirmSync" = false;
+
"github.copilot.editor.enableAutoCompletions" = false;
+
+
"editor.formatOnSave" = true;
+
+
"[json]" = {
+
"editor.defaultFormatter" = "esbenp.prettier-vscode";
+
};
+
"[javascript]" = {
+
"editor.defaultFormatter" = "esbenp.prettier-vscode";
+
};
+
};
+
};
+
+
programs.obs-studio = {
+
enable = true;
+
plugins = with pkgs.obs-studio-plugins; [
+
wlrobs
+
obs-backgroundremoval
+
obs-pipewire-audio-capture
+
];
+
};
+
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
+100
home-manager/hyprland/config.nix
···
+
{ lib, ... }:
+
{
+
wayland.windowManager.hyprland = {
+
# <https://wiki.hyprland.org/Configuring/Variables/#general>
+
config.general = {
+
border_size = 2;
+
gaps_inside = 5;
+
gaps_outside = 10;
+
resize_on_border = true;
+
extend_border_grab_area = 10;
+
};
+
+
# <https://wiki.hyprland.org/Configuring/Variables/#decoration>
+
config.decoration = {
+
rounding = 0;
+
shadow_range = 8;
+
shadow_render_power = 2;
+
blur = {
+
size = 3; # 8
+
passes = 2; # 1
+
ignore_opacity = true; # false
+
xray = true; # false
+
noise = 6.5e-2; # 0.0117
+
contrast = 0.75; # 0.8916
+
brightness = 0.8; # 0.8172
+
};
+
};
+
+
# <https://wiki.hyprland.org/Configuring/Variables/#input>
+
config.input = let
+
DISABLED = 0;
+
LOOSE = 2;
+
in {
+
follow_mouse = LOOSE;
+
float_switch_override_focus = DISABLED;
+
touchpad = {
+
natural_scroll = true;
+
};
+
};
+
+
# <https://wiki.hyprland.org/Configuring/Variables/#binds>
+
config.binds = let LONGEST_SHARED_SIDE = 1;
+
in {
+
pass_mouse_when_bound = false;
+
focus_preferred_method = LONGEST_SHARED_SIDE;
+
};
+
+
config.gestures = {
+
workspace_swipe = {
+
enable = true;
+
invert = false;
+
min_speed_to_force = 20;
+
cancel_ratio = 0.65;
+
create_new = false;
+
forever = true;
+
};
+
};
+
+
# <https://wiki.hyprland.org/Configuring/Variables/#misc>
+
config.misc = let FULLSCREEN_ONLY = 2;
+
in {
+
disable_hyprland_logo = true; # false
+
disable_splash_rendering = true; # false
+
force_default_wallpaper = 0; # disable weeb stuff
+
variable_framerate = true;
+
variable_refresh = FULLSCREEN_ONLY;
+
disable_autoreload = true; # false # nix takes care of that
+
+
# works well with swayidle
+
key_press_enables_dpms = true;
+
mouse_move_enables_dpms = true;
+
};
+
+
config.group = {
+
insert_after_current = true;
+
focus_removed_window = true;
+
+
# These features are not polished yet:
+
# <https://github.com/hyprwm/Hyprland/issues/2415>
+
# @MightyPlaza is working on this, but not doing it how we expect.
+
# <https://github.com/hyprwm/Hyprland/pull/3197>
+
groupbar = rec {
+
font_size = 9;
+
gradients = false;
+
render_titles = true;
+
scrolling = true;
+
};
+
};
+
+
# <https://wiki.hyprland.org/Configuring/Dwindle-Layout/>
+
config.dwindle = let ALWAYS_EAST = 2;
+
in {
+
force_split = ALWAYS_EAST; # 0
+
preserve_split = true; # false
+
# no_gaps_when_only = true;
+
};
+
+
# <https://wiki.hyprland.org/Configuring/Animations/#curves>
+
};
+
}
+28
home-manager/hyprland/default.nix
···
+
{ self, config, lib, pkgs, inputs, ... }: {
+
imports = [
+
inputs.hyprnix.homeManagerModules.hyprland
+
./config.nix
+
./windowrules.nix
+
./keybinds.nix
+
../waybar.nix
+
];
+
+
wayland.windowManager.hyprland = {
+
enable = true;
+
package = pkgs.hyprland;
+
reloadConfig = true;
+
systemdIntegration = true;
+
recommendedEnvironment = true;
+
+
fufexan.enable = true;
+
+
xwayland.enable = true;
+
+
config.exec_once = [
+
# polkit agent, raises to root access with gui
+
"${lib.getExe pkgs.lxqt.lxqt-policykit}"
+
# allow apps with risen perms after agent to connect to local xwayland
+
"${lib.getExe pkgs.xorg.xhost} +local:"
+
];
+
};
+
}
+224
home-manager/hyprland/keybinds.nix
···
+
# Converted with regex from hyprland config
+
# search: ^(\s*)(bind[rwelm]*) = (|\w+), (|\$?\w+), (.+)$ /gm
+
# replace: $1$2."$3, $4" = "$5";
+
+
{ config, pkgs, lib, ... }: {
+
# <https://wiki.hyprland.org/Configuring/Dispatchers/>
+
wayland.windowManager.hyprland.keyBinds = let
+
MOUSE_LMB = "mouse:272";
+
MOUSE_RMB = "mouse:273";
+
# MOUSE_MMB = "mouse:274";
+
MOUSE_EX1 = "mouse:275";
+
MOUSE_EX2 = "mouse:276";
+
+
# Collections of keybinds common across multiple submaps are collected into
+
# groups, which can be merged together granularly.
+
groups = {
+
# Exit the submap and restore normal binds.
+
submapReset = {
+
bind.", escape" = "submap, reset";
+
bind."CTRL, C" = "submap, reset";
+
};
+
+
# Self-explanatory.
+
launchPrograms = {
+
# Launch the program with a shortcut.
+
bind."SUPER, E" = "exec, dolphin";
+
bind."SUPER, Enter" = "exec, foot";
+
};
+
+
# Kill the active window.
+
killWindow = { bind."SUPER, Q" = "killactive,"; };
+
+
# Either window focus or window movement.
+
moveFocusOrWindow = with groups;
+
lib.mkMerge [ moveFocus moveWindow mouseMoveWindow ];
+
+
# Focus on another window, in the specified direction.
+
moveFocus = {
+
bind."SUPER, left" = "movefocus, l";
+
bind."SUPER, right" = "movefocus, r";
+
bind."SUPER, up" = "movefocus, u";
+
bind."SUPER, down" = "movefocus, d";
+
};
+
+
# Swap the active window with another, in the specified direction.
+
moveWindow = {
+
bind."SUPER_SHIFT, left" = "movewindow, l";
+
bind."SUPER_SHIFT, right" = "movewindow, r";
+
bind."SUPER_SHIFT, up" = "movewindow, u";
+
bind."SUPER_SHIFT, down" = "movewindow, d";
+
};
+
+
# Translate the dragged window by mouse movement.
+
mouseMoveWindow = {
+
bindm."SUPER, ${MOUSE_LMB}" = "movewindow";
+
bindm.", ${MOUSE_EX2}" = "movewindow";
+
};
+
+
# Toggle between vertical and horizontal split for
+
# the active window and an adjacent one.
+
toggleSplit = { bind."SUPER, tab" = "togglesplit,"; };
+
+
# Resize a window with the mouse.
+
mouseResizeWindow = {
+
bindm."SUPER, ${MOUSE_RMB}" = "resizewindow";
+
bindm.", ${MOUSE_EX1}" = "resizewindow";
+
};
+
+
# Switch to the next/previous tab in the active group.
+
changeGroupActive = {
+
bind."ALT, tab" = "changegroupactive, f";
+
bind."ALT, grave" = "changegroupactive, b";
+
};
+
+
# Switch to another workspace.
+
switchWorkspace = with groups;
+
lib.mkMerge [ switchWorkspaceAbsolute switchWorkspaceRelative ];
+
+
# Switch to a workspace by absolute identifier.
+
switchWorkspaceAbsolute = {
+
# Switch to a primary workspace by index.
+
bind."SUPER, 1" = "workspace, 1";
+
bind."SUPER, 2" = "workspace, 2";
+
bind."SUPER, 3" = "workspace, 3";
+
bind."SUPER, 4" = "workspace, 4";
+
bind."SUPER, 5" = "workspace, 5";
+
bind."SUPER, 6" = "workspace, 6";
+
bind."SUPER, 7" = "workspace, 7";
+
bind."SUPER, 8" = "workspace, 8";
+
bind."SUPER, 9" = "workspace, 9";
+
bind."SUPER, 0" = "workspace, 10";
+
+
# Switch to an alternate workspace by index.
+
bind."SUPER_ALT, 1" = "workspace, 11";
+
bind."SUPER_ALT, 2" = "workspace, 12";
+
bind."SUPER_ALT, 3" = "workspace, 13";
+
bind."SUPER_ALT, 4" = "workspace, 14";
+
bind."SUPER_ALT, 5" = "workspace, 15";
+
bind."SUPER_ALT, 6" = "workspace, 16";
+
bind."SUPER_ALT, 7" = "workspace, 17";
+
bind."SUPER_ALT, 8" = "workspace, 18";
+
bind."SUPER_ALT, 9" = "workspace, 19";
+
bind."SUPER_ALT, 0" = "workspace, 20";
+
+
# TODO Bind the special workspace to `XF86Favorites`.
+
# TODO Create a bind for "insert after current workspace".
+
};
+
+
# Switch to workspaces relative to the current one.
+
switchWorkspaceRelative = {
+
# Switch to the next/previous used workspace with page keys.
+
bind."SUPER, page_down" = "workspace, m+1";
+
bind."SUPER, page_up" = "workspace, m-1";
+
+
# Switch to the next/previous used workspace
+
# with the right and left square brackets,
+
# while holding super and shift.
+
bind."SUPER, bracketright " = "workspace, m+1";
+
bind."SUPER, bracketleft" = "workspace, m-1";
+
+
# Switch to the next/previous used workspace with the mouse wheel.
+
bind."SUPER, mouse_up" = "workspace, m+1";
+
bind."SUPER, mouse_down" = "workspace, m-1";
+
};
+
+
# Send a window to another workspace.
+
sendWindow = with groups;
+
lib.mkMerge [ sendWindowAbsolute sendWindowRelative ];
+
+
# Send a window to a workspace by absolute identifier.
+
sendWindowAbsolute = {
+
# Move the active window or group to a primary workspace by index.
+
bind."SUPER_SHIFT, 1" = "movetoworkspacesilent, 1";
+
bind."SUPER_SHIFT, 2" = "movetoworkspacesilent, 2";
+
bind."SUPER_SHIFT, 3" = "movetoworkspacesilent, 3";
+
bind."SUPER_SHIFT, 4" = "movetoworkspacesilent, 4";
+
bind."SUPER_SHIFT, 5" = "movetoworkspacesilent, 5";
+
bind."SUPER_SHIFT, 6" = "movetoworkspacesilent, 6";
+
bind."SUPER_SHIFT, 7" = "movetoworkspacesilent, 7";
+
bind."SUPER_SHIFT, 8" = "movetoworkspacesilent, 8";
+
bind."SUPER_SHIFT, 9" = "movetoworkspacesilent, 9";
+
bind."SUPER_SHIFT, 0" = "movetoworkspacesilent, 10";
+
+
# Move the active window or group to an alternate workspace by index.
+
bind."SUPER_ALT_SHIFT, 1" = "movetoworkspacesilent, 11";
+
bind."SUPER_ALT_SHIFT, 2" = "movetoworkspacesilent, 12";
+
bind."SUPER_ALT_SHIFT, 3" = "movetoworkspacesilent, 13";
+
bind."SUPER_ALT_SHIFT, 4" = "movetoworkspacesilent, 14";
+
bind."SUPER_ALT_SHIFT, 5" = "movetoworkspacesilent, 15";
+
bind."SUPER_ALT_SHIFT, 6" = "movetoworkspacesilent, 16";
+
bind."SUPER_ALT_SHIFT, 7" = "movetoworkspacesilent, 17";
+
bind."SUPER_ALT_SHIFT, 8" = "movetoworkspacesilent, 18";
+
bind."SUPER_ALT_SHIFT, 9" = "movetoworkspacesilent, 19";
+
bind."SUPER_ALT_SHIFT, 0" = "movetoworkspacesilent, 20";
+
};
+
+
# Send windows to other workspaces, relative to the current one.
+
sendWindowRelative = {
+
# Move the active window or group to the next/previous
+
# workspace with page keys, while holding super and shift.
+
bind."SUPER_SHIFT, page_down" = "movetoworkspace, r+1";
+
bind."SUPER_SHIFT, page_up" = "movetoworkspace, r-1";
+
+
# Move the active window or group to the next/previous
+
# workspace with the right and left square brackets,
+
# while holding super and shift.
+
bind."SUPER_SHIFT, bracketright" = "movetoworkspace, r+1";
+
bind."SUPER_SHIFT, bracketleft" = "movetoworkspace, r-1";
+
+
# Move the active window or group to the next/previous
+
# workspace with the mouse wheel while holding super and shift.
+
bind."SUPER_SHIFT, mouse_up" = "movetoworkspace, r+1";
+
bind."SUPER_SHIFT, mouse_down" = "movetoworkspace, r-1";
+
};
+
};
+
in lib.mkMerge [
+
### ACTIVE WINDOW ACTIONS ###
+
groups.killWindow
+
{
+
# Toggle full-screen for the active window.
+
bind."SUPER_SHIFT, F" = "fullscreen, 0";
+
+
# Float/unfloat the active window.
+
bind."SUPER, F" = "togglefloating,";
+
}
+
### MISCELLANEOUS ###
+
{
+
# Lock the session immediately.
+
bind."SUPER, l" = "exec, loginctl lock-session";
+
+
# Kill the window manager.
+
bind."SUPER_SHIFT, M" = "exit,";
+
+
# Forcefully kill a program after selecting its window with the mouse.
+
bind."SUPER_SHIFT, Q" = "exec, hyprctl kill";
+
+
# Select a region and take a screenshot, saving to the clipboard.
+
bind."SUPER_SHIFT, print" = "exec, prtsc -c -m r -D -b 00000066";
+
+
# Bypass all binds for the window manager and pass key combinations
+
# directly to the active window.
+
bind."SUPER_SHIFT, K" = "submap, passthru";
+
submap.passthru = { bind."SUPER_SHIFT, K" = "submap, reset"; };
+
}
+
### PROGRAM LAUNCHING ###
+
groups.launchPrograms
+
{
+
# Open Rofi to launch a program.
+
bind."SUPER, Space" = "exec, rofi -show drun -show-icons";
+
# Open Rofi to run a command.
+
bind."SUPER, R" = "exec, rofi -show run";
+
}
+
### WINDOW FOCUS & MOVEMENT ###
+
groups.moveFocusOrWindow
+
### WINDOW RESIZING ###
+
groups.toggleSplit
+
groups.mouseResizeWindow
+
+
### WORKSPACE SWITCHING ###
+
groups.switchWorkspace
+
### WORKSPACE WINDOW MOVEMENT ###
+
groups.sendWindow
+
];
+
}
+132
home-manager/hyprland/windowrules.nix
···
+
# <https://wiki.hyprland.org/Configuring/Window-Rules/#window-rules-v2>
+
{ lib, ... }:
+
let
+
# I recommend using this factory function for creating window rules.
+
rule = rules: attrs: attrs // { inherit rules; };
+
in {
+
wayland.windowManager.hyprland.layerRules = [{
+
namespace = [ "rofi" "notification" ];
+
rules = [ "blur" "ignorezero" ];
+
}];
+
+
wayland.windowManager.hyprland.windowRules = let
+
### SYSTEM CONTROL ###
+
printerConfig.class = [ "system-config-printer" ];
+
audioControl.class = [ "pavucontrol-qt" ];
+
wifiControl.class = [ "org.twosheds.iwgtk" "iwgtk" ];
+
bluetoothControl = {
+
class = [ ".*blueman-manager.*" ];
+
title = [ "Bluetooth Devices" ];
+
};
+
kvantumConfig.class = [ "kvantummanager" ];
+
+
### SYSTEM MODALS ###
+
filePickerPortal = {
+
# I'm guessing that almost all portal interfaces are going to be modals
+
class =
+
[ "xdg-desktop-portal-gtk" "org.freedesktop.impl.portal.desktop.kde" ];
+
# title = ["Open Files.+Portal"];
+
};
+
polkitAgent.class = [ "lxqt-policykit-agent" ];
+
mountDialog.class = [ "udiskie" ];
+
+
### DESKTOP APPLICATIONS ###
+
vscode = {
+
title = [ ".*Visual Studio Code" ];
+
# class = ["code-url-handler"];
+
};
+
discord = {
+
class = [ "vesktop" "ArmCord" "WebCord" "discord" ];
+
title = [
+
"(\\[\\d+\\] )?Discord |.*"
+
".*ArmCord"
+
"(\\[\\d+\\] )?WebCord.*"
+
".*Discord"
+
];
+
};
+
tidal.class = [ "tidal-hifi" ];
+
calculator.class = [ "qalculate-gtk" ];
+
# obsStudio = {
+
# class = [ "com.obsproject.Studio" ];
+
# title = [ "OBS\\s[\\d\\.]+.*" ];
+
# };
+
steam = {
+
class = [ "Steam" ];
+
# title = ["Steam"];
+
};
+
minecraft = {
+
class = [ "Minecraft.+" ];
+
title = [ "Minecraft.+" ];
+
};
+
virtManagerConsole = {
+
class = [ "virt-manager" ];
+
title = [ ".+on.+" ];
+
};
+
+
### DESKTOP APPLICATION MODALS ###
+
discordModal = {
+
class = [ "WebCord" ];
+
title = [ "WebCord.+Settings" ];
+
};
+
tidalModal = {
+
class = [ "tidal-hifi" ];
+
title = [ "Tidal Hi-Fi settings" ];
+
};
+
keePassModal = {
+
class = [ "org.keepassxc.KeePassXC" ];
+
title = [
+
"Unlock Database.+KeePassXC"
+
"Generate Password"
+
"KeePassXC.+Browser Access Request"
+
];
+
};
+
firefoxModal = {
+
class = [ "firefox" ];
+
title = [ "Extension.+Mozilla Firefox.*" "Picture-in-Picture" ];
+
};
+
lxImageModal = {
+
class = [ "lximage-qt" ];
+
title = [ "Print" ];
+
};
+
fileZillaModal = {
+
class = [ "filezilla" ];
+
title = [ "Site Manager" ];
+
};
+
in lib.concatLists [
+
[
+
(rule [ "size 740 460" ] filePickerPortal)
+
(rule [ "size 950 700" ] kvantumConfig)
+
]
+
# Because it can be shown and hidden with a systray icon.
+
(map (rule [ "float" "pin" "move 10% 10%" "size 80% 80%" ]) [ tidal ])
+
#
+
(map (rule [ "idleinhibit focus" ]) [ minecraft virtManagerConsole ])
+
(map (rule [ "float" ]) [
+
kvantumConfig
+
keePassModal
+
lxImageModal
+
firefoxModal
+
fileZillaModal
+
discordModal
+
tidalModal
+
])
+
# Barely translucent
+
(map (rule [ "opacity 0.97 0.97" ]) [ ])
+
(map (rule [ "opacity 0.97 0.97" "float" ]) [
+
printerConfig
+
audioControl
+
bluetoothControl
+
polkitAgent
+
mountDialog
+
])
+
# More translucent
+
(map (rule [ "opacity 0.92 0.92" ]) [ vscode steam tidal discord ])
+
(map (rule [ "opacity 0.92 0.92" "float" ]) [
+
filePickerPortal
+
wifiControl
+
])
+
# Super translucent
+
(map (rule [ "opacity 0.87 0.87" ]) [ ])
+
(map (rule [ "opacity 0.87 0.87" "float" ]) [ calculator ])
+
];
+
}
+47
home-manager/hyprland.nix
···
+
{
+
inputs,
+
lib,
+
config,
+
pkgs,
+
...
+
}: {
+
xdg.configFile."sunpaper/config".source = ./dots/sunpaperconfig;
+
xdg.configFile."hypr/hyprland.conf".source = ./dots/hyprland.conf;
+
xdg.configFile."hypr/hyprlock.conf".source = ./dots/hyprlock.conf;
+
xdg.configFile."hypr/macchiato.conf".source = ./dots/macchiato.conf;
+
xdg.configFile."face.png".source = ./dots/face.png;
+
+
programs.hyprlock.enable = true;
+
services.hypridle = {
+
enable = true;
+
settings= {
+
general = {
+
after_sleep_cmd = "hyprctl dispatch dpms on";
+
before_sleep_cmd = "hyprlock";
+
ignore_dbus_inhibit = false;
+
lock_cmd = "pidof hyprlock || hyprlock";
+
};
+
+
listener = [
+
{
+
timeout = 30;
+
on-timeout = "kill $(pidof wluma); brightnessctl -s set 10";
+
on-resume = "brightnessctl -r; wluma &";
+
}
+
{
+
timeout = 45;
+
on-timeout = "loginctl lock-session";
+
}
+
{
+
timeout = 90;
+
on-timeout = "hyprctl dispatch dpms off";
+
on-resume = "hyprctl dispatch dpms on";
+
}
+
{
+
timeout = 150;
+
on-timeout = "systemctl suspend";
+
}
+
];
+
};
+
};
+
}
+126
home-manager/neovim.nix
···
+
{ config, lib, pkgs, ... }:
+
+
{
+
programs.neovim = {
+
enable = true;
+
extraPackages = with pkgs; [
+
# LazyVim
+
lua-language-server
+
gopls
+
stylua
+
# Telescope
+
ripgrep
+
];
+
+
plugins = with pkgs.vimPlugins; [
+
lazy-nvim
+
];
+
+
defaultEditor = true;
+
viAlias = true;
+
vimAlias = true;
+
+
extraLuaConfig =
+
let
+
plugins = with pkgs.vimPlugins; [
+
# LazyVim
+
LazyVim
+
bufferline-nvim
+
cmp-buffer
+
cmp-nvim-lsp
+
cmp-path
+
cmp_luasnip
+
conform-nvim
+
dashboard-nvim
+
dressing-nvim
+
flash-nvim
+
friendly-snippets
+
gitsigns-nvim
+
indent-blankline-nvim
+
lualine-nvim
+
neo-tree-nvim
+
neoconf-nvim
+
neodev-nvim
+
noice-nvim
+
nui-nvim
+
nvim-cmp
+
nvim-lint
+
nvim-lspconfig
+
nvim-notify
+
nvim-spectre
+
nvim-treesitter
+
nvim-treesitter-context
+
nvim-treesitter-textobjects
+
nvim-ts-autotag
+
nvim-ts-context-commentstring
+
nvim-web-devicons
+
persistence-nvim
+
plenary-nvim
+
telescope-fzf-native-nvim
+
telescope-nvim
+
todo-comments-nvim
+
tokyonight-nvim
+
trouble-nvim
+
vim-illuminate
+
vim-startuptime
+
which-key-nvim
+
{ name = "LuaSnip"; path = luasnip; }
+
{ name = "catppuccin"; path = catppuccin-nvim; }
+
{ name = "mini.ai"; path = mini-nvim; }
+
{ name = "mini.bufremove"; path = mini-nvim; }
+
{ name = "mini.comment"; path = mini-nvim; }
+
{ name = "mini.indentscope"; path = mini-nvim; }
+
{ name = "mini.pairs"; path = mini-nvim; }
+
{ name = "mini.surround"; path = mini-nvim; }
+
];
+
mkEntryFromDrv = drv:
+
if lib.isDerivation drv then
+
{ name = "${lib.getName drv}"; path = drv; }
+
else
+
drv;
+
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
+
in
+
''
+
require("lazy").setup({
+
defaults = {
+
lazy = true,
+
},
+
dev = {
+
-- reuse files from pkgs.vimPlugins.*
+
path = "${lazyPath}",
+
patterns = { "." },
+
-- fallback to download
+
fallback = true,
+
},
+
spec = {
+
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
+
-- The following configs are needed for fixing lazyvim on nix
+
-- force enable telescope-fzf-native.nvim
+
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
+
-- disable mason.nvim, use programs.neovim.extraPackages
+
{ "williamboman/mason-lspconfig.nvim", enabled = false },
+
{ "williamboman/mason.nvim", enabled = false },
+
-- import/override with your plugins
+
{ import = "plugins" },
+
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
+
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
+
},
+
})
+
'';
+
};
+
+
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
+
xdg.configFile."nvim/parser".source =
+
let
+
parsers = pkgs.symlinkJoin {
+
name = "treesitter-parsers";
+
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [
+
c
+
lua
+
])).dependencies;
+
};
+
in
+
"${parsers}/parser";
+
+
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
+
}
+481
home-manager/waybar.nix
···
+
{
+
outputs,
+
config,
+
lib,
+
pkgs,
+
inputs,
+
...
+
}: let
+
commonDeps = with pkgs; [coreutils gnugrep systemd];
+
# Function to simplify making waybar outputs
+
mkScript = {
+
name ? "script",
+
deps ? [],
+
script ? "",
+
}:
+
lib.getExe (pkgs.writeShellApplication {
+
inherit name;
+
text = script;
+
runtimeInputs = commonDeps ++ deps;
+
});
+
# Specialized for JSON outputs
+
mkScriptJson = {
+
name ? "script",
+
deps ? [],
+
pre ? "",
+
text ? "",
+
tooltip ? "",
+
alt ? "",
+
class ? "",
+
percentage ? "",
+
}:
+
mkScript {
+
inherit name;
+
deps = [pkgs.jq] ++ deps;
+
script = ''
+
${pre}
+
jq -cn \
+
--arg text "${text}" \
+
--arg tooltip "${tooltip}" \
+
--arg alt "${alt}" \
+
--arg class "${class}" \
+
--arg percentage "${percentage}" \
+
'{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}'
+
'';
+
};
+
+
hyprlandCfg = config.wayland.windowManager.hyprland;
+
in {
+
# Let it try to start a few more times
+
systemd.user.services.waybar = {
+
Unit.StartLimitBurst = 30;
+
};
+
programs.waybar = {
+
enable = true;
+
package = pkgs.waybar.overrideAttrs (oa: {
+
mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"];
+
});
+
systemd.enable = true;
+
settings = {
+
primary = {
+
exclusive = false;
+
passthrough = false;
+
height = 46;
+
margin = "6";
+
position = "top";
+
modules-left =
+
[
+
"custom/menu"
+
"custom/currentplayer"
+
"custom/player"
+
"hyprland/workspaces"
+
"hyprland/submap"
+
];
+
+
modules-center = [
+
"cpu"
+
"memory"
+
"disk"
+
"clock"
+
"pulseaudio"
+
"battery"
+
"idle_inhibitor"
+
# "custom/unread-mail"
+
];
+
+
modules-right = [
+
# "custom/gammastep" TODO: currently broken for some reason
+
"network"
+
"bluetooth"
+
"tray"
+
"privacy"
+
"custom/webcam"
+
"custom/hostname"
+
];
+
+
clock = {
+
interval = 1;
+
format = "{:%d/%m %H:%M:%S}";
+
format-alt = "{:%Y-%m-%d %H:%M:%S %z}";
+
on-click-left = "mode";
+
tooltip-format = ''
+
<big>{:%Y %B}</big>
+
<tt><small>{calendar}</small></tt>'';
+
};
+
+
cpu = {
+
format = " {usage}%";
+
};
+
+
memory = {
+
format = " {}%";
+
interval = 5;
+
};
+
+
disk = {
+
interval = 5;
+
unit = "GB";
+
format = "󰋊 {percentage_used}%";
+
};
+
+
pulseaudio = {
+
format = "{icon} {volume}%";
+
format-muted = " 0%";
+
format-icons = {
+
headphone = "󰋋 ";
+
headset = "󰋎 ";
+
portable = " ";
+
default = [
+
" "
+
" "
+
" "
+
];
+
};
+
on-click = lib.getExe pkgs.pavucontrol;
+
};
+
+
idle_inhibitor = {
+
format = "{icon}";
+
format-icons = {
+
activated = "󰅶 ";
+
deactivated = "󰾫 ";
+
};
+
tooltip-format-activated =
+
"Caffinated! device will not sleep.";
+
tooltip-format-deactivated =
+
"no caffeine :( device will sleep when not in use.";
+
};
+
+
battery = {
+
interval = 5;
+
bat = "BAT1";
+
# full-at = 94;
+
format = "{icon} {capacity}%";
+
format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
+
states = {
+
battery-10 = 10;
+
battery-20 = 20;
+
battery-30 = 30;
+
battery-40 = 40;
+
battery-50 = 50;
+
battery-60 = 60;
+
battery-70 = 70;
+
battery-80 = 80;
+
battery-90 = 90;
+
battery-100 = 100;
+
};
+
# <https://github.com/Alexays/Waybar/issues/1938>
+
# the wiki lies about this, does not match
+
# /sys/class/power_supply/BAT0/status
+
format-plugged = "󰚥 AC";
+
format-charging-battery-10 = "󰢜 {capacity}%";
+
format-charging-battery-20 = "󰂆 {capacity}%";
+
format-charging-battery-30 = "󰂇 {capacity}%";
+
format-charging-battery-40 = "󰂈 {capacity}%";
+
format-charging-battery-50 = "󰢝 {capacity}%";
+
format-charging-battery-60 = "󰂉 {capacity}%";
+
format-charging-battery-70 = "󰢞 {capacity}%";
+
format-charging-battery-80 = "󰂊 {capacity}%";
+
format-charging-battery-90 = "󰂋 {capacity}%";
+
format-charging-battery-100 = "󰂅 {capacity}%";
+
};
+
+
"hyprland/workspaces" = {
+
format = "{icon} {windows}";
+
window-rewrite-default = " ";
+
window-rewrite-seperator = "";
+
window-rewrite = {
+
"title<.*github.*>" = "󰊤";
+
"title<.*youtube.*>" = "";
+
"title<*Gmail*>" = "󰊫";
+
"class<firefox>" = "";
+
"class<com.obsproject.Studio>" = "";
+
"title<OBS*>" = "";
+
"alacritty" = "";
+
"code" = "󰨞";
+
"slack" = "󰒱";
+
"initialtitle<Spotify*>" = "󰓇";
+
"class<org.gnome.Nautilus>" = "󰉓";
+
"class<kicad>" = "";
+
};
+
};
+
+
network = {
+
interval = 3;
+
format-wifi = "{icon} {essid}";
+
format-icons = [ "󰤟" "󰤢" "󰤥" "󰤨" ];
+
format-ethernet = "󰈁 Connected";
+
format-disconnected = "󱐤 ";
+
tooltip-format = ''
+
{ifname}
+
{ipaddr}/{cidr}
+
Up: {bandwidthUpBits}
+
Down: {bandwidthDownBits}'';
+
on-click = mkScript {
+
deps = [pkgs.wpa_supplicant pkgs.notify-desktop];
+
script = ''wpa_cli reconnect; notify-desktop "reconnecting to wifi" -t 1200'';
+
};
+
};
+
+
bluetooth = {
+
format-on = "󰂯";
+
format-off = "󰂲";
+
format-disabled = "󰂲";
+
format-connected = "󰂱 {num_connections}";
+
format-connected-battery = "󰂱 {device_alias} ({device_battery_percentage}%) ({num_connections})";
+
on-click = "overskride";
+
};
+
+
"custom/menu" = {
+
interval = 1;
+
return-type = "json";
+
exec = mkScriptJson {
+
deps = lib.optional hyprlandCfg.enable hyprlandCfg.package;
+
text = " ";
+
tooltip = ''$(grep PRETTY_NAME /etc/os-release | cut -d '"' -f2)'';
+
class = let
+
isFullScreen =
+
if hyprlandCfg.enable
+
then "hyprctl activewindow -j | jq -e '.fullscreen' &>/dev/null"
+
else "false";
+
in "$(if ${isFullScreen}; then echo fullscreen; fi)";
+
};
+
};
+
+
"custom/hostname" = {
+
exec = mkScript {script = ''echo "$USER@$HOSTNAME"'';};
+
on-click = mkScript {script = "systemctl --user restart waybar";};
+
};
+
+
"custom/unread-mail" = {
+
interval = 5;
+
return-type = "json";
+
exec = mkScriptJson {
+
deps = [pkgs.findutils pkgs.procps];
+
pre = ''
+
count=$(find ~/Mail/*/Inbox/new -type f | wc -l)
+
if pgrep mbsync &>/dev/null; then
+
status="syncing"
+
else
+
if [ "$count" == "0" ]; then
+
status="read"
+
else
+
status="unread"
+
fi
+
fi
+
'';
+
text = "$count";
+
alt = "$status";
+
};
+
format = "{icon} ({})";
+
format-icons = {
+
"read" = "󰇯";
+
"unread" = "󰇮";
+
"syncing" = "󰁪";
+
};
+
};
+
+
"custom/currentplayer" = {
+
interval = 2;
+
return-type = "json";
+
exec = mkScriptJson {
+
deps = [pkgs.playerctl];
+
pre = ''
+
player="$(playerctl status -f "{{playerName}}" 2>/dev/null || echo "No player active" | cut -d '.' -f1)"
+
count="$(playerctl -l 2>/dev/null | wc -l)"
+
if ((count > 1)); then
+
more=" +$((count - 1))"
+
else
+
more=""
+
fi
+
'';
+
alt = "$player";
+
tooltip = "$player ($count available)";
+
text = "$more";
+
};
+
format = "{icon}{}";
+
format-icons = {
+
"No player active" = " ";
+
"Celluloid" = "󰎁 ";
+
"spotify" = "󰓇 ";
+
"ncspot" = "󰓇 ";
+
"qutebrowser" = "󰖟 ";
+
"firefox" = " ";
+
"discord" = " 󰙯 ";
+
"sublimemusic" = " ";
+
"kdeconnect" = "󰄡 ";
+
"chromium" = " ";
+
};
+
};
+
+
privacy = {
+
"icon-spacing" = 0;
+
"icon-size" = 18;
+
"transition-duration" = 250;
+
modules = [
+
{
+
type = "screenshare";
+
tooltip = true;
+
"tooltip-icon-size" = 24;
+
}
+
{
+
type = "audio-out";
+
tooltip = true;
+
"tooltip-icon-size" = 24;
+
}
+
{
+
type = "audio-in";
+
tooltip = true;
+
"tooltip-icon-size" = 24;
+
}
+
];
+
};
+
+
"custom/webcam" = {
+
return-type = "json";
+
interval = 2;
+
exec = mkScript {
+
deps = [pkgs.jq pkgs.psmisc];
+
script = ''
+
# get programs using the video0 endpoint
+
ps -eo user,pid,cmd -q "$(fuser /dev/video0 2>/dev/null | xargs)" |\
+
# omit the column headings and the first line which is wireplumber
+
sed -n "1,2!p" |\
+
# just get the pid and program columns
+
awk '{print $2 " " $3}' |\
+
# filter out the program path
+
awk -F "/" '{print "{\"tooltip\": \"" $1 " " $NF "\"}"}' |\
+
jq -s 'if length > 0 then {text: "󰄀 ", tooltip: (map(.tooltip) | join("\r"))} else {text: "", tooltip: ""} end' |\
+
jq --unbuffered --compact-output
+
'';
+
};
+
};
+
+
"custom/player" = {
+
exec-if = mkScript {
+
deps = [pkgs.playerctl];
+
script = "playerctl status 2>/dev/null";
+
};
+
exec = let
+
format = ''{"text": "{{title}} - {{artist}}", "alt": "{{status}}", "tooltip": "{{title}} - {{artist}} ({{album}})"}'';
+
in
+
mkScript {
+
deps = [pkgs.playerctl];
+
script = "playerctl metadata --format '${format}' 2>/dev/null";
+
};
+
return-type = "json";
+
interval = 2;
+
max-length = 30;
+
format = "{icon} {}";
+
format-icons = {
+
"Playing" = "󰐊";
+
"Paused" = "󰏤 ";
+
"Stopped" = "󰓛";
+
};
+
on-click = mkScript {
+
deps = [pkgs.playerctl];
+
script = "playerctl play-pause";
+
};
+
};
+
};
+
};
+
# Cheatsheet:
+
# x -> all sides
+
# x y -> vertical, horizontal
+
# x y z -> top, horizontal, bottom
+
# w x y z -> top, right, bottom, left
+
style = let
+
inherit (inputs.nix-colors.lib.conversions) hexToRGBString;
+
inherit (config.colorscheme) colors;
+
toRGBA = color: opacity: "rgba(${hexToRGBString "," (lib.removePrefix "#" color)},${opacity})";
+
in
+
/*
+
css
+
*/
+
''
+
* {
+
font-family: Fira Sans, FiraCode Nerd Font;
+
font-size: 12pt;
+
padding: 0;
+
margin: 0 0.4em;
+
}
+
+
window#waybar {
+
padding: 0;
+
border-radius: 0.5em;
+
background-color: shade(@surface0, 0.7);
+
color: @surface2
+
}
+
.modules-left {
+
margin-left: -0.65em;
+
}
+
.modules-right {
+
margin-right: -0.65em;
+
}
+
+
#workspaces button {
+
background-color: @surface0;
+
color: @surface2;
+
padding-left: 0.2em;
+
padding-right: 0.2em;
+
margin-left: 0.25em;
+
margin-right: 0.25em;
+
margin-top: 0.4em;
+
margin-bottom: 0.4em;
+
}
+
#workspaces button.hidden {
+
background-color: @surface0;
+
color: @surface2;
+
}
+
#workspaces button.focused,
+
#workspaces button.active {
+
background-color: shade(@blue, 0.7);
+
color: @green;
+
}
+
+
#workspaces button:hover {
+
background-color: @surface3;
+
color: @surface1;
+
}
+
+
#privacy-item {
+
margin-left: 0.1em;
+
margin-right: 0.1em;
+
}
+
+
#clock {
+
padding-right: 1em;
+
padding-left: 1em;
+
border-radius: 0.5em;
+
}
+
+
#custom-menu {
+
background-color: @surface3;
+
color: @blue;
+
padding-right: 1.5em;
+
padding-left: 1em;
+
margin-right: 0;
+
border-radius: 0.5em;
+
}
+
#custom-menu.fullscreen {
+
background-color: @blue;
+
color: @green;
+
}
+
#custom-hostname {
+
background-color: @surface3;
+
color: @blue;
+
padding-right: 1em;
+
padding-left: 1em;
+
margin-left: 0;
+
border-radius: 0.5em;
+
}
+
#custom-currentplayer {
+
padding-right: 0;
+
}
+
#custom-gpu, #cpu, #memory {
+
margin-left: 0.05em;
+
margin-right: 0.55em;
+
}
+
'';
+
};
+
}
+112 -16
moonlark/configuration.nix
···
lib,
config,
pkgs,
+
pkgs-unstable,
...
}: {
# You can import other NixOS modules here
···
./disk-config.nix
# hpyrland config
-
#./hyprland
+
# ./hyprland
+
+
./pam.nix
+
+
# tuigreet
+
./greetd.nix
];
nixpkgs = {
···
environment.systemPackages = map lib.lowPrio [
pkgs.curl
+
pkgs.wget
+
pkgs.dogdns
inputs.agenix.packages.x86_64-linux.default
pkgs.wpa_supplicant_gui
+
pkgs.overskride
pkgs.alacritty
pkgs.zsh
+
pkgs.starship
+
pkgs.gh
pkgs.swww
pkgs.sunwait
+
pkgs.sunpaper
pkgs.wluma
pkgs.brightnessctl
+
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
+
pkgs.mako
+
pkgs.hyprpicker
+
pkgs.notify-desktop
+
pkgs.bc
+
pkgs.wl-clipboard
+
pkgs.psmisc
+
pkgs.jq
pkgs.playerctl
pkgs.firefox
pkgs.slack
pkgs.gnome.nautilus
+
pkgs.gnome.totem
+
pkgs.loupe
+
pkgs.gnome.simple-scan
pkgs.gnome.file-roller
+
pkgs.polkit_gnome
pkgs.fprintd
pkgs.gitMinimal
-
(pkgs.vscode-with-extensions.override {
-
vscodeExtensions = with pkgs.vscode-extensions; [
-
bbenoist.nix
-
];
-
})
pkgs.github-desktop
+
pkgs.udiskie
+
pkgs.neofetch
+
pkgs.cava
+
pkgs.go
+
pkgs.unstable.bun
+
pkgs.pitivi
+
pkgs.unstable.arduino-ide
+
pkgs.unstable.arduino-cli
+
pkgs.lazygit
+
pkgs.vhs
+
pkgs.lightworks
+
pkgs.ffmpeg
+
pkgs.ngrok
+
pkgs.openssl
+
pkgs.unstable.nodePackages_latest.prisma
+
pkgs.nodejs_22
+
pkgs.invoice
+
pkgs.pop
+
pkgs.gum
+
pkgs.unstable.netlify-cli
+
pkgs.unstable.kicad
];
-
services.fprintd.enable = true;
+
services.gnome.gnome-keyring.enable = true;
+
programs.dconf.enable = true;
+
+
systemd = {
+
user.services.polkit-gnome-authentication-agent-1 = {
+
description = "polkit-gnome-authentication-agent-1";
+
wantedBy = [ "graphical-session.target" ];
+
wants = [ "graphical-session.target" ];
+
after = [ "graphical-session.target" ];
+
serviceConfig = {
+
Type = "simple";
+
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
+
Restart = "on-failure";
+
RestartSec = 1;
+
TimeoutStopSec = 10;
+
};
+
};
+
};
fonts.packages = with pkgs; [
nerdfonts
+
fira
];
-
programs.hyprland.enable = true;
+
# import the secret
+
age.identityPaths = [ "/home/kierank/.ssh/id_rsa" "/etc/ssh/id_rsa" "/mnt/etc/ssh/id_rsa" ];
+
age.secrets = {
+
wifi = {
+
file = ../secrets/wifi.age;
+
owner = "kierank";
+
};
+
resend = {
+
file = ../secrets/resend.age;
+
owner = "kierank";
+
};
+
};
environment.sessionVariables = {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
+
SUNPAPERDIR = "${lib.getExe pkgs.sunpaper}";
XDG_STATE_HOME = "$HOME/.local/state";
NIXOS_OZONE_WL = "1";
-
};
-
-
# import the secret
-
age.identityPaths = [ "/home/kierank/.ssh/id_rsa" "/etc/ssh/id_rsa" "/mnt/etc/ssh/id_rsa" ];
-
age.secrets.wifi = {
-
file = ../secrets/wifi.age;
-
owner = "kierank";
+
PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";
+
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
+
PRISMA_SCHEMA_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/schema-engine";
+
RESEND_API_KEY = ''$(${pkgs.coreutils}/bin/cat ${config.age.secrets.resend.path})'';
+
POP_FROM = "me@dunkirk.sh";
};
# setup the network
···
};
};
};
+
+
programs.zsh.enable = true;
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed.
users.users = {
kierank = {
···
# Be sure to change it (using passwd) after rebooting!
initialPassword = "lolzthisaintsecure!";
isNormalUser = true;
+
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzEEjvbL/ttqmYoDjxYQmDIq36BabROJoXgQKeh9liBxApwp+2PmgxROzTg42UrRc9pyrkq5kVfxG5hvkqCinhL1fMiowCSEs2L2/Cwi40g5ZU+QwdcwI8a4969kkI46PyB19RHkxg54OUORiIiso/WHGmqQsP+5wbV0+4riSnxwn/JXN4pmnE//stnyAyoiEZkPvBtwJjKb3Ni9n3eNLNs6gnaXrCtaygEZdebikr9kS2g9mM696HvIFgM6cdR/wZ7DcLbG3IdTXuHN7PC3xxL+Y4ek5iMreQIPmuvs4qslbthPGYoYbYLUQiRa9XO5s/ksIj5Z14f7anHE6cuTQVpvNWdGDOigyIVS5qU+4ZF7j+rifzOXVL48gmcAvw/uV68m5Wl/p0qsC/d8vI3GYwEsWG/EzpAlc07l8BU2LxWgN+d7uwBFaJV9VtmUDs5dcslsh8IbzmtC9gq3OLGjklxTfIl6qPiL8U33oc/UwqzvZUrI2BlbagvIZYy6rP+q0= kierank@mockingjay"
];
-
extraGroups = ["wheel" "networkmanager" "audio" "video" "docker" "plugdev"];
+
extraGroups = ["wheel" "networkmanager" "audio" "video" "docker" "plugdev" "input"];
};
root.openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzEEjvbL/ttqmYoDjxYQmDIq36BabROJoXgQKeh9liBxApwp+2PmgxROzTg42UrRc9pyrkq5kVfxG5hvkqCinhL1fMiowCSEs2L2/Cwi40g5ZU+QwdcwI8a4969kkI46PyB19RHkxg54OUORiIiso/WHGmqQsP+5wbV0+4riSnxwn/JXN4pmnE//stnyAyoiEZkPvBtwJjKb3Ni9n3eNLNs6gnaXrCtaygEZdebikr9kS2g9mM696HvIFgM6cdR/wZ7DcLbG3IdTXuHN7PC3xxL+Y4ek5iMreQIPmuvs4qslbthPGYoYbYLUQiRa9XO5s/ksIj5Z14f7anHE6cuTQVpvNWdGDOigyIVS5qU+4ZF7j+rifzOXVL48gmcAvw/uV68m5Wl/p0qsC/d8vI3GYwEsWG/EzpAlc07l8BU2LxWgN+d7uwBFaJV9VtmUDs5dcslsh8IbzmtC9gq3OLGjklxTfIl6qPiL8U33oc/UwqzvZUrI2BlbagvIZYy6rP+q0= kierank@mockingjay"
···
};
programs.hyprland.enable = true;
+
services.hypridle.enable = true;
# enable cups
services.printing.enable = true;
+
services.avahi = {
+
enable = true;
+
nssmdns4 = true;
+
openFirewall = true;
+
};
+
# enable bluetooth
hardware.bluetooth.enable = true;
···
};
};
+
networking.firewall = {
+
enable = true;
+
allowedTCPPorts = [ 4455 ];
+
allowedUDPPorts = [ 4455 ];
+
};
+
+
+
services.devmon.enable = true;
+
services.gvfs.enable = true;
+
services.udisks2.enable = true;
+
+
services.logind.extraConfig = ''
+
# don't shutdown when power button is short-pressed
+
HandlePowerKey=ignore
+
HandlePowerKeyLongPress=poweroff
+
'';
+
# Requires at least 5.16 for working wi-fi and bluetooth.
# https://community.frame.work/t/using-the-ax210-with-linux-on-the-framework-laptop/1844/89
boot = {
···
efiSupport = true;
efiInstallAsRemovable = true;
};
+
supportedFilesystems = [ "ntfs" ];
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
+36
moonlark/greetd.nix
···
+
{ pkgs, ... }:
+
let
+
tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet";
+
in
+
{
+
services.greetd = {
+
enable = true;
+
settings = {
+
default_session = {
+
command = "${tuigreet} --time -g 'WARNING: UNAUTHORIZED ACCESS WILL RESULT IN TERMINATION OF SESSION. IDENTIFY YOURSELF' --remember --cmd Hyprland";
+
user = "greeter";
+
};
+
};
+
};
+
+
# this is a life saver.
+
# literally no documentation about this anywhere.
+
# might be good to write about this...
+
# https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/
+
systemd.services.greetd.serviceConfig = {
+
Type = "idle";
+
StandardInput = "tty";
+
StandardOutput = "tty";
+
StandardError = "journal"; # Without this errors will spam on screen
+
# Without these bootlogs will spam on screen
+
TTYReset = true;
+
TTYVHangup = true;
+
TTYVTDisallocate = true;
+
};
+
+
#environment.etc."greetd/environments".text = ''
+
# Hyprland
+
# fish
+
# bash
+
#'';
+
}
-158
moonlark/hyprland/config.nix
···
-
{ lib, ... }:
-
let
-
inherit (lib.birdos.colors) grayRGB;
-
hyprRGBA = rgb: a: "rgba(${lib.birdos.colors.hexRGBA rgb a})";
-
gb = (lib.birdos.colors.formats.custom hyprRGBA).gruvbox.dark;
-
shadow = hyprRGBA (grayRGB 6.0e-2); # 6% of each channel
-
in {
-
wayland.windowManager.hyprland = {
-
# <https://wiki.hyprland.org/Configuring/Variables/#general>
-
config.general = {
-
border_size = 2;
-
gaps_inside = 5;
-
gaps_outside = 10;
-
active_border_color = gb.fg3 1.0;
-
inactive_border_color = gb.bg3 1.0;
-
cursor_inactive_timeout = 10;
-
no_cursor_warps = true;
-
resize_on_border = true;
-
extend_border_grab_area = 10;
-
};
-
-
# <https://wiki.hyprland.org/Configuring/Variables/#decoration>
-
config.decoration = {
-
rounding = 0;
-
shadow_range = 8;
-
shadow_render_power = 2;
-
active_shadow_color = shadow 0.9;
-
inactive_shadow_color = shadow 0.6;
-
blur = {
-
size = 3; # 8
-
passes = 2; # 1
-
ignore_opacity = true; # false
-
xray = true; # false
-
noise = 6.5e-2; # 0.0117
-
contrast = 0.75; # 0.8916
-
brightness = 0.8; # 0.8172
-
};
-
};
-
-
# <https://wiki.hyprland.org/Configuring/Variables/#input>
-
config.input = let
-
DISABLED = 0;
-
LOOSE = 2;
-
in {
-
follow_mouse = LOOSE;
-
float_switch_override_focus = DISABLED;
-
};
-
-
# <https://wiki.hyprland.org/Configuring/Variables/#binds>
-
config.binds = let LONGEST_SHARED_SIDE = 1;
-
in {
-
pass_mouse_when_bound = false;
-
focus_preferred_method = LONGEST_SHARED_SIDE;
-
};
-
-
config.gestures = {
-
workspace_swipe = {
-
enable = true;
-
invert = false;
-
min_speed_to_force = 20;
-
cancel_ratio = 0.65;
-
create_new = false;
-
forever = true;
-
};
-
};
-
-
# <https://wiki.hyprland.org/Configuring/Variables/#misc>
-
config.misc = let FULLSCREEN_ONLY = 2;
-
in {
-
disable_hyprland_logo = true; # false
-
disable_splash_rendering = true; # false
-
force_default_wallpaper = 0; # disable weeb stuff
-
variable_framerate = true;
-
variable_refresh = FULLSCREEN_ONLY;
-
disable_autoreload = true; # false # nix takes care of that
-
-
# works well with swayidle
-
key_press_enables_dpms = true;
-
mouse_move_enables_dpms = true;
-
};
-
-
config.group = {
-
insert_after_current = true;
-
focus_removed_window = true;
-
-
active_border_color = gb.hl_yellow 1.0;
-
inactive_border_color = gb.bg3 1.0;
-
locked_active_border_color = gb.hl_blue 1.0;
-
locked_inactive_border_color = gb.bg3 1.0;
-
-
# These features are not polished yet:
-
# <https://github.com/hyprwm/Hyprland/issues/2415>
-
# @MightyPlaza is working on this, but not doing it how we expect.
-
# <https://github.com/hyprwm/Hyprland/pull/3197>
-
groupbar = rec {
-
font_size = 9;
-
gradients = false;
-
render_titles = true;
-
scrolling = true;
-
text_color = gb.fg0 1.0;
-
-
active_color = gb.fg3 1.0;
-
inactive_color = gb.bg1 0.6;
-
locked_active_color = active_color;
-
locked_inactive_color = inactive_color;
-
};
-
};
-
-
# <https://wiki.hyprland.org/Configuring/Dwindle-Layout/>
-
config.dwindle = let ALWAYS_EAST = 2;
-
in {
-
force_split = ALWAYS_EAST; # 0
-
preserve_split = true; # false
-
# no_gaps_when_only = true;
-
};
-
-
# <https://wiki.hyprland.org/Configuring/Animations/#curves>
-
animations.animation = {
-
# window creation
-
windowsIn = {
-
enable = true;
-
duration = 200;
-
curve = "easeOutCirc";
-
style = "popin 60%";
-
};
-
fadeIn = {
-
enable = true;
-
duration = 100;
-
curve = "easeOutCirc";
-
};
-
# window destruction
-
windowsOut = {
-
enable = true;
-
duration = 200;
-
curve = "easeOutCirc";
-
style = "popin 60%";
-
};
-
fadeOut = {
-
enable = true;
-
duration = 100;
-
curve = "easeOutCirc";
-
};
-
# window movement
-
windowsMove = {
-
enable = true;
-
duration = 300;
-
curve = "easeInOutCubic";
-
style = "popin";
-
};
-
workspaces = {
-
enable = true;
-
duration = 200;
-
curve = "easeOutCirc";
-
style = "slide";
-
};
-
};
-
};
-
}
-52
moonlark/hyprland/default.nix
···
-
{ self, config, lib, pkgs, inputs, ... }: {
-
imports = [
-
inputs.hyprland-nix.homeManagerModules.hyprland
-
# inputs.hyprland-nix.homeManagerModules.xdg-desktop-portals
-
./config.nix
-
./windowrules.nix
-
./keybinds.nix
-
#./waybar.nix
-
];
-
-
# home.packages = [
-
# # Screen Capture
-
# pkgs.prtsc
-
# # xwayland perm for pkexec
-
# pkgs.xorg.xhost
-
# ];
-
-
wayland.windowManager.hyprland = {
-
enable = true;
-
package = pkgs.hyprland;
-
reloadConfig = true;
-
systemdIntegration = true;
-
recommendedEnvironment = true;
-
-
xwayland.enable = true;
-
-
config.exec_once = [
-
# polkit agent, raises to root access with gui
-
"${lib.getExe pkgs.lxqt.lxqt-policykit}"
-
# allow apps with risen perms after agent to connect to local xwayland
-
"${lib.getExe pkgs.xorg.xhost} +local:"
-
];
-
};
-
-
# xdg.desktopPortals = {
-
# enable = true;
-
# extraPortals = [
-
# pkgs.xdg-desktop-portal-hyprland
-
# pkgs.xdg-desktop-portal-kde
-
# pkgs.xdg-desktop-portal-gtk
-
# ];
-
# configPackages = [ config.wayland.windowManager.hyprland.package ];
-
# config = {
-
# x-cinnamon = { default = [ "xapp" "gtk" ]; };
-
# pantheon = {
-
# default = [ "pantheon" "gtk" ];
-
# "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
-
# };
-
# common = { default = [ "gtk" ]; };
-
# };
-
# };
-
}
-281
moonlark/hyprland/keybinds.nix
···
-
# Converted with regex from hyprland config
-
# search: ^(\s*)(bind[rwelm]*) = (|\w+), (|\$?\w+), (.+)$ /gm
-
# replace: $1$2."$3, $4" = "$5";
-
-
{ config, pkgs, lib, ... }: {
-
# <https://wiki.hyprland.org/Configuring/Dispatchers/>
-
wayland.windowManager.hyprland.keyBinds = let
-
MOUSE_LMB = "mouse:272";
-
MOUSE_RMB = "mouse:273";
-
# MOUSE_MMB = "mouse:274";
-
MOUSE_EX1 = "mouse:275";
-
MOUSE_EX2 = "mouse:276";
-
-
exec = {
-
screenshotWindow = pkgs.patchShellScript ./scripts/screenshot.sh {
-
runtimeInputs = with pkgs; [
-
jq
-
grim
-
wl-clipboard
-
libnotify
-
config.wayland.windowManager.hyprland.package
-
];
-
};
-
playerctl = lib.getExe pkgs.playerctl;
-
slight = lib.getExe pkgs.slight;
-
osdFunc = lib.getExe config.utilities.osd-functions.package;
-
airplaneMode = "sudo /run/current-system/sw/bin/airplane-mode";
-
toggleGroupOrLock =
-
pkgs.patchShellScript ./scripts/toggle-group-or-lock.sh {
-
runtimeInputs = with pkgs; [
-
jq
-
config.wayland.windowManager.hyprland.package
-
];
-
};
-
};
-
-
# Collections of keybinds common across multiple submaps are collected into
-
# groups, which can be merged together granularly.
-
groups = {
-
# Exit the submap and restore normal binds.
-
submapReset = {
-
bind.", escape" = "submap, reset";
-
bind."CTRL, C" = "submap, reset";
-
};
-
-
# Self-explanatory.
-
launchPrograms = {
-
# Launch the program with a shortcut.
-
bind."SUPER, E" = "exec, dolphin";
-
bind."SUPER, Enter" = "exec, alacritty";
-
};
-
-
# Kill the active window.
-
killWindow = { bind."SUPER, Q" = "killactive,"; };
-
-
# Either window focus or window movement.
-
moveFocusOrWindow = with groups;
-
lib.mkMerge [ moveFocus moveWindow mouseMoveWindow ];
-
-
# Focus on another window, in the specified direction.
-
moveFocus = {
-
bind."SUPER, left" = "movefocus, l";
-
bind."SUPER, right" = "movefocus, r";
-
bind."SUPER, up" = "movefocus, u";
-
bind."SUPER, down" = "movefocus, d";
-
};
-
-
# Swap the active window with another, in the specified direction.
-
moveWindow = {
-
bind."SUPER_SHIFT, left" = "movewindow, l";
-
bind."SUPER_SHIFT, right" = "movewindow, r";
-
bind."SUPER_SHIFT, up" = "movewindow, u";
-
bind."SUPER_SHIFT, down" = "movewindow, d";
-
};
-
-
# Translate the dragged window by mouse movement.
-
mouseMoveWindow = {
-
bindm."SUPER, ${MOUSE_LMB}" = "movewindow";
-
bindm.", ${MOUSE_EX2}" = "movewindow";
-
};
-
-
# Toggle between vertical and horizontal split for
-
# the active window and an adjacent one.
-
toggleSplit = { bind."SUPER, tab" = "togglesplit,"; };
-
-
# Resize a window with the mouse.
-
mouseResizeWindow = {
-
bindm."SUPER, ${MOUSE_RMB}" = "resizewindow";
-
bindm.", ${MOUSE_EX1}" = "resizewindow";
-
};
-
-
# Switch to the next/previous tab in the active group.
-
changeGroupActive = {
-
bind."ALT, tab" = "changegroupactive, f";
-
bind."ALT, grave" = "changegroupactive, b";
-
};
-
-
# Switch to another workspace.
-
switchWorkspace = with groups;
-
lib.mkMerge [ switchWorkspaceAbsolute switchWorkspaceRelative ];
-
-
# Switch to a workspace by absolute identifier.
-
switchWorkspaceAbsolute = {
-
# Switch to a primary workspace by index.
-
bind."SUPER, 1" = "workspace, 1";
-
bind."SUPER, 2" = "workspace, 2";
-
bind."SUPER, 3" = "workspace, 3";
-
bind."SUPER, 4" = "workspace, 4";
-
bind."SUPER, 5" = "workspace, 5";
-
bind."SUPER, 6" = "workspace, 6";
-
bind."SUPER, 7" = "workspace, 7";
-
bind."SUPER, 8" = "workspace, 8";
-
bind."SUPER, 9" = "workspace, 9";
-
bind."SUPER, 0" = "workspace, 10";
-
-
# Switch to an alternate workspace by index.
-
bind."SUPER_ALT, 1" = "workspace, 11";
-
bind."SUPER_ALT, 2" = "workspace, 12";
-
bind."SUPER_ALT, 3" = "workspace, 13";
-
bind."SUPER_ALT, 4" = "workspace, 14";
-
bind."SUPER_ALT, 5" = "workspace, 15";
-
bind."SUPER_ALT, 6" = "workspace, 16";
-
bind."SUPER_ALT, 7" = "workspace, 17";
-
bind."SUPER_ALT, 8" = "workspace, 18";
-
bind."SUPER_ALT, 9" = "workspace, 19";
-
bind."SUPER_ALT, 0" = "workspace, 20";
-
-
# TODO Bind the special workspace to `XF86Favorites`.
-
# TODO Create a bind for "insert after current workspace".
-
};
-
-
# Switch to workspaces relative to the current one.
-
switchWorkspaceRelative = {
-
# Switch to the next/previous used workspace with page keys.
-
bind."SUPER, page_down" = "workspace, m+1";
-
bind."SUPER, page_up" = "workspace, m-1";
-
-
# Switch to the next/previous used workspace
-
# with the right and left square brackets,
-
# while holding super and shift.
-
bind."SUPER, bracketright " = "workspace, m+1";
-
bind."SUPER, bracketleft" = "workspace, m-1";
-
-
# Switch to the next/previous used workspace with the mouse wheel.
-
bind."SUPER, mouse_up" = "workspace, m+1";
-
bind."SUPER, mouse_down" = "workspace, m-1";
-
};
-
-
# Send a window to another workspace.
-
sendWindow = with groups;
-
lib.mkMerge [ sendWindowAbsolute sendWindowRelative ];
-
-
# Send a window to a workspace by absolute identifier.
-
sendWindowAbsolute = {
-
# Move the active window or group to a primary workspace by index.
-
bind."SUPER_SHIFT, 1" = "movetoworkspacesilent, 1";
-
bind."SUPER_SHIFT, 2" = "movetoworkspacesilent, 2";
-
bind."SUPER_SHIFT, 3" = "movetoworkspacesilent, 3";
-
bind."SUPER_SHIFT, 4" = "movetoworkspacesilent, 4";
-
bind."SUPER_SHIFT, 5" = "movetoworkspacesilent, 5";
-
bind."SUPER_SHIFT, 6" = "movetoworkspacesilent, 6";
-
bind."SUPER_SHIFT, 7" = "movetoworkspacesilent, 7";
-
bind."SUPER_SHIFT, 8" = "movetoworkspacesilent, 8";
-
bind."SUPER_SHIFT, 9" = "movetoworkspacesilent, 9";
-
bind."SUPER_SHIFT, 0" = "movetoworkspacesilent, 10";
-
-
# Move the active window or group to an alternate workspace by index.
-
bind."SUPER_ALT_SHIFT, 1" = "movetoworkspacesilent, 11";
-
bind."SUPER_ALT_SHIFT, 2" = "movetoworkspacesilent, 12";
-
bind."SUPER_ALT_SHIFT, 3" = "movetoworkspacesilent, 13";
-
bind."SUPER_ALT_SHIFT, 4" = "movetoworkspacesilent, 14";
-
bind."SUPER_ALT_SHIFT, 5" = "movetoworkspacesilent, 15";
-
bind."SUPER_ALT_SHIFT, 6" = "movetoworkspacesilent, 16";
-
bind."SUPER_ALT_SHIFT, 7" = "movetoworkspacesilent, 17";
-
bind."SUPER_ALT_SHIFT, 8" = "movetoworkspacesilent, 18";
-
bind."SUPER_ALT_SHIFT, 9" = "movetoworkspacesilent, 19";
-
bind."SUPER_ALT_SHIFT, 0" = "movetoworkspacesilent, 20";
-
};
-
-
# Send windows to other workspaces, relative to the current one.
-
sendWindowRelative = {
-
# Move the active window or group to the next/previous
-
# workspace with page keys, while holding super and shift.
-
bind."SUPER_SHIFT, page_down" = "movetoworkspace, r+1";
-
bind."SUPER_SHIFT, page_up" = "movetoworkspace, r-1";
-
-
# Move the active window or group to the next/previous
-
# workspace with the right and left square brackets,
-
# while holding super and shift.
-
bind."SUPER_SHIFT, bracketright" = "movetoworkspace, r+1";
-
bind."SUPER_SHIFT, bracketleft" = "movetoworkspace, r-1";
-
-
# Move the active window or group to the next/previous
-
# workspace with the mouse wheel while holding super and shift.
-
bind."SUPER_SHIFT, mouse_up" = "movetoworkspace, r+1";
-
bind."SUPER_SHIFT, mouse_down" = "movetoworkspace, r-1";
-
};
-
};
-
in lib.mkMerge [
-
### ACTIVE WINDOW ACTIONS ###
-
groups.killWindow
-
{
-
# Toggle full-screen for the active window.
-
bind."SUPER_SHIFT, F" = "fullscreen, 0";
-
-
# Float/unfloat the active window.
-
bind."SUPER, F" = "togglefloating,";
-
}
-
### MISCELLANEOUS ###
-
{
-
# Lock the session immediately.
-
bind."SUPER, l" = "exec, loginctl lock-session";
-
-
# Kill the window manager.
-
bind."SUPER_SHIFT, M" = "exit,";
-
-
# Forcefully kill a program after selecting its window with the mouse.
-
bind."SUPER_SHIFT, Q" = "exec, hyprctl kill";
-
-
# Screenshot the currently focused window and copy to clipboard.
-
bind."SUPER, print" = "exec, ${exec.screenshotWindow}";
-
-
# Select a region and take a screenshot, saving to the clipboard.
-
bind."SUPER_SHIFT, print" = "exec, prtsc -c -m r -D -b 00000066";
-
-
# Bypass all binds for the window manager and pass key combinations
-
# directly to the active window.
-
bind."SUPER_SHIFT, K" = "submap, passthru";
-
submap.passthru = { bind."SUPER_SHIFT, K" = "submap, reset"; };
-
}
-
### PROGRAM LAUNCHING ###
-
groups.launchPrograms
-
{
-
# Open Rofi to launch a program.
-
bind."SUPER, Space" = "exec, rofi -show drun -show-icons";
-
# Open Rofi to run a command.
-
bind."SUPER, R" = "exec, rofi -show run";
-
}
-
### FUNCTION KEYS ###
-
{
-
# The names of these keys can be found at:
-
# <https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h>
-
-
bindl."SHIFT, XF86WLAN" = "exec, ${exec.airplaneMode}";
-
-
# Mute/unmute the active audio output.
-
bindl.", XF86AudioMute" = "exec, ${exec.osdFunc} output mute";
-
-
# Raise and lower the volume of the active audio output.
-
bindel.", XF86AudioRaiseVolume" = "exec, ${exec.osdFunc} output +0.05";
-
bindel.", XF86AudioLowerVolume" = "exec, ${exec.osdFunc} output -0.05";
-
-
# Mute the active microphone or audio source.
-
bindl.", XF86AudioMicMute" = "exec, ${exec.osdFunc} input mute";
-
-
# Raise and lower display brightness.
-
bindel.", XF86MonBrightnessUp" = "exec, ${exec.slight} inc 10 -t 300ms";
-
bindel.", XF86MonBrightnessDown" = "exec, ${exec.slight} dec 10 -t 300ms";
-
-
# Regular media control keys, if your laptop or bluetooth device has them.
-
bindl.", XF86AudioPlay" = "exec, ${exec.playerctl} play-pause";
-
bindl.", XF86AudioPrev" = "exec, ${exec.playerctl} previous";
-
bindl.", XF86AudioNext" = "exec, ${exec.playerctl} next";
-
-
# Poor-man's media player control keys.
-
bindl."SUPER, slash" = "exec, ${exec.playerctl} play-pause";
-
bindl."SUPER, comma" = "exec, ${exec.playerctl} previous";
-
bindl."SUPER, period" = "exec, ${exec.playerctl} next";
-
}
-
### WINDOW FOCUS & MOVEMENT ###
-
groups.moveFocusOrWindow
-
### WINDOW RESIZING ###
-
groups.toggleSplit
-
groups.mouseResizeWindow
-
-
### WORKSPACE SWITCHING ###
-
groups.switchWorkspace
-
### WORKSPACE WINDOW MOVEMENT ###
-
groups.sendWindow
-
];
-
}
-384
moonlark/hyprland/waybar.nix
···
-
{ config, lib, pkgs, ... }:
-
let
-
package = pkgs.waybar;
-
-
# the fonts that will be included with the waybar package
-
fontPackages = [ pkgs.ubuntu_font_family pkgs.material-design-icons ];
-
-
# patch those fonts in
-
package' = let super = package;
-
in pkgs.symlinkJoin {
-
inherit (super) name pname version meta;
-
paths = [ super ] ++ fontPackages;
-
};
-
-
compileSCSS = name: source:
-
"${
-
pkgs.runCommandLocal name { } ''
-
mkdir -p $out
-
${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css
-
''
-
}/${name}.css";
-
-
# TODO when using store paths to executables, they do not inherit the user's
-
# environment (at least with systemd) and therefore GUIs use the default theme
-
commands = let
-
slight = "${lib.getExe pkgs.slight}";
-
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
-
# TODO this is duplicated from the hyprland config, make it a module
-
kbFns = lib.getExe config.utilities.osd-functions.package;
-
pavucontrol = lib.getExe pkgs.lxqt.pavucontrol-qt;
-
blueman-manager = "${pkgs.blueman}/bin/blueman-manager";
-
bluetoothctl = "${pkgs.bluez}/bin/bluetoothctl";
-
systemctl = "${pkgs.systemd}/bin/systemctl";
-
iwgtk = lib.getExe pkgs.iwgtk;
-
in {
-
backlightUp = "${slight} inc 5% -t 150ms";
-
backlightDown = "${slight} dec 5% -t 150ms";
-
# TODO --tab no longer works, what is the identifier to use?
-
outputSoundSettings = "${pavucontrol} --tab 'Output Devices'";
-
outputVolumeMute = "${kbFns} output mute";
-
outputVolumeUp = "${kbFns} output +0.05";
-
outputVolumeDown = "${kbFns} output -0.05";
-
# TODO --tab no longer works, what is the identifier to use?
-
inputSoundSettings = "${pavucontrol} --tab 'Input Devices'";
-
inputVolumeMute = "${kbFns} input mute";
-
# inputVolumeUp = "${kbFns} input +0.05";
-
# inputVolumeDown = "${kbFns} input -0.05";
-
bluetoothSettings = (pkgs.writeShellScript "waybar-bluetooth-settings" ''
-
set -eux
-
export PATH="${
-
lib.makeBinPath
-
(with pkgs; [ coreutils gawk util-linux bluez nettools blueman ])
-
}:$PATH"
-
is_powered_on="$(
-
bluetoothctl show | \
-
awk '/Name: '"$(hostname)"'$/{p=1} p && /Powered: yes/{print "true"; exit} END{if(!NR || !p) print "false"}'
-
)"
-
if [[ $is_powered_on == 'true' ]]; then
-
blueman-manager
-
else
-
rfkill unblock bluetooth && sleep 1 || true
-
bluetoothctl power on
-
sleep 0.5
-
blueman-manager
-
fi
-
'').outPath;
-
bluetoothToggle = (pkgs.writeShellScript "waybar-bluetooth-toggle" ''
-
set -eux
-
export PATH="${
-
lib.makeBinPath
-
(with pkgs; [ coreutils gawk util-linux bluez nettools ])
-
}:$PATH"
-
is_powered_on="$(
-
bluetoothctl show | \
-
awk '/Name: '"$(hostname)"'$/{p=1} p && /Powered: yes/{print "true"; exit} END{if(!NR || !p) print "false"}'
-
)"
-
if [[ $is_powered_on == 'true' ]]; then
-
bluetoothctl power off
-
else
-
rfkill unblock bluetooth && sleep 1 || true
-
bluetoothctl power on
-
fi
-
'').outPath;
-
bluetoothKill =
-
"rfkill block bluetooth && ${systemctl} restart bluetooth.service";
-
bluetoothOff = "${bluetoothctl} power off";
-
wirelessSettings = iwgtk;
-
workspaceSwitchPrev = "${hyprctl} dispatch workspace m-1";
-
workspaceSwitchNext = "${hyprctl} dispatch workspace m+1";
-
};
-
in {
-
programs.waybar.enable = true;
-
programs.waybar.package = package';
-
-
programs.waybar.systemd.enable = true;
-
-
programs.waybar.style =
-
builtins.readFile (compileSCSS "waybar-style" ./waybar.scss);
-
-
programs.waybar.settings = {
-
mainBar = {
-
layer = "top";
-
position = "top";
-
# Causes tooltips to be shown behind windows.
-
# mode = "dock";
-
height = 26;
-
-
modules-left = [ # #
-
"clock#time"
-
"clock#date"
-
# "wlr/workspaces"
-
"tray"
-
"mpris"
-
];
-
-
modules-center = [ # #
-
"hyprland/workspaces"
-
];
-
-
modules-right = [
-
"hyprland/submap"
-
"pulseaudio#output"
-
"pulseaudio#input"
-
"backlight"
-
"memory"
-
"cpu"
-
"temperature"
-
"battery"
-
"network"
-
"bluetooth"
-
"idle_inhibitor"
-
];
-
-
## MODULES-LEFT ##
-
-
# Hyprland dropped support unfortunately.
-
-
# "wlr/workspaces" = {
-
# sort-by-number = true;
-
-
# on-click = "activate";
-
# on-scroll-up = commands.workspaceSwitchPrev;
-
# on-scroll-down = commands.workspaceSwitchNext;
-
# };
-
-
"hyprland/workspaces" = {
-
format = "{name}";
-
# sort-by-number = true;
-
-
# on-click = "activate";
-
on-scroll-up = commands.workspaceSwitchPrev;
-
on-scroll-down = commands.workspaceSwitchNext;
-
};
-
-
tray = {
-
show-passive-items = true;
-
icon-size = 12;
-
spacing = 16;
-
};
-
-
mpris = {
-
player = "playerctld";
-
interval = 1;
-
-
format = "{status_icon} {dynamic}";
-
dynamic-len = 70;
-
dynamic-separator = " — ";
-
dynamic-order = [ "title" "artist" "position" "length" ];
-
dynamic-importance = [ "position" "title" "artist" ];
-
status-icons = {
-
playing = "󰐊";
-
paused = "󰏤";
-
stopped = "󰓛";
-
};
-
-
tooltip-format = lib.trim ''
-
<b>Player:</b> {player} ({status})
-
<b>Title:</b> {title}
-
<b>Artist:</b> {artist}
-
<b>Album:</b> {album}
-
<b>Length:</b> {position}/{length}
-
'';
-
};
-
-
"hyprland/submap" = {
-
format = "󰘳 {}";
-
tooltip = false;
-
};
-
-
"hyprland/window" = { max-length = 50; };
-
-
## MODULES-CENTER ##
-
-
"clock#time" = { format = "{:%I:%M %p}"; };
-
-
"clock#date" = { format = "{:%A, %B %d}"; };
-
-
## MODULES-RIGHT ##
-
-
"pulseaudio#output" = {
-
format = "{icon} {volume}%";
-
format-muted = "󰖁 {volume}%";
-
format-icons = {
-
headphone = "󰋋";
-
# speaker = "󰓃";
-
hdmi = "󰽟";
-
headset = "󰋎";
-
# hands-free = "󰋎";
-
# portable = "";
-
# car = "󰄋";
-
# hifi = "󰓃";
-
# phone = "󰏲";
-
default = [ "󰕿" "󰖀" "󰕾" ];
-
};
-
-
# anything below 100% is "safe" volume levels,
-
# the default style will be used,
-
# anything higher than this will have no CSS class,
-
# that will be considered "warning" state
-
# `#pulseaudio.output:not(.safe)`
-
states = { safe = 100; };
-
-
ignored-sinks = [ "Easy Effects Sink" ];
-
-
on-click = commands.outputSoundSettings;
-
on-click-right = commands.outputVolumeMute;
-
on-scroll-up = commands.outputVolumeUp;
-
on-scroll-down = commands.outputVolumeDown;
-
};
-
-
# TODO volume
-
"pulseaudio#input" = {
-
format = "{format_source}";
-
# format-source = "󰍬 {volume}%";
-
# format-source-muted = "󰍭 {volume}%";
-
format-source = "󰍬";
-
format-source-muted = "󰍭";
-
-
on-click = commands.inputSoundSettings;
-
on-click-right = commands.inputVolumeMute;
-
# on-scroll-up = commands.inputVolumeUp;
-
# on-scroll-down = commands.inputVolumeDown;
-
};
-
-
backlight = {
-
device = "amdgpu_bl0";
-
format = "{icon} {percent}%";
-
# format-icons = ["󰃜" "󰃛" "󰃝" "󰃟" "󰃠"];
-
format-icons = [ "󱩎" "󱩏" "󱩐" "󱩑" "󱩒" "󱩓" "󱩔" "󱩕" "󱩖" "󰛨" ];
-
-
on-scroll-up = commands.backlightUp;
-
on-scroll-down = commands.backlightDown;
-
};
-
-
memory = {
-
interval = 10;
-
format = "󰆼 {used:.2g}/{total:.2g}GiB";
-
};
-
-
cpu = {
-
interval = 5;
-
format = "󰘚 {usage}%";
-
};
-
-
temperature = {
-
interval = 5;
-
hwmon-path-abs = "/sys/devices/pci0000:00/0000:00:18.3/hwmon";
-
input-filename = "temp1_input";
-
critical-threshold =
-
90; # 15C lower than Tjmax <https://www.amd.com/en/product/9686>
-
format = "{icon} {temperatureC}°C";
-
format-critical = "󰈸 {temperatureC}°C";
-
# 4x low, 2x mid, 3x high, for 0-90
-
format-icons = [ "󱃃" "󱃃" "󱃃" "󱃃" "󰔏" "󰔏" "󱃂" "󱃂" "󱃂" ];
-
};
-
-
network = let
-
tooltip = ''
-
<b>Address:</b> {ipaddr}
-
<b>Netmask:</b> {netmask}
-
<b>Gateway:</b> {gwaddr}
-
<b>Speeds:</b> {bandwidthUpBytes} UL, {bandwidthDownBytes} DL
-
'';
-
in {
-
format-ethernet = "󰈀 {bandwidthDownBytes}";
-
format-wifi = "{icon} {bandwidthDownBytes}";
-
format-linked = "󱫱 {bandwidthDownBytes}";
-
format-disconnected = "󰲛";
-
format-icons = [ "󰤟" "󰤢" "󰤥" "󰤨" ];
-
-
tooltip-format = lib.trim ''
-
<b>Interface</b>: {ifname}
-
${tooltip}
-
'';
-
tooltip-format-wifi = lib.trim ''
-
<b>SSID:</b> {essid}
-
<b>Strength:</b> {signaldBm} dBmW ({signalStrength}%)
-
<b>Frequency:</b> {frequency} GHz
-
${tooltip}
-
'';
-
tooltip-format-disconnected = "Network disconnected.";
-
-
on-click = commands.wirelessSettings;
-
};
-
-
bluetooth = {
-
controller = "C0:3C:59:02:25:C3";
-
format-on = "󰂯";
-
format-off = "󰂲";
-
format-disabled = "󰂲";
-
format-connected = "󰂱 {num_connections}";
-
format-connected-battery =
-
"󰂱 {device_alias} ({device_battery_percentage}%) ({num_connections})";
-
-
on-click = commands.bluetoothSettings;
-
on-click-middle = commands.bluetoothKill;
-
on-click-right = commands.bluetoothToggle;
-
};
-
-
battery = {
-
interval = 5;
-
bat = "BAT0";
-
# full-at = 94;
-
format = "{icon} {capacity}%";
-
format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
-
states = {
-
battery-10 = 10;
-
battery-20 = 20;
-
battery-30 = 30;
-
battery-40 = 40;
-
battery-50 = 50;
-
battery-60 = 60;
-
battery-70 = 70;
-
battery-80 = 80;
-
battery-90 = 90;
-
battery-100 = 100;
-
};
-
# <https://github.com/Alexays/Waybar/issues/1938>
-
# the wiki lies about this, does not match
-
# /sys/class/power_supply/BAT0/status
-
format-plugged = "󰚥 AC";
-
format-charging-battery-10 = "󰢜 {capacity}%";
-
format-charging-battery-20 = "󰂆 {capacity}%";
-
format-charging-battery-30 = "󰂇 {capacity}%";
-
format-charging-battery-40 = "󰂈 {capacity}%";
-
format-charging-battery-50 = "󰢝 {capacity}%";
-
format-charging-battery-60 = "󰂉 {capacity}%";
-
format-charging-battery-70 = "󰢞 {capacity}%";
-
format-charging-battery-80 = "󰂊 {capacity}%";
-
format-charging-battery-90 = "󰂋 {capacity}%";
-
format-charging-battery-100 = "󰂅 {capacity}%";
-
};
-
-
idle_inhibitor = {
-
format = "{icon}";
-
format-icons = {
-
activated = "󰈈";
-
deactivated = "󱎫";
-
};
-
tooltip-format-activated =
-
"Idle timer inhibited, device will not sleep.";
-
tooltip-format-deactivated =
-
"Idle timer enabled, device will sleep when not in use.";
-
};
-
};
-
};
-
-
imports = [
-
(lib.mkIf config.programs.waybar.systemd.enable {
-
xdg.configFile."waybar/config".onChange = lib.mkOverride 90 ''
-
if [ -z "''${_reloaded_waybar-}" ]; then
-
_reloaded_waybar=1
-
${pkgs.systemd}/bin/systemctl --user restart waybar.service
-
fi
-
'';
-
xdg.configFile."waybar/style.css".onChange = lib.mkOverride 90 ''
-
if [ -z "''${_reloaded_waybar-}" ]; then
-
_reloaded_waybar=1
-
${pkgs.systemd}/bin/systemctl --user restart waybar.service
-
fi
-
'';
-
})
-
];
-
}
-236
moonlark/hyprland/waybar.scss
···
-
$default-foreground: #ebdbb2;
-
$highlight-foreground: #fbf1c7;
-
-
* {
-
all: unset;
-
font-family: Ubuntu, "Material Design Icons";
-
font-size: 10.5pt;
-
color: $default-foreground;
-
}
-
-
@mixin oscillate-highlight($function, $stop, $background, $duration) {
-
$name: inline-#{unique-id()};
-
-
@keyframes #{$name} {
-
#{$stop} {
-
background: $background;
-
color: $highlight-foreground;
-
}
-
}
-
-
animation-name: $name;
-
animation-duration: $duration;
-
animation-iteration-count: infinite;
-
animation-timing-function: $function;
-
}
-
-
@mixin breathe-highlight($background, $duration) {
-
@include oscillate-highlight(ease-in-out, 50%, $background, $duration);
-
}
-
-
@mixin pulse-highlight($stop, $background, $duration) {
-
@include oscillate-highlight(ease-out, $stop, $background, $duration);
-
}
-
-
@mixin indicate-active($color, $selector) {
-
transition:
-
box-shadow 300ms ease-in,
-
background 300ms ease-in;
-
-
#{$selector} {
-
transition:
-
box-shadow 600ms ease-out,
-
background 600ms ease-out;
-
box-shadow: 0 2px 0 0 $color inset;
-
background: #3c3836;
-
}
-
}
-
-
@mixin indicate-hover($color) {
-
transition:
-
background 120ms ease-in;
-
-
&:hover {
-
transition:
-
background 120ms ease-out;
-
background: $color;
-
}
-
}
-
-
#clock,
-
#submap,
-
#backlight,
-
#network,
-
#bluetooth,
-
#cpu,
-
#temperature,
-
#pulseaudio,
-
#memory,
-
#battery,
-
#idle_inhibitor,
-
#tray,
-
#mpris,
-
#window {
-
padding-left: 8px;
-
padding-right: 8px;
-
}
-
-
window#waybar {
-
// background: #1d2021;
-
background: #000000;
-
// border-bottom: 1px solid #3c3836;
-
}
-
-
tooltip,
-
window.popup {
-
background: #282828;
-
border: 1px solid #665c54;
-
// border-radius: 3px;
-
}
-
-
window.popup {
-
menu {
-
padding: 5px 0;
-
-
arrow {
-
min-width: 16px;
-
min-height: 16px;
-
-
&.top {
-
-gtk-icon-source: -gtk-icontheme("pan-up-symbolic");
-
}
-
-
&.bottom {
-
-gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
-
}
-
-
&.right {
-
-gtk-icon-source: -gtk-icontheme("pan-end-symbolic");
-
}
-
-
&.left {
-
-gtk-icon-source: -gtk-icontheme("pan-start-symbolic");
-
}
-
}
-
-
menuitem {
-
padding: 4px 8px;
-
-
transition:
-
color 66ms ease-in,
-
background 66ms ease-in;
-
-
&:hover {
-
transition:
-
color 100ms ease-out,
-
background 100ms ease-out;
-
-
color: $highlight-foreground;
-
background: #689d6a;
-
}
-
}
-
-
separator {
-
min-height: 1px;
-
background: #665c54;
-
margin: 4px 0;
-
}
-
}
-
}
-
-
#clock.time {
-
font-weight: bold;
-
}
-
-
#tray {
-
&>* {
-
@include indicate-hover(#282828);
-
}
-
}
-
-
#mpris {
-
@include indicate-hover(#282828);
-
}
-
-
#submap {
-
@include indicate-active(#d3869b, "&");
-
}
-
-
#workspaces {
-
button {
-
min-width: 26px;
-
padding: 6px;
-
-
@include indicate-hover(#282828);
-
@include indicate-active(#f38019, "&.active");
-
-
&.urgent {
-
animation-delay: 5s;
-
@include pulse-highlight(10%, #458588, 1.5s);
-
}
-
}
-
}
-
-
#network {
-
@include indicate-hover(#282828);
-
@include indicate-active(#689d6a, "&.wifi");
-
@include indicate-active(#458588, "&.ethernet");
-
@include indicate-active(#b16286, "&.linked");
-
}
-
-
#bluetooth {
-
@include indicate-hover(#282828);
-
@include indicate-active(#458588, "&.on");
-
@include indicate-active(#98971a, "&.connected");
-
-
&.on {
-
@include breathe-highlight(#458588, 5s);
-
}
-
-
// &.discoverable {
-
// @include breathe-highlight(#b16286, 5s);
-
// }
-
-
// &.discovering {
-
// @include breathe-highlight(#b16286, 5s);
-
// }
-
-
// &.pairable:not(.connected) {
-
// @include breathe-highlight(#b16286, 5s);
-
// }
-
}
-
-
#battery {
-
&.battery-30:not(.charging) {
-
@include breathe-highlight(#d64d0e, 10s);
-
}
-
-
&.battery-20:not(.charging) {
-
@include pulse-highlight(10%, #d64d0e, 5s);
-
}
-
-
&.battery-10:not(.charging) {
-
@include pulse-highlight(30%, #cc241d, 750ms);
-
}
-
}
-
-
#temperature.critical {
-
@include pulse-highlight(30%, #cc241d, 750ms);
-
}
-
-
#idle_inhibitor {
-
@include indicate-hover(#282828);
-
@include indicate-active(#d79921, "&.activated");
-
-
&.activated {
-
@include pulse-highlight(10%, #d79921, 5s);
-
}
-
}
-
-
#pulseaudio {
-
@include indicate-hover(#282828);
-
-
&.output:not(.safe) {
-
@include breathe-highlight(#cc241d, 10s);
-
}
-
}
-132
moonlark/hyprland/windowrules.nix
···
-
# <https://wiki.hyprland.org/Configuring/Window-Rules/#window-rules-v2>
-
{ lib, ... }:
-
let
-
# I recommend using this factory function for creating window rules.
-
rule = rules: attrs: attrs // { inherit rules; };
-
in {
-
wayland.windowManager.hyprland.layerRules = [{
-
namespace = [ "rofi" "notification" ];
-
rules = [ "blur" "ignorezero" ];
-
}];
-
-
wayland.windowManager.hyprland.windowRules = let
-
### SYSTEM CONTROL ###
-
printerConfig.class = [ "system-config-printer" ];
-
audioControl.class = [ "pavucontrol-qt" ];
-
wifiControl.class = [ "org.twosheds.iwgtk" "iwgtk" ];
-
bluetoothControl = {
-
class = [ ".*blueman-manager.*" ];
-
title = [ "Bluetooth Devices" ];
-
};
-
kvantumConfig.class = [ "kvantummanager" ];
-
-
### SYSTEM MODALS ###
-
filePickerPortal = {
-
# I'm guessing that almost all portal interfaces are going to be modals
-
class =
-
[ "xdg-desktop-portal-gtk" "org.freedesktop.impl.portal.desktop.kde" ];
-
# title = ["Open Files.+Portal"];
-
};
-
polkitAgent.class = [ "lxqt-policykit-agent" ];
-
mountDialog.class = [ "udiskie" ];
-
-
### DESKTOP APPLICATIONS ###
-
vscode = {
-
title = [ ".*Visual Studio Code" ];
-
# class = ["code-url-handler"];
-
};
-
discord = {
-
class = [ "vesktop" "ArmCord" "WebCord" "discord" ];
-
title = [
-
"(\\[\\d+\\] )?Discord |.*"
-
".*ArmCord"
-
"(\\[\\d+\\] )?WebCord.*"
-
".*Discord"
-
];
-
};
-
tidal.class = [ "tidal-hifi" ];
-
calculator.class = [ "qalculate-gtk" ];
-
# obsStudio = {
-
# class = [ "com.obsproject.Studio" ];
-
# title = [ "OBS\\s[\\d\\.]+.*" ];
-
# };
-
steam = {
-
class = [ "Steam" ];
-
# title = ["Steam"];
-
};
-
minecraft = {
-
class = [ "Minecraft.+" ];
-
title = [ "Minecraft.+" ];
-
};
-
virtManagerConsole = {
-
class = [ "virt-manager" ];
-
title = [ ".+on.+" ];
-
};
-
-
### DESKTOP APPLICATION MODALS ###
-
discordModal = {
-
class = [ "WebCord" ];
-
title = [ "WebCord.+Settings" ];
-
};
-
tidalModal = {
-
class = [ "tidal-hifi" ];
-
title = [ "Tidal Hi-Fi settings" ];
-
};
-
keePassModal = {
-
class = [ "org.keepassxc.KeePassXC" ];
-
title = [
-
"Unlock Database.+KeePassXC"
-
"Generate Password"
-
"KeePassXC.+Browser Access Request"
-
];
-
};
-
firefoxModal = {
-
class = [ "firefox" ];
-
title = [ "Extension.+Mozilla Firefox.*" "Picture-in-Picture" ];
-
};
-
lxImageModal = {
-
class = [ "lximage-qt" ];
-
title = [ "Print" ];
-
};
-
fileZillaModal = {
-
class = [ "filezilla" ];
-
title = [ "Site Manager" ];
-
};
-
in lib.concatLists [
-
[
-
(rule [ "size 740 460" ] filePickerPortal)
-
(rule [ "size 950 700" ] kvantumConfig)
-
]
-
# Because it can be shown and hidden with a systray icon.
-
(map (rule [ "float" "pin" "move 10% 10%" "size 80% 80%" ]) [ tidal ])
-
#
-
(map (rule [ "idleinhibit focus" ]) [ minecraft virtManagerConsole ])
-
(map (rule [ "float" ]) [
-
kvantumConfig
-
keePassModal
-
lxImageModal
-
firefoxModal
-
fileZillaModal
-
discordModal
-
tidalModal
-
])
-
# Barely translucent
-
(map (rule [ "opacity 0.97 0.97" ]) [ ])
-
(map (rule [ "opacity 0.97 0.97" "float" ]) [
-
printerConfig
-
audioControl
-
bluetoothControl
-
polkitAgent
-
mountDialog
-
])
-
# More translucent
-
(map (rule [ "opacity 0.92 0.92" ]) [ vscode steam tidal discord ])
-
(map (rule [ "opacity 0.92 0.92" "float" ]) [
-
filePickerPortal
-
wifiControl
-
])
-
# Super translucent
-
(map (rule [ "opacity 0.87 0.87" ]) [ ])
-
(map (rule [ "opacity 0.87 0.87" "float" ]) [ calculator ])
-
];
-
}
+68
moonlark/pam.nix
···
+
{
+
lib,
+
config,
+
pkgs,
+
...
+
}: {
+
services.fprintd.enable = true;
+
security.pam.services.hyprlock = lib.mkIf (config.services.fprintd.enable) {
+
text = ''
+
# Account management.
+
account required pam_unix.so # unix (order 10900)
+
+
# Authentication management.
+
auth sufficient pam_unix.so try_first_pass likeauth nullok
+
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
+
auth required pam_deny.so # deny
+
+
# Password management.
+
password sufficient pam_unix.so nullok yescrypt # unix
+
+
# Session management.
+
session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
+
session required pam_unix.so # unix (order 10200)
+
'';
+
};
+
+
security.pam.services.sudo = lib.mkIf (config.services.fprintd.enable) {
+
text = ''
+
# Account management.
+
account required pam_unix.so # unix (order 10900)
+
+
# Authentication management.
+
auth sufficient pam_unix.so try_first_pass likeauth nullok
+
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
+
auth required pam_deny.so # deny
+
+
# Password management.
+
password sufficient pam_unix.so nullok yescrypt # unix
+
+
# Session management.
+
session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
+
session required pam_unix.so # unix (order 10200)
+
'';
+
};
+
+
security.pam.services.su = lib.mkIf (config.services.fprintd.enable) {
+
text = ''
+
# Account management.
+
account required pam_unix.so # unix (order 10900)
+
+
# Authentication management.
+
auth sufficient pam_rootok.so # rootok (order 10200)
+
auth required pam_faillock.so # faillock (order 10400)
+
auth sufficient pam_unix.so try_first_pass likeauth nullok
+
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
+
auth required pam_deny.so # deny
+
+
# Password management.
+
password sufficient pam_unix.so nullok yescrypt # unix
+
+
# Session management.
+
session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
+
session required pam_unix.so # unix (order 10200)
+
session required pam_unix.so # unix (order 10200)
+
session optional pam_xauth.so systemuser=99 xauthpath=${pkgs.xorg.xauth}/bin/xauth # xauth (order 12100)
+
'';
+
};
+
}
+23
secrets/resend.age
···
+
age-encryption.org/v1
+
-> ssh-rsa DqcG0Q
+
QVtoU4x4NGS4wDmzRDa98V76GXXWiE1ArRyVxYood6/QbXP5ZakEh5m0RQX7zU+6
+
8CXZyA9ME24eMIyCGN7jvgYurUVH32grFbqO0SV6Ozsdd+8KZw3MeWp+08z9xJlU
+
ZkROo4yTViJO8XfigTdQlfkEJu8f/uwWPZyDG0vEr5aXteePffkEmgbP7IZ6uSwC
+
G3a5LoCOx2/lcZ2VA0trQpapFezTUotdLbMQ6+Eu+Rv1Eh9SjBNJZ2gN+CiHko/2
+
jSBsiOvJDJ7iMg9f2qS7A8NOD0VTHxFxG4WMoYJ6FjIdNX5Yghdz7vkcHZzAgZBy
+
jQ3F3kXZ+M0gDUT9eKFPP9q5qk3IK9HAUlnZElJS+J07KSOOgD34P7I6AT8mcmJ0
+
xXl7idqlX/NmmBlh8HbhdB+TX79IoKkm5G+Bi+YbRBvMAh9Xy5ig9uIUJKJcnpnR
+
cL0uDBoRsbyxdJpUF5NfXJj2EmERynnMpUuvh2ThNMcsQKeVNii5Mvk+HwngF72Q
+
+
-> ssh-rsa DqcG0Q
+
V/Qx/lo8OPBqrcx9FSLYN+5q+Gf/fouyGS4ksd+Ruag+v3LtUgzR+t8y6VNo3PD6
+
lM1DeMuDQmie70jP/rW7NcUS4SzJ1xWKina+Ix4uA8BM2W4aEZwn6qgWdOzkryhJ
+
8tB0MZuogcvyz5DHZYg2riKQkLnkD0oGbZIfeRM9cFz7UX2KjnGQl2fitnASk+Ub
+
hIaF0MPJo0uZrBhdGulHH5qx4v5vahK/M3vcgIY8NTAHG3/fU75kJ5mcQd4Kwesm
+
O1Q2rato95ddM98IngNQ7hgbeSL9Pr6cRM2BaNsQsI09RUjV/PN8LmAH0eHhWT1k
+
KIIjlAzRjOb4cN133zS63H6kkur2LdjHbBxmvt0XcCNc/sbOZdHnB6oQQa0cPuqc
+
Qi/j9nkinAiDxSuJfrsMZqZGbA7AQbCd7DtlJsZn18/nKusjCKuagiWXhcZFs64C
+
o7teM8YUrzb8vBjYkMMzs/BJoytzxoW7yxLkuAs28Wj8C0K3/dPSWesPiz9pUUHp
+
+
--- E9XQg8S6Hb5LUQciLQZWeIt8cAfJz2jR7L+Rh56hKmI
+
AO���=����9���l��-�g��z�a)��>�;�0n>{�rZt� ���~_RP���'[;4���n�* &L
+1
secrets/secrets.nix
···
in
{
"wifi.age".publicKeys = [ kierank moonlark ];
+
"resend.age".publicKeys = [ kierank moonlark ];
}