Compare commits

...

54 commits

Author SHA1 Message Date
Leonardo Eugênio c20343c129 controller: add auto-connect service 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 0093ab7007 flake: set formatter to nixfmt-rfc-style 2024-05-31 11:41:21 -03:00
Leonardo Eugênio fbcf9bd14e treewide: format using nixfmt-rfc-style 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 8376baaf34 kakoune: use rfc-style nixfmt 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 4fdbf6f821 nix: lower frequency of gc 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 7808c20502 monolith: add docker subvolume 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 49ea594496 configuration: extract nixos config into more files 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 4494f23f22 kdeconect: update config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 314d95f9dd gnome: update autologin config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio d29b92d8b4 scripts: add pass export script 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f2ffa579f2 qutebrowser: don't install if not the default browser 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 52bd0f67ed monolith: disable virtualbox while it's borked 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5e0c4ff27d flake: update to 24.05 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 4c356d6822 Revert "sshd: disable until xz is secure"
This reverts commit b0d1b2fbff.
2024-05-31 11:41:21 -03:00
Leonardo Eugênio 0d5a1c1fd5 sway: don't require rebuilding sway dependencies 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 7bb5a7c5a0 sway: set godot windows to floating 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5cc4532b24 sway: autostart corectrl 2024-05-31 11:41:21 -03:00
Leonardo Eugênio faca1d3c81 git: enable lfs 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f54f98ea4e update: pass arguments to ./switch 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 8f0160ef73 monolith: add gpu crash work-around 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 2ce18fc7a0 sway: enable adaptive sync 2024-05-31 11:41:21 -03:00
Leonardo Eugênio ba3ab547b7 forgejo-runner: update runner token and url 2024-05-31 11:41:21 -03:00
Leonardo Eugênio dc4ca50622 firefox: add i dont care about cookies 2024-05-31 11:41:21 -03:00
Leonardo Eugênio be28de858d ssh: update hostnames 2024-05-31 11:41:21 -03:00
Leonardo Eugênio b489452aba sway: make gaming windows floating by default 2024-05-31 11:41:21 -03:00
Leonardo Eugênio e925f586a1 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 45383a0d8b firefox: add substitoot extension 2024-05-31 11:41:21 -03:00
Leonardo Eugênio de2b80018b monolith: enable all features of corectrl 2024-05-31 11:41:21 -03:00
Leonardo Eugênio d86b7db36e monolith: add forgejo runner 2024-05-31 11:41:21 -03:00
Leonardo Eugênio e4b9bcca7e sshd: disable until xz is secure 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 850be61bf3 sway: add more env vars to dbus activation 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 9f10425c04 flake: update lockfile 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 36d2bedd34 syncthing: way for tray 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5f588d7e1a kdenlive: fix theme 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 577328395d theme: improve qt theming 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 34c35fb4eb syncthing: enable tray icon 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5161c3a5d8 mangohud: install patch to fix keybind crash 2024-05-31 11:41:21 -03:00
Leonardo Eugênio b4538b5db5 gpg: simplify config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5fa213ab59 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5571ebd26a lsp: replace rnix-lsp with nil 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5cbc3b799f update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 061df3f2c4 btop: enable gpu monitoring 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f6c2f4905b update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f9d95745ef kak-lsp: update config to new format 2024-05-31 11:41:21 -03:00
Leonardo Eugênio b60fc8900a alacritty: update config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio c7999c3fbe update renamed xkb config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 78d6120281 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 916132cf9c update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 33063a8b99 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 2deca2fc3d sway: disable adaptive sync 2024-05-31 11:41:21 -03:00
Leonardo Eugênio c713e32440 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 1201faf5fe update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 6c6e82aae8 switch to nixpkgs unstable 2024-05-31 11:41:21 -03:00
Leonardo Eugênio da736e199c email: add aliases 2024-05-31 11:40:43 -03:00
109 changed files with 2357 additions and 1530 deletions

View file

@ -42,11 +42,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1707830867,
"narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=",
"lastModified": 1715290355,
"narHash": "sha256-2T7CHTqBXJJ3ZC6R/4TXTcKoXWHcvubKNj9SfomURnw=",
"owner": "ryantm",
"repo": "agenix",
"rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6",
"rev": "8d37c5bdeade12b6479c85acd133063ab53187a0",
"type": "github"
},
"original": {
@ -186,33 +186,16 @@
"type": "github"
}
},
"dzgui": {
"flake": false,
"locked": {
"lastModified": 1702780245,
"narHash": "sha256-cdW5LN2Q7eYW8xIqKPQfeYPd7e6VdJGaoA9NMHesCrE=",
"owner": "aclist",
"repo": "dztui",
"rev": "28323f3edb8fa747dc559d1939ccdd7729e4e3a1",
"type": "github"
},
"original": {
"owner": "aclist",
"repo": "dztui",
"type": "github"
}
},
"dzgui-nix": {
"inputs": {
"dzgui": "dzgui",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1702850463,
"narHash": "sha256-qR/c/GjsLUzrCyHN/Q9nnClduf6OqTg26S1AFYKPzxA=",
"lastModified": 1715128199,
"narHash": "sha256-mj23cBtiDKy3pgg+J26UA8giZgmJApO8IQlC6+XTAx8=",
"owner": "lelgenio",
"repo": "dzgui-nix",
"rev": "2ed6515b27d8186b9fedfe1dcaf861f07e796a0d",
"rev": "03968bade43d23c47e8b4f102c711c171c446645",
"type": "github"
},
"original": {
@ -392,7 +375,7 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1681202837,
@ -410,7 +393,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_7"
"systems": "systems_6"
},
"locked": {
"lastModified": 1681202837,
@ -428,7 +411,7 @@
},
"flake-utils_6": {
"inputs": {
"systems": "systems_9"
"systems": "systems_8"
},
"locked": {
"lastModified": 1694529238,
@ -446,7 +429,7 @@
},
"flake-utils_7": {
"inputs": {
"systems": "systems_10"
"systems": "systems_9"
},
"locked": {
"lastModified": 1681202837,
@ -464,14 +447,14 @@
},
"flake-utils_8": {
"inputs": {
"systems": "systems_11"
"systems": "systems_10"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -508,23 +491,26 @@
]
},
"locked": {
"lastModified": 1706981411,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
"lastModified": 1716563886,
"narHash": "sha256-MKSVKxP50gEbdP60G0M5LampyVSIGT8FGGB88nKPmi8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
"rev": "00a86e4f7a6455ad58b7090a931f1c6097e4fcd7",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": "hyprlang",
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
@ -535,11 +521,11 @@
]
},
"locked": {
"lastModified": 1710257359,
"narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=",
"lastModified": 1713612213,
"narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974",
"rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1",
"type": "github"
},
"original": {
@ -551,21 +537,20 @@
"hyprland": {
"inputs": {
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang_2",
"hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_5",
"wlroots": "wlroots",
"systems": "systems_4",
"xdph": "xdph"
},
"locked": {
"lastModified": 1710864211,
"narHash": "sha256-Uve1/UBnwD4M/9xD0E3XATnLrF8B5vL6MTBhX6Is+TE=",
"lastModified": 1715342341,
"narHash": "sha256-jHCjAwaukNCI7yVsbB8oppl1dUujvFAfRiXaecqWGI0=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "bcba3951f45f11245d424274130eb3a0ac790d93",
"rev": "38911d6df4977b6b00557cc887eb151d032e505b",
"type": "github"
},
"original": {
@ -578,10 +563,12 @@
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
@ -603,17 +590,19 @@
"inputs": {
"nixpkgs": [
"hyprland",
"hyprcursor",
"nixpkgs"
],
"systems": "systems_4"
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1709914708,
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
"lastModified": 1713121246,
"narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
"rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706",
"type": "github"
},
"original": {
@ -622,7 +611,7 @@
"type": "github"
}
},
"hyprlang_2": {
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
@ -634,16 +623,16 @@
]
},
"locked": {
"lastModified": 1709914708,
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
"lastModified": 1715287423,
"narHash": "sha256-B7AJIjOyWgVMKhu7DlOnWa0VprdhywUVHuB/j+EwSxM=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
"repo": "hyprwayland-scanner",
"rev": "e2fc1c0eb8b392110588f478cce644348ead7271",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
@ -709,11 +698,11 @@
]
},
"locked": {
"lastModified": 1710644923,
"narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=",
"lastModified": 1714878592,
"narHash": "sha256-E68C03sYRsYFsK7wiGHUIJm8IsyPRALOrFoTL0glXnI=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "e25efda85e39fcdc845e371971ac4384989c4295",
"rev": "a362555e9dbd4ecff3bb98969bbdb8f79fe87f10",
"type": "github"
},
"original": {
@ -724,15 +713,16 @@
},
"nix-software-center": {
"inputs": {
"nixos-appstream-data": "nixos-appstream-data",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1703105285,
"narHash": "sha256-BHoW1RQMc2Auz8paBvTBriKv0F6FI99+3nnz/ELLawg=",
"lastModified": 1714856183,
"narHash": "sha256-Ue7xV+rZqImux4DDj3VMla4LIH2g8VeXbTJwgvX7wOo=",
"owner": "vlinkz",
"repo": "nix-software-center",
"rev": "68e87fb6e24fb3e6fe65449918d0cbda96622b65",
"rev": "b9e0f53536e1e94e7d8c3cda3c6866b3f9d01386",
"type": "github"
},
"original": {
@ -741,6 +731,32 @@
"type": "github"
}
},
"nixos-appstream-data": {
"inputs": {
"flake-utils": [
"nix-software-center",
"utils"
],
"nixpkgs": [
"nix-software-center",
"nixpkgs"
]
},
"locked": {
"lastModified": 1712858390,
"narHash": "sha256-XE7gr+zU3N4SHPAhsgk8cVAFp1iBg+Lxxp3y4dUF1vE=",
"owner": "korfuri",
"repo": "nixos-appstream-data",
"rev": "0465d42a4433faa63b7a5eb0b8d397937c9fc13a",
"type": "github"
},
"original": {
"owner": "korfuri",
"ref": "flake",
"repo": "nixos-appstream-data",
"type": "github"
}
},
"nixos-conf-editor": {
"inputs": {
"flake-compat": "flake-compat_3",
@ -789,11 +805,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1702539185,
"narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=",
"lastModified": 1714562304,
"narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447",
"rev": "bcd44e224fd68ce7d269b4f44d24c2220fd821e7",
"type": "github"
},
"original": {
@ -866,16 +882,16 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1710695816,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
"lastModified": 1716408587,
"narHash": "sha256-el71IUaQdEmntmd51GBpkJs/Hqh6S4dmfmUGP8GQaME=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
"rev": "1a7abfa62e8a36f7f2dbe463722ed9ea31be5e43",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"ref": "nixos-24.05",
"type": "indirect"
}
},
@ -898,11 +914,11 @@
"ranger-icons": {
"flake": false,
"locked": {
"lastModified": 1709209315,
"narHash": "sha256-ETE13REDIVuoFIbvWqWvQLj/2fGST+1koowmmuBzGmo=",
"lastModified": 1713564482,
"narHash": "sha256-sijO9leDXgnjgcVlh5fKYalhjOupwFMRyH0xh2g/rEQ=",
"owner": "alexanderjeurissen",
"repo": "ranger_devicons",
"rev": "ed718dd6a6d5d2c0f53cba8474c5ad96185057e9",
"rev": "a8d626485ca83719e1d8d5e32289cd96a097c861",
"type": "github"
},
"original": {
@ -1057,21 +1073,6 @@
"type": "github"
}
},
"systems_11": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
@ -1119,16 +1120,16 @@
},
"systems_5": {
"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"
}
},
@ -1215,7 +1216,7 @@
},
"utils": {
"inputs": {
"systems": "systems_8"
"systems": "systems_7"
},
"locked": {
"lastModified": 1689068808,
@ -1254,11 +1255,11 @@
]
},
"locked": {
"lastModified": 1685576039,
"narHash": "sha256-WMkWurJsZZG7YkWzW/k2SNquYLsAZjzFs7CFswSjDew=",
"lastModified": 1715216838,
"narHash": "sha256-q5key9BWJjJQqECrhflso9ZTzULBeScvromo0S4fjqE=",
"owner": "lelgenio",
"repo": "wl-crosshair",
"rev": "57d0908e10d9f58fc37fe866404cc8b66be1f0d9",
"rev": "39b716cf410a1b45006f50f32f8d63de5c43aedb",
"type": "github"
},
"original": {
@ -1267,31 +1268,9 @@
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {
"host": "gitlab.freedesktop.org",
"lastModified": 1709983277,
"narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=",
"owner": "wlroots",
"repo": "wlroots",
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
"type": "gitlab"
},
"original": {
"host": "gitlab.freedesktop.org",
"owner": "wlroots",
"repo": "wlroots",
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
"type": "gitlab"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprland-protocols": "hyprland-protocols",
"hyprlang": [
"hyprland",
"hyprlang"
@ -1306,11 +1285,11 @@
]
},
"locked": {
"lastModified": 1709299639,
"narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=",
"lastModified": 1714662532,
"narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "2d2fb547178ec025da643db57d40a971507b82fe",
"rev": "1f228ba2f1f254195c0b571302b37482861abee3",
"type": "github"
},
"original": {

View file

@ -1,8 +1,8 @@
{
description = "My system config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
nixpkgs.url = "nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database = {
@ -68,33 +68,31 @@
nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
nix-software-center.url = "github:vlinkz/nix-software-center";
};
outputs = inputs:
outputs =
inputs:
let
nixpkgsConfig = {
inherit system;
config = { allowUnfree = true; };
overlays = old_overlays.all;
config = {
allowUnfree = true;
};
bootstrapPkgs = import inputs.nixpkgs nixpkgsConfig;
nixpkgs = bootstrapPkgs.applyPatches {
name = "patched-nixpkgs";
src = inputs.nixpkgs;
patches = lib.mapAttrsToList (k: v: ./patches/nixpkgs/${k})
(builtins.readDir ./patches/nixpkgs);
overlays = old_overlays.all;
};
inherit (import ./user/variables.nix) desktop;
system = "x86_64-linux";
pkgs = import nixpkgs nixpkgsConfig;
pkgs = import inputs.nixpkgs nixpkgsConfig;
lib = inputs.nixpkgs.lib;
packages = import ./pkgs { inherit pkgs inputs; };
old_overlays = (import ./overlays { inherit packages inputs; });
specialArgs = { inherit inputs; };
common_modules = [
specialArgs = {
inherit inputs;
};
common_modules =
[
{ nixpkgs.pkgs = pkgs; }
./system/configuration.nix
./system/secrets.nix
@ -114,7 +112,9 @@
home-manager.backupFileExtension = "bkp";
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.extraSpecialArgs = {
inherit inputs;
};
}
]
++ lib.optional (desktop == "gnome") ./system/gnome.nix
@ -131,6 +131,7 @@
modules = [
./hosts/monolith.nix
./system/monolith-gitlab-runner.nix
./system/monolith-forgejo-runner.nix
./system/nix-serve.nix
./system/steam.nix
] ++ common_modules;
@ -151,11 +152,16 @@
};
pixie = lib.nixosSystem {
inherit system specialArgs;
modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{
modules =
[ ./hosts/pixie.nix ]
++ common_modules
++ [
{
packages.media-packages.enable = lib.mkOverride 0 false;
programs.steam.enable = lib.mkOverride 0 false;
services.flatpak.enable = lib.mkOverride 0 false;
}];
}
];
};
phantom = lib.nixosSystem {
inherit system specialArgs;
@ -176,6 +182,6 @@
packages.${system} = pkgs // packages;
formatter.${system} = pkgs.nixpkgs-fmt;
formatter.${system} = pkgs.nixfmt-rfc-style;
};
}

