Compare commits

..

No commits in common. "30c78716102fe0992fafe303b3cd26942455bb6b" and "da736e199c6a1b0ae05e9e6901289c09c4abfc71" have entirely different histories.

116 changed files with 12312 additions and 2338 deletions

View file

@ -42,11 +42,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1716561646,
"narHash": "sha256-UIGtLO89RxKt7RF2iEgPikSdU53r6v/6WYB0RW3k89I=",
"lastModified": 1707830867,
"narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=",
"owner": "ryantm",
"repo": "agenix",
"rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9",
"rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6",
"type": "github"
},
"original": {
@ -186,16 +186,33 @@
"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": 1715128199,
"narHash": "sha256-mj23cBtiDKy3pgg+J26UA8giZgmJApO8IQlC6+XTAx8=",
"lastModified": 1702850463,
"narHash": "sha256-qR/c/GjsLUzrCyHN/Q9nnClduf6OqTg26S1AFYKPzxA=",
"owner": "lelgenio",
"repo": "dzgui-nix",
"rev": "03968bade43d23c47e8b4f102c711c171c446645",
"rev": "2ed6515b27d8186b9fedfe1dcaf861f07e796a0d",
"type": "github"
},
"original": {
@ -291,11 +308,11 @@
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
@ -375,7 +392,7 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1681202837,
@ -393,7 +410,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_6"
"systems": "systems_7"
},
"locked": {
"lastModified": 1681202837,
@ -411,7 +428,7 @@
},
"flake-utils_6": {
"inputs": {
"systems": "systems_8"
"systems": "systems_9"
},
"locked": {
"lastModified": 1694529238,
@ -450,11 +467,11 @@
"systems": "systems_11"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
@ -491,26 +508,23 @@
]
},
"locked": {
"lastModified": 1717527182,
"narHash": "sha256-vWSkg6AMok1UUQiSYVdGMOXKD2cDFnajITiSi0Zjd1A=",
"lastModified": 1706981411,
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "845a5c4c073f74105022533907703441e0464bc3",
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.05",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprlang": "hyprlang",
"nixpkgs": [
"hyprland",
"nixpkgs"
@ -521,11 +535,11 @@
]
},
"locked": {
"lastModified": 1716576411,
"narHash": "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=",
"lastModified": 1710257359,
"narHash": "sha256-43re5pzE/cswFAgw92/ugsB3+d5ufDaCcLtl9ztKfBo=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "57298fc4f13c807e50ada2c986a3114b7fc2e621",
"rev": "1761f6cefd77f4fcd2039d930c88d6716ddc4974",
"type": "github"
},
"original": {
@ -537,20 +551,21 @@
"hyprland": {
"inputs": {
"hyprcursor": "hyprcursor",
"hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang_2",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_4",
"systems": "systems_5",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1717605046,
"narHash": "sha256-zzdMmUNJCPY1KqVjzpukHOecae1AiAzwmBN5hq7jM2U=",
"lastModified": 1710864211,
"narHash": "sha256-Uve1/UBnwD4M/9xD0E3XATnLrF8B5vL6MTBhX6Is+TE=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "c95845b1488b4bd63e901cbdc4cb68c27a45971b",
"rev": "bcba3951f45f11245d424274130eb3a0ac790d93",
"type": "github"
},
"original": {
@ -563,12 +578,10 @@
"inputs": {
"nixpkgs": [
"hyprland",
"xdph",
"nixpkgs"
],
"systems": [
"hyprland",
"xdph",
"systems"
]
},
@ -590,19 +603,17 @@
"inputs": {
"nixpkgs": [
"hyprland",
"hyprcursor",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
"systems": "systems_4"
},
"locked": {
"lastModified": 1716473782,
"narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=",
"lastModified": 1709914708,
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "87d5d984109c839482b88b4795db073eb9ed446f",
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
"type": "github"
},
"original": {
@ -611,7 +622,7 @@
"type": "github"
}
},
"hyprwayland-scanner": {
"hyprlang_2": {
"inputs": {
"nixpkgs": [
"hyprland",
@ -623,16 +634,16 @@
]
},
"locked": {
"lastModified": 1716058375,
"narHash": "sha256-CwjWoVnBZE5SBpRx9dgSQGCr4Goxyfcyv3zZbOhVqzk=",
"lastModified": 1709914708,
"narHash": "sha256-bR4o3mynoTa1Wi4ZTjbnsZ6iqVcPGriXp56bZh5UFTk=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "3afed4364790aebe0426077631af1e164a9650cc",
"repo": "hyprlang",
"rev": "a685493fdbeec01ca8ccdf1f3655c044a8ce2fe2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"repo": "hyprlang",
"type": "github"
}
},
@ -698,11 +709,11 @@
]
},
"locked": {
"lastModified": 1717297675,
"narHash": "sha256-43UmlS1Ifx17y93/Vc258U7bOlAAIZbu8dsGDHOIIr0=",
"lastModified": 1710644923,
"narHash": "sha256-0fjbN5GYYDKPyPay0l8gYoH+tFfNqPPwP5sxxBreeA4=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "972a52bee3991ae1f1899e6452e0d7c01ee566d9",
"rev": "e25efda85e39fcdc845e371971ac4384989c4295",
"type": "github"
},
"original": {
@ -713,16 +724,15 @@
},
"nix-software-center": {
"inputs": {
"nixos-appstream-data": "nixos-appstream-data",
"nixpkgs": "nixpkgs_2",
"utils": "utils"
},
"locked": {
"lastModified": 1714856183,
"narHash": "sha256-Ue7xV+rZqImux4DDj3VMla4LIH2g8VeXbTJwgvX7wOo=",
"lastModified": 1703105285,
"narHash": "sha256-BHoW1RQMc2Auz8paBvTBriKv0F6FI99+3nnz/ELLawg=",
"owner": "vlinkz",
"repo": "nix-software-center",
"rev": "b9e0f53536e1e94e7d8c3cda3c6866b3f9d01386",
"rev": "68e87fb6e24fb3e6fe65449918d0cbda96622b65",
"type": "github"
},
"original": {
@ -731,32 +741,6 @@
"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",
@ -784,31 +768,32 @@
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-24_05": "nixpkgs-24_05",
"nixpkgs-23_05": "nixpkgs-23_05",
"nixpkgs-23_11": "nixpkgs-23_11",
"utils": "utils_2"
},
"locked": {
"lastModified": 1717515260,
"narHash": "sha256-UJhSsczeTpRpoXICuRk++NORXE2qNTEwOn0rL3uTJ3E=",
"lastModified": 1706219574,
"narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "b51ae1a235353ffdfa9f5874e6aea32e367a5739",
"rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"ref": "nixos-24.05",
"ref": "nixos-23.11",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1714562304,
"narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=",
"lastModified": 1702539185,
"narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bcd44e224fd68ce7d269b4f44d24c2220fd821e7",
"rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447",
"type": "github"
},
"original": {
@ -817,18 +802,33 @@
"type": "indirect"
}
},
"nixpkgs-24_05": {
"nixpkgs-23_05": {
"locked": {
"lastModified": 1717144377,
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
"lastModified": 1704290814,
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"nixpkgs-23_11": {
"locked": {
"lastModified": 1706098335,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"type": "indirect"
}
},
@ -866,16 +866,16 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1717281328,
"narHash": "sha256-evZPzpf59oNcDUXxh2GHcxHkTEG4fjae2ytWP85jXRo=",
"lastModified": 1710695816,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b3b2b28c1daa04fe2ae47c21bb76fd226eac4ca1",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"ref": "nixos-23.11",
"type": "indirect"
}
},
@ -898,11 +898,11 @@
"ranger-icons": {
"flake": false,
"locked": {
"lastModified": 1713564482,
"narHash": "sha256-sijO9leDXgnjgcVlh5fKYalhjOupwFMRyH0xh2g/rEQ=",
"lastModified": 1709209315,
"narHash": "sha256-ETE13REDIVuoFIbvWqWvQLj/2fGST+1koowmmuBzGmo=",
"owner": "alexanderjeurissen",
"repo": "ranger_devicons",
"rev": "a8d626485ca83719e1d8d5e32289cd96a097c861",
"rev": "ed718dd6a6d5d2c0f53cba8474c5ad96185057e9",
"type": "github"
},
"original": {
@ -1119,16 +1119,16 @@
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"repo": "default-linux",
"type": "github"
}
},
@ -1215,7 +1215,7 @@
},
"utils": {
"inputs": {
"systems": "systems_7"
"systems": "systems_8"
},
"locked": {
"lastModified": 1689068808,
@ -1232,15 +1232,12 @@
}
},
"utils_2": {
"inputs": {
"systems": "systems_9"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
"type": "github"
},
"original": {
@ -1257,11 +1254,11 @@
]
},
"locked": {
"lastModified": 1715216838,
"narHash": "sha256-q5key9BWJjJQqECrhflso9ZTzULBeScvromo0S4fjqE=",
"lastModified": 1685576039,
"narHash": "sha256-WMkWurJsZZG7YkWzW/k2SNquYLsAZjzFs7CFswSjDew=",
"owner": "lelgenio",
"repo": "wl-crosshair",
"rev": "39b716cf410a1b45006f50f32f8d63de5c43aedb",
"rev": "57d0908e10d9f58fc37fe866404cc8b66be1f0d9",
"type": "github"
},
"original": {
@ -1270,9 +1267,31 @@
"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-protocols",
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
@ -1287,11 +1306,11 @@
]
},
"locked": {
"lastModified": 1716290197,
"narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=",
"lastModified": 1709299639,
"narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "91e48d6acd8a5a611d26f925e51559ab743bc438",
"rev": "2d2fb547178ec025da643db57d40a971507b82fe",
"type": "github"
},
"original": {

View file

@ -1,8 +1,8 @@
{
description = "My system config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.05";
nixpkgs.url = "nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-index-database = {
@ -33,7 +33,7 @@
};
nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -68,57 +68,57 @@
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;
};
config = { allowUnfree = true; };
overlays = old_overlays.all;
};
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);
};
inherit (import ./user/variables.nix) desktop;
system = "x86_64-linux";
pkgs = import inputs.nixpkgs nixpkgsConfig;
pkgs = import nixpkgs nixpkgsConfig;
lib = inputs.nixpkgs.lib;
packages = import ./pkgs { inherit pkgs inputs; };
old_overlays = (import ./overlays { inherit packages inputs; });
specialArgs = {
inherit inputs;
};
common_modules =
[
{ nixpkgs.pkgs = pkgs; }
./system/configuration.nix
./system/secrets.nix
./system/specialisation.nix
./system/greetd.nix
{ login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; }
specialArgs = { inherit inputs; };
common_modules = [
{ nixpkgs.pkgs = pkgs; }
./system/configuration.nix
./system/secrets.nix
./system/specialisation.nix
./system/greetd.nix
{ login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; }
inputs.agenix.nixosModules.default
inputs.hyprland.nixosModules.default
inputs.dzgui-nix.nixosModules.default
{ programs.hyprland.enable = (desktop == "hyprland"); }
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lelgenio = import ./user/home.nix;
home-manager.backupFileExtension = "bkp";
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = {
inherit inputs;
};
}
]
++ lib.optional (desktop == "gnome") ./system/gnome.nix
++ lib.optional (desktop == "kde") ./system/kde.nix;
inputs.agenix.nixosModules.default
inputs.hyprland.nixosModules.default
inputs.dzgui-nix.nixosModules.default
{ programs.hyprland.enable = (desktop == "hyprland"); }
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.lelgenio = import ./user/home.nix;
home-manager.backupFileExtension = "bkp";
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = { inherit inputs; };
}
]
++ lib.optional (desktop == "gnome") ./system/gnome.nix
++ lib.optional (desktop == "kde") ./system/kde.nix;
in
{
nixosConfigurations = {
@ -131,7 +131,6 @@
modules = [
./hosts/monolith.nix
./system/monolith-gitlab-runner.nix
./system/monolith-forgejo-runner.nix
./system/nix-serve.nix
./system/steam.nix
] ++ common_modules;
@ -152,16 +151,11 @@
};
pixie = lib.nixosSystem {
inherit system specialArgs;
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;
}
];
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;
@ -182,6 +176,6 @@
packages.${system} = pkgs // packages;
formatter.${system} = pkgs.nixfmt-rfc-style;
formatter.${system} = pkgs.nixpkgs-fmt;
};
}

