dlaptop on zfs

This commit is contained in:
delta 2024-06-08 00:27:59 +03:00
parent e6c91a257d
commit ec3f81e682
14 changed files with 925 additions and 177 deletions

View file

@ -5,14 +5,15 @@
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
],
"systems": "systems"
},
"locked": {
"lastModified": 1713259062,
"narHash": "sha256-WTO84hUL8IlNuHDK2yOCeJ38EewFzGt5E0kzBjNWxa8=",
"lastModified": 1717576207,
"narHash": "sha256-LU6d1xX7jN1zt10YU7Oym07MtzVfziSmUEznGFdbuaw=",
"owner": "anyrun-org",
"repo": "anyrun",
"rev": "f9d30e34fa4ccb2797c6becec37e8bcff6585d39",
"rev": "7aabad8d5bb7d1bffae903ce86427b888ab824b4",
"type": "github"
},
"original": {
@ -70,11 +71,11 @@
]
},
"locked": {
"lastModified": 1716035127,
"narHash": "sha256-qqxeTHGDvCcer1QEGlu81MmRfbkNHBqCD9Ue7S2yHBE=",
"lastModified": 1717590482,
"narHash": "sha256-TbKrGVHIXTdanGtit/NghkQ4qeCdP7W775VKmPm0tnM=",
"owner": "nix-community",
"repo": "flake-firefox-nightly",
"rev": "ee25f2df1923145abee8aa8096f9b45065b535fb",
"rev": "e7deec85c929653bc1aa034a3c2f0a588614e10b",
"type": "github"
},
"original": {
@ -85,11 +86,11 @@
},
"flake-compat": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
@ -136,11 +137,11 @@
]
},
"locked": {
"lastModified": 1696343447,
"narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
@ -157,11 +158,11 @@
]
},
"locked": {
"lastModified": 1714641030,
"narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=",
"lastModified": 1715865404,
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e",
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
"type": "github"
},
"original": {
@ -170,24 +171,9 @@
"type": "github"
}
},
"flake-root": {
"locked": {
"lastModified": 1713493429,
"narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=",
"owner": "srid",
"repo": "flake-root",
"rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd",
"type": "github"
},
"original": {
"owner": "srid",
"repo": "flake-root",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
@ -205,7 +191,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1701680307,
@ -223,7 +209,7 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
"systems": "systems_5"
},
"locked": {
"lastModified": 1710146030,
@ -240,24 +226,6 @@
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_6"
},
@ -275,11 +243,38 @@
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1716213921,
"narHash": "sha256-xrsYFST8ij4QWaV6HEokCUNIZLjjLP1bYC60K8XiBVA=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "0e8fcc54b842ad8428c9e705cb5994eaf05c26a0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"pre-commit-hooks",
"git-hooks",
"nixpkgs"
]
},
@ -304,11 +299,11 @@
]
},
"locked": {
"lastModified": 1715486357,
"narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=",
"lastModified": 1717525419,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b",
"type": "github"
},
"original": {
@ -325,11 +320,11 @@
]
},
"locked": {
"lastModified": 1715486357,
"narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=",
"lastModified": 1717052710,
"narHash": "sha256-LRhOxzXmOza5SymhOgnEzA8EAQp+94kkeUYWKKpLJ/U=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1",
"rev": "29c69d9a466e41d46fd3a7a9d0591ef9c113c2ae",
"type": "github"
},
"original": {
@ -354,11 +349,11 @@
]
},
"locked": {
"lastModified": 1715791817,
"narHash": "sha256-J069Uhv/gCMFLX1dSh2f+9ZTM09r1Nv3oUfocCnWKow=",
"lastModified": 1716576411,
"narHash": "sha256-FIN1wMoyePBTtibCbaeJaoKNLuAYIGwLCWAYC1DJanw=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "7c3aa03dffb53921e583ade3d4ae3f487e390e7e",
"rev": "57298fc4f13c807e50ada2c986a3114b7fc2e621",
"type": "github"
},
"original": {
@ -373,15 +368,15 @@
"hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs",
"systems": "systems_2",
"systems": "systems_3",
"xdph": "xdph"
},
"locked": {
"lastModified": 1716316196,
"narHash": "sha256-ynu+Ii1PTtnz4YdjP2CJbnxaie9aETNAds9lwDzeQus=",
"lastModified": 1717576964,
"narHash": "sha256-+iTjt2ujiWJZW7J36s/CzMiF1CEOi20TTK+Uq53tlxk=",
"ref": "refs/heads/main",
"rev": "e419ef1873de01b0762f7f1a411994170a4d8cab",
"revCount": 4723,
"rev": "fefa55d406e38eda481ce75178cef3e43298762d",
"revCount": 4763,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@ -399,11 +394,11 @@
]
},
"locked": {
"lastModified": 1715621965,
"narHash": "sha256-S5Wzi3hhFOiCaeZqmx3zBdrv8KzaEafD5hCfY8ixz0A=",
"lastModified": 1716228712,
"narHash": "sha256-y+LOXuSRMfkR2Vfwl5K2NVrszi1h5MJpML+msLnVS8U=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "46d2206858657d439792926958f52b037534de49",
"rev": "33b38358559054d316eb605ccb733980dfa7dc63",
"type": "github"
},
"original": {
@ -451,11 +446,11 @@
]
},
"locked": {
"lastModified": 1715791527,
"narHash": "sha256-HhQ4zvGHrRjR63ltySSeg+x+0jb0lepiutWdnFhLRoo=",
"lastModified": 1716473782,
"narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "969cb076e5b76f2e823aeca1937a3e1f159812ee",
"rev": "87d5d984109c839482b88b4795db073eb9ed446f",
"type": "github"
},
"original": {
@ -495,11 +490,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1716725378,
"narHash": "sha256-bNTVDAVBLFSSTU+q54cJnntmFKBi+F/D8sSqlZwBGiM=",
"lastModified": 1717330178,
"narHash": "sha256-rRZjmC3xcPpHTJHnEy3T99O86Ecjao5YhakzaoNiRcs=",
"owner": "nix-community",
"repo": "lib-aggregate",
"rev": "dbc9130fe1455e0f6ee4d8f5f799f9be551f866b",
"rev": "64d43e2bbc6eab8d1cbdfba96d90a71e15a847d7",
"type": "github"
},
"original": {
@ -532,11 +527,11 @@
]
},
"locked": {
"lastModified": 1713946171,
"narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=",
"lastModified": 1716993688,
"narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7",
"rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4",
"type": "github"
},
"original": {
@ -547,11 +542,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1716137900,
"narHash": "sha256-sowPU+tLQv8GlqtVtsXioTKeaQvlMz/pefcdwg8MvfM=",
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c0b7a92c30122196a761b440ac0d46d3d9954f1",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"type": "github"
},
"original": {
@ -563,11 +558,11 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1716684580,
"narHash": "sha256-sIbMJWJr4hl2PWd9/iWlh89QfVzBn1NJ3u5RjeZADuM=",
"lastModified": 1717289404,
"narHash": "sha256-4q6ZO3BqHgdd3Aacb/xiQXB4g9TQKpQg/praTpD9vbI=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "d0d27192931680482081aa1c38389da2af84a651",
"rev": "e090cb30ae82f4b4461aafdb808847c6c97b08c2",
"type": "github"
},
"original": {
@ -578,11 +573,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1715668745,
"narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=",
"lastModified": 1717530100,
"narHash": "sha256-b4Dn+PnrZoVZ/BoR9JN2fTxXxplJrAsdSUIePf4Cacs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843",
"rev": "a2e1d0414259a144ebdc048408a807e69e0565af",
"type": "github"
},
"original": {
@ -610,11 +605,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1715534503,
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"type": "github"
},
"original": {
@ -658,11 +653,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1715534503,
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"type": "github"
},
"original": {
@ -674,11 +669,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1715447595,
"narHash": "sha256-VsVAUQOj/cS1LCOmMjAGeRksXIAdPnFIjCQ0XLkCsT0=",
"lastModified": 1716769173,
"narHash": "sha256-7EXDb5WBw+d004Agt+JHC/Oyh/KTUglOaQ4MNjBbo5w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "062ca2a9370a27a35c524dc82d540e6e9824b652",
"rev": "9ca3f649614213b2aaf5f1e16ec06952fe4c2632",
"type": "github"
},
"original": {
@ -741,19 +736,18 @@
"devshell": "devshell",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"flake-root": "flake-root",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks": "pre-commit-hooks",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1715758881,
"narHash": "sha256-0W9F2F9YnqMZPBrz68VrTALlhTyBBeuuh/xD8C0PEVg=",
"lastModified": 1717574948,
"narHash": "sha256-8C2S1WWC4ty1LePzFWp+D6re/pggCJj9tWslddJ/wUw=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "e035d22b64a9bd5f469664cbe42ea798d7c16b2e",
"rev": "a54ee8ad64c91b587c3460126bad25a441c1118c",
"type": "github"
},
"original": {
@ -762,34 +756,6 @@
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_3",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
],
"nixpkgs-stable": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1714478972,
"narHash": "sha256-q//cgb52vv81uOuwz1LaXElp3XAe1TqrABXODAEF6Sk=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "2849da033884f54822af194400f8dff435ada242",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"anyrun": "anyrun",
@ -813,11 +779,11 @@
"sops-nix": "sops-nix"
},
"locked": {
"lastModified": 1716081545,
"narHash": "sha256-ypSvXHziqSlX/dafHm0SWS2TiaAEoswWr/0LrzPC8Xc=",
"lastModified": 1717693242,
"narHash": "sha256-yRPXkZ6Uc4M585Hq1hxNtSBlgGnzDEVFcs2+xccDcXs=",
"ref": "refs/heads/main",
"rev": "33beddf3a50f2a15266f847e298b50ce54077ef8",
"revCount": 33,
"rev": "dc80291b90317d2b88665392858c4191ebb6f6ad",
"revCount": 36,
"type": "git",
"url": "ssh://git@github.com/deltathetawastaken/secrets.git"
},
@ -828,7 +794,7 @@
},
"shwewo": {
"inputs": {
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
],
@ -871,21 +837,6 @@
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
@ -900,7 +851,7 @@
"type": "github"
}
},
"systems_3": {
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -915,6 +866,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
@ -962,7 +928,7 @@
},
"tdesktop": {
"inputs": {
"flake-utils": "flake-utils_5",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_6"
},
"locked": {
@ -987,11 +953,11 @@
]
},
"locked": {
"lastModified": 1714058656,
"narHash": "sha256-Qv4RBm4LKuO4fNOfx9wl40W2rBbv5u5m+whxRYUMiaA=",
"lastModified": 1715940852,
"narHash": "sha256-wJqHMg/K6X3JGAE9YLM0LsuKrKb4XiBeVaoeMNlReZg=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "c6aaf729f34a36c445618580a9f95a48f5e4e03f",
"rev": "2fba33a182602b9d49f0b2440513e5ee091d838b",
"type": "github"
},
"original": {

View file

@ -7,6 +7,7 @@
./theme.nix
../pkgs/helix
../pkgs/yazi
../pkgs/waybar
];
#services.blueman-applet.enable = true;
@ -15,7 +16,6 @@
enable = true;
package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; [
matklad.rust-analyzer
jnoortheen.nix-ide
b4dm4n.vscode-nixpkgs-fmt
usernamehw.errorlens

View file

@ -2,7 +2,6 @@
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ stable, unstable, config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -29,12 +28,44 @@
pkgs.wireless-regdb
];
console = {
earlySetup = true;
font = "${pkgs.spleen}/share/consolefonts/spleen-16x32.psfu";
packages = with pkgs; [ spleen ];
keyMap = "us";
};
boot.initrd = {
preDeviceCommands = ''
cat << "EOF"
____
/\ \
/ \ \
/ \ \
/ \ \
/ /\ \ \
/ / \ \ \
/ / /\ \ \
/ / / \ \ \
/ / /____\___\ \
/ / / \
/ / /________________\
\ / /
\/_____________________/
EOF
echo kernel: $(uname -r | tr '[:upper:]' '[:lower:]')
'';
};
# boot.initrd = {
# preDeviceCommands = ''/bin/initrd.sh'';
# secrets."/bin/initrd.sh" = ./initrd.sh;
# };
# 5 GHZ wifi
boot.extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="RU"
'';
services.zfs.autoScrub.enable = true;
services.fstrim = {
enable = true;
interval = "weekly";
@ -55,6 +86,8 @@
"initcall_blacklist=acpi_cpufreq_init"
"nowatchdog"
"amd_pstate.shared_mem=1"
"zfs.zfs_arc_max=19327352832"
"resume=UUID=a2ff20bd-56f3-4c83-b1b4-933ba0c82f36"
];
boot.kernelModules = [ "amd-pstate" "acpi_call" "amdgpu" "kvm-amd" "vfat" "nls_cp437" "nls_iso8859-1" ];
@ -69,7 +102,10 @@
xanPackages = filterAttrs (name: packages: hasSuffix "_xanmod" name && (tryEval packages).success) pkgs.linuxKernel.packages;
compatiblePackages = filter (packages: compareVersions packages.kernel.version latestCompatibleVersion <= 0) (attrValues xanPackages);
orderedCompatiblePackages = sort (x: y: compareVersions x.kernel.version y.kernel.version > 0) compatiblePackages;
in head orderedCompatiblePackages;
selectedKernelPackage = head orderedCompatiblePackages;
in selectedKernelPackage // {
extraPackages = with selectedKernelPackage; [ acpi_call ];
};
boot.plymouth.enable = false;
@ -80,7 +116,7 @@
'';
boot.initrd.luks = {
yubikeySupport = true;
yubikeySupport = false;
devices."cryptroot0" = {
device = "/dev/nvme0n1p2";
postOpenCommands = "
@ -103,24 +139,20 @@
};
};
sops.age.keyFile = lib.mkForce "/root/keys.txt";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4E0B-6C2F";
fsType = "vfat";
};
fileSystems."/" =
{ device = "zroot/ROOT/default";
{ device = "zroot/root";
fsType = "zfs";
};
fileSystems."/nix/store" =
{ device = "zroot/nix/store";
fsType = "zfs";
};
fileSystems."/var/log" =
{ device = "zroot/var/log";
fileSystems."/home" =
{ device = "zroot/home";
fsType = "zfs";
};

View file

@ -21,10 +21,16 @@
time.timeZone = "Europe/Moscow";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LANGUAGE = "en_GB.UTF-8";
LC_ALL = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
networking = {
hostName = "dlaptop";
nameservers = [ "100.92.15.128" "fd7a:115c:a1e0::b21c:f80" ];
nameservers = [ "1.1.1.1" ];
#nameservers = [ "100.92.15.128" "fd7a:115c:a1e0::b21c:f80" ];
networkmanager.dns = "none";
networkmanager.enable = true;
useDHCP = lib.mkDefault true;

View file

@ -129,7 +129,7 @@ in {
",s" = ", -s";
};
promptInit = ''
# set TERM "xterm-256color"
set TERM "xterm-256color"
set fish_greeting
export STARSHIP_CONFIG=/etc/starship.toml
${pkgs.zoxide}/bin/zoxide init fish | source

View file

@ -10,7 +10,7 @@
programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland;
users.users.delta.packages = with pkgs; [
swww
stable.waybar
waybar
stable.swaynotificationcenter
cliphist
fzf

View file

@ -7,7 +7,7 @@
# monitor=eDP-1,2944x1840@60,auto,1.333333
# monitor=eDP-1,preferred,auto,1.6
monitor=eDP-1,preferred,auto,1.333333
monitor=eDP-1,preferred,auto,1.6
#monitor=eDP-1,preferred,auto,1.066667
#source = ~/.config/hypr/monitors.conf
@ -33,7 +33,7 @@ exec-once = sh -c "sleep 2 && swww clear"
#exec-once = mpvpaper '*' -o "video-scale-y=1.1 --gpu-context=wayland --vo=gpu --hwdec=vaapi-copy" videowork/bgloop.webm
# exec-once = gtk-launch autostart
exec-once =
exec-once = waybar -c ~/.config/waybar/config-offline.jsonc
exec-once = waybar
#exec-once = ags
exec-once = nm-applet
@ -525,5 +525,5 @@ binde = $mainMod SHIFT CTRL, L, moveactive, 30 0
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
source = ~/.config/hypr/media-binds.conf
source = ~/.config/hypr/env_var.conf
###source = ~/.config/hypr/media-binds.conf
###source = ~/.config/hypr/env_var.conf

View file

@ -0,0 +1,189 @@
{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"height": 20,
"modules-left": [
"custom/power_btn",
"custom/launch_apps",
"idle_inhibitor",
"hyprland/workspaces",
"hyprland/window"
],
"modules-center": [
"clock"
],
"modules-right": [
//"custom/updates",
"cpu",
"pulseaudio",
"custom/bluetoothcharge",
"pulseaudio#microphone",
"backlight",
"tray",
//"temperature",
"custom/power_profile",
"battery",
"hyprland/language"
//"custom/myutils",
//"custom/weather"
//"custom/light_dark"
],
"include": [
"~/.config/waybar/mesu.jsonc"
// "~/.config/utils/waybar/conf/asus-rog.jsonc",
// "~/.config/utils/waybar/conf/utils-util.jsonc"
],
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰛐",
"deactivated": "󰛑"
},
"timeout": 180,
"tooltip": true
},
"custom/launch_apps": {
"format": "󱗼 ",
"on-click": "sh -c '(nwg-drawer -term foot)'",
"tooltip": false
},
"hyprland/language": {
"interval": 30,
"format": "<span font-family=\"Twemoji\">{}</span>",
"format-en": "🇬🇧",
"format-ru": "🇷🇺",
"on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next",
"signal": 8
},
"hyprland/window": {
"max-length": 200,
"separate-outputs": true
},
"custom/power_btn": {
"format": "",
"on-click": "sh -c '(wlogout --protocol layer-shell)'",
"tooltip": false
},
"custom/lock_screen": {
"format": "",
"on-click": "sh -c '(swaylock)'",
"tooltip": false
},
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"on-click": "activate"
},
"cpu": {
"states": {
"high": 80,
"med": 40,
"low": 15
},
"interval": 10,
"format": " {usage}%",
"max-length": 10,
"format-alt-click": "click-right",
"format-alt": " ",
"on-click": "footclient --fullscreen --title=btop -o colors.alpha=0.3 sh -c 'btop'"
},
"battery": {
"states": {
"good": 80,
"warning": 30,
"critical": 20
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt-click": "click-right",
"format-alt": "{icon}",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
},
"pulseaudio": {
"format": "{icon}",
"format-muted": "",
"on-click": "~/.config/utils/waybar/scripts/volume --toggle",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/utils/waybar/scripts/volume --inc",
"on-scroll-down": "~/.config/utils/waybar/scripts/volume --dec",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "<span color='#757de8'></span>",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"format-alt-click": "click-middle",
"format-alt": "{icon} {volume}%",
"tooltip": true,
"tooltip-format": "{volume}%"
},
"pulseaudio#microphone": {
"format": "{format_source}",
"format-source": "",
"format-source-muted": "",
"on-click": "~/.config/utils/waybar/scripts/volume --toggle-mic",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/utils/waybar/scripts/volume --mic-inc",
"on-scroll-down": "~/.config/utils/waybar/scripts/volume --mic-dec",
"scroll-step": 5,
"format-alt-click": "click-middle",
"format-alt": " {volume}%",
"tooltip": true,
"tooltip-format": " {volume}%"
},
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"format-alt-click": "click-right",
"format-alt": "{icon} {percent}%",
"format-icons": ["󰃞", "󰃟", "󰃠"],
"on-scroll-up": "~/.config/utils/waybar/scripts/brightness --inc",
"on-scroll-down": "~/.config/utils/waybar/scripts/brightness --dec"
},
"tray": {
"icon-size": 16,
"spacing": 10
},
"custom/updates": {
"format": "{}",
"exec": "~/.config/utils/waybar/scripts/update-sys",
"on-click": "~/.config/utils/waybar/scripts/update-sys update",
"interval": 3600,
"tooltip": true
},
"custom/bluetoothcharge": {
"format": "{}",
"tooltip-format": "{}",
"exec": "~/.config/utils/waybar/scripts/bluetoothcharge",
"on-click": "~/.config/utils/waybar/scripts/bluetoothcharge",
"interval": 60,
"tooltip": true
}
}

View file

@ -0,0 +1,188 @@
{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"height": 20,
"modules-left": [
"custom/power_btn",
"custom/launch_apps",
"idle_inhibitor",
"hyprland/workspaces",
"hyprland/window"
],
"modules-center": [
"clock"
],
"modules-right": [
"custom/updates",
"cpu",
"pulseaudio",
"custom/bluetoothcharge",
"pulseaudio#microphone",
"backlight",
"tray",
//"temperature",
"custom/power_profile",
"battery",
"hyprland/language",
//"custom/myhyprv",
"custom/weather"
//"custom/light_dark"
],
"include": [
"~/.config/HyprV/waybar/conf/mesu.jsonc",
// "~/.config/HyprV/waybar/conf/asus-rog.jsonc",
"~/.config/HyprV/waybar/conf/hyprv-util.jsonc"
],
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰛐",
"deactivated": "󰛑"
},
"tooltip": true
},
"custom/launch_apps": {
"format": "󱗼 ",
"on-click": "sh -c '(nwg-drawer -term wezterm)'",
"tooltip": false
},
"hyprland/language": {
"interval": 30,
"format": "<span font-family=\"Twemoji\">{}</span>",
"format-en": "🇬🇧",
"format-ru": "🇷🇺",
"on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next",
"signal": 8
},
"hyprland/window": {
"max-length": 200,
"separate-outputs": true
},
"custom/power_btn": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)'",
"tooltip": false
},
"custom/lock_screen": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; swaylock)'",
"tooltip": false
},
"hyprland/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"on-scroll-up": "hyprctl dispatch workspace e+1",
"on-scroll-down": "hyprctl dispatch workspace e-1",
"on-click": "activate"
},
"cpu": {
"states": {
"high": 80,
"med": 40,
"low": 15
},
"interval": 10,
"format": " {usage}%",
"max-length": 10,
"format-alt-click": "click-right",
"format-alt": " ",
"on-click": "footclient --fullscreen --title=btop -o colors.alpha=0.3 sh -c 'btop'"
},
"battery": {
"states": {
"good": 80,
"warning": 30,
"critical": 20
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt-click": "click-right",
"format-alt": "{icon}",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
},
"pulseaudio": {
"format": "{icon}",
"format-muted": "",
"on-click": "~/.config/HyprV/waybar/scripts/volume --toggle",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/HyprV/waybar/scripts/volume --inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/volume --dec",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "<span color='#757de8'></span>",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"format-alt-click": "click-middle",
"format-alt": "{icon} {volume}%",
"tooltip": true,
"tooltip-format": "{volume}%"
},
"pulseaudio#microphone": {
"format": "{format_source}",
"format-source": "",
"format-source-muted": "",
"on-click": "~/.config/HyprV/waybar/scripts/volume --toggle-mic",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/HyprV/waybar/scripts/volume --mic-inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/volume --mic-dec",
"scroll-step": 5,
"format-alt-click": "click-middle",
"format-alt": " {volume}%",
"tooltip": true,
"tooltip-format": " {volume}%"
},
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"format-alt-click": "click-right",
"format-alt": "{icon} {percent}%",
"format-icons": ["󰃞", "󰃟", "󰃠"],
"on-scroll-up": "~/.config/HyprV/waybar/scripts/brightness --inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/brightness --dec"
},
"tray": {
"icon-size": 16,
"spacing": 10
},
"custom/updates": {
"format": "{}",
"exec": "~/.config/HyprV/waybar/scripts/update-sys",
"on-click": "~/.config/HyprV/waybar/scripts/update-sys update",
"interval": 3600,
"tooltip": true
},
"custom/bluetoothcharge": {
"format": "{}",
"tooltip-format": "{}",
"exec": "~/.config/HyprV/waybar/scripts/bluetoothcharge",
"on-click": "~/.config/HyprV/waybar/scripts/bluetoothcharge",
"interval": 60,
"tooltip": true
}
}