View file

@ -1,13 +1,32 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
btrfs_ssd = [ "ssd" "discard=async" ];
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = [
"ssd"
"discard=async"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -18,8 +37,7 @@ in
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
};
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device =
"/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/97EB-7DB5";
@ -37,8 +55,7 @@ in
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "double-rainbow"; # Define your hostname.
}

View file

@ -1,15 +1,30 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -45,10 +60,12 @@ in
options = [ "subvol=@swap" ] ++ btrfs_options;
};
swapDevices = [{
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
}];
}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
@ -59,7 +76,6 @@ in
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "i15"; # Define your hostname.
}

View file

@ -1,21 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
btrfs_ssd = [ "ssd" "discard=async" ];
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = [
"ssd"
"discard=async"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
hardware.opentabletdriver.enable = true;
boot.extraModulePackages = with config.boot.kernelPackages; [
zenpower
];
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [
"kvm-amd"
@ -23,6 +40,7 @@ in
"zenpower"
];
boot.kernelParams = [
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
"video=DP-1:1920x1080@144"
# hibernation
"resume=LABEL=BTRFS_ROOT" # findmnt -o LABEL --noheadings /swap/
@ -43,10 +61,16 @@ in
vaapiVdpau
rocm-opencl-icd
rocm-opencl-runtime
rocmPackages.rocm-smi
];
programs.corectrl.enable = true;
virtualisation.virtualbox.host.enable = true;
programs.corectrl = {
enable = true;
gpuOverclock = {
enable = true;
ppfeaturemask = "0xffffffff";
};
};
fileSystems."/" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
@ -81,22 +105,34 @@ in
fileSystems."/home/lelgenio/Games" = {
device = "/dev/disk/by-label/BTRFS_DATA";
fsType = "btrfs";
options = [ "subvol=@games" "nofail" ] ++ btrfs_options;
options = [
"subvol=@games"
"nofail"
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/Downloads/Torrents" = {
device = "/dev/disk/by-label/BTRFS_DATA";
fsType = "btrfs";
options = [ "subvol=@torrents" "nofail" ] ++ btrfs_options;
options = [
"subvol=@torrents"
"nofail"
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/Música" = {
device = "/dev/disk/by-label/BTRFS_DATA";
fsType = "btrfs";
options = [ "subvol=@music" "nofail" ] ++ btrfs_options;
options = [
"subvol=@music"
"nofail"
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/.local/mount/data" = {
device = "/dev/disk/by-label/BTRFS_DATA";
fsType = "btrfs";
options = [ "subvol=@data" "nofail" ] ++ btrfs_options;
options = [
"subvol=@data"
"nofail"
] ++ btrfs_options;
};
fileSystems."/home/lelgenio/.local/mount/bigboy" = {
device = "/dev/disk/by-label/BTRFS_BIGBOY";
@ -106,8 +142,20 @@ in
fileSystems."/home/lelgenio/projects" = {
device = "/dev/disk/by-label/BTRFS_BIGBOY";
fsType = "btrfs";
options = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd;
options = [
"subvol=@projects"
"nofail"
] ++ btrfs_options ++ btrfs_ssd;
};
fileSystems."/var/lib/docker" = {
device = "/dev/disk/by-label/BTRFS_BIGBOY";
fsType = "btrfs";
options = [
"subvol=@docker"
"nofail"
] ++ btrfs_options ++ btrfs_ssd;
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
@ -115,8 +163,7 @@ in
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = "ondemand";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "monolith"; # Define your hostname.
# Fix broken suspend with Logitech USB dongle
@ -133,8 +180,10 @@ in
# with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd;
};
swapDevices = [{
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
}];
}
];
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
imports = [
./vpsadminos.nix
inputs.agenix.nixosModules.default
@ -49,7 +55,12 @@
enable = true;
dates = "04:40";
operation = "switch";
flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ];
flags = [
"--update-input"
"nixpkgs"
"--no-write-lock-file"
"-L"
];
flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom";
};
@ -57,4 +68,3 @@
system.stateVersion = "23.05"; # Never change this
}

View file

@ -1,10 +1,14 @@
{ pkgs, inputs, config, ... }: {
{
pkgs,
inputs,
config,
...
}:
{
# It's important to let Digital Ocean set the hostname so we get rDNS to work
networking.hostName = "";
imports = [
inputs.nixos-mailserver.nixosModules.mailserver
];
imports = [ inputs.nixos-mailserver.nixosModules.mailserver ];
mailserver = {
enable = true;
@ -22,11 +26,7 @@
loginAccounts = {
"lelgenio@lelgenio.com" = {
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
aliases = [ "postmaster@lelgenio.com" ];
};
"lelgenio@lelgenio.xyz" = {
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
aliases = [ "postmaster@lelgenio.xyz" ];
aliases = [ "postmaster@lelgenio.com" "lelgenio@lelgenio.xyz" "lelgenio@lelgenio.xyz" ];
};
"noreply@git.lelgenio.com" = {
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
@ -54,5 +54,4 @@
$config['plugins'] = [ "carddav", "archive" ];
'';
};
}

View file

@ -1,4 +1,9 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;

View file

@ -1,7 +1,14 @@
{ config, pkgs, inputs, ... }: {
swapDevices = [{
{
config,
pkgs,
inputs,
...
}:
{
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 2); # 2 GB
}];
}
];
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
services.mastodon = {
enable = true;
configureNginx = true;

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
services.nextcloud = {
enable = true;
package = pkgs.nextcloud27;
@ -22,6 +28,4 @@
group = "nextcloud";
};
};
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
services.nginx = {
enable = true;
recommendedProxySettings = true;
@ -8,10 +14,20 @@
};
# Redirect *lelgenio.xyz -> *lelgenio.com
services.nginx.virtualHosts = lib.mapAttrs'
(key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
services.nginx.virtualHosts =
lib.mapAttrs' (key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
(
lib.genAttrs [ "" "social." "blog." "cloud." "mail." "git." "syncthing." ] (name: {
lib.genAttrs
[
""
"social."
"blog."
"cloud."
"mail."
"git."
"syncthing."
]
(name: {
enableACME = true;
forceSSL = true;
locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri";
@ -23,6 +39,8 @@
defaults.email = "lelgenio@disroot.org";
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.firewall.allowedTCPPorts = [
80
443
];
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
services.syncthing = {
enable = true;
@ -14,11 +20,10 @@
proxyPass = "http://127.0.0.1:8384";
extraConfig =
# required when the target is also TLS server with multiple hosts
"proxy_ssl_server_name on;" +
"proxy_ssl_server_name on;"
+
# required when the server wants to use HTTP Authentication
"proxy_pass_header Authorization;"
;
"proxy_pass_header Authorization;";
};
};
}

View file

@ -1,8 +1,12 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
security.rtkit.enable = true;
services.openssh = {
enable = true;
ports = [ 9022 22 ];
ports = [
9022
22
];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
@ -15,7 +19,15 @@
isNormalUser = true;
description = "Leonardo Eugênio";
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
extraGroups = [
"networkmanager"
"wheel"
"docker"
"adbusers"
"bluetooth"
"corectrl"
"vboxusers"
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
@ -32,7 +44,5 @@
programs.fish.enable = true;
environment.systemPackages = with pkgs; [
git
];
environment.systemPackages = with pkgs; [ git ];
}

View file

@ -6,7 +6,12 @@
#
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
with lib;
let
nameservers = [
@ -22,16 +27,19 @@ in
systemd.services.systemd-sysctl.enable = false;
systemd.services.systemd-oomd.enable = false;
systemd.sockets."systemd-journald-audit".enable = false;
systemd.mounts = [{ where = "/sys/kernel/debug"; enable = false; }];
systemd.mounts = [
{
where = "/sys/kernel/debug";
enable = false;
}
];
systemd.services.rpc-gssd.enable = false;
# Due to our restrictions in /sys, the default systemd-udev-trigger fails
# on accessing PCI devices, etc. Override it to match only network devices.
# In addition, boot.isContainer prevents systemd-udev-trigger.service from
# being enabled at all, so add it explicitly.
systemd.additionalUpstreamSystemUnits = [
"systemd-udev-trigger.service"
];
systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ];
systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [
""
"-udevadm trigger --subsystem-match=net --action=add"

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
services.writefreely = {
enable = true;
acme.enable = true;
@ -22,4 +28,3 @@
};
};
}

View file

@ -1,13 +1,25 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
@ -18,8 +30,7 @@
options = [ "subvol=nixos" ];
};
boot.initrd.luks.devices."pixie".device =
"/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
boot.initrd.luks.devices."pixie".device = "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
fileSystems."/home" = {
device = "/dev/mapper/pixie";
@ -46,8 +57,7 @@
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "pixie"; # Define your hostname.
}

View file

@ -1,16 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
btrfs_ssd = [ "ssd" "discard=async" ];
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = [
"ssd"
"discard=async"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -46,10 +64,12 @@ in
options = [ "subvol=@swap" ] ++ btrfs_ssd;
};
swapDevices = [{
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8);
}];
}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
@ -59,8 +79,7 @@ in
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "rainbow"; # Define your hostname.
}

View file

@ -1,4 +1,5 @@
{ inputs, packages, ... }: rec {
{ inputs, packages, ... }:
rec {
all = [
scripts
sway
@ -13,7 +14,8 @@
sway = (import ./sway.nix);
themes = (final: prev: {
themes = (
final: prev: {
material-wifi-icons = final.stdenv.mkDerivation rec {
name = "material-wifi-icons";
src = inputs.material-wifi-icons;
@ -22,43 +24,66 @@
'';
};
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
orchis_theme_compact = (final.orchis-theme.override {
orchis_theme_compact = (
final.orchis-theme.override {
border-radius = 0;
tweaks = [ "compact" "solid" ];
});
nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; });
});
tweaks = [
"compact"
"solid"
];
}
);
nerdfonts_fira_hack = (
final.nerdfonts.override {
fonts = [
"FiraCode"
"Hack"
];
}
);
}
);
new-packages = (final: prev: packages // {
new-packages = (
final: prev:
packages
// {
dhist = inputs.dhist.packages.${prev.system}.dhist;
demoji = inputs.demoji.packages.${prev.system}.default;
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
maildir-notify-daemon = inputs.maildir-notify-daemon.packages.${prev.system}.default;
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
}
);
webcord = (prev.webcord.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ../patches/webcord/fix-reading-config.patch ];
}));
});
patches = (final: prev: {
patches = (
final: prev: {
bemenu = prev.bemenu.overrideAttrs (o: {
postPatch = ''
substituteInPlace lib/renderers/wayland/window.c \
--replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
'';
});
mySway = prev.sway.override {
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
patches = old.patches
++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
});
};
mangohud = prev.mangohud.overrideAttrs (o: {
patches = o.patches ++ [
(prev.fetchpatch {
url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch";
hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A=";
})
];
});
}
);
variables = (final: prev: {
uservars = import ../user/variables.nix;
});
variables = (final: prev: { uservars = import ../user/variables.nix; });
lib_extended = (final: prev: {
lib_extended = (
final: prev: {
lib = prev.lib // rec {
# Utility function
# Input: [{v1=1;} {v2=2;}]
@ -70,5 +95,6 @@
# Output: {v1=1;v2=2;}
forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func);
};
});
}
);
}