View file

@ -1,32 +1,13 @@
{
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 = [ ];
@ -37,7 +18,8 @@ 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";
@ -55,7 +37,8 @@ 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,30 +1,15 @@
# 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 = [ ];
@ -60,12 +45,10 @@ in
options = [ "subvol=@swap" ] ++ btrfs_options;
};
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
}
];
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
@ -76,6 +59,7 @@ 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,38 +1,21 @@
# 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"
@ -60,9 +43,11 @@ in
vaapiVdpau
rocm-opencl-icd
rocm-opencl-runtime
rocmPackages.rocm-smi
];
programs.corectrl.enable = true;
virtualisation.virtualbox.host.enable = true;
fileSystems."/" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";
@ -96,34 +81,22 @@ 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";
@ -133,20 +106,8 @@ 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
@ -154,16 +115,14 @@ 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
# `lsusb | grep Logitech` will return "vendor:product"
services.udev.extraRules = ''
# Fix broken suspend with Logitech USB dongle
# `lsusb | grep Logitech` will return "vendor:product"
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled"
# Force all disks to use mq-deadline scheduler
# For some reason "noop" is used by default which is kinda bad when io is saturated
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline"
'';
# swap
@ -174,10 +133,8 @@ 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 = [
{
device = "/swap/swapfile";
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
}
];
swapDevices = [{
device = "/swap/swapfile";
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
}];
}

View file