View file

@ -0,0 +1,159 @@
{
"layer": "top",
"position": "top",
"mod": "dock",
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"height": 20,
"modules-left": [
"custom/power_btn",
"custom/launch_apps",
"idle_inhibitor",
"sway/workspaces",
"sway/mode"
],
"modules-center": [
"clock"
],
"modules-right": [
"custom/updates",
"cpu",
"pulseaudio",
"pulseaudio#microphone",
"backlight",
"tray",
"temperature",
"custom/power_profile",
"battery",
"sway/language",
"custom/weather"
],
"include": [
"~/.config/HyprV/waybar/conf/mesu.jsonc",
// "~/.config/HyprV/waybar/conf/asus-rog.jsonc",
"~/.config/HyprV/waybar/conf/hyprv-util.jsonc"
],
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "󰛐",
"deactivated": "󰛑"
},
"tooltip": true
},
"custom/launch_apps": {
"format": "󱗼 ",
"on-click": "sh -c '(sleep 0.5s; pkill nwg-drawer || nwg-drawer -term wezterm)' & disown",
"tooltip": false
},
"sway/language": {
"interval": 30,
"format": "<span font-family=\"Twitter Color Emoji\"> {}</span>",
"format-en": "🇬🇧",
"format-ru": "🇷🇺",
"on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next",
"signal": 8
},
"custom/power_btn": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)' & disown",
"tooltip": false
},
"custom/lock_screen": {
"format": "",
"on-click": "sh -c '(sleep 0.5s; swaylock)' & disown",
"tooltip": false
},
"cpu": {
"interval": 10,
"format": "",
"max-length": 10,
"format-alt-click": "click-right",
"format-alt": " {usage}%",
"on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'"
},
"battery": {
"states": {
"good": 80,
"warning": 30,
"critical": 20
},
"format": "{icon}",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt-click": "click-right",
"format-alt": "{icon} {capacity}%",
"format-icons": ["󰂎", "󰁺", "󰁻", "󰁼", "󰁽", "󰁾", "󰁿", "󰂀", "󰂁", "󰂂", "󰁹"]
},
"pulseaudio": {
"format": "{icon}",
"format-muted": "",
"on-click": "~/.config/HyprV/waybar/scripts/volume --toggle",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/HyprV/waybar/scripts/volume --inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/volume --dec",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"format-alt-click": "click-middle",
"format-alt": "{icon} {volume}%",
"tooltip": true,
"tooltip-format": "{icon} {volume}%"
},
"pulseaudio#microphone": {
"format": "{format_source}",
"format-source": "",
"format-source-muted": "",
"on-click": "~/.config/HyprV/waybar/scripts/volume --toggle-mic",
"on-click-right": "pavucontrol",
"on-scroll-up": "~/.config/HyprV/waybar/scripts/volume --mic-inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/volume --mic-dec",
"scroll-step": 5,
"format-alt-click": "click-middle",
"format-alt": " {volume}%",
"tooltip": true,
"tooltip-format": " {volume}%"
},
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"format-alt-click": "click-right",
"format-alt": "{icon} {percent}%",
"format-icons": ["󰃞", "󰃟", "󰃠"],
"on-scroll-up": "~/.config/HyprV/waybar/scripts/brightness --inc",
"on-scroll-down": "~/.config/HyprV/waybar/scripts/brightness --dec"
},
"tray": {
"icon-size": 16,
"spacing": 10
},
"custom/updates": {
"format": "{}",
"exec": "~/.config/HyprV/waybar/scripts/update-sys",
"on-click": "~/.config/HyprV/waybar/scripts/update-sys update",
"interval": 300,
"tooltip": true
}
}