View file

@ -11,7 +11,7 @@
executable = true;
text = ''
systemctl --user import-environment
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway SWAYSOCK
# systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
# systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
'';

View file

@ -1,27 +0,0 @@
From ac4d51306af54a088e29e2e5efcfac5dfe87d95c Mon Sep 17 00:00:00 2001
From: lelgenio <lelgenio@disroot.org>
Date: Fri, 4 Aug 2023 01:25:04 -0300
Subject: [PATCH] HACK: fix steam after generation switch
---
pkgs/build-support/build-fhsenv-bubblewrap/default.nix | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
index 3500e5e9216f..4d7ac0aa7618 100644
--- a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
+++ b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
@@ -152,6 +152,10 @@ let
fi
if [[ -L $i ]]; then
symlinks+=(--symlink "$(${coreutils}/bin/readlink "$i")" "$i")
+ elif [[ -f $i && -r $i ]]; then
+ SNAPSHOT=$(mktemp --dry-run)
+ cp "$i" "$SNAPSHOT"
+ ro_mounts+=(--ro-bind-try "$SNAPSHOT" "$i")
else
ro_mounts+=(--ro-bind-try "$i" "$i")
fi
--
2.42.0

View file

@ -1,14 +0,0 @@
diff --git a/sources/code/main/modules/config.ts b/sources/code/main/modules/config.ts
index caf51df..41faabe 100644
--- a/sources/code/main/modules/config.ts
+++ b/sources/code/main/modules/config.ts
@@ -158,6 +158,9 @@ class Config<T> {
#read(): unknown {
const encodedData = readFileSync(this.#path+this.#pathExtension);
let decodedData = encodedData.toString();
+ if (decodedData === "")
+ return {};
+
if(this.#pathExtension === FileExt.Encrypted)
decodedData = safeStorage.decryptString(encodedData);
return JSON.parse(decodedData);

View file

@ -1,11 +1,12 @@
{ lib
, mkYarnPackage
, fetchFromGitHub
, fetchYarnDeps
, testers
, writeText
, runCommand
, blade-formatter
{
lib,
mkYarnPackage,
fetchFromGitHub,
fetchYarnDeps,
testers,
writeText,
runCommand,
blade-formatter,
}:
mkYarnPackage rec {
@ -40,13 +41,15 @@ mkYarnPackage rec {
Hello world!
@endif
'';
actual = runCommand "actual"
actual =
runCommand "actual"
{
nativeBuildInputs = [ blade-formatter ];
base = writeText "base" ''
@if( true ) Hello world! @endif
'';
} ''
}
''
blade-formatter $base > $out
'';
};

View file

@ -1,11 +1,12 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, zlib
, stdenv
, Security ? null
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
zlib,
stdenv,
Security ? null,
}:
rustPlatform.buildRustPackage rec {
@ -22,9 +23,7 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
Security
];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
meta = with lib; {
description = "Check all the things.";

View file

@ -1,7 +1,8 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
{ pkgs, inputs }: {
{ pkgs, inputs }:
{
blade-formatter = pkgs.callPackage ./blade-formatter { };
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { };
lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; };

View file

@ -1,6 +1,7 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {

View file

@ -11,9 +11,7 @@ pkgs.stdenv.mkDerivation rec {
wrapGAppsHook
];
makeFlags = [
"PRG=${pname}"
];
makeFlags = [ "PRG=${pname}" ];
installPhase = ''
install -Dm 755 "$pname" "$out/bin/$pname"
@ -21,4 +19,3 @@ pkgs.stdenv.mkDerivation rec {
glib-compile-schemas "$out/share/glib-2.0/schemas/"
'';
}

26
scripts/auto_connect_gamepad Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh
list_paired_controllers() {
bluetoothctl devices Paired | grep -i 'controller' | cut -d' ' -f2
}
count_connected_controllers() {
bluetoothctl devices Connected | grep -i 'controller' | wc -l
}
try_to_connect_to_all_controllers() {
list_paired_controllers | while read paired_controller; do
echo "Trying to connect to controller $paired_controller"
bluetoothctl connect "$paired_controller"
done
}
while true; do
echo "looping"
if test "$(count_connected_controllers)" -ne 0 ; then
echo "there is a controller connected, not attempting to connect to any other"
sleep 10s
continue
fi
try_to_connect_to_all_controllers
done

View file

@ -1,8 +1,10 @@
(final: prev:
(
final: prev:
with prev;
let
import_script = (_: path: import (path) { inherit pkgs lib; });
create_script = (name: text: runtimeInputs:
create_script = (
name: text: runtimeInputs:
let
script_body = pkgs.writeTextFile {
inherit name;
@ -16,43 +18,118 @@ let
inherit name runtimeInputs;
text = ''exec ${script_body} "$@"'';
checkPhase = "";
}));
create_scripts =
lib.mapAttrs (name: deps: create_script name ./${name} deps);
})
);
create_scripts = lib.mapAttrs (name: deps: create_script name ./${name} deps);
pass = pkgs.pass.withExtensions (ex: with ex; [
pass-otp
]);
pass = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
in
create_scripts
{
create_scripts {
br = [ ];
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
down_meme = [ wl-clipboard yt-dlp libnotify ];
wl-copy-file = [ wl-clipboard fish ];
bmenu = [
final.bemenu
final.dhist
fish
j4-dmenu-desktop
jq
sway
];
down_meme = [
wl-clipboard
yt-dlp
libnotify
];
wl-copy-file = [
wl-clipboard
fish
];
_diffr = [ diffr ];
_thunar-terminal = [ final.terminal ];
_sway_idle_toggle = [ final.swayidle ];
kak-pager = [ fish final._diffr ];
kak-pager = [
fish
final._diffr
];
kak-man-pager = [ final.kak-pager ];
helix-pager = [ fish final._diffr ];
helix-pager = [
fish
final._diffr
];
helix-man-pager = [ final.helix-pager ];
musmenu = [ mpc-cli final.wdmenu trash-cli xdg-user-dirs libnotify sd wl-clipboard ];
showkeys =
[ ]; # This will not work unless programs.wshowkeys is enabled systemwide
musmenu = [
mpc-cli
final.wdmenu
trash-cli
xdg-user-dirs
libnotify
sd
wl-clipboard
];
showkeys = [ ]; # This will not work unless programs.wshowkeys is enabled systemwide
terminal = [ alacritty ];
playerctl-status = [ playerctl ];
wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
screenshotsh =
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
volumesh = [ pulseaudio libnotify ];
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
color_picker = [ grim slurp wl-clipboard libnotify imagemagick ];
dzadd = [ procps libnotify final.wdmenu jq mpv pqiv python3Packages.deemix mpc-cli final.mpdDup ];
mpdDup = [ mpc-cli perl ];
readQrCode = [ grim zbar wl-clipboard ];
} // lib.mapAttrs import_script {
pass-export = [
pass2csv
gnupg
];
wpass = [
final.wdmenu
fd
pass
sd
wl-clipboard
wtype
];
screenshotsh = [
capitaine-cursors
grim
slurp
jq
sway
wl-clipboard
xdg-user-dirs
];
volumesh = [
pulseaudio
libnotify
];
pulse_sink = [
pulseaudio
pamixer
final.wdmenu
];
color_picker = [
grim
slurp
wl-clipboard
libnotify
imagemagick
];
dzadd = [
procps
libnotify
final.wdmenu
jq
mpv
pqiv
python3Packages.deemix
mpc-cli
final.mpdDup
];
mpdDup = [
mpc-cli
perl
];
readQrCode = [
grim
zbar
wl-clipboard
];
auto_connect_gamepad = [ bluez ];
}
// lib.mapAttrs import_script {
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;
_gpg-unlock = ./_gpg-unlock.nix;
})
}
)

10
scripts/pass-export Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
if test -z "$PASSWORD_STORE_DIR"; then
PASSWORD_STORE_DIR="$HOME/.password-store"
fi
pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \
-f User '(user|login)(:\s*)?' \
-f TOTP 'otpauth(:)?' \
-f URL 'url(:\s*)?'

Binary file not shown.

View file

@ -2,9 +2,14 @@ let
main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15";
in
{
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
main_ssh_public_key
];
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
main_ssh_public_key
];
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];