@ -1,10 +1,4 @@
{
config,
pkgs,
inputs,
...
}:
{
{ config, pkgs, inputs, ... }: {
imports = [
./vpsadminos.nix
inputs.agenix.nixosModules.default
@ -55,12 +49,7 @@
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";
};
@ -68,3 +57,4 @@
system.stateVersion = "23.05"; # Never change this
}

View file

@ -1,14 +1,10 @@
{
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;
@ -26,11 +22,7 @@
loginAccounts = {
"lelgenio@lelgenio.com" = {
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
aliases = [
"postmaster@lelgenio.com"
"lelgenio@lelgenio.xyz"
"lelgenio@lelgenio.xyz"
];
aliases = [ "postmaster@lelgenio.com" "lelgenio@lelgenio.xyz" "lelgenio@lelgenio.xyz" ];
};
"noreply@git.lelgenio.com" = {
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
@ -58,4 +50,5 @@
$config['plugins'] = [ "carddav", "archive" ];
'';
};
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,12 +1,8 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
security.rtkit.enable = true;
services.openssh = {
enable = true;
ports = [
9022
22
];
ports = [ 9022 22 ];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
@ -19,15 +15,7 @@
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"
@ -44,5 +32,7 @@
programs.fish.enable = true;
environment.systemPackages = with pkgs; [ git ];
environment.systemPackages = with pkgs; [
git
];
}

View file

@ -6,12 +6,7 @@
#
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
with lib;
let
nameservers = [
@ -27,19 +22,16 @@ 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,10 +1,4 @@
{
config,
pkgs,
inputs,
...
}:
{
{ config, pkgs, inputs, ... }: {
services.writefreely = {
enable = true;
acme.enable = true;
@ -28,3 +22,4 @@
};
};
}

View file

@ -1,25 +1,13 @@
# 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 = [ ];
@ -30,7 +18,8 @@
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";
@ -57,7 +46,8 @@
# 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,34 +1,16 @@
# 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 = [ ];
@ -64,12 +46,10 @@ in
options = [ "subvol=@swap" ] ++ btrfs_ssd;
};
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8);
}
];
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
@ -79,7 +59,8 @@ 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,11 +1,11 @@
{ inputs, packages, ... }:
rec {
{ inputs, packages, ... }: rec {
all = [
scripts
sway
themes
new-packages
patches
variables
lib_extended
];
@ -13,85 +13,62 @@ rec {
sway = (import ./sway.nix);
themes = (
final: prev: {
material-wifi-icons = final.stdenv.mkDerivation rec {
name = "material-wifi-icons";
src = inputs.material-wifi-icons;
installPhase = ''
install -D material-wifi.ttf $out/share/fonts/${name}
'';
};
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
orchis_theme_compact = (
final.orchis-theme.override {
border-radius = 0;
tweaks = [
"compact"
"solid"
];
}
);
nerdfonts_fira_hack = (
final.nerdfonts.override {
fonts = [
"FiraCode"
"Hack"
];
}
);
}
);
themes = (final: prev: {
material-wifi-icons = final.stdenv.mkDerivation rec {
name = "material-wifi-icons";
src = inputs.material-wifi-icons;
installPhase = ''
install -D material-wifi.ttf $out/share/fonts/${name}
'';
};
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
orchis_theme_compact = (final.orchis-theme.override {
border-radius = 0;
tweaks = [ "compact" "solid" ];
});
nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; });
});
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;
}
);
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;
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 ];
});
};
mangohud = prev.mangohud.overrideAttrs (o: {
patches = o.patches ++ [
(prev.fetchpatch {
url = "https://github.com/flightlessmango/MangoHud/commit/95141de657e02577f1d3fab0ca12122bfb68bc56.patch";
hash = "sha256-a2tESliGBkfF7uYQn8TDgeFt07A9FOioI4VcTT7DC7A=";
})
];
});
}
);
webcord = (prev.webcord.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ../patches/webcord/fix-reading-config.patch ];
}));
});
lib_extended = (
final: prev: {
lib = prev.lib // rec {
# Utility function
# Input: [{v1=1;} {v2=2;}]
# Output: {v1=1;v2=2;}
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
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
'';
});
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
patches = old.patches
++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
});
});
# Easily translate imperative templating code
# Input: [ 1 2 ] (num: { "v${num}" = num; })
# Output: {v1=1;v2=2;}
forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func);
};
}
);
variables = (final: prev: {
uservars = import ../user/variables.nix;
});
lib_extended = (final: prev: {
lib = prev.lib // rec {
# Utility function
# Input: [{v1=1;} {v2=2;}]
# Output: {v1=1;v2=2;}
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
# Easily translate imperative templating code
# Input: [ 1 2 ] (num: { "v${num}" = num; })
# 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 DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway SWAYSOCK
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
# 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

@ -0,0 +1,27 @@
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

File diff suppressed because it is too large Load diff

View file

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

View file

@ -1,12 +1,11 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
zlib,
stdenv,
Security ? null,
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, zlib
, stdenv
, Security ? null
}:
rustPlatform.buildRustPackage rec {
@ -23,7 +22,9 @@ 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,8 +1,7 @@
# 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,7 +1,6 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
{ lib
, buildNpmPackage
, fetchFromGitHub
}:
buildNpmPackage rec {

View file

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

View file

@ -1,26 +0,0 @@
#!/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,136 +1,58 @@
(
final: prev:
with prev;
let
import_script = (_: path: import (path) { inherit pkgs lib; });
create_script = (
name: text: runtimeInputs:
let
script_body = pkgs.writeTextFile {
inherit name;
executable = true;
text = ''
${builtins.readFile text}
'';
};
in
(pkgs.writeShellApplication {
inherit name runtimeInputs;
text = ''exec ${script_body} "$@"'';
checkPhase = "";
})
);
create_scripts = lib.mapAttrs (name: deps: create_script name ./${name} deps);
(final: prev:
with prev;
let
import_script = (_: path: import (path) { inherit pkgs lib; });
create_script = (name: text: runtimeInputs:
let
script_body = pkgs.writeTextFile {
inherit name;
executable = true;
text = ''
${builtins.readFile text}
'';
};
in
(pkgs.writeShellApplication {
inherit name runtimeInputs;
text = ''exec ${script_body} "$@"'';
checkPhase = "";
}));
create_scripts =
lib.mapAttrs (name: deps: create_script name ./${name} deps);
pass = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
in
create_scripts {
pass = pkgs.pass.withExtensions (ex: with ex; [
pass-otp
]);
in
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 ];
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 ];
vrr-fullscreen = [ ];
}
// lib.mapAttrs import_script {
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;
_gpg-unlock = ./_gpg-unlock.nix;
}
)
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 {
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;
_gpg-unlock = ./_gpg-unlock.nix;
})

View file

@ -1,10 +0,0 @@
#!/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*)?'

View file

