Compare commits
19 Commits
master
..
bbd84a0903
| Author | SHA1 | Date | |
|---|---|---|---|
|
bbd84a0903
|
|||
|
7a9f10ffb5
|
|||
|
7d5b12ba34
|
|||
|
13b4e7b1a8
|
|||
|
731a95289a
|
|||
|
1deef1e46b
|
|||
|
42d3628e35
|
|||
|
48d90fac39
|
|||
|
d460f0c8d5
|
|||
|
22572128fc
|
|||
|
aa3fb4b2ce
|
|||
|
ec6558a6ee
|
|||
|
1a89460348
|
|||
|
79574a4238
|
|||
|
7fc241affc
|
|||
|
37fc953d3a
|
|||
|
f189ff1d40
|
|||
|
258a155c00
|
|||
|
efc3a7fbc8
|
Generated
+84
-66
@@ -7,11 +7,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780372639,
|
||||
"narHash": "sha256-VFzXYHlIGwO4h4ovtnpZj9sX/Qu6+dlI00sXjHdwi2w=",
|
||||
"lastModified": 1778493762,
|
||||
"narHash": "sha256-PG7vz7Dk3U3hB8OXtIS3bJ4QmJEw08ycFprJuAO7YS0=",
|
||||
"owner": "ezKEa",
|
||||
"repo": "aagl-gtk-on-nix",
|
||||
"rev": "1ee1e8864a1fcfcc21a5fb5af4bd328b3c829f42",
|
||||
"rev": "75aac6845b47e913b53c2a0af7fd124fdb8fe84a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -165,11 +165,11 @@
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1779670703,
|
||||
"narHash": "sha256-UdfMivNMwCCqQsYDg5pSz8X2IOaOrIZLIIy+Bg3CO2o=",
|
||||
"lastModified": 1776136500,
|
||||
"narHash": "sha256-r0gN2brVWA351zwMV0Flmlcd6SGMvYqFbvC3DfKFM8Y=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "942159e73e40bf785816f7f1f5feed9ef3d7c8f9",
|
||||
"rev": "0f8ba203d475587f477e7ae12661bd8459e225b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -218,11 +218,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1778716662,
|
||||
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
|
||||
"lastModified": 1775087534,
|
||||
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
|
||||
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -311,11 +311,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780679734,
|
||||
"narHash": "sha256-KmRNvpNOb7QEORa06bVgjW9kITcx0VhsI7w0vhmZyD8=",
|
||||
"lastModified": 1778954430,
|
||||
"narHash": "sha256-oaNyOr05lblaQdtbkbN1wO0b2KLIL2O1LkmwDgdQp4I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "b2b7db486e06e098711dc291bb25db82850e1d16",
|
||||
"rev": "26aaab785b0bab4af60a2c42b22760fa906ef22a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -476,11 +476,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779209205,
|
||||
"narHash": "sha256-asc7NpeB8vD66gvZeYcQkaWOs2X6Jgd29vBtP17vjxo=",
|
||||
"lastModified": 1778926589,
|
||||
"narHash": "sha256-IX6e5ggQi60UChhDJx6wsczbPRCEE8WZbEtlDMazLmU=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-plugins",
|
||||
"rev": "1cb37fad68dff5f5840010c314fed5809b4ee66f",
|
||||
"rev": "f1569efa6a939fd68cee605d2a34d0db3af5d879",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -676,11 +676,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1779560665,
|
||||
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
||||
"lastModified": 1777268161,
|
||||
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
||||
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -692,32 +692,32 @@
|
||||
},
|
||||
"nixpkgs-pinned": {
|
||||
"locked": {
|
||||
"lastModified": 1779971959,
|
||||
"narHash": "sha256-R5nauXyqyfRUFiZycFFZdkF7wl6eaUpPLst35+2nJQY=",
|
||||
"lastModified": 1764517877,
|
||||
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ec942ba042dad5ef097e2ef3a3effc034241f011",
|
||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ec942ba042dad5ef097e2ef3a3effc034241f011",
|
||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1780453794,
|
||||
"narHash": "sha256-bXMRa9VTsHSPXL4Cw8R6JJLQeY3Y/IP4+YJCYVmQ7FY=",
|
||||
"lastModified": 1778737229,
|
||||
"narHash": "sha256-6xWoytx8jFW4PF1GjRm/i/53trbpKGfz6zjzQGBr4cI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6b316287bae2ee04c9b93c8c858d930fd07d7338",
|
||||
"rev": "d7a713c0b7e47c908258e71cba7a2d77cc8d71d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-26.05",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -756,17 +756,17 @@
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1780243769,
|
||||
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=",
|
||||
"lastModified": 1776718653,
|
||||
"narHash": "sha256-eU5yaR3OY3jrvxpQlKUWyGzYovBZ0UB4EdZelq1Hq1g=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c",
|
||||
"rev": "5a5f98738120adbb3d2753087b17839a45701cbe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5a5f98738120adbb3d2753087b17839a45701cbe",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -788,11 +788,11 @@
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1780243769,
|
||||
"narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=",
|
||||
"lastModified": 1777268161,
|
||||
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "331800de5053fcebacf6813adb5db9c9dca22a0c",
|
||||
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -804,11 +804,11 @@
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1779877693,
|
||||
"narHash": "sha256-NOF9NAREhxr50bbBfVcVOq+ArCMSoe8dP79Pk2uyARk=",
|
||||
"lastModified": 1776329215,
|
||||
"narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4100e830e085863741bc69b156ec4ccd53ab5be0",
|
||||
"rev": "b86751bc4085f48661017fa226dee99fab6c651b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -830,11 +830,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780281641,
|
||||
"narHash": "sha256-M/+hUKoKbHXpV0xGVfELbN1Ds1aoe3pL5p5/t46YhVo=",
|
||||
"lastModified": 1777598946,
|
||||
"narHash": "sha256-X239dAGaU1+gfDj8jKH8GzlqKMcxaVfXOio+uzBOkeE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "30f9ae2f04174de63ba8bcf3580ca90843b28a01",
|
||||
"rev": "5d55af01c0f86be583931fe99207fc56c14134b3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -876,12 +876,30 @@
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-pinned": "nixpkgs-pinned",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"russia-blocked-geoip": "russia-blocked-geoip",
|
||||
"sops-nix": "sops-nix",
|
||||
"stylix": "stylix",
|
||||
"yazi": "yazi",
|
||||
"yazi-plugins": "yazi-plugins"
|
||||
}
|
||||
},
|
||||
"russia-blocked-geoip": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1777481212,
|
||||
"narHash": "sha256-NCkYOw4OM3xBv/TCmhGCm7lH+QkpetbUOYbQnOs9nRg=",
|
||||
"owner": "runetfreedom",
|
||||
"repo": "russia-blocked-geoip",
|
||||
"rev": "bbe32b96712342ae479ac598fb1a939b59d586c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "runetfreedom",
|
||||
"repo": "russia-blocked-geoip",
|
||||
"rev": "bbe32b96712342ae479ac598fb1a939b59d586c2",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -890,11 +908,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780197589,
|
||||
"narHash": "sha256-FVCr2Ij/jKf59a4LW481eeOF6rJRreOBrVgW/aUBTrw=",
|
||||
"lastModified": 1777605393,
|
||||
"narHash": "sha256-Hjp0VOOHgHcTrX23iVvnfAudPcuCmfkfpQNFwv2v/ks=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "21632e942d89bf1cce4e5a63d7e58a215a0cbfcc",
|
||||
"rev": "ff88db34cfa486fc4964a6991cab1678d82eee8c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -911,11 +929,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1779851998,
|
||||
"narHash": "sha256-UkkMh3bX9QW4Luqkm98nUaOqKWrU6i65mUnph3WeSSw=",
|
||||
"lastModified": 1776741231,
|
||||
"narHash": "sha256-k9G98qzn+7npROUaks8VqCFm7cFtEG8ulQLBBo5lItg=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "6cddd512fa2bf7231f098d3a2f92f6e4cff71e0a",
|
||||
"rev": "02061303f7c4c964f7b4584dabd9e985b4cd442b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -929,11 +947,11 @@
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780547341,
|
||||
"narHash": "sha256-Gq8KNx5A7hBB3uGJaj6eQfLDIz5YdLu92gqBcvHvoUo=",
|
||||
"lastModified": 1777944972,
|
||||
"narHash": "sha256-VfGRo1qTBKOe3s2gOv8LSoA6Fk19PvBlwQ1ECN0Evn8=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "9ed65852b6257fbeae4355bc24ecfea307ca759a",
|
||||
"rev": "c591bf665727040c6cc5cb409079acb22dcce33c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -960,11 +978,11 @@
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780684162,
|
||||
"narHash": "sha256-7HslPhFlg9tD5t+E8c5nL9v85TehwSWvwSmk+tarBnI=",
|
||||
"lastModified": 1778776709,
|
||||
"narHash": "sha256-YhnEcpiY6+l3RFA+cPmdTaeODGvNRuqE8B7VBjPVIxo=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "e14dbcb3e8ed94de5e85ed9ad133b6017480f86c",
|
||||
"rev": "e8ea85b4f7dddda9603e0f1ac86cd92cee3b2819",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1037,11 +1055,11 @@
|
||||
"tinted-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1777806186,
|
||||
"narHash": "sha256-PDF0/wObw4nIsSBeXVYLsloXOiphXCgIdsrNcVXguKs=",
|
||||
"lastModified": 1777041405,
|
||||
"narHash": "sha256-BAGZ7ObFV/9Z61OJZun7ifPyhkuHqNuW1QIhQ8LuzCo=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "0c94645546f4f3ddac77a1a5fce54eb95bf50795",
|
||||
"rev": "5f868b3a338b6904c47f3833b9c411be641983a8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1053,11 +1071,11 @@
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1778379944,
|
||||
"narHash": "sha256-wPDFzMGSlARlw0Sfsn48Q2+jPSfk6N0Ng6BC/d+7Q24=",
|
||||
"lastModified": 1777169200,
|
||||
"narHash": "sha256-h7dDbIzP5hDr9v97w9PL6jdAgXawmj6krcH+959rqpU=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "fe0203a198690e71a5ff11e08812a4673de3678d",
|
||||
"rev": "f798c2dce44ef815bb6b8f05a82135c7942d35ac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1069,11 +1087,11 @@
|
||||
"tinted-zed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1778378178,
|
||||
"narHash": "sha256-OXPXRIQgGwV77HjYRryOHguh4ALX96jkg+tseLkGgHA=",
|
||||
"lastModified": 1777463218,
|
||||
"narHash": "sha256-Bhkozqtq3BKLqWTlmKm8uAptfX4aRGI8QX3eEL54Vpc=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"rev": "9cd816033ff969415b190722cddf134e78a5665f",
|
||||
"rev": "5768d08ed2e7944a26a958868cdb073cb8856dae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1130,11 +1148,11 @@
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1780290961,
|
||||
"narHash": "sha256-XPSfzLmyGeGMU5o1gaRp8XVVFFLxri93TXpzTr38Ti8=",
|
||||
"lastModified": 1778801438,
|
||||
"narHash": "sha256-TtawbMZ+tgKAiDpkJJw7m2OLOJHUbRZB0xLDXBxTPck=",
|
||||
"owner": "sxyazi",
|
||||
"repo": "yazi",
|
||||
"rev": "8e80798984864799cd72b3625b21edc33b1ba1e5",
|
||||
"rev": "3f5cc47a4852cbffbd8536507ae7499d3da1f0b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1146,11 +1164,11 @@
|
||||
"yazi-plugins": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1780203849,
|
||||
"narHash": "sha256-bqGN6JxbU+/o7TlM/Cm9Qj/s1McA4pB5QWArGZPcme4=",
|
||||
"lastModified": 1778691457,
|
||||
"narHash": "sha256-cZlnrlgv8+SFeNgIW69q//i/apcpvAv41q5W8bJwVaI=",
|
||||
"owner": "yazi-rs",
|
||||
"repo": "plugins",
|
||||
"rev": "598cdb671401574ac27aeee257e2f3b0c80610a1",
|
||||
"rev": "5d5c4803dd12bab4e4f19d606f8db0c871e6bec5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
|
||||
inputs = {
|
||||
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixpkgs-pinned.url = "github:nixos/nixpkgs/ec942ba042dad5ef097e2ef3a3effc034241f011";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/5a5f98738120adbb3d2753087b17839a45701cbe";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-pinned.url = "github:nixos/nixpkgs/2d293cbfa5a793b4c50d17c05ef9e385b90edf6c";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
stylix.url = "github:danth/stylix";
|
||||
ags.url = "github:Aylur/ags/3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6";
|
||||
@@ -43,6 +43,11 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
russia-blocked-geoip = {
|
||||
url = "github:runetfreedom/russia-blocked-geoip/bbe32b96712342ae479ac598fb1a939b59d586c2";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-pinned, home-manager, ... }@inputs: let
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
./secrets/secrets.nix
|
||||
./modules/grub.nix
|
||||
./modules/syncthing.nix
|
||||
./modules/torrent.nix
|
||||
../modules/gpu/nvidia.nix
|
||||
|
||||
(import ../modules/common.nix {
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
''$mainMod, F2, exec, ${lib.getExe monitor-switcher} mirror''
|
||||
''$mainMod, F3, exec, ${lib.getExe monitor-switcher}''
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"2, layout:scrolling"
|
||||
"4, layout:monocle"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }: {
|
||||
services.transmission = {
|
||||
enable = true; # Включаем демон
|
||||
package = pkgs.transmission_4;
|
||||
openRPCPort = true; # Открываем порт для веб-интерфейса
|
||||
settings = {
|
||||
download-dir = "/home/sweetbread/Downloads"; # Папка для загрузок
|
||||
};
|
||||
};
|
||||
}
|
||||
+2
-31
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }: {
|
||||
{
|
||||
imports = [
|
||||
./host/bluetooth.nix
|
||||
./host/bootloader.nix
|
||||
@@ -17,36 +17,7 @@
|
||||
./host/yggdrasil.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
hyprland.enable = true;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-termfilechooser
|
||||
];
|
||||
|
||||
config = {
|
||||
common = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
services = {
|
||||
udisks2.enable = true;
|
||||
fstrim.enable = true;
|
||||
|
||||
+3
-10
@@ -1,15 +1,8 @@
|
||||
{ lib, ... }: {
|
||||
{
|
||||
environment.variables = {
|
||||
EDITOR = "hx";
|
||||
RANGER_LOAD_DEFAULT_RC = "FALSE";
|
||||
# GTK/Electron apps do not consistently use the portal picker unless this
|
||||
# variable is present in the graphical session environment.
|
||||
GTK_USE_PORTAL = "1";
|
||||
|
||||
# Qt/Telegram-like apps otherwise keep using their own picker. This makes
|
||||
# them ask xdg-desktop-portal for file/folder selection.
|
||||
QT_QPA_PLATFORMTHEME = lib.mkForce "xdgdesktopportal";
|
||||
TDESKTOP_USE_GTK_FILE_DIALOG = "1";
|
||||
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
GSETTINGS_BACKEND = "keyfile";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ lib.mkIf config.programs.gamemode.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud
|
||||
protonup-ng
|
||||
pkgs-stable.bottles
|
||||
bottles
|
||||
pkgs-stable.heroic
|
||||
prismlauncher
|
||||
];
|
||||
|
||||
+21
-5
@@ -1,8 +1,24 @@
|
||||
{
|
||||
programs.clash-verge = {
|
||||
{ inputs, pkgs, config, ... }: {
|
||||
systemd.services.v2raya = {
|
||||
enable = true;
|
||||
serviceMode = true;
|
||||
tunMode = true;
|
||||
autoStart = true;
|
||||
description = "v2rayA gui client";
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
ExecStart = "${pkgs.v2raya}/bin/v2rayA";
|
||||
};
|
||||
path = with pkgs; [ iptables bash iproute2 ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
V2RAYA_LOG_FILE = "/var/log/v2raya/v2raya.log";
|
||||
V2RAYA_V2RAY_BIN = pkgs.lib.getExe pkgs.xray;
|
||||
V2RAY_LOCATION_ASSET = "/etc/v2raya";
|
||||
XRAY_LOCATION_ASSET = "/etc/v2raya";
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"v2raya/ru_geoip.dat".source = "${inputs.russia-blocked-geoip}/geoip.dat";
|
||||
"v2raya/bolt.db".source = config.sops.secrets.vpn_bolt.path;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# Важно: портал должен быть собран под тот же Hyprland, что и сам Hyprland
|
||||
# (есть отдельная опция именно для этого).
|
||||
programs.hyprland = {
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
||||
# Делает так, что xdg-open идёт через портал (часто полезно для sandbox/FHS/wrappers).
|
||||
# Опция есть в NixOS как xdg.portal.xdgOpenUsePortal :contentReference[oaicite:2]{index=2}
|
||||
xdgOpenUsePortal = true;
|
||||
|
||||
# Два бэкенда: Hyprland (композитор-специфичное) + GTK (интеграция/диалоги/OpenURI)
|
||||
extraPortals = [
|
||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
|
||||
# Роутинг интерфейсов по portals.conf(5):
|
||||
# xdg-desktop-portal выбирает конфиг по XDG_CURRENT_DESKTOP (с lower-case) :contentReference[oaicite:3]{index=3}
|
||||
config = {
|
||||
common = {
|
||||
default = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.ScreenCast" = [ "hyprland" ];
|
||||
"org.freedesktop.impl.portal.Screenshot" = [ "hyprland" ];
|
||||
"org.freedesktop.impl.portal.GlobalShortcuts" = [ "hyprland" ];
|
||||
};
|
||||
|
||||
# Если XDG_CURRENT_DESKTOP=Hyprland присутствует — предпочитаем Hyprland,
|
||||
# но оставляем gtk как fallback для интерфейсов, которых нет у hyprland-портала.
|
||||
hyprland.default = [ "hyprland" "gtk" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
+1
-4
@@ -1,6 +1,7 @@
|
||||
{ config, lib, ... }: {
|
||||
imports = [
|
||||
./user/btop.nix
|
||||
./user/fuzzel.nix
|
||||
./user/ghostty.nix
|
||||
./user/helix.nix
|
||||
./user/hyprland.nix
|
||||
@@ -8,12 +9,8 @@
|
||||
./user/mako.nix
|
||||
./user/neofetch.nix
|
||||
./user/qt.nix
|
||||
./user/quickshell.nix
|
||||
./user/stylix.nix
|
||||
./user/sops.nix
|
||||
./user/ssh.nix
|
||||
./user/walker.nix
|
||||
./user/wob.nix
|
||||
./user/yazi.nix
|
||||
./user/zsh.nix
|
||||
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{ config, inputs, pkgs, username, ... }: {
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
configDir = null;
|
||||
|
||||
extraPackages = with inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
battery
|
||||
mpris
|
||||
hyprland
|
||||
network
|
||||
tray
|
||||
wireplumber
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
pulsemixer
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "ags run" ];
|
||||
|
||||
xdg.configFile."ags".source = (pkgs.callPackage ./packages/drvs/ags.nix { inherit username; colors = config.lib.stylix.colors; });
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
width = 40;
|
||||
line-height = 25;
|
||||
fields = "name,generic,comment,categories,filename,keywords";
|
||||
prompt = ''"❯ "'';
|
||||
show-actions = "no";
|
||||
filter-desktop = "yes";
|
||||
match-counter = "yes";
|
||||
};
|
||||
|
||||
border = {
|
||||
radius = "20";
|
||||
};
|
||||
|
||||
dmenu = {
|
||||
exit-immediately-if-empty = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,23 +1,11 @@
|
||||
{ config, pkgs, ... }: let
|
||||
ghosttyWithGL = (config.lib.nixGL.wrap pkgs.ghostty);
|
||||
shaders = pkgs.fetchFromGitHub {
|
||||
owner = "sahaj-b";
|
||||
repo = "ghostty-cursor-shaders";
|
||||
rev = "06d4e90fb5410e9c4d0b3131584060adddf89406";
|
||||
hash = "sha256-G/UIr1bKnxn1AcHl/4FL/jou6b7M2VeREslYVELxdmw=";
|
||||
};
|
||||
in {
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
package = ghosttyWithGL;
|
||||
|
||||
settings = {
|
||||
confirm-close-surface = false;
|
||||
copy-on-select = false;
|
||||
title-report = true;
|
||||
|
||||
custom-shader = "${shaders}/cursor_warp.glsl";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -41,11 +41,6 @@ in {
|
||||
env = [
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"QT_QPA_PLATFORMTHEME,xdgdesktopportal"
|
||||
"GTK_USE_PORTAL,1"
|
||||
"TDESKTOP_USE_GTK_FILE_DIALOG,1"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
||||
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
@@ -120,8 +115,6 @@ in {
|
||||
|
||||
exec-once = lib.mkBefore [
|
||||
"systemctl --user start plasma-polkit-agent"
|
||||
"${lib.getExe' pkgs.dbus "dbus-update-activation-environment"} --systemd --all"
|
||||
"systemctl --user import-environment XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE WAYLAND_DISPLAY DISPLAY GTK_USE_PORTAL QT_QPA_PLATFORMTHEME TDESKTOP_USE_GTK_FILE_DIALOG NIXOS_OZONE_WL ELECTRON_OZONE_PLATFORM_HINT"
|
||||
"awww-daemon"
|
||||
"wl-clip-persist --clipboard both"
|
||||
"clipse -listen"
|
||||
@@ -136,6 +129,7 @@ in {
|
||||
"$mainMod, M, exit,"
|
||||
"$mainMod, E, exec, ghostty -e sh -c yazi"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, D, exec, fuzzel"
|
||||
"$mainMod, P, pseudo, # dwindle"
|
||||
"$mainMod, J, layoutmsg, togglesplit"
|
||||
"$mainMod, K, layoutmsg, swapsplit"
|
||||
@@ -234,21 +228,11 @@ in {
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-termfilechooser
|
||||
];
|
||||
|
||||
config = {
|
||||
common = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
|
||||
hyprland = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" "gtk" ];
|
||||
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
|
||||
};
|
||||
config.common = {
|
||||
default = [ "hyprland" "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+20
-12
@@ -1,13 +1,21 @@
|
||||
{ config, lib, ... }: let
|
||||
colors = config.lib.stylix.colors.withHashtag;
|
||||
accent = colors.${config.stylix.accent};
|
||||
in {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
colors = config.lib.stylix.colors;
|
||||
in {
|
||||
home.packages = [ pkgs.mako ];
|
||||
xdg.configFile."mako/config".text = ''
|
||||
background-color=#${colors.base00}
|
||||
text-color=#${colors.base05}
|
||||
border-color=#${colors.base0B}
|
||||
border-radius=10
|
||||
margin=16
|
||||
progress-color=over #${colors.base0A}
|
||||
default-timeout=5000
|
||||
|
||||
settings = {
|
||||
border-color = lib.mkForce accent;
|
||||
default-timeout = 5000;
|
||||
};
|
||||
};
|
||||
}
|
||||
[urgency=high]
|
||||
border-color=#${colors.base09}
|
||||
|
||||
[urgency=low]
|
||||
border-color=#${colors.base04}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, pkgs-stable, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
ayugram-desktop
|
||||
vesktop
|
||||
@@ -6,9 +6,8 @@
|
||||
mpv
|
||||
imhex
|
||||
obsidian
|
||||
pkgs-stable.qbittorrent
|
||||
qbittorrent
|
||||
thunderbird
|
||||
libreoffice
|
||||
pear-desktop
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
{ stdenv, colors, accent ? colors.base0B, ... }:
|
||||
{ stdenv, lib, config, colors, username, ... }:
|
||||
stdenv.mkDerivation {
|
||||
name = "AGS theme";
|
||||
|
||||
src = ./ags;
|
||||
dontUnpack = true;
|
||||
|
||||
patchPhase = ''
|
||||
patchPhase = let
|
||||
accent = if username == "chest"
|
||||
then colors.base0E
|
||||
else colors.base0B;
|
||||
in ''
|
||||
echo \$bg: \#${colors.base00}\; > colors.scss
|
||||
echo \$surface0: \#${colors.base02}\; >> colors.scss
|
||||
echo \$fg: \#${colors.base05}\; >> colors.scss
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
mtr
|
||||
imagemagick
|
||||
wl-clipboard
|
||||
pkgsCross.mingw32.wine-discord-ipc-bridge
|
||||
];
|
||||
|
||||
xdg.mimeApps = {
|
||||
|
||||
+1
-11
@@ -1,14 +1,4 @@
|
||||
{ lib, ... }: {
|
||||
# Keep qtct/Kvantum for styling, but tell qtct to delegate standard file
|
||||
# dialogs to xdg-desktop-portal. This is what makes AyuGram/Telegram-like Qt
|
||||
# apps use the Yazi picker instead of Qt's built-in dialog.
|
||||
stylix.targets.qt.standardDialogs = "xdgdesktopportal";
|
||||
|
||||
home.sessionVariables = {
|
||||
QT_QPA_PLATFORMTHEME = lib.mkForce "xdgdesktopportal";
|
||||
TDESKTOP_USE_GTK_FILE_DIALOG = "1";
|
||||
};
|
||||
|
||||
{
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "qtct";
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
{ pkgs, config, ... }: let
|
||||
c = config.lib.stylix.colors.withHashtag;
|
||||
font = config.stylix.fonts.sansSerif.name;
|
||||
in {
|
||||
programs.quickshell = {
|
||||
enable = true;
|
||||
activeConfig = "control-center";
|
||||
|
||||
configs = {
|
||||
control-center = pkgs.writeTextDir "shell.qml" ''
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
PanelWindow {
|
||||
id: root
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
right: true
|
||||
}
|
||||
|
||||
implicitWidth: 360
|
||||
implicitHeight: wrapper.implicitHeight
|
||||
|
||||
color: "transparent"
|
||||
|
||||
margins {
|
||||
top: -12
|
||||
right: 0
|
||||
}
|
||||
|
||||
exclusionMode: ExclusionMode.Normal
|
||||
exclusiveZone: 0
|
||||
|
||||
WlrLayershell.namespace: "qs-control-center"
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
|
||||
|
||||
Item {
|
||||
id: wrapper
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
readonly property int outerMargin: 12
|
||||
readonly property int innerMargin: 18
|
||||
readonly property int buttonHeight: 48
|
||||
readonly property int spacingSize: 14
|
||||
|
||||
implicitWidth: 360
|
||||
implicitHeight: panel.implicitHeight + outerMargin * 2
|
||||
|
||||
Rectangle {
|
||||
id: panel
|
||||
|
||||
x: wrapper.outerMargin
|
||||
y: wrapper.outerMargin
|
||||
width: parent.width - wrapper.outerMargin * 2
|
||||
height: implicitHeight
|
||||
|
||||
implicitHeight: content.implicitHeight + wrapper.innerMargin * 2
|
||||
|
||||
radius: 20
|
||||
color: "${c.base00}"
|
||||
border.color: "${c.base03}"
|
||||
border.width: 1
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
x: wrapper.innerMargin
|
||||
y: wrapper.innerMargin
|
||||
width: parent.width - wrapper.innerMargin * 2
|
||||
|
||||
spacing: wrapper.spacingSize
|
||||
|
||||
Text {
|
||||
text: "Control Center"
|
||||
color: "${c.base05}"
|
||||
font.family: "${font}"
|
||||
font.pixelSize: 22
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: wrapper.buttonHeight
|
||||
radius: 12
|
||||
color: audioMouse.containsMouse ? "${c.base02}" : "${c.base01}"
|
||||
border.color: "${c.base03}"
|
||||
border.width: 1
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "Audio settings"
|
||||
color: "${c.base05}"
|
||||
font.family: "${font}"
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: audioMouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: Hyprland.dispatch("exec pavucontrol")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: wrapper.buttonHeight
|
||||
radius: 12
|
||||
color: networkMouse.containsMouse ? "${c.base02}" : "${c.base01}"
|
||||
border.color: "${c.base03}"
|
||||
border.width: 1
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "Network settings"
|
||||
color: "${c.base05}"
|
||||
font.family: "${font}"
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: networkMouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: Hyprland.dispatch("exec nm-connection-editor")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: wrapper.buttonHeight
|
||||
radius: 12
|
||||
color: bluetoothMouse.containsMouse ? "${c.base02}" : "${c.base01}"
|
||||
border.color: "${c.base03}"
|
||||
border.width: 1
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "Bluetooth"
|
||||
color: "${c.base05}"
|
||||
font.family: "${font}"
|
||||
font.pixelSize: 15
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: bluetoothMouse
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: Hyprland.dispatch("exec blueman-manager")
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: 1
|
||||
color: "${c.base03}"
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "Quickshell + Hyprland"
|
||||
color: "${c.base04}"
|
||||
font.family: "${font}"
|
||||
font.pixelSize: 13
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
settings = {
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
serverAliveInterval = 30;
|
||||
serverAliveCountMax = 5;
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{ config, lib, ... }: let
|
||||
inherit (lib) mkOption types;
|
||||
|
||||
base16Names = [
|
||||
"base00"
|
||||
"base01"
|
||||
"base02"
|
||||
"base03"
|
||||
"base04"
|
||||
"base05"
|
||||
"base06"
|
||||
"base07"
|
||||
"base08"
|
||||
"base09"
|
||||
"base0A"
|
||||
"base0B"
|
||||
"base0C"
|
||||
"base0D"
|
||||
"base0E"
|
||||
"base0F"
|
||||
];
|
||||
in {
|
||||
options.stylix.accent = mkOption {
|
||||
type = types.enum base16Names;
|
||||
default = "base0B";
|
||||
description = ''
|
||||
Base16 colour used as the user accent.
|
||||
|
||||
Use it as:
|
||||
|
||||
config.lib.stylix.colors.${config.stylix.accent}
|
||||
config.lib.stylix.colors.withHashtag.${config.stylix.accent}
|
||||
|
||||
This module deliberately does not extend config.lib.stylix.colors: Stylix
|
||||
exports that value as a generated base16 attrset/functor, and replacing or
|
||||
partially extending it can break Stylix targets which expect metadata such
|
||||
as `scheme` to be present.
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
services = {
|
||||
walker = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
elephant.enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.bind = [
|
||||
"$mainMod, D, exec, walker"
|
||||
];
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{ config, pkgs, lib, ... }: let
|
||||
c = config.lib.stylix.colors;
|
||||
|
||||
wobSocket = ''"''${XDG_RUNTIME_DIR:-/run/user/$(id -u)}/wob.sock"'';
|
||||
|
||||
volumeStep = pkgs.writeShellScriptBin "volume-step" /*bash*/ ''
|
||||
volume="$(${lib.getExe' pkgs.wireplumber "wpctl"} get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
percent="$(printf '%s\n' "$volume" | ${pkgs.gawk}/bin/awk '{print int($2 * 100)}')"
|
||||
|
||||
if printf '%s\n' "$volume" | ${pkgs.gnugrep}/bin/grep -q MUTED; then
|
||||
printf '%s muted\n' "$percent" > ${wobSocket}
|
||||
else
|
||||
printf '%s volume\n' "$percent" > ${wobSocket}
|
||||
fi
|
||||
'';
|
||||
|
||||
brightnessStep = pkgs.writeShellScriptBin "brightness-step" /*bash*/ ''
|
||||
percent="$(${lib.getExe pkgs.brightnessctl} -m | ${lib.getExe' pkgs.coreutils "cut"} -d, -f4 | ${lib.getExe' pkgs.coreutils "tr"} -d '%')"
|
||||
printf '%s brightness\n' "$percent" > ${wobSocket}
|
||||
'';
|
||||
in {
|
||||
systemd.user = {
|
||||
services.wob.Install.WantedBy = lib.mkForce [ ];
|
||||
sockets.wob.Install.WantedBy = lib.mkForce [ "sockets.target" ];
|
||||
};
|
||||
|
||||
services.wob = {
|
||||
enable = true;
|
||||
systemd = true;
|
||||
|
||||
settings = {
|
||||
"" = {
|
||||
timeout = 2000;
|
||||
max = 100;
|
||||
|
||||
width = 280;
|
||||
height = 32;
|
||||
|
||||
border_offset = 0;
|
||||
border_size = 2;
|
||||
bar_padding = 4;
|
||||
|
||||
anchor = "top center";
|
||||
margin = "0 0 0 0";
|
||||
|
||||
overflow_mode = "nowrap";
|
||||
orientation = "horizontal";
|
||||
};
|
||||
|
||||
"style.volume" = { bar_color = c.base0D; };
|
||||
"style.brightness" = { bar_color = c.base0A; };
|
||||
"style.muted" = { bar_color = c.base04; };
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, ${lib.getExe volumeStep} up"
|
||||
", XF86AudioLowerVolume, exec, ${lib.getExe volumeStep} down"
|
||||
", XF86MonBrightnessUp, exec, ${lib.getExe brightnessStep} up"
|
||||
", XF86MonBrightnessDown, exec, ${lib.getExe brightnessStep} down"
|
||||
];
|
||||
|
||||
bind = [
|
||||
", XF86AudioMute, exec, ${lib.getExe volumeStep} mute"
|
||||
];
|
||||
};
|
||||
}
|
||||
+120
-305
@@ -1,319 +1,134 @@
|
||||
{ pkgs, lib, inputs, ... }: let
|
||||
hostSystem = pkgs.stdenv.hostPlatform.system;
|
||||
{ pkgs, lib, inputs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
( ouch.override { enableUnfree = true; } )
|
||||
];
|
||||
|
||||
yaziPkg = inputs.yazi.packages.${hostSystem}.default.override {
|
||||
_7zz = pkgs._7zz-rar;
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.windowrule = [
|
||||
"match:class dragon-drop, move cursor_x-window_w/2 cursor_y-window_h/2"
|
||||
];
|
||||
|
||||
yaziOpen = pkgs.writeShellScriptBin "yazi-open" ''
|
||||
set -efu
|
||||
programs.yazi = {
|
||||
package = inputs.yazi.packages
|
||||
.${pkgs.stdenv.hostPlatform.system}.default
|
||||
.override { _7zz = pkgs._7zz-rar; };
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
|
||||
target="''${1:-$HOME}"
|
||||
settings = {
|
||||
mgr = {
|
||||
show_hidden = true;
|
||||
};
|
||||
preview = {
|
||||
max_width = 1000;
|
||||
max_height = 1000;
|
||||
};
|
||||
plugin = {
|
||||
preloaders = [
|
||||
{ url = "*.crdownload"; run = "noop"; }
|
||||
];
|
||||
|
||||
case "$target" in
|
||||
file://*)
|
||||
target="$(${lib.getExe pkgs.python3} -c 'import sys, urllib.parse; print(urllib.parse.unquote(urllib.parse.urlparse(sys.argv[1]).path))' "$target")"
|
||||
;;
|
||||
esac
|
||||
prepend_previewers = [
|
||||
{ mime = "application/xz"; run = "ouch"; }
|
||||
{ mime = "application/zip"; run = "ouch"; }
|
||||
{ mime = "application/rar"; run = "ouch"; }
|
||||
{ mime = "application/gzip"; run = "ouch"; }
|
||||
{ mime = "application/7z-compressed"; run = "ouch"; }
|
||||
];
|
||||
|
||||
if [ -f "$target" ]; then
|
||||
target="$(dirname "$target")"
|
||||
fi
|
||||
prepend_fetchers = [
|
||||
{ group = "git"; url = "*"; run = "git"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
if [ ! -e "$target" ]; then
|
||||
target="$HOME"
|
||||
fi
|
||||
plugins = let
|
||||
yaziPlugin = name: pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "${name}.yazi";
|
||||
version = "unstable";
|
||||
src = inputs.yazi-plugins;
|
||||
|
||||
exec ${lib.getExe pkgs.ghostty} --title="Yazi" -e ${lib.getExe yaziPkg} "$target"
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r ${name}.yazi/* $out/
|
||||
rm -f $out/LICENSE
|
||||
cp LICENSE $out/LICENSE
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in with pkgs.yaziPlugins; {
|
||||
inherit
|
||||
chmod
|
||||
ouch
|
||||
mount
|
||||
toggle-pane
|
||||
;
|
||||
|
||||
yaziFileChooser = pkgs.writeShellScriptBin "yazi-file-chooser" ''
|
||||
set -efu
|
||||
full-border = {
|
||||
package = yaziPlugin "full-border";
|
||||
setup = true;
|
||||
};
|
||||
|
||||
directory="''${2:-0}"
|
||||
save="''${3:-0}"
|
||||
path="''${4:-}"
|
||||
out="''${5:?missing termfilechooser output path}"
|
||||
starship = {
|
||||
package = starship;
|
||||
setup = true;
|
||||
};
|
||||
|
||||
state_dir="''${XDG_STATE_HOME:-$HOME/.local/state}/xdg-desktop-portal-termfilechooser"
|
||||
last_selected_path="$state_dir/last-selected"
|
||||
${lib.getExe' pkgs.coreutils "mkdir"} -p "$state_dir"
|
||||
git = {
|
||||
package = git;
|
||||
setup = true;
|
||||
};
|
||||
};
|
||||
|
||||
if [ -s "$last_selected_path" ]; then
|
||||
IFS= read -r last_selected < "$last_selected_path" || true
|
||||
if [ -d "$last_selected" ]; then
|
||||
if [ "$save" = "1" ] && [ -n "$path" ]; then
|
||||
path="$last_selected/''${path##*/}"
|
||||
else
|
||||
path="$last_selected"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
initLua = ''
|
||||
Status:children_add(function()
|
||||
local h = cx.active.current.hovered
|
||||
if not h or ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
path="$HOME"
|
||||
fi
|
||||
return ui.Line {
|
||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||
":",
|
||||
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||
" ",
|
||||
}
|
||||
end, 500, Status.RIGHT)
|
||||
'';
|
||||
|
||||
created_placeholder=0
|
||||
if [ "$save" = "1" ] && [ ! -e "$path" ]; then
|
||||
placeholder_dir="''${path%/*}"
|
||||
if [ "$placeholder_dir" != "$path" ]; then
|
||||
${lib.getExe' pkgs.coreutils "mkdir"} -p "$placeholder_dir"
|
||||
fi
|
||||
|
||||
{
|
||||
printf '%s\n' 'This file was created by xdg-desktop-portal-termfilechooser.'
|
||||
printf '%s\n' 'Move/rename it in Yazi, then open/select it to choose the save path.'
|
||||
} > "$path"
|
||||
created_placeholder=1
|
||||
fi
|
||||
|
||||
${lib.getExe pkgs.ghostty} --title="Yazi File Picker" -e ${lib.getExe yaziPkg} --chooser-file="$out" --cwd-file="$last_selected_path" "$path"
|
||||
|
||||
if [ "$directory" = "1" ] && [ ! -s "$out" ] && [ -s "$last_selected_path" ]; then
|
||||
IFS= read -r cwd < "$last_selected_path" || true
|
||||
if [ -n "''${cwd:-}" ] && [ -d "$cwd" ]; then
|
||||
printf '%s\n' "$cwd" > "$out"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$created_placeholder" = "1" ] && [ ! -s "$out" ]; then
|
||||
${lib.getExe' pkgs.coreutils "rm"} -f "$path"
|
||||
fi
|
||||
'';
|
||||
|
||||
fileManager1 = pkgs.writeShellScriptBin "yazi-filemanager1" ''
|
||||
exec ${pkgs.python3.withPackages (ps: [ ps.dbus-next ])}/bin/python ${pkgs.writeText "yazi-filemanager1.py" ''
|
||||
import asyncio
|
||||
import os
|
||||
import subprocess
|
||||
import urllib.parse
|
||||
|
||||
from dbus_next.aio import MessageBus
|
||||
from dbus_next.constants import BusType
|
||||
from dbus_next.service import ServiceInterface, method
|
||||
|
||||
YAZI_OPEN = ${builtins.toJSON (lib.getExe yaziOpen)}
|
||||
|
||||
|
||||
def uri_to_path(uri: str) -> str | None:
|
||||
parsed = urllib.parse.urlparse(uri)
|
||||
if parsed.scheme != "file":
|
||||
return None
|
||||
return urllib.parse.unquote(parsed.path)
|
||||
|
||||
|
||||
def open_paths(uris: list[str], reveal_items: bool = False) -> None:
|
||||
for uri in uris:
|
||||
path = uri_to_path(uri)
|
||||
if not path:
|
||||
continue
|
||||
|
||||
if reveal_items and os.path.isfile(path):
|
||||
path = os.path.dirname(path)
|
||||
|
||||
subprocess.Popen(
|
||||
[YAZI_OPEN, path],
|
||||
start_new_session=True,
|
||||
stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
|
||||
|
||||
class FileManager1(ServiceInterface):
|
||||
def __init__(self) -> None:
|
||||
super().__init__("org.freedesktop.FileManager1")
|
||||
|
||||
@method()
|
||||
def ShowFolders(self, uris: "as", startup_id: "s") -> "":
|
||||
open_paths(uris)
|
||||
|
||||
@method()
|
||||
def ShowItems(self, uris: "as", startup_id: "s") -> "":
|
||||
open_paths(uris, reveal_items=True)
|
||||
|
||||
@method()
|
||||
def ShowItemProperties(self, uris: "as", startup_id: "s") -> "":
|
||||
open_paths(uris, reveal_items=True)
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
bus = await MessageBus(bus_type=BusType.SESSION).connect()
|
||||
bus.export("/org/freedesktop/FileManager1", FileManager1())
|
||||
await bus.request_name("org.freedesktop.FileManager1")
|
||||
await asyncio.Event().wait()
|
||||
|
||||
asyncio.run(main())
|
||||
''}
|
||||
'';
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
( ouch.override { enableUnfree = true; } )
|
||||
yaziOpen
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
GTK_USE_PORTAL = "1";
|
||||
};
|
||||
|
||||
xdg.configFile."xdg-desktop-portal-termfilechooser/config".text = ''
|
||||
[filechooser]
|
||||
cmd=${lib.getExe yaziFileChooser}
|
||||
default_dir=$HOME
|
||||
open_mode=suggested
|
||||
save_mode=last
|
||||
'';
|
||||
|
||||
xdg.desktopEntries.yazi = {
|
||||
name = "Yazi";
|
||||
genericName = "File Manager";
|
||||
exec = "${lib.getExe yaziOpen} %U";
|
||||
terminal = false;
|
||||
mimeType = [ "inode/directory" ];
|
||||
categories = [ "System" "FileTools" "FileManager" ];
|
||||
startupNotify = false;
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"inode/directory" = "yazi.desktop";
|
||||
"application/x-gnome-saved-search" = "yazi.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.dataFile."dbus-1/services/org.freedesktop.FileManager1.service".text = ''
|
||||
[D-BUS Service]
|
||||
Name=org.freedesktop.FileManager1
|
||||
Exec=${lib.getExe fileManager1}
|
||||
'';
|
||||
|
||||
wayland.windowManager.hyprland.settings.windowrule = [
|
||||
"match:class dragon-drop, move cursor_x-window_w/2 cursor_y-window_h/2"
|
||||
"match:title Yazi File Picker, float 1"
|
||||
"match:title Yazi File Picker, size 1200 800"
|
||||
];
|
||||
|
||||
programs.yazi = {
|
||||
package = yaziPkg;
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
|
||||
settings = {
|
||||
mgr = {
|
||||
show_hidden = true;
|
||||
};
|
||||
preview = {
|
||||
max_width = 1000;
|
||||
max_height = 1000;
|
||||
};
|
||||
plugin = {
|
||||
preloaders = [
|
||||
{ url = "*.crdownload"; run = "noop"; }
|
||||
];
|
||||
|
||||
prepend_previewers = [
|
||||
{ mime = "application/xz"; run = "ouch"; }
|
||||
{ mime = "application/zip"; run = "ouch"; }
|
||||
{ mime = "application/rar"; run = "ouch"; }
|
||||
{ mime = "application/gzip"; run = "ouch"; }
|
||||
{ mime = "application/7z-compressed"; run = "ouch"; }
|
||||
];
|
||||
|
||||
prepend_fetchers = [
|
||||
{ group = "git"; url = "*"; run = "git"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
plugins = let
|
||||
yaziPlugin = name: pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "${name}.yazi";
|
||||
version = "unstable";
|
||||
src = inputs.yazi-plugins;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
cp -r ${name}.yazi/* $out/
|
||||
rm -f $out/LICENSE
|
||||
cp LICENSE $out/LICENSE
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in with pkgs.yaziPlugins; {
|
||||
inherit
|
||||
chmod
|
||||
ouch
|
||||
mount
|
||||
toggle-pane
|
||||
;
|
||||
|
||||
full-border = {
|
||||
package = yaziPlugin "full-border";
|
||||
setup = true;
|
||||
};
|
||||
|
||||
starship = {
|
||||
package = starship;
|
||||
setup = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
package = git;
|
||||
setup = true;
|
||||
};
|
||||
};
|
||||
|
||||
initLua = ''
|
||||
Status:children_add(function()
|
||||
local h = cx.active.current.hovered
|
||||
if not h or ya.target_family() ~= "unix" then
|
||||
return ""
|
||||
end
|
||||
|
||||
return ui.Line {
|
||||
ui.Span(ya.user_name(h.cha.uid) or tostring(h.cha.uid)):fg("magenta"),
|
||||
":",
|
||||
ui.Span(ya.group_name(h.cha.gid) or tostring(h.cha.gid)):fg("magenta"),
|
||||
" ",
|
||||
}
|
||||
end, 500, Status.RIGHT)
|
||||
'';
|
||||
|
||||
keymap = {
|
||||
mgr.prepend_keymap = [
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin toggle-pane max-preview";
|
||||
desc = "Maximize or restore the preview pane";
|
||||
}
|
||||
{
|
||||
on = "Y";
|
||||
run = ''shell -- for path in %s; do echo "file://$path"; done | wl-copy -t text/uri-list'';
|
||||
desc = "Copy files into system clipboard";
|
||||
}
|
||||
{
|
||||
on = ["c" "m"];
|
||||
run = "plugin chmod";
|
||||
desc = "Chmod on selected files";
|
||||
}
|
||||
{
|
||||
on = ["M"];
|
||||
run = "plugin mount";
|
||||
desc = "Open mount menu";
|
||||
}
|
||||
{
|
||||
on = [ "<C-n>" ];
|
||||
run = "shell '${lib.getExe pkgs.dragon-drop} -x -A -i -T %s'";
|
||||
}
|
||||
{
|
||||
on = [ "g" "<S-d>" ];
|
||||
run = ''cd /mnt/D'';
|
||||
desc = "Goto D drive";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
keymap = {
|
||||
mgr.prepend_keymap = [
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin toggle-pane max-preview";
|
||||
desc = "Maximize or restore the preview pane";
|
||||
}
|
||||
{
|
||||
on = "Y";
|
||||
run = ''shell -- for path in %s; do echo "file://$path"; done | wl-copy -t text/uri-list'';
|
||||
desc = "Copy files into system clipboard";
|
||||
}
|
||||
{
|
||||
on = ["c" "m"];
|
||||
run = "plugin chmod";
|
||||
desc = "Chmod on selected files";
|
||||
}
|
||||
{
|
||||
on = ["M"];
|
||||
run = "plugin mount";
|
||||
desc = "Open mount menu";
|
||||
}
|
||||
{
|
||||
on = [ "<C-n>" ];
|
||||
run = "shell '${lib.getExe pkgs.dragon-drop} -x -A -i -T %s'";
|
||||
}
|
||||
{
|
||||
on = [ "g" "<S-d>" ];
|
||||
run = ''cd /mnt/D'';
|
||||
desc = "Goto D drive";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SUBSTITUTERS=(
|
||||
"https://cache.garnix.io"
|
||||
"https://cache.m7.rs"
|
||||
"https://cache.nixos.org"
|
||||
"https://cache.soopy.moe"
|
||||
"https://chaotic-nyx.cachix.org"
|
||||
"https://colmena.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
|
||||
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://nixos-cache-proxy.cofob.dev"
|
||||
"https://nixos.snix.store"
|
||||
"https://nixos.tvix.store"
|
||||
)
|
||||
|
||||
TEST_HASH="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
|
||||
|
||||
clean_url() {
|
||||
echo "$1" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//'
|
||||
}
|
||||
|
||||
check_speed() {
|
||||
local url=$(clean_url "$1")
|
||||
local cache_info=$(curl -s -o /dev/null -w "%{http_code},%{time_total}" -L "${url}/nix-cache-info" --max-time 10 --insecure)
|
||||
IFS=',' read -r code time_info <<< "$cache_info"
|
||||
|
||||
if [[ "$code" == "200" ]]; then
|
||||
echo -e "\033[1;32m✓ nix-cache-info: ${time_info}s\033[0m"
|
||||
|
||||
local narinfo_time=$(curl -s -o /dev/null -w "%{time_total}" -L "${url}/${TEST_HASH}.narinfo" --max-time 10 --insecure)
|
||||
echo -e " .narinfo: \033[1;33m${narinfo_time}s\033[0m"
|
||||
|
||||
local nar_time=$(curl -s -o /dev/null -w "%{time_total}" -L "${url}/nar/${TEST_HASH}.nar.xz" --max-time 10 --insecure)
|
||||
echo -e " .nar.xz: \033[1;33m${nar_time}s\033[0m"
|
||||
|
||||
local speed=$(curl -s -o /dev/null -w "%{speed_download}" -L "${url}/nix-cache-info" --max-time 10 --insecure)
|
||||
echo -e " СКОРОСТЬ: \033[1;36m$(numfmt --to=iec-i --suffix=B/s $speed | sed 's/Bi *//')\033[0m"
|
||||
return 0
|
||||
else
|
||||
echo -e "\033[1;31m✗ nix-cache-info: $code (${time_info}s)\033[0m"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
echo "🚀 Тест скорости Nix Substituters ($(date '+%H:%M:%S'))"
|
||||
echo "=============================================="
|
||||
|
||||
local working=()
|
||||
|
||||
for url in "${SUBSTITUTERS[@]}"; do
|
||||
local clean_url=$(clean_url "$url")
|
||||
echo -e "\n\033[1;34m=== $clean_url ===\033[0m"
|
||||
|
||||
if check_speed "$url"; then
|
||||
working+=("$clean_url")
|
||||
fi
|
||||
echo "----------------------------------------"
|
||||
done
|
||||
|
||||
echo -e "\n\033[1;36m🏆 РЕКОМЕНДУЕМЫЙ ПОРЯДОК (по скорости):\033[0m"
|
||||
printf 'nix.settings.substituters = [\n'
|
||||
for url in "${working[@]}"; do
|
||||
printf ' "%s"\n' "$url"
|
||||
done
|
||||
printf '];\n'
|
||||
}
|
||||
|
||||
main
|
||||
@@ -1,14 +1,13 @@
|
||||
{ pkgs, lib, config, inputs, ... }: {
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
accent = colors.${config.stylix.accent};
|
||||
in {
|
||||
settings = {
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(${accent}ee) rgba(${colors.base0C}ee) 45deg";
|
||||
"col.active_border" = "rgba(${colors.base0E}ee) rgba(${colors.base0C}ee) 45deg";
|
||||
"col.inactive_border" = "rgba(${colors.base05}aa)";
|
||||
|
||||
layout = "dwindle";
|
||||
@@ -48,6 +47,7 @@
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ in {
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/eris.yaml";
|
||||
accent = "base0E";
|
||||
polarity = "dark";
|
||||
|
||||
image = pkgs.fetchurl {
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
style = let
|
||||
colors = config.lib.stylix.colors.withHashtag;
|
||||
accent = colors.${config.stylix.accent};
|
||||
accent = colors.base0E;
|
||||
scssFile = pkgs.writeText "waybar.scss" /*scss*/ ''
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
programs.hyprlock.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
android-studio
|
||||
(vivaldi.override {
|
||||
proprietaryCodecs = true;
|
||||
enableWidevine = true;
|
||||
})
|
||||
vivaldi
|
||||
weechat
|
||||
];
|
||||
|
||||
|
||||
@@ -1,82 +1,17 @@
|
||||
{ pkgs, lib, config, osConfig, inputs, ... }: {
|
||||
wayland.windowManager.hyprland = let
|
||||
colors = config.lib.stylix.colors;
|
||||
accent = colors.${config.stylix.accent};
|
||||
|
||||
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
|
||||
libraries = [ pkgs.python3Packages.requests ];
|
||||
flakeIgnore = [ "E111" "E121" "E241" "E501" "E701" "E731" ];
|
||||
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
|
||||
} /*py*/ ''
|
||||
import requests as requests
|
||||
from random import choice
|
||||
from os import listdir, makedirs, remove, replace, system
|
||||
from os import system, mkdir, listdir
|
||||
from os.path import exists
|
||||
from subprocess import run
|
||||
|
||||
notify_id = None
|
||||
|
||||
|
||||
def notify(text, progress=None, expire_time=5000):
|
||||
global notify_id
|
||||
|
||||
command = [
|
||||
"${pkgs.libnotify}/bin/notify-send",
|
||||
"--app-name", "wallpaper_changer",
|
||||
"--print-id",
|
||||
"--expire-time", str(expire_time),
|
||||
]
|
||||
|
||||
if notify_id:
|
||||
command.extend(["--replace-id", str(notify_id)])
|
||||
|
||||
if progress is not None:
|
||||
command.extend(["--hint", f"int:value:{progress}"])
|
||||
|
||||
command.extend(["Wallpaper", text])
|
||||
|
||||
result = run(command, capture_output=True, text=True, check=False)
|
||||
output = result.stdout.strip()
|
||||
if output.isdigit():
|
||||
notify_id = output
|
||||
|
||||
|
||||
def download_with_progress(link, destination):
|
||||
temporary = f"{destination}.part"
|
||||
downloaded = 0
|
||||
last_progress = -1
|
||||
|
||||
response = None
|
||||
try:
|
||||
response = requests.get(link, stream=True)
|
||||
response.raise_for_status()
|
||||
total = int(response.headers.get("content-length", 0))
|
||||
|
||||
with open(temporary, "wb") as file:
|
||||
for chunk in response.iter_content(chunk_size=256 * 1024):
|
||||
if not chunk:
|
||||
continue
|
||||
|
||||
file.write(chunk)
|
||||
downloaded += len(chunk)
|
||||
|
||||
if total <= 0:
|
||||
continue
|
||||
|
||||
progress = min(100, downloaded * 100 // total)
|
||||
if progress == 100 or progress >= last_progress + 2:
|
||||
notify(f"Downloading... {progress}%", progress, 0)
|
||||
last_progress = progress
|
||||
|
||||
replace(temporary, destination)
|
||||
except Exception:
|
||||
if exists(temporary):
|
||||
remove(temporary)
|
||||
raise
|
||||
finally:
|
||||
if response is not None:
|
||||
response.close()
|
||||
|
||||
|
||||
notify = lambda s: system(f"notify-desktop Wallpaper '{s}'")
|
||||
folder = "${config.home.homeDirectory}/Wallpapers"
|
||||
url = "https://wallhaven.cc/api/v1/collections/sweetbread/${
|
||||
if osConfig.networking.hostName == "Rias" then "1764377"
|
||||
@@ -85,13 +20,10 @@
|
||||
with open("${config.sops.secrets."tokens/apis/wallhaven".path}") as f:
|
||||
token = f.read()
|
||||
|
||||
filename = None
|
||||
notify("Updating wallpaper...", 0)
|
||||
notify("Updating wallpaper!")
|
||||
|
||||
try:
|
||||
response = requests.get(url, params={'apikey': token})
|
||||
response.raise_for_status()
|
||||
json = response.json()
|
||||
json = requests.get(url, params={'apikey': token}).json()
|
||||
|
||||
wallpaper = choice(json['data'])
|
||||
link = wallpaper['path']
|
||||
@@ -102,27 +34,22 @@
|
||||
else: ext = "png"
|
||||
|
||||
filename = f"{id}.{ext}"
|
||||
destination = f"{folder}/{filename}"
|
||||
|
||||
if not exists(destination):
|
||||
makedirs(folder, exist_ok=True)
|
||||
notify("Downloading... 0%", 0, 0)
|
||||
download_with_progress(link, destination)
|
||||
notify("Downloaded", 100)
|
||||
else:
|
||||
notify("Using cached wallpaper", 100)
|
||||
if not exists(f"{folder}/{filename}"):
|
||||
if not exists(folder):
|
||||
mkdir(f"{folder}")
|
||||
|
||||
except requests.exceptions.RequestException:
|
||||
notify("Downloading...")
|
||||
with open(f"{folder}/{filename}", 'wb') as f:
|
||||
r = requests.get(link)
|
||||
f.write(r.content)
|
||||
|
||||
except requests.exceptions.ConnectionError:
|
||||
notify("Offline mode")
|
||||
try:
|
||||
filename = choice(listdir(folder))
|
||||
except (FileNotFoundError, IndexError):
|
||||
notify("Offline mode and wallpaper cache is empty")
|
||||
filename = choice(listdir(folder))
|
||||
|
||||
finally:
|
||||
if filename is not None:
|
||||
notify("Applying wallpaper", 100)
|
||||
system(f"awww img {folder}/{filename} --transition-type center")
|
||||
system(f"awww img {folder}/{filename} --transition-type center")
|
||||
'';
|
||||
in {
|
||||
settings = {
|
||||
@@ -130,7 +57,7 @@
|
||||
gaps_in = 2;
|
||||
gaps_out = 10;
|
||||
border_size = 3;
|
||||
"col.active_border" = lib.mkForce "rgba(${colors.base0C}aa) rgba(${accent}aa) 45deg";
|
||||
"col.active_border" = lib.mkForce "rgba(${colors.base0C}aa) rgba(${colors.base0B}aa) 45deg";
|
||||
|
||||
layout = "dwindle";
|
||||
};
|
||||
@@ -164,6 +91,7 @@
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
smart_split = true;
|
||||
};
|
||||
|
||||
@@ -179,10 +107,6 @@
|
||||
"${lib.getExe wallpaper_changer}"
|
||||
];
|
||||
|
||||
workspace = [
|
||||
"2, layout:scrolling"
|
||||
];
|
||||
|
||||
bind = [
|
||||
" , Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m active -m output"
|
||||
"CTRL, Print, exec, ${lib.getExe pkgs.hyprshot} -z -o ~/Screenshots -m region"
|
||||
|
||||
@@ -79,21 +79,8 @@
|
||||
cp Kurumi $out/share/icons -r
|
||||
'';
|
||||
};
|
||||
|
||||
pixeloid = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "Pixeloid";
|
||||
dontUnpack = true;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://lair.moe/static/font/Pixeloid/otf/Sans.otf";
|
||||
hash = "sha256-GTf2BnhH0Pzc3Bbevmd+mA6t8lZFMUxX9wkSqWicuSc=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
install -Dm644 "$src" "$out/share/fonts/opentype/Sans.otf"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
# {
|
||||
stylix = {
|
||||
enable = true;
|
||||
overlays.enable = false;
|
||||
@@ -105,7 +92,6 @@ in {
|
||||
};
|
||||
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
accent = "base0B";
|
||||
polarity = "dark";
|
||||
|
||||
image = pkgs.fetchurl {
|
||||
@@ -136,11 +122,6 @@ in {
|
||||
package = (pkgs.google-fonts.override { fonts = [ "Gabriela" ]; });
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
name = "Pixeloid Sans";
|
||||
package = pixeloid;
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-monochrome-emoji;
|
||||
name = "Noto Emoji";
|
||||
@@ -164,6 +145,7 @@ in {
|
||||
|
||||
gtk = {
|
||||
gtk4 = {
|
||||
theme = null;
|
||||
extraConfig = {
|
||||
gtk-application-prefer-dark-theme = true;
|
||||
};
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
{ osConfig, config, pkgs, lib, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
font-awesome
|
||||
nerd-fonts.symbols-only
|
||||
playerctl
|
||||
cava
|
||||
pulsemixer
|
||||
|
||||
monocraft
|
||||
font-awesome
|
||||
nerd-fonts.symbols-only
|
||||
];
|
||||
|
||||
programs.waybar = {
|
||||
@@ -51,7 +49,7 @@
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "{icon} {volume}%";
|
||||
format = "{icon} {volume}%";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
@@ -155,14 +153,12 @@
|
||||
|
||||
style = let
|
||||
colors = config.lib.stylix.colors.withHashtag;
|
||||
accent = colors.${config.stylix.accent};
|
||||
radius = "6px";
|
||||
scssFile = pkgs.writeText "waybar.scss" /*scss*/ ''
|
||||
window#waybar {
|
||||
background: transparent;
|
||||
color: ${colors.base05};
|
||||
border-radius: ${radius};
|
||||
font-family: "Symbols Nerd Font Mono", "Monocraft", "Font Awesome 7 Free";
|
||||
font-weight: bold;
|
||||
font-size: .85em;
|
||||
|
||||
@@ -200,13 +196,13 @@
|
||||
&:hover { background: ${colors.base01}; }
|
||||
|
||||
&.active {
|
||||
background: ${accent};
|
||||
background: ${colors.base0B};
|
||||
color: ${colors.base00};
|
||||
|
||||
&:hover {
|
||||
border-color: ${accent};
|
||||
border-color: ${colors.base0B};
|
||||
background: ${colors.base01};
|
||||
color: ${accent};
|
||||
color: ${colors.base0B};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -260,7 +256,7 @@
|
||||
|
||||
#battery {
|
||||
&.plugged { color: ${colors.base0D}; }
|
||||
&.charging { color: ${accent}; }
|
||||
&.charging { color: ${colors.base0B}; }
|
||||
&:not(.charging) {
|
||||
&.warning {
|
||||
color: ${colors.base00};
|
||||
@@ -278,7 +274,7 @@
|
||||
}
|
||||
&.full {
|
||||
color: ${colors.base00};
|
||||
background: ${accent};
|
||||
background: ${colors.base0B};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user