17
system/bluetooth.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
{
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
settings = {
General = {
DiscoverableTimeout = 0;
# Discoverable = true;
AlwaysPairable = true;
};
Policy = {
AutoEnable = true;
};
};
};
}

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, inputs, ... }: {
{
config,
pkgs,
lib,
inputs,
...
}:
{
console = {
font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz";
packages = [ pkgs.terminus_font ];
@ -38,9 +45,7 @@
enable = true;
theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader";
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override {
selected_themes = [ "red_loader" ];
})
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
];
};
};

View file

@ -1,4 +1,10 @@
{ pkgs, lib, config, ... }: {
{
pkgs,
lib,
config,
...
}:
{
services.cachix-watch-store = {
enable = true;
cacheName = "lelgenio";

View file

@ -1,7 +1,13 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
imports = [
./gamemode.nix
./cachix.nix
@ -9,115 +15,24 @@
./boot.nix
./thunar.nix
./nix.nix
./fonts.nix
./sound.nix
./bluetooth.nix
./locale.nix
./users.nix
./containers.nix
./network.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
zramSwap.enable = true;
programs.adb.enable = true;
services.udev.packages = [ pkgs.android-udev-rules ];
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Open kde connect ports
programs.kdeconnect.enable = true;
networking.firewall.allowedTCPPorts = [ 55201 ];
# Set your time zone.
time.timeZone = "America/Sao_Paulo";
environment.variables.TZ = config.time.timeZone;
# Select internationalisation properties.
i18n.defaultLocale = "pt_BR.utf8";
# Enable the GNOME Desktop Environment.
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
# services.xserver.displayManager.autologin.user = "lelgenio";
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "colemak";
};
console.keyMap = "colemak";
# Enable CUPS to print documents.
# services.printing.enable = true;
services.flatpak.enable = true;
virtualisation.docker.enable = true;
virtualisation.docker.autoPrune.enable = true;
virtualisation.docker.autoPrune.dates = "monthly";
virtualisation.docker.autoPrune.flags = [ "--all --volumes" ];
programs.extra-container.enable = true;
programs.firejail.enable = true;
security.rtkit.enable = true;
services.openssh = {
enable = true;
ports = [ 9022 ];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
# programs.ssh = {
# startAgent = true;
# extraConfig = ''
# AddKeysToAgent yes
# '';
# };
## Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
alsa.enable = true;
jack.enable = true;
};
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
settings = {
General = {
DiscoverableTimeout = 0;
# Discoverable = true;
AlwaysPairable = true;
};
Policy = { AutoEnable = true; };
};
};
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.mutableUsers = false;
users.users.lelgenio = {
isNormalUser = true;
description = "Leonardo Eugênio";
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
];
};
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
# services.getty.autologinUser = "lelgenio";
programs.fish.enable = true;
programs.dzgui.enable = true;
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
services.libinput.enable = true;
packages.media-packages.enable = true;
environment.systemPackages = with pkgs; [
@ -129,21 +44,7 @@
gnome3.adwaita-icon-theme # default gnome cursors
];
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
nerdfonts_fira_hack
];
services.geoclue2.enable = true;
# programs.qt5ct.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
services.pcscd.enable = true;
security.sudo.wheelNeedsPassword = false;
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s

12
system/containers.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
services.flatpak.enable = true;
virtualisation.docker.enable = true;
virtualisation.docker.autoPrune.enable = true;
virtualisation.docker.autoPrune.dates = "monthly";
virtualisation.docker.autoPrune.flags = [ "--all --volumes" ];
programs.extra-container.enable = true;
programs.firejail.enable = true;
}

10
system/fonts.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
nerdfonts_fira_hack
];
}

View file