@ -1,28 +0,0 @@
#!/usr/bin/env bash
# List of supported outputs for VRR
output_vrr_whitelist=(
"DP-1"
"DP-2"
)
# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop
swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do
window_event=$(echo ${window_json} | jq -r '.change')
# Process only focus change and fullscreen toggle
if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then
output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)')
output_name=$(echo ${output_json} | jq -r '.name')
# Use only VRR in whitelisted outputs
if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then
output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status')
window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode')
# Only update output if nesseccary to avoid flickering
[[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1
[[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0
fi
fi
done

View file

@ -1,4 +1,12 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu";
rofi = "rofi -dmenu -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wdmenu" ''
exec bmenu "$@"
exec ${menu_cmd} "$@"
''

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
let
inherit (config.my) dmenu;
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";

View file

@ -1,4 +1,12 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wlauncher" ''
exec bmenu run "$@"
exec ${menu_cmd} "$@"
''

View file

@ -50,6 +50,10 @@ main() {
}
autotype(){
if pgrep qutebrowser >/dev/null; then
qutebrowser ":mode-enter insert"
fi
env wtype -s 100 "$username"
env wtype -s 100 -k tab
env wtype -s 100 "$password"

View file

@ -2,14 +2,9 @@ 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 ];

View file

@ -1,6 +0,0 @@
{ lib, ... }:
{
options = {
my = lib.mkOption { };
};
}

View file

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

View file

@ -1,11 +1,4 @@
{
config,
pkgs,
lib,
inputs,
...
}:
{
{ config, pkgs, lib, inputs, ... }: {
console = {
font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz";
packages = [ pkgs.terminus_font ];
@ -43,9 +36,11 @@
};
plymouth = {
enable = true;
theme = lib.mkIf (config.my.desktop == "sway") "red_loader";
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,10 +1,4 @@
{
pkgs,
lib,
config,
...
}:
{
{ pkgs, lib, config, ... }: {
services.cachix-watch-store = {
enable = true;
cacheName = "lelgenio";

View file

@ -1,13 +1,7 @@
# 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
@ -15,25 +9,115 @@
./boot.nix
./thunar.nix
./nix.nix
./fonts.nix
./sound.nix
./bluetooth.nix
./locale.nix
./users.nix
./containers.nix
./network.nix
../settings
];
my = import ../user/variables.nix;
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.libinput.enable = true;
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;
packages.media-packages.enable = true;
environment.systemPackages = with pkgs; [
@ -45,7 +129,21 @@
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

View file

@ -1,12 +0,0 @@
{ 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;
}

View file

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

View file

@ -1,16 +1,8 @@
{
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,52 +1,40 @@
{ pkgs, lib, ... }:
{
mkNixRunner =
registrationConfigFile: with lib; rec {
# File should contain at least these two variables:
# `CI_SERVER_URL`
# `REGISTRATION_TOKEN`
inherit registrationConfigFile; # 2
dockerImage = "alpine:3.18.2";
dockerAllowedImages = [ dockerImage ];
dockerVolumes = [
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
"/nix/store:/nix/store:ro"
"/nix/var/nix/db:/nix/var/nix/db:ro"
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
];
dockerDisableCache = true;
preBuildScript = pkgs.writeScript "setup-container" ''
mkdir -p -m 0755 /nix/var/log/nix/drvs
mkdir -p -m 0755 /nix/var/nix/gcroots
mkdir -p -m 0755 /nix/var/nix/profiles
mkdir -p -m 0755 /nix/var/nix/temproots
mkdir -p -m 0755 /nix/var/nix/userpool
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
mkdir -p -m 0700 "$HOME/.nix-defexpr"
{ pkgs, lib, ... }: {
mkNixRunner = registrationConfigFile: with lib; rec {
# File should contain at least these two variables:
# `CI_SERVER_URL`
# `REGISTRATION_TOKEN`
inherit registrationConfigFile; # 2
dockerImage = "alpine:3.18.2";
dockerAllowedImages = [ dockerImage ];
dockerVolumes = [
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
"/nix/store:/nix/store:ro"
"/nix/var/nix/db:/nix/var/nix/db:ro"
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
];
dockerDisableCache = true;
preBuildScript = pkgs.writeScript "setup-container" ''
mkdir -p -m 0755 /nix/var/log/nix/drvs
mkdir -p -m 0755 /nix/var/nix/gcroots
mkdir -p -m 0755 /nix/var/nix/profiles
mkdir -p -m 0755 /nix/var/nix/temproots
mkdir -p -m 0755 /nix/var/nix/userpool
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
mkdir -p -m 0700 "$HOME/.nix-defexpr"
. ${pkgs.nix}/etc/profile.d/nix.sh
. ${pkgs.nix}/etc/profile.d/nix.sh
${pkgs.nix}/bin/nix-env -i ${
concatStringsSep " " (
with pkgs;
[
nix
cacert
git
openssh
]
)
}
'';
environmentVariables = {
ENV = "/etc/profile";
USER = "root";
NIX_REMOTE = "daemon";
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
};
tagList = [ "nix" ];
${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])}
'';
environmentVariables = {
ENV = "/etc/profile";
USER = "root";
NIX_REMOTE = "daemon";
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
};
tagList = [ "nix" ];
};
}

View file

@ -1,44 +1,25 @@
{ pkgs, lib, ... }:
{
services.xserver = {
enable = true;
desktopManager.gnome = {
enable = true;
# Enable VRR (Variable Refresh Rate)
extraGSettingsOverridePackages = with pkgs; [ gnome.mutter ];
extraGSettingsOverrides = ''
[org.gnome.mutter]
experimental-features=['variable-refresh-rate', 'scale-monitor-framebuffer']
'';
};
displayManager.gdm.enable = true;
};
# 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, ... }: {
# 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;
# Workaround for https://github.com/NixOS/nixpkgs/issues/103746
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
services.displayManager.autoLogin = {
services.xserver.displayManager.autoLogin = {
enable = true;
user = "lelgenio";
};
programs.kdeconnect = {
enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
hardware.opentabletdriver.enable = lib.mkForce false;
# services.xserver.displayManager.autologin.user = "lelgenio";
environment.systemPackages =
with pkgs;
with gnome;
[
gnome-tweaks
dconf-editor
environment.systemPackages = with pkgs; with gnome; [
gnome-tweaks
dconf-editor
chrome-gnome-shell
gnomeExtensions.quick-settings-audio-devices-hider
];
chrome-gnome-shell
gnomeExtensions.gsconnect
gnomeExtensions.quick-settings-audio-devices-hider
];
}

View file

@ -1,17 +1,6 @@
{
lib,
pkgs,
config,
...
}:
{ lib, pkgs, config, ... }:
let
inherit (config.my)
key
accent
font
theme
desktop
;
inherit (pkgs.uservars) key accent font theme desktop;
cfg = config.login-manager.greetd;
in
@ -28,7 +17,6 @@ in
# enable sway window manager
programs.sway = {
enable = true;
package = pkgs.mySway;
wrapperFeatures.gtk = true;
};
@ -71,7 +59,7 @@ in
enable = true;
settings = {
initial_session = {
command = desktop;
command = "${pkgs.sway}/bin/sway";
user = "lelgenio";
};
default_session = {

View file

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

View file

@ -1,13 +0,0 @@
{ 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,13 +1,6 @@
{
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";
};
@ -23,7 +16,7 @@ in
gimp
inkscape
krita
kdePackages.kdenlive
kdenlive
pitivi
blender-hip
libreoffice

View file

@ -1,20 +0,0 @@
{ 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,9 +1,4 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
@ -20,8 +15,7 @@ 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;
};

View file

@ -1,25 +0,0 @@
{ 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,10 +1,4 @@
{
config,
pkgs,
lib,
...
}:
{
{ config, pkgs, lib, ... }: {
services.nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;

View file

@ -1,13 +1,7 @@
{
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;
@ -17,15 +11,13 @@ in
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
dates = "daily";
options = "--delete-older-than 3d";
};
optimise.automatic = true;
settings = {
trusted-users = [
"root"
"@wheel"
];
auto-optimise-store = true;
trusted-users = [ "root" "@wheel" ];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"

View file

@ -1,9 +1,4 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
@ -20,8 +15,7 @@ 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,13 +1,16 @@
{ 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.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;
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;
};
}

View file

@ -1,12 +0,0 @@
{ 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,7 +1,10 @@
{ 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,33 +1,20 @@
{
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; [
capitaine-cursors
bibata-cursors
mangohud
xdg-user-dirs
];
extraPkgs = pkgs: with pkgs; [
capitaine-cursors
bibata-cursors
mangohud
xdg-user-dirs
];
};
environment.systemPackages = with pkgs; [
protontricks
bottles
];
programs.dzgui.enable = true;
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
}

View file

@ -1,10 +1,4 @@
{
config,
pkgs,
inputs,
...
}:
{
{ config, pkgs, inputs, ... }: {
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
@ -18,15 +12,17 @@
services.tumbler.enable = true;
environment.systemPackages = [
(pkgs.writeTextFile {
name = "thumbs";
text = ''
[Thumbnailer Entry]
TryExec=unzip
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
MimeType=application/x-krita;
'';
destination = "/share/thumbnailers/kra.thumbnailer";
})
(
pkgs.writeTextFile {
name = "thumbs";
text = ''
[Thumbnailer Entry]
TryExec=unzip
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
MimeType=application/x-krita;
'';
destination = "/share/thumbnailers/kra.thumbnailer";
}
)
];
}

View file

@ -1,29 +0,0 @@
{ 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
exec ./switch "$@"
./switch

View file

@ -1,16 +1,6 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
let
inherit (config.my)
key
theme
accent
font
;
inherit (pkgs.uservars) key theme accent font;
inherit (theme) color;
in
{
@ -20,9 +10,7 @@ in
settings = {
font = {
size = font.size.small;
normal = {
family = font.mono;
};
normal = { family = font.mono; };
};
colors = {
primary = {
@ -43,8 +31,8 @@ in
cyan = "${color.normal.cyan}";
white = "${color.normal.white}";
};
draw_bold_text_with_bright_colors = false;
};
draw_bold_text_with_bright_colors = false;
window = {
opacity = theme.opacity / 100.0;
dynamic_padding = true;
@ -52,35 +40,32 @@ in
hints = {
alphabet = key.hints;
enabled = [
{
regex =
let
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,
# but alacritty doesn't know about them
whitespace_characters = ''¬·'';
in
"${mimes}[${delimiters}${whitespace_characters}]+";
command = "xdg-open";
post_processing = true;
mouse = {
enabled = true;
mods = "None";
};
binding = {
key = "U";
mods = "Control|Shift";
};
}
];
enabled = [{
regex =
let
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,
# but alacritty doesn't know about them
whitespace_characters = ''¬·'';
in
"${mimes}[${delimiters}${whitespace_characters}]+";
command = "xdg-open";
post_processing = true;
mouse = {
enabled = true;
mods = "None";
};
binding = {
key = "U";
mods = "Control|Shift";
};
}];
};
mouse = {
hide_when_typing = true;
};
keyboard.bindings = [
mouse = { hide_when_typing = true; };
key_bindings = [
{
key = lib.toUpper key.up;
mode = "Vi|~Search";
@ -156,9 +141,7 @@ 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,17 +1,6 @@
{
config,
pkgs,
lib,
inputs,
...
}:
{ config, pkgs, lib, inputs, ... }:
let
inherit (config.my)
key
theme
accent
font
;
inherit (pkgs.uservars) key theme accent font;
inherit (theme) color;
in
{

View file

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

View file

@ -1,22 +1,10 @@
{ 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" ];
};
};
};
{ config, pkgs, lib, inputs, ... }: {
xdg.desktopEntries = {
connect-controller = {
name = "Connect Controller";
exec = "bluetoothctl connect 84:30:95:97:1A:79";
terminal = false;
};
disconnect-controller = {
name = "Disconnect Controller";
exec = "bluetoothctl disconnect 84:30:95:97:1A:79";

View file

@ -1,10 +1,4 @@
{
config,
pkgs,
lib,
...
}:
{
{ config, pkgs, lib, ... }: {
xdg.desktopEntries = {
kak = {
name = "Kakoune";
@ -14,10 +8,7 @@
terminal = true;
type = "Application";
icon = "kak.desktop";
categories = [
"Utility"
"TextEditor"
];
categories = [ "Utility" "TextEditor" ];
startupNotify = true;
mimeType = [
"text/english"
@ -49,15 +40,10 @@
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,16 +1,6 @@
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (config.my) 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 = {
@ -38,12 +28,6 @@ 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";
@ -59,11 +43,6 @@ 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,13 +1,6 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (config.my) accent editor desktop;
in
{
{ config, pkgs, lib, ... }:
let inherit (pkgs.uservars) key theme color accent font editor desktop;
in {
config = {
programs.fish = {
enable = true;
@ -41,12 +34,10 @@ in
};
shellAbbrs = {
off = "shutdown now";
v =
{
"helix" = "hx";
"kakoune" = "kak";
}
.${editor};
v = {
"helix" = "hx";
"kakoune" = "kak";
}.${editor};
ns = "nix develop --command $SHELL";
wcf = "wl-copy-file";
c = "cargo";
@ -73,13 +64,12 @@ 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;
};
@ -96,18 +86,13 @@ in
};
# programs.command-not-found.enable = true;
programs.nix-index.enable = true;
home.packages = (
with pkgs;
with fishPlugins;
[
trash-cli
wl-copy-file
foreign-env
]
++ (lib.optionals (desktop == "sway") [
async-prompt
done
])
);
home.packages = (with pkgs; with fishPlugins;[
trash-cli
wl-copy-file
foreign-env
] ++ (lib.optionals (desktop == "sway") [
async-prompt
done
]));
};
}

View file

@ -1,17 +1,6 @@
{
config,
pkgs,
lib,
inputs,
...
}:
{ config, pkgs, lib, inputs, ... }:
let
inherit (config.my)
key
theme
accent
font
;
inherit (pkgs.uservars) key theme accent font;
inherit (theme) color;
colors = {
@ -26,21 +15,22 @@ 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,17 +1,9 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (config.my) 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,11 +1,4 @@
{
pkgs,
lib,
inputs,
config,
...
}:
lib.mkIf (config.my.desktop == "gnome") {
{ pkgs, lib, inputs, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") {
home.pointerCursor = {
name = "Adwaita";
@ -21,7 +14,9 @@ lib.mkIf (config.my.desktop == "gnome") {
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" ];
};
@ -41,15 +36,20 @@ lib.mkIf (config.my.desktop == "gnome") {
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 = lib.mkForce false;
enable = true;
text-editor = "codium.desktop";
image-viewer = "org.gnome.eog.desktop";
video-player = "org.gnome.Totem.desktop";
web-browser = "firefox.desktop";
document-viewer = "org.gnome.Evince.desktop";
file-manager = "org.gnome.Nautilus.desktop";
archive-manager = "org.gnome.FileRoller.desktop;";
email-client = "thunderbird.desktop";
torrent-client = "torrent.desktop";
};
}

View file

@ -1,16 +1,10 @@
{
config,
pkgs,
lib,
...
}:
{
{ config, pkgs, lib, ... }: {
config = {
services.gpg-agent = {
enable = true;
defaultCacheTtl = 604800;
maxCacheTtl = 604800;
pinentryPackage = pkgs.pinentry-curses;
pinentryFlavor = "gtk2";
extraConfig = ''
allow-preset-passphrase
'';
@ -22,9 +16,7 @@
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 = {
@ -39,10 +31,9 @@
OnUnitActiveSec = "300";
Unit = "gpg_unlock.service";
};
Install = {
WantedBy = [ "sway-session.target" ];
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
};
};
}

View file

@ -1,11 +1,6 @@
{
pkgs,
lib,
config,
...
}:
{ pkgs, lib, ... }:
let
inherit (config.my) accent theme editor;
inherit (pkgs.uservars) accent theme editor;
inherit (theme) color;
in
{
@ -79,9 +74,7 @@ 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 = [
{
@ -103,29 +96,14 @@ 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;
@ -146,6 +124,8 @@ in
};
};
};
home.sessionVariables = lib.mkIf (editor == "helix") { EDITOR = "hx"; };
home.sessionVariables = lib.mkIf (editor == "helix") {
EDITOR = "hx";
};
};
}

View file

@ -1,12 +1,4 @@
{
config,
pkgs,
lib,
inputs,
osConfig,
...
}:
{
{ config, pkgs, lib, inputs, osConfig, ... }: {
imports = [
./controller.nix
./waybar
@ -19,6 +11,7 @@
./alacritty.nix
./git.nix
./ssh.nix
./qutebrowser
./gpg.nix
./rofi.nix
./mpv.nix
@ -44,11 +37,8 @@
./xdg-dirs.nix
inputs.hyprland.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
../settings
];
my = import ./variables.nix;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "lelgenio";
@ -80,7 +70,7 @@
comma
# System monitors
(btop.override { cudaSupport = true; })
btop
amdgpu_top
inxi
dmidecode
@ -136,7 +126,7 @@
rust-analyzer # rust analyzer
blade-formatter
nixfmt-rfc-style
nixpkgs-fmt
];
fonts.fontconfig.enable = true;
@ -148,18 +138,22 @@
};
};
home.sessionVariables = {
VOLUME_CHANGE_SOUND = "${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
};
programs.bash = {
enable = true;
VOLUME_CHANGE_SOUND =
"${pkgs.sound-theme-freedesktop}/share/sounds/freedesktop/stereo/audio-volume-change.oga";
};
programs.bash = { enable = true; };
xdg.defaultApplications = {
enable = true;
text-editor = lib.mkDefault "kak.desktop";
image-viewer = lib.mkDefault "pqiv.desktop";
video-player = lib.mkDefault "mpv.desktop";
web-browser = lib.mkDefault "firefox.desktop";
web-browser = lib.mkDefault (
{
firefox = lib.mkDefault "firefox.desktop";
qutebrowser = lib.mkDefault "org.qutebrowser.qutebrowser.desktop";
}.${pkgs.uservars.browser}
);
document-viewer = lib.mkDefault "org.pwmt.zathura.desktop";
file-manager = lib.mkDefault "thunar.desktop";
archive-manager = "engrampa.desktop";
@ -167,14 +161,12 @@
torrent-client = lib.mkDefault "torrent.desktop";
};
wayland.windowManager.sway.extraConfig =
lib.optionalString (osConfig.networking.hostName or "" == "monolith")
''
exec steam
exec obs --startreplaybuffer --disable-shutdown-check
exec deluge-gtk
exec nicotine
'';
wayland.windowManager.sway.extraConfig = lib.optionalString (osConfig.networking.hostName or "" == "monolith") ''
exec steam
exec obs --startreplaybuffer --disable-shutdown-check
exec deluge-gtk
exec nicotine
'';
systemd.user.services.rm-target = {
Unit = {
@ -188,16 +180,12 @@
};
};
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,11 +1,5 @@
{
config,
pkgs,
lib,
...
}:
{
config = lib.mkIf (config.my.desktop == "hyprland") {
{ config, pkgs, lib, ... }: {
config = lib.mkIf (pkgs.uservars.desktop == "hyprland") {
wayland.windowManager.hyprland = {
enable = false;
extraConfig = ''
@ -128,9 +122,6 @@
'';
};
home.file.".config/eww".source = ./eww;
home.packages = with pkgs; [
eww-wayland
jq
];
home.packages = with pkgs; [ eww-wayland jq ];
};
}

View file

@ -1,9 +1,4 @@
{
pkgs,
lib,
color,
accent,
}:
{ pkgs, lib, color, accent }:
let
colors = lib.mapAttrs (_: lib.replaceStrings [ "#" ] [ "rgb:" ]) {
accent_fg = accent.fg;
@ -99,9 +94,8 @@ 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
@ -112,5 +106,6 @@ with colors;
Error = "red";
Warning = "yellow";
Hint = "blue";
}
))
})
)

View file

@ -1,17 +1,6 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
let
inherit (config.my)
key
dmenu
editor
theme
accent
;
inherit (pkgs.uservars) key dmenu editor theme accent;
inherit (theme) color;
inherit (pkgs) kakounePlugins;
inherit (pkgs.kakouneUtils) buildKakounePlugin;
@ -85,39 +74,26 @@ in
})
];
extraConfig =
lib.concatStringsSep "\n" (
map (lib.readFile) (
[
./filetypes.kak
./hooks.kak
./indent.kak
./keys.kak
./lsp-config.kak
./usermode.kak
./git-mode.kak
]
++ lib.optional (dmenu == "rofi") ./rofi-commands.kak
)
)
+ ''
lib.concatStringsSep "\n"
(map (lib.readFile) ([
./filetypes.kak
./hooks.kak
./indent.kak
./keys.kak
./lsp-config.kak
./usermode.kak
./git-mode.kak
] ++ lib.optional (dmenu == "rofi") ./rofi-commands.kak)) + ''
set global scrolloff 10,20
set global autoreload yes
set global startup_info_version 99999999
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
@ -147,3 +123,4 @@ in
};
};
}

View file

@ -12,7 +12,7 @@ hook global WinSetOption filetype=c %{
}
hook global WinSetOption filetype=nix %{
set buffer formatcmd 'nixfmt'
set buffer formatcmd 'nixpkgs-fmt'
}
hook global BufCreate .*\.html %{
@ -93,7 +93,6 @@ hook global WinSetOption filetype=blade %[
hook -once -always window WinSetOption filetype=.* %{ remove-hooks window blade-.+ }
require-module php
require-module javascript
add-highlighter buffer/blade regions
add-highlighter buffer/blade/base default-region group
@ -109,9 +108,6 @@ hook global WinSetOption filetype=blade %[
add-highlighter buffer/blade/php/ ref php
add-highlighter buffer/blade/php/ regex '@((end)?php)' 1:block
add-highlighter buffer/blade/js region '<script>' '</script>' group
add-highlighter buffer/blade/js/ ref javascript
add-highlighter buffer/blade/expression region '\{\{(?!--)' '(?!--)\}\}' ref php
add-highlighter buffer/blade/statement region -recurse '\(' '@(if|foreach|for|section|yield|include)\s*\(' '\)' ref php
add-highlighter buffer/blade/base/ regex '@(else(if)?|include|case|break)' 1:keyword

View file

@ -7,7 +7,7 @@ verbosity = 2
# set to 0 to disable
timeout = 1800 # seconds = 30 minutes
[language_server.angular]
[language.angular]
filetypes = ["angular"]
roots = [".angular", ".git"]
command = "node"
@ -20,80 +20,134 @@ args = [
"--stdio",
]
[language_server.bash-language-server]
[language.bash]
filetypes = ["sh"]
roots = [".git", ".hg"]
command = "bash-language-server"
args = ["start"]
[language_server.clangd]
[language.c_cpp]
filetypes = ["c", "cpp"]
roots = ["compile_commands.json", ".clangd", ".git", ".hg"]
roots = [ "compile_commands.json", ".clangd", ".git" ]
command = "clangd"
[language_server.css-language-server]
[language.crystal]
filetypes = ["crystal"]
roots = ["shard.yml"]
command = "scry"
[language.css]
filetypes = ["css"]
roots = ["package.json", ".git", ".hg"]
roots = ["package.json"]
command = "vscode-css-languageserver"
args = ["--stdio"]
[language_server.less-language-server]
[language.less]
filetypes = ["less"]
roots = ["package.json", ".git", ".hg"]
roots = ["package.json", ".git"]
command = "vscode-css-languageserver"
args = ["--stdio"]
[language_server.html-language-server]
[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]
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_server.typescript-language-server]
filetypes = ["javascript", "typescript"]
roots = ["package.json", "tsconfig.json", "jsconfig.json", ".git", ".hg"]
[language.javascript]
filetypes = ["javascript"]
roots = [".flowconfig"]
command = "flow"
args = ["lsp"]
[language.typescript]
filetypes = ["typescript"]
roots = ["package.json"]
command = "typescript-language-server"
args = ["--stdio"]
settings_section = "_"
[language_server.typescript-language-server.settings._]
# quotePreference = "double"
# typescript.format.semicolons = "insert"
[language_server.json-language-server]
[language.json]
filetypes = ["json"]
roots = ["package.json"]
command = "vscode-json-languageserver"
args = ["--stdio"]
[language_server.nil]
[language.latex]
filetypes = ["latex"]
roots = [".git"]
command = "texlab"
[language.nim]
filetypes = ["nim"]
roots = ["*.nimble", ".git"]
command = "nimlsp"
[language.nix]
filetypes = ["nix"]
command = "nil"
roots = ["flake.nix", "shell.nix", ".git"]
[language_server.nil.settings.nil]
formatting.command = [ "nixfmt" ]
[language.nix.settings.nil]
formatting.command = [ "nixpkgs-fmt" ]
[language_server.intelephense]
[language.ocaml]
filetypes = ["ocaml"]
roots = ["Makefile", "opam", "*.opam", "dune"]
command = "ocaml-language-server"
args = ["--stdio"]
[language.php]
filetypes = ["php"]
roots = [".htaccess", "composer.json"]
command = "intelephense"
args = ["--stdio"]
settings_section = "intelephense"
[language_server.intelephense.settings.intelephense]
storagePath = "/tmp/intelephense"
format.braces = "k&r"
environment.includePaths = [
[language.php.settings]
intelephense.format.braces = "k&r"
intelephense.storagePath = "/tmp/intelephense"
intelephense.environment.includePaths = [
"./vendor",
"./vendor/autoload",
"./vendor/laravel/framework/",
"./vendor/laravel/framework/src/",
"./vendor/laravel/framework/src/Illuminate/"
]
files.exclude = [
intelephense.files.exclude = [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
@ -105,9 +159,42 @@ files.exclude = [
"**/resources/views/**"
]
[language_server.rust-analyzer]
[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]
filetypes = ["rust"]
roots = ["Cargo.toml"]
roots = ["rust-toolchain.toml", "rust-toolchain", "Cargo.toml"]
command = "sh"
args = [
"-c",
@ -119,37 +206,99 @@ args = [
fi
""",
]
[language_server.rust-analyzer.settings.rust-analyzer]
# See https://rust-analyzer.github.io/manual.html#configuration
# cargo.features = []
[language.rust.settings.rust-analyzer]
## this can use too much space and processing power
# checkOnSave.extraArgs = ["--target-dir", "./target/check"]
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_server.godot]
[language.terraform]
filetypes = ["terraform"]
roots = ["*.tf"]
command = "terraform-ls"
args = ["serve"]
[language.godot]
filetypes = ["gd", "gdscript", "gdscript3"]
roots = ["project.godot", ".git/"]
command = "nc"
args = [ "localhost", "6008"]
# 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"},
]
[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"

View file

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

View file

@ -1,20 +1,5 @@
{
config,
pkgs,
lib,
inputs,
...
}:
let
inherit (config.my)
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,20 +1,6 @@
{
config,
pkgs,
lib,
font,
...
}:
let
inherit (config.my)
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,12 +1,6 @@
{
config,
pkgs,
lib,
font,
...
}:
{ config, pkgs, lib, font, ... }:
let
inherit (config.my) browser;
inherit (pkgs.uservars) browser;
cfg = config.xdg.defaultApplications;
in
{
@ -32,21 +26,20 @@ 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;
@ -428,6 +421,7 @@ in
"x-theora+ogg"
];
archive-suffixes = [
"bzip2"
"gzip"
@ -493,5 +487,6 @@ in
enable = true;
defaultApplications = mimes;
};
};
}

View file

@ -1,11 +1,5 @@
{
lib,
pkgs,
config,
...
}:
{
config = lib.mkIf (config.my.desktop != "gnome") {
{ lib, pkgs, config, ... }: {
config = lib.mkIf (pkgs.uservars.desktop != "gnome") {
services.mpd = {
enable = true;
musicDirectory = config.home.homeDirectory + "/Música";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
config = {
programs.mpv = {
enable = true;
@ -7,7 +6,8 @@
# 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,15 +1,10 @@
{
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,10 +1,4 @@
{
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,21 +1,8 @@
{
config,
pkgs,
lib,
inputs,
...
}:
{ config, pkgs, lib, inputs, ... }:
let
inherit (config.my)
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";
@ -28,8 +15,8 @@ let
montage_mode_shift_${axis}(${toString (sign * -1)})
}
}
''
);
'');
in
{
# My bemenu wrapper
@ -58,12 +45,7 @@ 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); }
@ -72,7 +54,10 @@ 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
'';

219
user/qutebrowser/colors.nix Normal file
View file

@ -0,0 +1,219 @@
{ config, pkgs, lib, font, ... }:
let
inherit (pkgs.uservars) key theme accent font browser;
inherit (theme) color;
in
{
programs.qutebrowser.settings = {
hints.border = "2px solid ${accent.color}";
content.user_stylesheets = "style.css";
colors = {
########################################################
# Tabs
########################################################
tabs =
let
tabs_defaults = {
odd = {
fg = color.txt;
bg = color.bg;
};
even = {
fg = color.txt;
bg = color.bg_dark;
};
selected = {
odd = {
fg = accent.fg;
bg = accent.color;
};
even = {
fg = accent.fg;
bg = accent.color;
};
};
};
in
{
bar = { bg = color.bg; };
pinned = tabs_defaults;
} // tabs_defaults;
########################################################
# Completion for urls and commands
########################################################
completion = {
fg = color.txt;
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;
border = {
top = color.bg_dark;
bottom = color.bg_dark;
};
};
item = {
selected = {
fg = accent.fg;
bg = accent.color;
border = {
top = color.bg_dark;
bottom = color.bg_dark;
};
match = { fg = color.txt; };
};
};
};
########################################################
# Statusbar
########################################################
statusbar = {
normal = {
fg = color.txt;
bg = color.bg;
};
insert = {
fg = color.normal.green;
bg = color.bg;
};
passthrough = {
fg = color.normal.blue;
bg = color.bg;
};
command = {
fg = color.txt;
bg = color.bg;
};
caret = {
selection = {
fg = accent.fg;
bg = accent.color;
};
};
url = {
success = {
https = { fg = color.txt; };
http = { fg = color.normal.red; };
};
hover = { fg = color.normal.cyan; };
};
};
########################################################
# Downloads
########################################################
downloads = {
start = { bg = color.normal.blue; };
stop = { bg = color.normal.green; };
bar = { bg = color.bg; };
};
########################################################
# Choice of what element should be clicked
########################################################
hints = {
fg = color.txt;
bg = color.bg;
match = { fg = accent.color; };
};
########################################################
# List of what each keybinding does
########################################################
keyhint = {
fg = color.txt;
bg = color.bg;
suffix = { fg = accent.color; };
};
########################################################
# Right click menu
########################################################
contextmenu = {
menu = {
fg = color.txt;
bg = color.bg;
};
selected = {
fg = accent.fg;
bg = accent.color;
};
disabled = { fg = color.bg_light; };
};
########################################################
# Dark theme
########################################################
# webpage = lib.mkIf (color.type == "dark") {
# bg = color.bg;
# preferred_color_scheme = "dark";
# darkmode = {
# enabled = false;
# threshold = {
# text = 150;
# background = 205;
# };
# };
# };
};
};
home.file = {
".config/qutebrowser/style.css".text = ''
${lib.optionalString (color.type == "dark") ''
button,
input[type="button"] {
color: unset;
background-color: unset;
}
.bg-gradient-to-b,
body {
background-image: none !important;
}
/***************************
* Remove borked ellements *
***************************/
.search-filters-wrap:before, .search-filters-wrap:after {
display: none;
}
''}
/*****************
* Hide some ads *
*****************/
/*Reddit*/
#sr-header-area .redesign-beta-optin,
.link.promotedlink.promoted,
.spacer:empty,
.spacer .premium-banner-outer,
.ad-container,
/*Youtube*/
div#masthead-ad ,
.video-ads,
#player-ads,
ytd-popup-container {
display: none !important;
}
'';
};
}

View file

@ -0,0 +1,90 @@
{ config, pkgs, lib, font, ... }:
let
inherit (pkgs.uservars) theme;
inherit (theme) color;
# ".config/qutebrowser/greasemonkey/darkreader.js".text =
darkThemeUserscript = enabled: pkgs.writeText "darkreader.js" ''
// ==UserScript==
// @name Dark Reader (Unofficial)
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
// @namespace DarkReader
// @description Inverts the brightness of pages to reduce eye strain
// @version 4.7.15
// @author https://github.com/darkreader/darkreader#contributors
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
// @run-at document-end
// @grant none
// @include http*
// @require https://cdn.jsdelivr.net/npm/darkreader/darkreader.min.js
// @noframes
// ==/UserScript==
DarkReader.setFetchMethod(window.fetch)
if (${if enabled then "false" else "true"}) {
DarkReader.disable();
return;
}
const ignore_list = [
"askubuntu.com",
"mathoverflow.com",
"mathoverflow.net",
"serverfault.com",
"stackapps.com",
"stackexchange.com",
"stackoverflow.com",
"superuser.com",
"hub.docker.com",
];
for (let item of ignore_list) {
if (window.location.origin.indexOf(item) >= 0) {
console.log("URL matched dark-mode ignore list");
return;
}
}
DarkReader.enable({
brightness: 100,
contrast: 100,
sepia: 0,
darkSchemeBackgroundColor: "${color.bg}",
darkSchemeTextColor: "${color.txt}",
lightSchemeBackgroundColor: "${color.bg}",
lightSchemeTextColor: "${color.txt}",
});
'';
in
{
programs.qutebrowser.keyBindings = {
normal = {
"K" = "spawn --userscript toggle-dark-theme";
};
};
home.file = {
".local/share/qutebrowser/userscripts/toggle-dark-theme".executable = true;
".local/share/qutebrowser/userscripts/toggle-dark-theme".text = ''
#!/bin/sh
DARK_READER_SCRIPT="$HOME/.config/qutebrowser/greasemonkey/darkreader.js"
MARKER="$HOME/.config/qutebrowser/is-dark-mode"
if test -f "$MARKER"
then
rm -f "$MARKER"
cp -f ${darkThemeUserscript false} "$DARK_READER_SCRIPT"
echo "jseval --world main DarkReader.disable()" >> "$QUTE_FIFO"
else
touch "$MARKER"
cp -f ${darkThemeUserscript true} "$DARK_READER_SCRIPT"
echo "jseval --world main DarkReader.enable()" >> "$QUTE_FIFO"
fi
if test -n "$QUTE_FIFO"; then
echo "greasemonkey-reload --quiet" >> "$QUTE_FIFO"
fi
'';
};
}

View file

@ -0,0 +1,152 @@
{ config, pkgs, lib, font, ... }:
let
inherit (pkgs.uservars) key browser editor;
in
{
imports = [
./colors.nix
./dark-theme.nix
./fonts.nix
];
config = {
programs.qutebrowser = {
enable = true;
# enableDefaultBindings = false;
keyBindings = {
normal = {
# basic movent
"${key.left}" = "scroll left";
"${key.down}" = "scroll down";
"${key.up}" = "scroll up";
"${key.right}" = "scroll right";
"${lib.toUpper key.up}" = "scroll-px 0 -100";
"${lib.toUpper key.down}" = "scroll-px 0 100";
"${lib.toUpper key.left}" = "back";
"${lib.toUpper key.right}" = "forward";
"${lib.toUpper key.tabL}" = "tab-prev";
"${lib.toUpper key.tabR}" = "tab-next";
"${key.next}" = "search-next";
"${lib.toUpper key.next}" = "search-prev";
"${key.insertMode}" = "mode-enter insert";
# ":" = "mode-enter command";
"t" = "hint all";
"h" = "set-cmd-text -s :open";
"T" = "hint all tab";
"H" = "set-cmd-text -s :open -t";
"<Ctrl-${lib.toLower key.tabL}>" = "tree-tab-promote";
"<Ctrl-${lib.toLower key.tabR}>" = "tree-tab-demote";
"co" = "tab-only --pinned keep";
# "K" = "jseval --world main if (DarkReader.isEnabled()) {DarkReader.disable()} else {DarkReader.enable()}";
};
insert = {
# quit insert mode
"<Alt-k>" = "mode-enter normal";
};
caret = {
# basic movent
"${key.left}" = "move-to-prev-char";
"${key.down}" = "move-to-next-line";
"${key.up}" = "move-to-prev-line";
"${key.right}" = "move-to-next-char";
"${key.insertMode}" = "mode-enter insert";
};
};
settings = {
tabs.tree_tabs = true;
tabs.position = "right";
tabs.pinned.shrink = false;
tabs.title.format = "{tree}{collapsed}{audio}{index}: {current_title}";
tabs.title.format_pinned = "{tree}{collapsed}{audio}{index} 🔒: {current_title}";
session.lazy_restore = true;
auto_save.session = true;
hints.chars = key.hints;
editor.command = [
"terminal"
"-e"
{
kakoune = "kak";
helix = "hx";
}.${editor}
"{file}"
"+{line}"
];
input.insert_mode.auto_leave = false;
content.autoplay = false;
content.blocking.adblock.lists = [
"https://easylist.to/easylist/easylist.txt"
"https://easylist.to/easylist/easyprivacy.txt"
"https://easylist-downloads.adblockplus.org/easylistdutch.txt"
"https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt"
"https://www.i-dont-care-about-cookies.eu/abp/"
"https://secure.fanboy.co.nz/fanboy-cookiemonster.txt"
];
};
extraConfig = ''
config.load_autoconfig()
config.set("content.notifications.enabled", True, "https://web.whatsapp.com")
'';
};
systemd.user.services = lib.mkIf (browser == "qutebrowser") {
qutebrowser = {
Unit = {
Description = "Qutebrowser Web client";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStartPre = "/usr/bin/env sleep 10s";
ExecStart = "${pkgs.qutebrowser}/bin/qutebrowser";
Restart = "on-failure";
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
};
home.file = {
# For some stupid reason qutebrowser crashes if this dir does not exist
".local/share/qutebrowser/greasemonkey/.keep".text = "";
".config/qutebrowser/greasemonkey/youtube.js".text = ''
// ==UserScript==
// @name Auto Skip YouTube Ads
// @version 1.0.2
// @description Speed up and skip YouTube ads automatically
// @author codiac-killer
// @match *://*.youtube.com/*
// @exclude *://*.youtube.com/subscribe_embed?*
// ==/UserScript==
let main = new MutationObserver(() => {
// Get skip button and click it
let btn = document.getElementsByClassName("ytp-ad-skip-button ytp-button").item(0)
if (btn) {
btn.click()
}
// (unskipable ads) If skip button didn't exist / was not clicked speed up video
const ad = [...document.querySelectorAll('.ad-showing')][0];
if (ad) {
// Speed up and mute
document.querySelector('video').playbackRate = 16;
document.querySelector('video').muted = true;
}
})
main.observe(document.getElementsByClassName("video-ads ytp-ad-module").item(0), {attributes: true, characterData: true, childList: true})
'';
};
};
}

View file

@ -0,0 +1,36 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) font;
in
{
programs.qutebrowser.settings.fonts =
let
mkFont = name: size: "${toString size}px ${name}";
DEF_MONO = mkFont font.mono font.size.medium;
BIG_MONO = mkFont font.mono font.size.big;
DEF_INTER = mkFont font.interface font.size.medium;
BIG_INTER = mkFont font.interface font.size.big;
in
{
debug_console = BIG_INTER;
downloads = BIG_INTER;
hints = "bold " + BIG_MONO;
keyhint = BIG_INTER;
prompts = BIG_INTER;
statusbar = DEF_MONO;
completion = {
entry = BIG_INTER;
category = BIG_INTER;
};
messages = {
error = DEF_INTER;
info = DEF_INTER;
warning = DEF_INTER;
};
tabs = {
selected = BIG_INTER;
unselected = BIG_INTER;
};
};
}

View file

@ -1,11 +1,4 @@
{
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,17 +1,6 @@
{
config,
pkgs,
lib,
font,
...
}:
{ config, pkgs, lib, font, ... }:
let
inherit (config.my)
key
theme
accent
font
;
inherit (pkgs.uservars) key theme accent font;
inherit (theme) color;
in
{
@ -53,15 +42,14 @@ 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";
@ -90,7 +78,9 @@ in
margin-right = mkLiteral "20px";
size = 24;
};
};
};
};
}

View file

@ -1,24 +1,17 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (config.my) 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 = "monolith.lelgenio.com";
hostname = "lelgenio.1337.cx";
port = 9022;
};
phantom = {
user = "root";
hostname = "phantom.lelgenio.com";
hostname = "phantom.lelgenio.xyz";
port = 9022;
};
};

View file

@ -1,16 +1,6 @@
{
config,
pkgs,
lib,
...
}:
{ config, pkgs, lib, ... }:
let
inherit (config.my)
key
accent
font
theme
;
inherit (pkgs.uservars) key accent font theme;
inherit (theme) color;
in
{
@ -24,14 +14,13 @@ in
./swaylock.nix
./theme.nix
];
config = lib.mkIf (config.my.desktop == "sway") {
config = lib.mkIf (pkgs.uservars.desktop == "sway") {
services.mako.enable = true;
services.swayidle.enable = true;
services.kanshi.enable = true;
wayland.windowManager.sway = {
enable = true;
package = pkgs.mySway;
config = {
bars = [ ];
@ -52,13 +41,7 @@ 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
{
@ -69,7 +52,7 @@ in
};
output = {
"*" = {
adaptive_sync = "off";
adaptive_sync = "on";
bg = "${theme.background} fill";
mode = "1920x1080@144.000Hz";
};
@ -95,7 +78,9 @@ 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";
};
};
@ -116,25 +101,10 @@ in
indicator = true;
};
systemd.user.services.vrr-fullscreen = {
Unit = {
Description = "Enable VRR for fullscreen windows";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${lib.getExe pkgs.vrr-fullscreen}";
Restart = "on-failure";
};
Install = {
WantedBy = [ "sway-session.target" ];
};
};
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
home.packages = with pkgs; [
mySway
sway
swaybg
swaylock
wdisplays
@ -160,10 +130,7 @@ in
grim
swappy
(tesseract5.override {
enableLanguages = [
"eng"
"por"
];
enableLanguages = [ "eng" "por" ];
})
];
};

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