1
pkgs/waybar/config.jsonc Symbolic link
View file

@ -0,0 +1 @@
config-offline.jsonc

8
pkgs/waybar/default.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs, lib, ... }:
{
home.file.".config/waybar/config.jsonc".text = builtins.readFile ./config-offline.jsonc;
home.file.".config/waybar/style.css".text = builtins.readFile ./style.css;
home.file.".config/waybar/mesu.jsonc".text = builtins.readFile ./mesu.jsonc;
}

38
pkgs/waybar/mesu.jsonc Normal file
View file

@ -0,0 +1,38 @@
{
"clock": {
"format": "{:%H:%M}",
"format-alt": "{:%a %d %R}",
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calendar": {
"mode" : "month",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#66cc99'><b>{}</b></span>",
"days": "<span color='#cccccc'><b>{}</b></span>",
"weeks": "<span color='#666666'><b>{}</b></span>",
"weekdays": "<span color='#99ffcc'><b>{}</b></span>",
"today": "<span color='#ff99cc'><b>{}</b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
"temperature": {
"thermal-zone": 1,
"format": "",
"format-alt-click": "click-right",
"format-alt": " {temperatureC}°C",
"critical-threshold": 70,
"format-critical": " {temperatureC}°C",
"on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'"
}
}

161
pkgs/waybar/style.css Normal file
View file

@ -0,0 +1,161 @@
* {
border: none;
border-radius: 0;
font-family: "IosevkaDiosevka";
font-weight: bold;
font-size: 16px;
min-height: 0;
}
#language {
font-size: 20px;
font-family: "Twemoji";
}
window#waybar {
background: rgba(21, 18, 27, 0);
color: #f6f7fc;
}
tooltip {
font-family: "Iosevka\ Fixed\ Heavy\ Extended";
background: #000000;
opacity: 1;
border-radius: 10px;
border-width: 2px;
border-style: solid;
border-color: #11111b;
}
tooltip label{
color: #cdd6f4;
}
#workspaces button {
padding: 5px;
color: #f6f7fc;
margin-right: 5px;
}
#workspaces button.active {
color: #000000;
background: #a6e3a1;
border-radius: 10px;
}
#workspaces button:hover {
background: #11111b;
color: #cdd6f4;
border-radius: 10px;
}
#custom-launch_wofi,
#custom-launch_firefox,
#custom-launch_thunderbird,
#custom-launch_thunar,
#custom-launch_kitty,
#custom-lock_screen,
#custom-light_dark,
#custom-power_btn,
#custom-power_profile,
#custom-weather,
#custom-myhyprv,
#window,
#cpu,
#disk,
#custom-updates,
#memory,
#clock,
#battery,
#pulseaudio,
#network,
#tray,
#temperature,
#workspaces,
#idle_inhibitor,
#backlight {
background: rgba(21, 18, 27, 0);
opacity: 1;
padding: 0px 8px;
margin: 0px 3px;
border: 0px;
}
#temperature.critical {
color: #e92d4d;
}
#workspaces {
padding-right: 0px;
padding-left: 5px;
}
#window {
border-radius: 10px;
margin-left: 0px;
margin-right: 0px;
}
#custom-launch_firefox,
#custom-launch_thunderbird,
#custom-launch_thunar,
#custom-launch_wofi,
#custom-launch_kitty,
#custom-weather {
margin-left: 0px;
border-right: 0px;
font-size: 24px;
margin-right: 20px;
}
#custom-launch_firefox,
#custom-launch_kitty {
font-size: 20px;
}
#battery {
color: #FFFFFF;
}
#battery.charging {
color: #7bc275;
}
#battery.warning:not(.charging) {
color: #FCCE7B;
}
#battery.critical:not(.charging) {
color: #f44336;
}
#cpu {
color: #FFFFFF;
}
#cpu.crit {
color: #70140d
}
#cpu.high {
color: #f44336
}
#cpu.med {
color: #FCCE7B;
}
#cpu.low {
color: #99d8ff;
}
#custom-bluetoothcharge {
color: #757de8;
}
#clock {
font-size: 17px;
margin-left: 0px;
border-right: 0px;
margin-right: 0px;
}