@ -1,8 +1,16 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
programs.gamemode.enable = true;
programs.gamemode.enableRenice = true;
programs.gamemode.settings = {
general = { renice = 10; };
general = {
renice = 10;
};
# Warning: GPU optimisations have the potential to damage hardware
gpu = {

View file

@ -1,5 +1,7 @@
{ pkgs, lib, ... }: {
mkNixRunner = registrationConfigFile: with lib; rec {
{ pkgs, lib, ... }:
{
mkNixRunner =
registrationConfigFile: with lib; rec {
# File should contain at least these two variables:
# `CI_SERVER_URL`
# `REGISTRATION_TOKEN`
@ -26,7 +28,17 @@
. ${pkgs.nix}/etc/profile.d/nix.sh
${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])}
${pkgs.nix}/bin/nix-env -i ${
concatStringsSep " " (
with pkgs;
[
nix
cacert
git
openssh
]
)
}
'';
environmentVariables = {
ENV = "/etc/profile";

View file

@ -1,25 +1,33 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager.autoLogin = {
services.displayManager.autoLogin = {
enable = true;
user = "lelgenio";
};
programs.kdeconnect = {
enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
# services.xserver.displayManager.autologin.user = "lelgenio";
environment.systemPackages = with pkgs; with gnome; [
environment.systemPackages =
with pkgs;
with gnome;
[
gnome-tweaks
dconf-editor
chrome-gnome-shell
gnomeExtensions.gsconnect
gnomeExtensions.quick-settings-audio-devices-hider
];
}

View file

@ -1,6 +1,17 @@
{ lib, pkgs, config, ... }:
{
lib,
pkgs,
config,
...
}:
let
inherit (pkgs.uservars) key accent font theme desktop;
inherit (pkgs.uservars)
key
accent
font
theme
desktop
;
cfg = config.login-manager.greetd;
in
@ -17,6 +28,7 @@ in
# enable sway window manager
programs.sway = {
enable = true;
package = pkgs.mySway;
wrapperFeatures.gtk = true;
};

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Desktop Environment.

13
system/locale.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, config, ... }:
{
time.timeZone = "America/Sao_Paulo";
environment.variables.TZ = config.time.timeZone;
i18n.defaultLocale = "pt_BR.utf8";
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "colemak";
};
console.keyMap = "colemak";
}

View file

@ -1,6 +1,13 @@
{ config, pkgs, lib, ... }:
let cfg = config.packages.media-packages;
in {
{
config,
pkgs,
lib,
...
}:
let
cfg = config.packages.media-packages;
in
{
options.packages.media-packages = {
enable = lib.mkEnableOption "media packages";
};
@ -16,7 +23,7 @@ in {
gimp
inkscape
krita
kdenlive
kdePackages.kdenlive
pitivi
blender-hip
libreoffice

View file

@ -0,0 +1,20 @@
{ pkgs, config, ... }:
{
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "monolith";
url = "https://git.lelgenio.com";
tokenFile = config.age.secrets.monolith-forgejo-runner-token.path;
labels = [
# provide a debian base with nodejs for actions
"debian-latest:docker://node:18-bullseye"
# fake the ubuntu name, because node provides no ubuntu builds
"ubuntu-latest:docker://node:18-bullseye"
# provide native execution on the host
#"native:host"
];
};
};
}

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
@ -15,7 +20,8 @@ in
# dockerPrivileged = true;
# };
thoreb_builder = {
registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
registrationConfigFile =
config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
dockerImage = "debian";
dockerPrivileged = true;
};

25
system/network.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs, ... }:
{
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Open kde connect ports
programs.kdeconnect.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
security.rtkit.enable = true;
services.openssh = {
enable = true;
ports = [ 9022 ];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
services.nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;

View file

@ -1,7 +1,13 @@
{ lib, config, pkgs, inputs, ... }:
{
lib,
config,
pkgs,
inputs,
...
}:
let
collectFlakeInputs = input:
[ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
collectFlakeInputs =
input: [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
in
{
system.extraDependencies = collectFlakeInputs inputs.self;
@ -11,13 +17,16 @@ in
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 3d";
dates = "weekly";
options = "--delete-older-than 7d";
};
optimise.automatic = true;
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "@wheel" ];
trusted-users = [
"root"
"@wheel"
];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
@ -15,7 +20,8 @@ in
# dockerPrivileged = true;
# };
thoreb_builder = {
registrationConfigFile = config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
registrationConfigFile =
config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
dockerImage = "debian";
dockerPrivileged = true;
};

View file

@ -1,16 +1,13 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
age = {
identityPaths = [ "/root/.ssh/id_rsa" ];
secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age;
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.monolith-nix-serve-privkey.file =
../secrets/monolith-nix-serve-privkey.age;
secrets.phantom-forgejo-mailer-password.file =
../secrets/phantom-forgejo-mailer-password.age;
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age;
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age;
secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age;
};
}

12
system/sound.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
sound.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
alsa.enable = true;
jack.enable = true;
};
}

View file

@ -1,10 +1,7 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
specialisation.dark-theme.configuration = {
nixpkgs.overlays = [
(final: prev: {
uservars = prev.uservars;
})
];
nixpkgs.overlays = [ (final: prev: { uservars = prev.uservars; }) ];
};
specialisation.light-theme.configuration = {
nixpkgs.overlays = [

View file

@ -1,12 +1,22 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
programs.steam.enable = true;
programs.steam.package = pkgs.steam.override {
extraLibraries = pkgs: with config.hardware.opengl;
if pkgs.hostPlatform.is64bit
then [ package ] ++ extraPackages
else [ package32 ] ++ extraPackages32;
extraLibraries =
pkgs:
with config.hardware.opengl;
if pkgs.hostPlatform.is64bit then
[ package ] ++ extraPackages
else
[ package32 ] ++ extraPackages32;
extraPkgs = pkgs: with pkgs; [
extraPkgs =
pkgs: with pkgs; [
capitaine-cursors
bibata-cursors
mangohud
@ -17,4 +27,7 @@
protontricks
bottles
];
programs.dzgui.enable = true;
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
@ -12,8 +18,7 @@
services.tumbler.enable = true;
environment.systemPackages = [
(
pkgs.writeTextFile {
(pkgs.writeTextFile {
name = "thumbs";
text = ''
[Thumbnailer Entry]
@ -22,7 +27,6 @@
MimeType=application/x-krita;
'';
destination = "/share/thumbnailers/kra.thumbnailer";
}
)
})
];
}

29
system/users.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs, ... }:
{
security.sudo.wheelNeedsPassword = false;
# services.getty.autologinUser = "lelgenio";
programs.fish.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.mutableUsers = false;
users.users.lelgenio = {
isNormalUser = true;
description = "Leonardo Eugênio";
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"adbusers"
"bluetooth"
"corectrl"
"vboxusers"
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
];
};
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
}

2
update
View file

@ -1,4 +1,4 @@
#!/bin/sh
nix flake update --verbose --print-build-logs
./switch
exec ./switch "$@"

View file

@ -1,6 +1,16 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key theme accent font;
inherit (pkgs.uservars)
key
theme
accent
font
;
inherit (theme) color;
in
{
@ -10,7 +20,9 @@ in
settings = {
font = {
size = font.size.small;
normal = { family = font.mono; };
normal = {
family = font.mono;
};
};
colors = {
primary = {
@ -31,8 +43,8 @@ in
cyan = "${color.normal.cyan}";
white = "${color.normal.white}";
};
};
draw_bold_text_with_bright_colors = false;
};
window = {
opacity = theme.opacity / 100.0;
dynamic_padding = true;
@ -40,11 +52,11 @@ in
hints = {
alphabet = key.hints;
enabled = [{
enabled = [
{
regex =
let
mimes =
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
# I fucking hate regex, look at this bullshit
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^`'';
# Kakoune uses these characters to represent whitespace,
@ -62,10 +74,13 @@ in
key = "U";
mods = "Control|Shift";
};
}];
}
];
};
mouse = { hide_when_typing = true; };
key_bindings = [
mouse = {
hide_when_typing = true;
};
keyboard.bindings = [
{
key = lib.toUpper key.up;
mode = "Vi|~Search";
@ -141,7 +156,9 @@ in
};
};
home.sessionVariables = { TERMINAL = "alacritty"; };
home.sessionVariables = {
TERMINAL = "alacritty";
};
# Look at this fucking bullshit:
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702

View file

@ -1,6 +1,17 @@
{ config, pkgs, lib, inputs, ... }:
{
config,
pkgs,
lib,
inputs,
...
}:
let
inherit (pkgs.uservars) key theme accent font;
inherit (pkgs.uservars)
key
theme
accent
font
;
inherit (theme) color;
in
{

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, inputs, ... }: {
{
config,
pkgs,
lib,
inputs,
...
}:
{
wayland.windowManager.sway = {
extraConfig = ''
exec thunderbird

View file

@ -1,10 +1,22 @@
{ config, pkgs, lib, inputs, ... }: {
xdg.desktopEntries = {
connect-controller = {
name = "Connect Controller";
exec = "bluetoothctl connect 84:30:95:97:1A:79";
terminal = false;
{ pkgs, lib, ... }:
{
systemd.user.services = {
autoconnect-gamepad = {
Unit = {
Description = "Attempt to connect to game controllers";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = lib.getExe pkgs.auto_connect_gamepad;
};
Install = {
WantedBy = [ "sway-session.target" ];
};
};
};
xdg.desktopEntries = {
disconnect-controller = {
name = "Disconnect Controller";
exec = "bluetoothctl disconnect 84:30:95:97:1A:79";

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
xdg.desktopEntries = {
kak = {
name = "Kakoune";
@ -8,7 +14,10 @@
terminal = true;
type = "Application";
icon = "kak.desktop";
categories = [ "Utility" "TextEditor" ];
categories = [
"Utility"
"TextEditor"
];
startupNotify = true;
mimeType = [
"text/english"
@ -40,10 +49,15 @@
terminal = true;
type = "Application";
icon = "mutt";
categories = [ "Network" "Email" ];
categories = [
"Network"
"Email"
];
startupNotify = false;
mimeType = [ "x-scheme-handler/mailto" ];
settings = { Keywords = "Mail;E-mail;"; };
settings = {
Keywords = "Mail;E-mail;";
};
};
down_meme = {
name = "DownMeme";

View file

@ -1,6 +1,16 @@
{ config, pkgs, lib, font, ... }:
let inherit (pkgs.uservars) desktop browser;
bugfixedFirefox = pkgs.firefox-esr-unwrapped // { requireSigning = false; allowAddonSideload = true; };
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (pkgs.uservars) desktop browser;
bugfixedFirefox = pkgs.firefox-esr-unwrapped // {
requireSigning = false;
allowAddonSideload = true;
};
in
{
config = {
@ -28,6 +38,12 @@ in
url = "https://addons.mozilla.org/firefox/downloads/file/4198829/ublock_origin-1.54.0.xpi";
hash = "sha256-l5cWCQgZFxD/CFhTa6bcKeytmSPDCyrW0+XjcddZ5E0=";
})
(pkgs.fetchFirefoxAddon {
name = "i-still-dont-care-about-cookies";
url = "https://github.com/OhMyGuus/I-Still-Dont-Care-About-Cookies/releases/download/v1.1.4/istilldontcareaboutcookies-1.1.4.xpi";
hash = "sha256-yt6yRiLTuaK4K/QwgkL9gCVGsSa7ndFOHqZvKqIGZ5U=";
})
(pkgs.fetchFirefoxAddon {
name = "vimium_ff";
url = "https://addons.mozilla.org/firefox/downloads/file/4191523/vimium_ff-2.0.6.xpi";
@ -43,6 +59,11 @@ in
url = "https://addons.mozilla.org/firefox/downloads/file/4215691/mastodon_simplified_federation-2.2.xpi";
hash = "sha256-4iU25chpjsdsMTPaa0yQOTWc9V9q1qFz6YV0lYtNjLA=";
})
(pkgs.fetchFirefoxAddon {
name = "substitoot";
url = "https://addons.mozilla.org/firefox/downloads/file/4236602/substitoot-0.7.2.0.xpi";
hash = "sha256-1auSqEjkebwRSbmAVUsYwy77dl7TQCOnqgozpoVnqgI=";
})
# Locale
(pkgs.fetchFirefoxAddon {

View file

@ -1,6 +1,21 @@
{ config, pkgs, lib, ... }:
let inherit (pkgs.uservars) key theme color accent font editor desktop;
in {
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars)
key
theme
color
accent
font
editor
desktop
;
in
{
config = {
programs.fish = {
enable = true;
@ -34,10 +49,12 @@ in {
};
shellAbbrs = {
off = "shutdown now";
v = {
v =
{
"helix" = "hx";
"kakoune" = "kak";
}.${editor};
}
.${editor};
ns = "nix develop --command $SHELL";
wcf = "wl-copy-file";
c = "cargo";
@ -64,12 +81,13 @@ in {
gr = "cd (git root)";
gri = "git rebase --interactive FETCH_HEAD";
};
functions = { fish_greeting = ""; };
functions = {
fish_greeting = "";
};
};
programs = {
zoxide.enable = true;
eza.enable = true;
eza.enableAliases = true;
direnv.enable = true;
direnv.nix-direnv.enable = true;
};
@ -86,13 +104,18 @@ in {
};
# programs.command-not-found.enable = true;
programs.nix-index.enable = true;
home.packages = (with pkgs; with fishPlugins;[
home.packages = (
with pkgs;
with fishPlugins;
[
trash-cli
wl-copy-file
foreign-env
] ++ (lib.optionals (desktop == "sway") [
]
++ (lib.optionals (desktop == "sway") [
async-prompt
done
]));
])
);
};
}

View file

@ -1,6 +1,17 @@
{ config, pkgs, lib, inputs, ... }:
{
config,
pkgs,
lib,
inputs,
...
}:
let
inherit (pkgs.uservars) key theme accent font;
inherit (pkgs.uservars)
key
theme
accent
font
;
inherit (theme) color;
colors = {
@ -15,22 +26,21 @@ let
makeOptList = lib.mapAttrsToList makeKeyValue colors;
makeColorValue = lib.strings.concatStringsSep "," makeOptList;
color_opts = "--color=${makeColorValue}";
preview_opts =
"--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
preview_opts = "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'";
in
{
programs.fzf = {
enable = true;
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
fileWidgetOptions =
[ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
fileWidgetOptions = [ "--preview '${pkgs.bat}/bin/bat --style=numbers --color=always {}'" ];
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
changeDirWidgetOptions =
[ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
changeDirWidgetOptions = [ "--preview '${pkgs.eza}/bin/eza -T L3 | head -200'" ];
defaultOptions = [ color_opts preview_opts ];
defaultOptions = [
color_opts
preview_opts
];
};
}

View file

@ -1,9 +1,17 @@
{ config, pkgs, lib, ... }:
let inherit (pkgs.uservars) username mail;
in {
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) username mail;
in
{
config = {
programs.git = {
enable = true;
lfs.enable = true;
extraConfig = {
user = {
name = username;

View file

@ -1,4 +1,10 @@
{ pkgs, lib, inputs, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") {
{
pkgs,
lib,
inputs,
...
}:
lib.mkIf (pkgs.uservars.desktop == "gnome") {
home.pointerCursor = {
name = "Adwaita";
@ -14,9 +20,7 @@
cursor-theme = "Adwaita";
# color-scheme = "default";
};
"org/gnome/desktop/wm/preferences" = lib.mkForce {
button-layout = "appmenu:close";
};
"org/gnome/desktop/wm/preferences" = lib.mkForce { button-layout = "appmenu:close"; };
"org/gnome/desktop/input-sources" = {
xkb-options = [ "lv3:lsgt_switch" ];
};
@ -36,9 +40,13 @@
libsForQt5.qt5ct
libsForQt5.qtstyleplugin-kvantum
qt6Packages.qt6ct
qt6Packages.qtstyleplugin-kvantum
];
home.sessionVariables = { QT_QPA_PLATFORMTHEME = "qt5ct"; };
home.sessionVariables = {
QT_QPA_PLATFORMTHEME = "qt5ct";
};
xdg.defaultApplications = {
enable = true;

View file

@ -1,10 +1,16 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
config = {
services.gpg-agent = {
enable = true;
defaultCacheTtl = 604800;
maxCacheTtl = 604800;
pinentryFlavor = "gtk2";
pinentryPackage = pkgs.pinentry-curses;
extraConfig = ''
allow-preset-passphrase
'';
@ -16,7 +22,9 @@
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = { ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock"; };
Service = {
ExecStart = "${pkgs._gpg-unlock}/bin/_gpg-unlock";
};
};
};
systemd.user.timers = {
@ -31,9 +39,10 @@
OnUnitActiveSec = "300";
Unit = "gpg_unlock.service";
};
Install = { WantedBy = [ "sway-session.target" ]; };
Install = {
WantedBy = [ "sway-session.target" ];
};
};
};
};
}

View file

@ -74,7 +74,9 @@ in
g.n = "goto_line_start";
g.o = "goto_line_end";
};
keys.insert = { "A-k" = "normal_mode"; };
keys.insert = {
"A-k" = "normal_mode";
};
};
languages.language = [
{
@ -96,14 +98,29 @@ in
my-theme = {
"inherits" = "gruvbox";
"ui.menu" = "none";
"ui.background" = { bg = "none"; };
"ui.background" = {
bg = "none";
};
"ui.virtual.whitespace" = color.nontxt;
"ui.cursor.primary" = { fg = accent.fg; bg = accent.color; };
"ui.cursorline.primary" = { bg = color.bg_dark; };
"ui.cursorcolumn.primary" = { modifiers = [ "bold" ]; };
"ui.cursorline" = { bg = "none"; };
"ui.cursorcolumn" = { bg = "none"; };
"ui.linenr.selected" = { fg = color.txt; };
"ui.cursor.primary" = {
fg = accent.fg;
bg = accent.color;
};
"ui.cursorline.primary" = {
bg = color.bg_dark;
};
"ui.cursorcolumn.primary" = {
modifiers = [ "bold" ];
};
"ui.cursorline" = {
bg = "none";
};
"ui.cursorcolumn" = {
bg = "none";
};
"ui.linenr.selected" = {
fg = color.txt;
};
function = color.normal.orange;
module = color.normal.brown;
@ -124,8 +141,6 @@ in
};
};
};
home.sessionVariables = lib.mkIf (editor == "helix") {
EDITOR = "hx";
};
home.sessionVariables = lib.mkIf (editor == "helix") { EDITOR = "hx"; };
};
}

View file

@ -1,4 +1,12 @@
{ config, pkgs, lib, inputs, osConfig, ... }: {
{
config,
pkgs,
lib,
inputs,
osConfig,
...
}:
{
imports = [
./controller.nix
./waybar
@ -70,7 +78,7 @@
comma
# System monitors
btop
(btop.override { cudaSupport = true; })
amdgpu_top
inxi
dmidecode
@ -126,7 +134,7 @@
rust-analyzer # rust analyzer
blade-formatter
nixpkgs-fmt
nixfmt-rfc-style
];
fonts.fontconfig.enable = true;
@ -138,10 +146,11 @@
};
};
home.sessionVariables = {
VOLUME_CHANGE_SOUND =
"${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
VOLUME_CHANGE_SOUND = "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
};
programs.bash = {
enable = true;
};
programs.bash = { enable = true; };
xdg.defaultApplications = {
enable = true;
@ -152,7 +161,8 @@
{
firefox = lib.mkDefault "firefox.desktop";
qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop";
}.${pkgs.uservars.browser}
}
.${pkgs.uservars.browser}
);
document-viewer = lib.mkDefault "org.pwmt.zathura.desktop";
file-manager = lib.mkDefault "thunar.desktop";
@ -161,7 +171,9 @@
torrent-client = lib.mkDefault "torrent.desktop";
};
wayland.windowManager.sway.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") ''
wayland.windowManager.sway.extraConfig =
lib.optionalString (osConfig.networking.hostName or "" == "monolith")
''
exec steam
exec obs --startreplaybuffer --disable-shutdown-check
exec deluge-gtk
@ -180,12 +192,16 @@
};
};
systemd.user.timers.rm-target = {
Unit = { Description = "Remove directories named 'target'"; };
Unit = {
Description = "Remove directories named 'target'";
};
Timer = {
OnCalendar = "weekly";
Unit = "rm-target.service";
};
Install = { WantedBy = [ "timers.target" ]; };
Install = {
WantedBy = [ "timers.target" ];
};
};
# This value determines the Home Manager release that your

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
wayland.windowManager.hyprland = {
enable = false;
@ -122,6 +128,9 @@
'';
};
home.file.".config/eww".source = ./eww;
home.packages = with pkgs; [ eww-wayland jq ];
home.packages = with pkgs; [
eww-wayland
jq
];
};
}

View file

@ -1,4 +1,9 @@
{ pkgs, lib, color, accent }:
{
pkgs,
lib,
color,
accent,
}:
let
colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) {
accent_fg = accent.fg;
@ -94,8 +99,9 @@ with colors;
face global InlayHint ${bg_light}+buif
# Lsp
'' + (
lib.concatStringsSep "\n" (lib.mapAttrsToList
''
+ (lib.concatStringsSep "\n" (
lib.mapAttrsToList
(name: color: ''
face global HighlightDiagnostic${name} ${color},default+bu
face global Diagnostic${name} ${color},default+bu
@ -106,6 +112,5 @@ with colors;
Error = "red";
Warning = "yellow";
Hint = "blue";
})
)
}
))

View file

@ -1,6 +1,17 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key dmenu editor theme accent;
inherit (pkgs.uservars)
key
dmenu
editor
theme
accent
;
inherit (theme) color;
inherit (pkgs) kakounePlugins;
inherit (pkgs.kakouneUtils) buildKakounePlugin;
@ -74,8 +85,9 @@ in
})
];
extraConfig =
lib.concatStringsSep "\n"
(map (lib.readFile) ([
lib.concatStringsSep "\n" (
map (lib.readFile) (
[
./filetypes.kak
./hooks.kak
./indent.kak
@ -83,17 +95,29 @@ in
./lsp-config.kak
./usermode.kak
./git-mode.kak
] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + ''
]
++ lib.optional (dmenu == "rofi") ./rofi-commands.kak
)
)
+ ''
set global scrolloff 10,20
set global autoreload yes
set global startup_info_version 99999999
'' + (import ./colors.nix {
inherit pkgs lib color accent;
''
+ (import ./colors.nix {
inherit
pkgs
lib
color
accent
;
});
};
home.file = { ".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml; };
home.file = {
".config/kak-lsp/kak-lsp.toml".source = ./kak-lsp.toml;
};
home.packages = with pkgs; [
terminal
ranger
@ -123,4 +147,3 @@ in
};
};
}

View file

@ -12,7 +12,7 @@ hook global WinSetOption filetype=c %{
}
hook global WinSetOption filetype=nix %{
set buffer formatcmd 'nixpkgs-fmt'
set buffer formatcmd 'nixfmt'
}
hook global BufCreate .*\.html %{

View file

@ -7,7 +7,7 @@ verbosity = 2
# set to 0 to disable
timeout = 1800 # seconds = 30 minutes
[language.angular]
[language_server.angular]
filetypes = ["angular"]
roots = [".angular", ".git"]
command = "node"
@ -20,134 +20,80 @@ args = [
"--stdio",
]
[language.bash]
[language_server.bash-language-server]
filetypes = ["sh"]
roots = [".git", ".hg"]
command = "bash-language-server"
args = ["start"]
[language.c_cpp]
[language_server.clangd]
filetypes = ["c", "cpp"]
roots = [ "compile_commands.json", ".clangd", ".git" ]
roots = ["compile_commands.json", ".clangd", ".git", ".hg"]
command = "clangd"
[language.crystal]
filetypes = ["crystal"]
roots = ["shard.yml"]
command = "scry"
[language.css]
[language_server.css-language-server]
filetypes = ["css"]
roots = ["package.json"]
roots = ["package.json", ".git", ".hg"]
command = "vscode-css-languageserver"
args = ["--stdio"]
[language.less]
[language_server.less-language-server]
filetypes = ["less"]
roots = ["package.json", ".git"]
roots = ["package.json", ".git", ".hg"]
command = "vscode-css-languageserver"
args = ["--stdio"]
[language.d]
filetypes = ["d", "di"]
roots = [".git", "dub.sdl", "dub.json"]
command = "dls"
[language.dart]
# start shell to find path to dart analysis server source
filetypes = ["dart"]
roots = ["pubspec.yaml", ".git"]
command = "sh"
args = ["-c", "dart $(dirname $(which dart))/snapshots/analysis_server.dart.snapshot --lsp"]
[language.elm]
filetypes = ["elm"]
roots = ["elm.json"]
command = "elm-language-server"
args = ["--stdio"]
# [language.elm.initialization_options]
# runtime = "node"
# elmPath = "elm"
# elmFormatPath = "elm-format"
# elmTestPath = "elm-test"
[language.go]
filetypes = ["go"]
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
command = "gopls"
offset_encoding = "utf-8"
[language.haskell]
filetypes = ["haskell"]
roots = ["Setup.hs", "stack.yaml", "*.cabal"]
command = "haskell-language-server-wrapper"
args = ["--lsp"]
[language.html]
[language_server.html-language-server]
filetypes = ["html"]
roots = ["package.json"]
command = "vscode-html-languageserver"
args = ["--stdio"]
settings_section = "_"
[language_server.html-language-server.settings._]
# quotePreference = "single"
# javascript.format.semicolons = "insert"
[language.javascript]
filetypes = ["javascript"]
roots = [".flowconfig"]
command = "flow"
args = ["lsp"]
[language.typescript]
filetypes = ["typescript"]
roots = ["package.json"]
[language_server.typescript-language-server]
filetypes = ["javascript", "typescript"]
roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"]
command = "typescript-language-server"
args = ["--stdio"]
settings_section = "_"
[language_server.typescript-language-server.settings._]
# quotePreference = "double"
# typescript.format.semicolons = "insert"
[language.json]
[language_server.json-language-server]
filetypes = ["json"]
roots = ["package.json"]
command = "vscode-json-languageserver"
args = ["--stdio"]
[language.latex]
filetypes = ["latex"]
roots = [".git"]
command = "texlab"
[language.nim]
filetypes = ["nim"]
roots = ["*.nimble", ".git"]
command = "nimlsp"
[language.nix]
[language_server.nil]
filetypes = ["nix"]
command = "nil"
roots = ["flake.nix", "shell.nix", ".git"]
[language.nix.settings.nil]
formatting.command = [ "nixpkgs-fmt" ]
[language_server.nil.settings.nil]
formatting.command = [ "nixfmt" ]
[language.ocaml]
filetypes = ["ocaml"]
roots = ["Makefile", "opam", "*.opam", "dune"]
command = "ocaml-language-server"
args = ["--stdio"]
[language.php]
[language_server.intelephense]
filetypes = ["php"]
roots = [".htaccess", "composer.json"]
command = "intelephense"
args = ["--stdio"]
settings_section = "intelephense"
[language.php.settings]
intelephense.format.braces = "k&r"
intelephense.storagePath = "/tmp/intelephense"
intelephense.environment.includePaths = [
[language_server.intelephense.settings.intelephense]
storagePath = "/tmp/intelephense"
format.braces = "k&r"
environment.includePaths = [
"./vendor",
"./vendor/autoload",
"./vendor/laravel/framework/",
"./vendor/laravel/framework/src/",
"./vendor/laravel/framework/src/Illuminate/"
]
intelephense.files.exclude = [
files.exclude = [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
@ -159,42 +105,9 @@ intelephense.files.exclude = [
"**/resources/views/**"
]
[language.python]
filetypes = ["python"]
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
command = "pyls"
offset_encoding = "utf-8"
[language.reason]
filetypes = ["reason"]
roots = ["package.json", "Makefile", ".git", ".hg"]
command = "ocaml-language-server"
args = ["--stdio"]
[language.ruby]
filetypes = ["ruby"]
roots = ["Gemfile"]
command = "solargraph"
args = ["stdio"]
# [language.rust]
# filetypes = ["rust"]
# roots = ["Cargo.toml"]
# command = "sh"
# args = [
# "-c",
# """
# if path=$(rustup which rls 2>/dev/null); then
# "$path"
# else
# rls
# fi
# """,
# ]
[language.rust]
[language_server.rust-analyzer]
filetypes = ["rust"]
roots = ["rust-toolchain.toml", "rust-toolchain", "Cargo.toml"]
roots = ["Cargo.toml"]
command = "sh"
args = [
"-c",
@ -206,99 +119,37 @@ args = [
fi
""",
]
[language.rust.settings.rust-analyzer]
## this can use too much space and processing power
# checkOnSave.extraArgs = ["--target-dir", "./target/check"]
[language_server.rust-analyzer.settings.rust-analyzer]
# See https://rust-analyzer.github.io/manual.html#configuration
# cargo.features = []
checkOnSave.command = "clippy"
hoverActions.enable = false # kak-lsp doesn't support this at the moment
# procMacro.enable = true
# cargo.loadOutDirsFromCheck = true
# rustfmt.rangeFormatting.enable = true
# rustfmt.extraArgs = ["+nightly"]
[language.terraform]
filetypes = ["terraform"]
roots = ["*.tf"]
command = "terraform-ls"
args = ["serve"]
[language.godot]
[language_server.godot]
filetypes = ["gd", "gdscript", "gdscript3"]
roots = ["project.godot", ".git/"]
command = "nc"
args = [ "localhost", "6008"]
[language.clojure]
filetypes = ["clojure"]
roots = ["project.clj", ".git/"]
command = "clojure-lsp"
args = []
[semantic_scopes]
# Map textmate scopes to kakoune faces for semantic highlighting
# the underscores are translated to dots, and indicate nesting.
# That is, if variable_other_field is omitted, it will try the face for
# variable_other and then variable
#
# To see a list of available scopes in the debug buffer, run lsp-semantic-available-scopes
variable = "variable"
entity_name_function = "function"
entity_name_type = "type"
variable_other_enummember = "variable"
entity_name_namespace = "module"
[semantic_modifiers]
documentation = "documentation"
readonly = "default+d"
[[semantic_tokens]]
token = "comment"
face = "documentation"
modifiers = ["documentation"]
[[semantic_tokens]]
token = "comment"
face = "comment"
[[semantic_tokens]]
token = "function"
face = "function"
[[semantic_tokens]]
token = "keyword"
face = "keyword"
[[semantic_tokens]]
token = "namespace"
face = "module"
[[semantic_tokens]]
token = "operator"
face = "operator"
[[semantic_tokens]]
token = "string"
face = "string"
[[semantic_tokens]]
token = "type"
face = "type"
[[semantic_tokens]]
token = "variable"
face = "default+d"
modifiers = ["readonly"]
[[semantic_tokens]]
token = "variable"
face = "default+d"
modifiers = ["constant"]
[[semantic_tokens]]
token = "variable"
face = "variable"
# Semantic tokens support
# See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens
# for the default list of tokens and modifiers.
# However, many language servers implement their own values.
# Make sure to check the output of `lsp-capabilities` and each server's documentation and source code as well.
# Examples:
# - TypeScript: https://github.com/microsoft/vscode-languageserver-node/blob/main/client/src/common/semanticTokens.ts
# - Rust Analyzer: https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs
[semantic_tokens]
faces = [
{face="documentation", token="comment", modifiers=["documentation"]},
{face="comment", token="comment"},
{face="function", token="function"},
{face="keyword", token="keyword"},
{face="module", token="namespace"},
{face="operator", token="operator"},
{face="string", token="string"},
{face="type", token="type"},
{face="default+d", token="variable", modifiers=["readonly"]},
{face="default+d", token="variable", modifiers=["constant"]},
{face="variable", token="variable"},
]

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, inputs, ... }: {
{
config,
pkgs,
lib,
inputs,
...
}:
{
programs.lf = {
enable = true;
keybindings = {

View file

@ -1,5 +1,20 @@
{ config, pkgs, lib, inputs, ... }:
let inherit (pkgs.uservars) key theme color accent font desktop editor;
{
config,
pkgs,
lib,
inputs,
...
}:
let
inherit (pkgs.uservars)
key
theme
color
accent
font
desktop
editor
;
pagers = rec {
kak = kakoune;
kakoune = {

View file

@ -1,6 +1,20 @@
{ config, pkgs, lib, font, ... }:
let inherit (pkgs.uservars) key theme color accent font;
in {
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (pkgs.uservars)
key
theme
color
accent
font
;
in
{
config = {
programs.mangohud = {
enable = true;

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, font, ... }:
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (pkgs.uservars) browser;
cfg = config.xdg.defaultApplications;
@ -26,20 +32,21 @@ in
xdg.mimeApps =
let
createMimeAssociation = (mime_prefix: application: mime_suffix: {
"${mime_prefix}/${mime_suffix}" = application;
});
createMimeAssociation = (
mime_prefix: application: mime_suffix: { "${mime_prefix}/${mime_suffix}" = application; }
);
createMimeAssociations = (mime_prefix: application: mime_suffixes:
lib.foldAttrs (n: _: n) { }
(map (createMimeAssociation mime_prefix application) mime_suffixes));
createMimeAssociations = (
mime_prefix: application: mime_suffixes:
lib.foldAttrs (n: _: n) { } (map (createMimeAssociation mime_prefix application) mime_suffixes)
);
mimes = simple
mimes =
simple
// (createMimeAssociations "text" cfg.text-editor text_suffixes)
// (createMimeAssociations "image" cfg.image-viewer image_suffixes)
// (createMimeAssociations "video" cfg.video-player video_suffixes)
// (createMimeAssociations "application" cfg.archive-manager archive-suffixes)
;
// (createMimeAssociations "application" cfg.archive-manager archive-suffixes);
simple = {
"inode/directory" = cfg.file-manager;
@ -421,7 +428,6 @@ in
"x-theora+ogg"
];
archive-suffixes = [
"bzip2"
"gzip"
@ -487,6 +493,5 @@ in
enable = true;
defaultApplications = mimes;
};
};
}

View file

@ -1,4 +1,10 @@
{ lib, pkgs, config, ... }: {
{
lib,
pkgs,
config,
...
}:
{
config = lib.mkIf (pkgs.uservars.desktop != "gnome") {
services.mpd = {
enable = true;

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
config = {
programs.mpv = {
enable = true;
@ -6,8 +7,7 @@
# ytdl-format='best';
# ytdl_path = "yt-dlp";
ytdl-format = "bestvideo[height<=1080][vcodec!=vp9]+bestaudio/best";
ytdl-raw-options =
"cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
ytdl-raw-options = "cookies=~/.cache/cookies-youtube-com.txt,mark-watched=";
osd-fractions = true;
save-position-on-quit = true;
keep-open = true;

View file

@ -1,10 +1,15 @@
{ config, pkgs, lib, inputs, ... }: {
{
config,
pkgs,
lib,
inputs,
...
}:
{
config = {
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (ex: with ex; [
pass-otp
]);
package = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
};
services = {
pass-secret-service.enable = true;

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
# RNNoise is a noise supperssion neural network
# Here we use it as a plugin for pipewire to create a virtual microphone
config = {

View file

@ -1,8 +1,21 @@
{ config, pkgs, lib, inputs, ... }:
{
config,
pkgs,
lib,
inputs,
...
}:
let
inherit (pkgs.uservars) key theme color accent font;
inherit (pkgs.uservars)
key
theme
color
accent
font
;
make_direction_binds = lib.imap0 (idx: direction:
make_direction_binds = lib.imap0 (
idx: direction:
let
sign = if (idx < 2) then 1 else -1;
axis = if ((lib.mod idx 2) != 0) then "y" else "x";
@ -15,8 +28,8 @@ let
montage_mode_shift_${axis}(${toString (sign * -1)})
}
}
'');
''
);
in
{
# My bemenu wrapper
@ -45,7 +58,12 @@ in
<Left> { goto_file_relative(-1) }
<Right> { goto_file_relative(1); }
${lib.concatStrings (make_direction_binds [ "left" "up" "right" "down" ])}
${lib.concatStrings (make_direction_binds [
"left"
"up"
"right"
"down"
])}
${key.tabL} { goto_file_relative(-1) }
${key.tabR} { goto_file_relative(1); }
@ -54,10 +72,7 @@ in
d { send_keys(6) }
y { send_keys(8) }
${if (key.layout == "colemak") then
"\n t { toggle_scale_mode(0) }\n "
else
""}
${if (key.layout == "colemak") then "\n t { toggle_scale_mode(0) }\n " else ""}
# vim: ft=ini
'';

View file

@ -1,6 +1,18 @@
{ config, pkgs, lib, font, ... }:
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (pkgs.uservars) key theme accent font browser;
inherit (pkgs.uservars)
key
theme
accent
font
browser
;
inherit (theme) color;
in
{
@ -38,9 +50,12 @@ in
};
in
{
bar = { bg = color.bg; };
bar = {
bg = color.bg;
};
pinned = tabs_defaults;
} // tabs_defaults;
}
// tabs_defaults;
########################################################
# Completion for urls and commands
@ -48,10 +63,18 @@ in
completion = {
fg = color.txt;
even = { bg = color.bg; };
odd = { bg = color.bg; };
scrollbar = { bg = color.bg_dark; };
match = { fg = accent.color; };
even = {
bg = color.bg;
};
odd = {
bg = color.bg;
};
scrollbar = {
bg = color.bg_dark;
};
match = {
fg = accent.color;
};
category = {
fg = color.txt;
bg = color.bg_dark;
@ -68,7 +91,9 @@ in
top = color.bg_dark;
bottom = color.bg_dark;
};
match = { fg = color.txt; };
match = {
fg = color.txt;
};
};
};
};
@ -102,10 +127,16 @@ in
};
url = {
success = {
https = { fg = color.txt; };
http = { fg = color.normal.red; };
https = {
fg = color.txt;
};
http = {
fg = color.normal.red;
};
};
hover = {
fg = color.normal.cyan;
};
hover = { fg = color.normal.cyan; };
};
};
########################################################
@ -113,9 +144,15 @@ in
########################################################
downloads = {
start = { bg = color.normal.blue; };
stop = { bg = color.normal.green; };
bar = { bg = color.bg; };
start = {
bg = color.normal.blue;
};
stop = {
bg = color.normal.green;
};
bar = {
bg = color.bg;
};
};
########################################################
@ -125,7 +162,9 @@ in
hints = {
fg = color.txt;
bg = color.bg;
match = { fg = accent.color; };
match = {
fg = accent.color;
};
};
########################################################
@ -135,7 +174,9 @@ in
keyhint = {
fg = color.txt;
bg = color.bg;
suffix = { fg = accent.color; };
suffix = {
fg = accent.color;
};
};
########################################################
@ -151,7 +192,9 @@ in
fg = accent.fg;
bg = accent.color;
};
disabled = { fg = color.bg_light; };
disabled = {
fg = color.bg_light;
};
};
########################################################
@ -216,4 +259,3 @@ in
'';
};
}

View file

@ -1,10 +1,18 @@
{ config, pkgs, lib, font, ... }:
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (pkgs.uservars) theme;
inherit (theme) color;
# ".config/qutebrowser/greasemonkey/darkreader.js".text =
darkThemeUserscript = enabled: pkgs.writeText "darkreader.js" ''
darkThemeUserscript =
enabled:
pkgs.writeText "darkreader.js" ''
// ==UserScript==
// @name Dark Reader (Unofficial)
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
@ -87,4 +95,3 @@ in
'';
};
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, font, ... }:
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (pkgs.uservars) key browser editor;
in
@ -10,7 +16,7 @@ in
];
config = {
programs.qutebrowser = {
programs.qutebrowser = lib.mkIf (browser == "qutebrowser") {
enable = true;
# enableDefaultBindings = false;
keyBindings = {
@ -59,7 +65,6 @@ in
"${key.insertMode}" = "mode-enter insert";
};
};
settings = {
tabs.tree_tabs = true;
@ -78,7 +83,8 @@ in
{
kakoune = "kak";
helix = "hx";
}.${editor}
}
.${editor}
"{file}"
"+{line}"
];
@ -112,7 +118,9 @@ in
ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser";
Restart = "on-failure";
};
Install = { WantedBy = [ "sway-session.target" ]; };
Install = {
WantedBy = [ "sway-session.target" ];
};
};
};
home.file = {
@ -149,4 +157,3 @@ in
};
};
}

View file

@ -33,4 +33,3 @@ in
};
};
}

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, inputs, ... }: {
{
config,
pkgs,
lib,
inputs,
...
}:
{
xdg.configFile = {
"ranger/rc.conf".source = ./rc.conf;
"ranger/rifle.conf".source = ./rifle.conf;

View file

@ -1,6 +1,17 @@
{ config, pkgs, lib, font, ... }:
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (pkgs.uservars) key theme accent font;
inherit (pkgs.uservars)
key
theme
accent
font
;
inherit (theme) color;
in
{
@ -42,14 +53,15 @@ in
};
"#window" = {
background-color = mkLiteral
"${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}";
background-color = mkLiteral "${color.bg}${lib.toHexString (theme.opacity * 255 / 100)}";
# children = map mkLiteral [ "prompt" "entry" ];
border = mkLiteral "2px solid";
border-color = mkLiteral accent.color;
padding = 0;
};
"#inputbar" = { margin = mkLiteral "10px"; };
"#inputbar" = {
margin = mkLiteral "10px";
};
"#listview" = {
# fixed-height=0;
border = mkLiteral "2px solid 0px 0px";
@ -78,9 +90,7 @@ in
margin-right = mkLiteral "20px";
size = 24;
};
};
};
};
}

View file

@ -1,17 +1,24 @@
{ config, pkgs, lib, ... }:
let inherit (pkgs.uservars) username mail;
in {
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) username mail;
in
{
config = {
programs.ssh.enable = true;
programs.ssh.matchBlocks = {
monolith = {
user = "lelgenio";
hostname = "lelgenio.1337.cx";
hostname = "monolith.lelgenio.com";
port = 9022;
};
phantom = {
user = "root";
hostname = "phantom.lelgenio.xyz";
hostname = "phantom.lelgenio.com";
port = 9022;
};
};

View file

@ -1,6 +1,16 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key accent font theme;
inherit (pkgs.uservars)
key
accent
font
theme
;
inherit (theme) color;
in
{
@ -21,6 +31,7 @@ in
wayland.windowManager.sway = {
enable = true;
package = pkgs.mySway;
config = {
bars = [ ];
@ -41,7 +52,13 @@ in
bg_color = color.bg_dark;
alert = "#000000";
client = border: background: text: indicator: childBorder: {
inherit border background text indicator childBorder;
inherit
border
background
text
indicator
childBorder
;
};
in
{
@ -52,7 +69,7 @@ in
};
output = {
"*" = {
adaptive_sync = "on";
adaptive_sync = "enabled";
bg = "${theme.background} fill";
mode = "1920x1080@144.000Hz";
};
@ -78,9 +95,7 @@ in
};
# setup cursor based on home.pointerCursor
seat."*" = {
xcursor_theme = "${config.home.pointerCursor.name} ${
toString config.home.pointerCursor.size
}";
xcursor_theme = "${config.home.pointerCursor.name} ${toString config.home.pointerCursor.size}";
hide_cursor = "when-typing enable";
};
};
@ -89,6 +104,7 @@ in
exec ${pkgs.dbus-sway-environment}/bin/dbus-sway-environment
exec swaymsg workspace 2
exec_always systemctl --user restart waybar.service
exec corectrl --minimize-systray
'';
};
services.gammastep = {
@ -104,7 +120,7 @@ in
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
home.packages = with pkgs; [
sway
mySway
swaybg
swaylock
wdisplays
@ -130,7 +146,10 @@ in
grim
swappy
(tesseract5.override {
enableLanguages = [ "eng" "por" ];
enableLanguages = [
"eng"
"por"
];
})
];
};

View file

@ -1,12 +1,24 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key accent font theme;
inherit (pkgs.uservars)
key
accent
font
theme
;
inherit (theme) color;
in
{
services.kanshi = {
profiles = {
sedetary = {
settings = [
{
profile = {
name = "sedetary";
outputs = [
{
criteria = "eDP-1";
@ -20,14 +32,20 @@ in
];
exec = [ "xrdb .Xresources" ];
};
nomad = {
outputs = [{
}
{
profile = {
name = "nomad";
outputs = [
{
criteria = "eDP-1";
status = "enable";
position = "1920,312";
}];
}
];
exec = [ "xrdb .Xresources" ];
};
};
}
];
};
}

View file

@ -1,6 +1,16 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key accent font theme;
inherit (pkgs.uservars)
key
accent
font
theme
;
inherit (theme) color;
in
{
@ -48,6 +58,8 @@ in
ExecStart = "${pkgs.mako}/bin/mako";
Restart = "on-failure";
};
Install = { WantedBy = [ "sway-session.target" ]; };
Install = {
WantedBy = [ "sway-session.target" ];
};
};
}

View file

@ -1,20 +1,18 @@
{ config, pkgs, ... }:
let
in
# inherit (pkgs.uservars) key accent font theme;
# inherit (theme) color;
# inherit (pkgs) lib;
# mod = "Mod4";
# menu = "wlauncher";
# terminal = "alacritty";
# locked_binds =
# lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
# code_binds =
# lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
# return_mode = lib.mapAttrs (k: v: "${v}; mode default");
# playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
in
{
wayland.windowManager.sway.config = {
assigns = {
@ -54,11 +52,13 @@ in
};
floating = {
criteria = [
{ class = "Godot"; }
{ class = "file_picker"; }
{ app_id = "file_picker"; }
{ app_id = "wdisplays"; }
{ app_id = "pavucontrol"; }
{ app_id = ".*[Hh]elvum.*"; }
{ workspace = "9"; }
];
};
};

View file

@ -1,6 +1,11 @@
{ config, pkgs, ... }:
let
inherit (pkgs.uservars) key accent font theme;
inherit (pkgs.uservars)
key
accent
font
theme
;
inherit (theme) color;
inherit (pkgs) lib;
@ -21,29 +26,27 @@ let
# mod+1 to swich to workspace 1
# mod+shift+1 to move to workspace 1
workspace_binds = lib.forEachMerge (lib.range 1 10) (i:
workspace_binds = lib.forEachMerge (lib.range 1 10) (
i:
let
key = toString (lib.mod i 10);
workspaceNumber = toString i;
in
{
"${mod}+${key}" = "workspace number ${workspaceNumber}";
"${mod}+Shift+${key}" =
"move container to workspace number ${workspaceNumber}";
});
"${mod}+Shift+${key}" = "move container to workspace number ${workspaceNumber}";
}
);
prev_next_binds =
let
maybe_window = key:
if (lib.strings.hasInfix "button" key) then
"--whole-window"
else
"";
makePrevNextBindFunction = (prev_or_next:
maybe_window = key: if (lib.strings.hasInfix "button" key) then "--whole-window" else "";
makePrevNextBindFunction = (
prev_or_next:
map (key: {
"${maybe_window key} ${mod}+${key}" =
"workspace ${prev_or_next}_on_output";
}));
"${maybe_window key} ${mod}+${key}" = "workspace ${prev_or_next}_on_output";
})
);
prev_binds = makePrevNextBindFunction "prev" [
key.tabL
"bracketleft"
@ -67,19 +70,33 @@ let
# for every direction with both arrow keys and vim keys
movement_binds =
let
directions = [ "Left" "Up" "Right" "Down" ];
directions = [
"Left"
"Up"
"Right"
"Down"
];
makeVimKeys = (k: key.${lib.toLower k});
makeArrowKeys = (k: k);
makeResizeCommand = direction:
makeResizeCommand =
direction:
{
Left = "shrink width 20px";
Up = "shrink height 20px";
Right = "grow width 20px";
Down = "grow height 20px";
}.${direction};
}
.${direction};
in
lib.forEachMerge [ makeVimKeys makeArrowKeys ] (prefixFun:
lib.forEachMerge directions (direction:
lib.forEachMerge
[
makeVimKeys
makeArrowKeys
]
(
prefixFun:
lib.forEachMerge directions (
direction:
let
resize_cmd = makeResizeCommand direction;
keyBind = prefixFun direction;
@ -94,9 +111,10 @@ let
# focus output
"${mod}+mod1+${keyBind}" = "focus output ${direction}";
# Move workspace to output
"${mod}+mod1+Shift+${keyBind}" =
"move workspace output ${direction}";
}));
"${mod}+mod1+Shift+${keyBind}" = "move workspace output ${direction}";
}
)
);
parenting_binds = {
"${mod}+equal" = "focus parent";
@ -116,8 +134,7 @@ let
XF86AudioRaiseVolume = "exec volumesh -i 10";
XF86AudioLowerVolume = "exec volumesh -d 10";
XF86AudioMute = "exec volumesh -t";
XF86AudioMicMute =
"exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
XF86AudioMicMute = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
# Control media
XF86AudioPlay = "exec playerctl play-pause";
XF86AudioPause = "exec playerctl play-pause";
@ -136,8 +153,7 @@ let
# Screen area to file
"Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area";
# Screen area to clipboard
"Control+Shift+Print" =
"exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
"Control+Shift+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh area-clip";
# Focused monitor to clipboard
"Control+Print" = "exec ${pkgs.screenshotsh}/bin/screenshotsh clip";
};
@ -155,8 +171,7 @@ let
"${mod}+Alt+x" = "exec pkill wl-crosshair || exec wl-crosshair";
"${mod}+x" = "kill";
"${mod}+m" = "mode audio";
"${mod}+escape" =
"mode passthrough;exec notify-send 'Passthrough on'";
"${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'";
"${mod}+ctrl+k" = "exec swaymsg input type:pointer events disabled";
"${mod}+ctrl+shift+k" = "exec swaymsg input type:pointer events enabled";
"${mod}+f" = "fullscreen toggle";

View file

@ -1,6 +1,11 @@
{ config, pkgs, ... }:
let
inherit (pkgs.uservars) key accent font theme;
inherit (pkgs.uservars)
key
accent
font
theme
;
inherit (theme) color;
inherit (pkgs) lib;
@ -8,10 +13,8 @@ let
menu = "wlauncher";
terminal = "alacritty";
locked =
lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
to-code =
lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
locked = lib.mapAttrs' (k: v: lib.nameValuePair "--locked ${k}" v);
to-code = lib.mapAttrs' (k: v: lib.nameValuePair "--to-code ${k}" v);
quit-mode = lib.mapAttrs (k: v: "${v}; mode default");
playerctl = "exec ${pkgs.playerctl}/bin/playerctl";
@ -20,20 +23,32 @@ in
{
wayland.windowManager.sway.config.modes = {
audio =
(bind_group [ to-code locked ] {
(bind_group
[
to-code
locked
]
{
${key.tabR} = "exec volumesh -i 10";
${key.tabL} = "exec volumesh -d 10";
${key.right} = "exec mpc next";
${key.left} = "exec mpc prev";
${key.up} = "exec volumesh --mpd -i 10";
${key.down} = "exec volumesh --mpd -d 10";
}) //
(bind_group [ locked quit-mode ] {
}
)
// (bind_group
[
locked
quit-mode
]
{
"space" = "exec mpc toggle";
"escape" = "";
"q" = "";
}) //
(bind_group [ quit-mode ] {
}
)
// (bind_group [ quit-mode ] {
"m" = "exec volumesh -t";
"s" = "exec ${pkgs.pulse_sink}/bin/pulse_sink";
@ -47,28 +62,38 @@ in
"Ctrl+s" = "exec ${pkgs.musmenu}/bin/musmenu psave";
"Ctrl+o" = "exec ${pkgs.musmenu}/bin/musmenu pload";
"Ctrl+d" = "exec ${pkgs.musmenu}/bin/musmenu pdelete";
}) //
{
})
// {
"p" = "mode playerctl";
"Ctrl+c" = "exec musmenu pclear";
}
;
};
playerctl =
(bind_group [ to-code locked ] {
(bind_group
[
to-code
locked
]
{
${key.left} = "${playerctl} previous";
${key.right} = "${playerctl} next";
${key.up} = "${playerctl} volume 10+";
${key.down} = "${playerctl} volume 10-";
${key.tabR} = "${playerctl} volume 10+";
${key.tabL} = "${playerctl} volume 10-";
}) //
(bind_group [ to-code quit-mode ] {
}
)
// (bind_group
[
to-code
quit-mode
]
{
"space" = "${playerctl} play-pause";
"escape" = "";
"q" = "";
})
;
}
);
passthrough = {
"${mod}+escape" = "mode default;exec notify-send 'Passthrough off'";

View file

@ -1,6 +1,16 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key accent font theme;
inherit (pkgs.uservars)
key
accent
font
theme
;
inherit (theme) color;
asScript = filename: text: toString (pkgs.writeShellScript filename text);

View file

@ -1,11 +1,21 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key accent font theme;
inherit (pkgs.uservars)
key
accent
font
theme
;
inherit (theme) color;
in
{
programs.swaylock.settings = {
image = theme.background;
image = toString theme.background;
font = font.interface;
font-size = font.size.medium;
indicator-thickness = 20;

Some files were not shown because too many files have changed in this diff Show more