Compare commits

...

4 commits

Author SHA1 Message Date
68d49d0c1e fixup 2026-02-26 16:34:55 +02:00
6b5b149c04 shit broke 2026-02-25 18:13:56 +02:00
f45d11be35 final hardware.nix changes for btrfs 2026-02-25 16:05:38 +02:00
598d3440b4 btrfs conversion, boost broke 2026-02-25 13:33:04 +02:00
9 changed files with 580 additions and 336 deletions

3
.gitignore vendored
View file

@ -13,3 +13,6 @@ devenv.local.yaml
# pre-commit
.pre-commit-config.yaml
# ide
.vscode/settings.json

View file

@ -184,16 +184,13 @@
"pipewire"
];
packages = with pkgs; [
# swaylock
swaybg
# swayimg
swayidle
fuzzel
xwayland-satellite
gamescope
telegram-desktop
ladybird
krita
# krita # BOOST BROKE, FUCK
meld
pavucontrol
pwvucontrol
@ -215,7 +212,6 @@
};
programs = {
niri.enable = true;
gnome-terminal.enable = true;
thunar.enable = true; # TODO: replace
winbox = {

View file

@ -1,10 +1,15 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.qdrant;
configRelPath = ".config/qdrant/config.yaml";
configPath = "${config.home.homeDirectory}/${configRelPath}";
configPath = "${config.home.homeDirectory}/${configRelPath}";
defaultSettings = {
log_level = "INFO";
@ -14,20 +19,19 @@ let
grpc_port = 6334;
};
storage = {
storage_path = "${cfg.dataDir}/storage";
storage_path = "${cfg.dataDir}/storage";
snapshots_path = "${cfg.dataDir}/snapshots";
};
};
effectiveSettings = lib.recursiveUpdate defaultSettings cfg.settings;
yaml = pkgs.formats.yaml {};
yaml = pkgs.formats.yaml { };
configFile = yaml.generate "qdrant-config.yaml" effectiveSettings;
envList = lib.mapAttrsToList (k: v: "${k}=${toString v}") cfg.environment;
extraArgsStr =
lib.concatStringsSep " " (map lib.escapeShellArg cfg.extraArgs);
extraArgsStr = lib.concatStringsSep " " (map lib.escapeShellArg cfg.extraArgs);
in
{
options.services.qdrant = {
@ -46,30 +50,24 @@ in
# Мержится поверх defaultSettings
settings = lib.mkOption {
type = lib.types.attrs;
default = {};
default = { };
};
# Если нужно прокинуть QDRANT__... переменные (они имеют максимальный приоритет)
environment = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
default = {};
default = { };
};
extraArgs = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
default = [ ];
};
};
config = lib.mkIf cfg.enable {
home.packages = [ cfg.package ];
# symlink в ~/.config/qdrant/config.yaml -> nix store
home.file."${configRelPath}".source = configFile;
# автоматический start/stop/restart при home-manager switch
systemd.user.startServices = "sd-switch"; # default true, но фиксируем явно :contentReference[oaicite:1]{index=1}
systemd.user.services.qdrant = {
Unit = {
Description = "Qdrant (user)";

View file

@ -11,6 +11,16 @@ final: prev: {
});
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(pyFinal: pyPrev: {
sseclient-py = pyPrev.sseclient-py.overridePythonAttrs (old: rec {
format = "pyproject";
nativeBuildInputs = (old.nativeBuildInputs or []) ++ (with pyPrev; [
hatchling
#pypaBuildHook
#pypaInstallHook
]);
doCheck = false;
});
haystack-ai = pyPrev.haystack-ai.overridePythonAttrs (old: rec {
version = "2.24.1";

View file

@ -13,6 +13,9 @@
git submodule update --init --recursive
nix flake update
'';
check.exec = ''
nix flake check
'';
build.exec = ''
nixos-rebuild switch --sudo --flake '.#'
'';

350
flake.lock generated
View file

@ -19,12 +19,12 @@
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager_4",
"home-manager": "home-manager_3",
"nixpkgs": [
"ragenix",
"nixpkgs"
],
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1736955230,
@ -195,15 +195,15 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1761588595,
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
"owner": "edolstra",
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
@ -240,22 +240,6 @@
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@ -297,7 +281,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems"
"systems": "systems_6"
},
"locked": {
"lastModified": 1731533236,
@ -313,51 +297,9 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_7"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"ghostty": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"zig": "zig",
"zon2nix": "zon2nix"
},
"locked": {
"lastModified": 1771930713,
"narHash": "sha256-NPOmouXCaizb9Xv0l4xus8/MLOvs+7TktkaElr7Gqoo=",
"owner": "ghostty-org",
"repo": "ghostty",
"rev": "d0e308f32b0024d2203232626e605b2fd4417d21",
"type": "github"
},
"original": {
"owner": "ghostty-org",
"ref": "tip",
"repo": "ghostty",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"intel-hw",
@ -449,16 +391,15 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"ghostty",
"nixpkgs"
]
},
"locked": {
"lastModified": 1770586272,
"narHash": "sha256-Ucci8mu8QfxwzyfER2DQDbvW9t1BnTUJhBmY7ybralo=",
"lastModified": 1772060133,
"narHash": "sha256-VuyRptb8v1lVGMlLp4/1vRX3Efwec0CN0S6mKmDPzLg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b1f916ba052341edc1f80d4b2399f1092a4873ca",
"rev": "ce9b6e52500a0ea0ec48f0bbf6d7a3e431d9dfa4",
"type": "github"
},
"original": {
@ -468,26 +409,6 @@
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1771851181,
"narHash": "sha256-gFgE6mGUftwseV3DUENMb0k0EiHd739lZexPo5O/sdQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "9a4b494b1aa1b93d8edf167f46dc8e0c0011280c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"intel-hw",
@ -508,7 +429,7 @@
"type": "github"
}
},
"home-manager_4": {
"home-manager_3": {
"inputs": {
"nixpkgs": [
"ragenix",
@ -537,21 +458,21 @@
"fenix": "fenix",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager_3",
"home-manager": "home-manager_2",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"nu-env": "nu-env",
"systems": "systems_4",
"systems": "systems_3",
"templates": "templates",
"valhali": "valhali",
"vaultix": "vaultix"
},
"locked": {
"lastModified": 1771802471,
"narHash": "sha256-+4BK9fTD8fFarmwTTU78bGQwUbVZSmEM2yyZIzBeUvs=",
"lastModified": 1772058145,
"narHash": "sha256-23O8yplzS6R2g0ATiaj+PNxCZsYf+6UFMkm1f+U5TRs=",
"owner": "MordragT",
"repo": "nixos",
"rev": "168b703308f0b14f6af300b60b0db50498235b54",
"rev": "b08bb8ba4cab2b7ccaff961f8f64d8134e62604d",
"type": "github"
},
"original": {
@ -604,26 +525,84 @@
"url": "https://git.sys-con.ru/thek0tyara/nixpkgs-extension.git"
}
},
"niri": {
"niri-flake": {
"inputs": {
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_3"
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1764399944,
"narHash": "sha256-FC9eYtSmplgxllCX4/3hJq5J3sXWKLSc7at8ZUxycVw=",
"lastModified": 1771940378,
"narHash": "sha256-qe5t8E8uK5eSgPTxtfcde3VO8fnIr/Tu+hn72FDry/E=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "f8899e60a1425d21a03a05ac2c069a85398039b5",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1756556321,
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b35bcae35b3f9665043c335e55ed5828af77db85",
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.11",
"ref": "v25.08",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1771849386,
"narHash": "sha256-CFvjBjS2LxbBMR3Lu6wZhME6ck3CXyKUufRoJA5tlmw=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "2dc6f4482c4eeed75ea8b133d89cad8658d38429",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1771734689,
"narHash": "sha256-/phvMgr1yutyAMjKnZlxkVplzxHiz60i4rc+gKzpwhg=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "8f590b832326ab9699444f3a48240595954a4b10",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1752687322,
@ -655,20 +634,23 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs-stable": {
"locked": {
"lastModified": 1770537093,
"narHash": "sha256-XV30uo8tXuxdzuV8l3sojmlPRLd/8tpMsOp4lNzLGUo=",
"rev": "fef9403a3e4d31b0a23f0bacebbec52c248fbb51",
"type": "tarball",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.05pre942631.fef9403a3e4d/nixexprs.tar.xz"
"lastModified": 1771903837,
"narHash": "sha256-sdaqdnsQCv3iifzxwB22tUwN/fSHoN7j2myFW5EIkGk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e764fc9a405871f1f6ca3d1394fb422e0a0c3951",
"type": "github"
},
"original": {
"type": "tarball",
"url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_2": {
"locked": {
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
@ -683,7 +665,7 @@
"type": "indirect"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1757584362,
"narHash": "sha256-XeTX/w16rUNUNBsfaOVCDoMMa7Xu7KvIMT7tn1zIEcg=",
@ -697,23 +679,7 @@
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1757967192,
"narHash": "sha256-/aA9A/OBmnuOMgwfzdsXRusqzUpd8rQnQY8jtrHK+To=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0d7c15863b251a7a50265e57c1dca1a7add2e291",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_4": {
"locked": {
"lastModified": 1771848320,
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
@ -729,7 +695,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_5": {
"locked": {
"lastModified": 1741379970,
"narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=",
@ -769,7 +735,7 @@
},
"pre-commit": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_2",
"gitignore": "gitignore_2",
"nixpkgs": [
"intel-hw",
@ -793,7 +759,7 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_3",
"gitignore": "gitignore_3",
"nixpkgs": [
"intel-hw",
@ -819,9 +785,9 @@
"inputs": {
"agenix": "agenix",
"crane": "crane_3",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_7",
"rust-overlay": "rust-overlay_4"
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_3"
},
"locked": {
"lastModified": 1741508717,
@ -841,12 +807,12 @@
"root": {
"inputs": {
"dw-proton": "dw-proton",
"ghostty": "ghostty",
"home-manager": "home-manager_2",
"home-manager": "home-manager",
"intel-hw": "intel-hw",
"mypkgs": "mypkgs",
"niri": "niri",
"nixpkgs": "nixpkgs_6",
"niri-flake": "niri-flake",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_4",
"ragenix": "ragenix"
}
},
@ -912,27 +878,6 @@
}
},
"rust-overlay_3": {
"inputs": {
"nixpkgs": [
"niri",
"nixpkgs"
]
},
"locked": {
"lastModified": 1757989933,
"narHash": "sha256-9cpKYWWPCFhgwQTww8S94rTXgg8Q8ydFv9fXM6I8xQM=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "8249aa3442fb9b45e615a35f39eca2fe5510d7c3",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_4": {
"inputs": {
"nixpkgs": [
"ragenix",
@ -1043,24 +988,9 @@
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"templates": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1757668691,
@ -1078,7 +1008,7 @@
},
"utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
@ -1096,7 +1026,7 @@
},
"utils_2": {
"inputs": {
"systems": "systems_3"
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
@ -1114,7 +1044,7 @@
},
"utils_3": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1731533236,
@ -1178,54 +1108,36 @@
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": [
"ghostty",
"flake-compat"
],
"flake-utils": [
"ghostty",
"flake-utils"
],
"nixpkgs": [
"ghostty",
"nixpkgs"
]
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1763295135,
"narHash": "sha256-sGv/NHCmEnJivguGwB5w8LRmVqr1P72OjS+NzcJsssE=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "64f8b42cfc615b2cf99144adf2b7728c7847c72a",
"lastModified": 1755491097,
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"owner": "Supreeeme",
"ref": "v0.7",
"repo": "xwayland-satellite",
"type": "github"
}
},
"zon2nix": {
"inputs": {
"nixpkgs": [
"ghostty",
"nixpkgs"
]
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1768231828,
"narHash": "sha256-wL/8Iij4T2OLkhHcc4NieOjf7YeJffaUYbCiCqKv/+0=",
"owner": "jcollie",
"repo": "zon2nix",
"rev": "c28e93f3ba133d4c1b1d65224e2eebede61fd071",
"lastModified": 1771787042,
"narHash": "sha256-7bM6Y4KldhKnfopSALF8XALxcX7ehkomXH9sPl4MXp0=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "33c344fee50504089a447a8fef5878cf4f6215fc",
"type": "github"
},
"original": {
"owner": "jcollie",
"repo": "zon2nix",
"rev": "c28e93f3ba133d4c1b1d65224e2eebede61fd071",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}

View file

@ -6,47 +6,45 @@
inputs.nixpkgs.follows = "nixpkgs";
};
ragenix.url = "github:yaxitech/ragenix/2025.03.09";
niri.url = "github:YaLTeR/niri/v25.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
ghostty.url = "github:ghostty-org/ghostty/tip";
# ghostty.url = [
# "github:ghostty-org/ghostty/1.3.0"
# "github:ghostty-org/ghostty/tip"
# ];
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
niri-flake = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
dw-proton.url = "github:imaviso/dwproton-flake";
intel-hw.url = "github:MordragT/nixos";
#
};
outputs =
inputs@{
# self,
nixpkgs,
mypkgs,
ragenix,
home-manager,
ghostty,
nix-index-database,
niri-flake,
intel-hw,
...
}:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
# pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.${system}.default = pkgs.mkShell {
packages = [
ragenix.packages.x86_64-linux.default
];
};
nixosConfigurations.testenv = nixpkgs.lib.nixosSystem {
inherit system;
#
specialArgs = { inherit inputs; };
modules = [
ragenix.nixosModules.default
niri-flake.nixosModules.niri
nix-index-database.nixosModules.default
(
{
pkgs,
@ -59,9 +57,9 @@
};
nixpkgs.overlays = [
intel-hw.overlays.default
# (import ./custom/overlays/default.nix)
mypkgs.overlays.default
(import ./custom/override.nix)
niri-flake.overlays.niri
];
# boot.kernelPatches = [
# {
@ -161,6 +159,7 @@
polkit = {
enable = true;
};
rtkit.enable = true;
sudo = {
extraRules = [
{
@ -175,13 +174,12 @@
];
};
};
# virtualisation.qemu = {
# options = [
# ];
# };
programs = {
# amnezia-vpn.enable = true;
ccache.enable = true;
niri = {
enable = true;
package = pkgs.niri-stable;
};
nix-ld = {
enable = true;
libraries = with pkgs; [
@ -251,8 +249,7 @@
useUserPackages = true;
extraSpecialArgs = {
inherit system;
inherit ghostty;
inherit inputs;
};
users.thek0tyara = ./home.nix;

View file

@ -13,15 +13,33 @@
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# fileSystems."/" =
# { device = "/dev/disk/by-label/NVME_NIXOS";
# fsType = "ext4";
# };
#
# fileSystems."/boot" =
# { device = "/dev/disk/by-label/NVME_ESP";
# fsType = "vfat";
# options = [ "fmask=0022" "dmask=0022" ];
# };
fileSystems."/" =
{ device = "/dev/disk/by-label/NVME_NIXOS";
fsType = "ext4";
{ device = "/dev/disk/by-label/NVME_BTRFS";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd:1" "noatime" "discard=async" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NVME_ESP";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
fileSystems."/home" =
{ device = "/dev/disk/by-label/NVME_BTRFS";
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd:1" "noatime" "discard=async" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-label/NVME_BTRFS";
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd:1" "noatime" "discard=async" ];
};
swapDevices =

443
home.nix
View file

@ -1,20 +1,10 @@
{
inputs,
config,
pkgs,
system,
ghostty,
lib,
...
}:
# let
# vesktopNoFuses = pkgs.vesktop.overrideAttrs (old: {
# nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.jq ];
# postPatch = (old.postPatch or "") + ''
# tmp="$(mktemp)"
# jq 'del(.build.electronFuses)' package.json > "$tmp"
# mv "$tmp" package.json
# '';
# });
# in
{
imports = [
./custom/hm
@ -56,9 +46,23 @@
enableFishIntegration = true;
};
packages = with pkgs; [
### utility
dig
libnotify
arch-install-scripts
kdocker # tray the untrayable
xwayland-satellite
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
winboat
xfce4-taskmanager
### development
# idea-community-bin
###
vlc
jq
xfce4-taskmanager
gparted
tor-browser
iperf
@ -66,9 +70,9 @@
lmstudio
dig
libnotify
arch-install-scripts
### social
# fluffychat
### gaming
winetricks
@ -77,14 +81,12 @@
vintagestory
prismlauncher
winboat
# kdePackages.kdenlive
(python313.withPackages (
py: with py; [
huggingface-hub
haystack-ai
raganything
# haystack-ai
# raganything
]
))
]
@ -97,10 +99,39 @@
DESKTOP = ":0";
OLLAMA_HOST = "10.20.0.201:11434";
};
file = {
".config/waybar/power_menu.xml".text = ''
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="shutdown">
<property name="label"> Shutdown</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label"> Reboot</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="suspend">
<property name="label"> Suspend</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="hibernate">
<property name="label"> Hibernate</property>
</object>
</child>
</object>
</interface>
'';
};
};
xdg = {
configFile."xfce4/helpers.rc".text = ''
TerminalEmulator=ghostty
TerminalEmulator=wezterm
'';
mimeApps = {
@ -156,9 +187,9 @@
};
};
services = {
mako.enable = true;
ollama = {
# enable = true;
# acceleration = vulkan;
package = pkgs.ollama-vulkan;
host = "10.20.0.201";
environmentVariables = {
@ -179,8 +210,6 @@
dataDir = "/mnt/HDD_A_DATA/services/lib/qdrant";
settings = {
storage = {
# storage_path = "/mnt/HDD_A_DATA/services/lib/qdrant/storage";
# snapshots_path = "/mnt/HDD_A_DATA/services/lib/qdrant/snapshots";
hnsw_index = {
on_disk = true;
};
@ -193,6 +222,23 @@
telemetry_disabled = true;
};
};
swayidle = {
enable = true;
timeouts = [
{
timeout = 601;
command = "${pkgs.niri}/bin/niri msg action power-off-monitors";
}
{
timeout = 600;
command = "${pkgs.swaylock}/bin/swaylock -f --color 030303";
}
];
events = {
"before-sleep" = "${pkgs.swaylock}/bin/swaylock -fF --color 030303";
"lock" = "lock";
};
};
};
programs = {
### custom
@ -351,14 +397,16 @@
### default
aria2.enable = true;
btop.enable = true;
command-not-found.enable = true;
# command-not-found.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
element-desktop = {
enable = true;
# settings = {};
settings = {
};
};
eza = {
enable = true;
@ -381,46 +429,6 @@
'';
};
};
#
ghostty = {
# enable = true;
# package = ghostty.packages.${system}.default;
settings = {
theme = "dark";
term = "xterm-256color";
scrollback-limit = 100000;
# fullscreen = true;
# title = ''"daft cunt can't set scrollback"'';
};
themes = {
dark = {
background = "171421";
# cursor-color = "f5e0dc";
foreground = "D0CFCC";
palette = [
"0=#171421"
"1=#C01C28"
"2=#26A269"
"3=#A2734C"
"4=#12488B"
"5=#A347BA"
"6=#2AA1B3"
"7=#D0CFCC"
"8=#5E5C64"
"9=#F66151"
"10=#33D17A"
"11=#E9AD0C"
"12=#2A7BDE"
"13=#C061CB"
"14=#33C7DE"
"15=#FFFFFF"
];
# selection-background = "171421";
# selection-foreground = "D0CFCC";
};
};
};
#
lutris = {
# enable = true;
# defaultWinePackage = pkgs.wineWowPackages.full;
@ -440,6 +448,202 @@
};
};
# nheko.enable = true;
niri = {
package = pkgs.niri;
settings = {
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
screenshot-path = "~/Pictures/Screenshots/%Y-%m-%d_%H-%M-%S.png";
input = {
keyboard = {
xkb = {
layout = "us,ru";
options = "grp:alt_shift_toggle";
};
numlock = true;
};
mod-key = "Super";
};
layout.default-column-width = { };
spawn-at-startup = [
{
sh = "systemctl --user restart xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk";
}
];
workspaces = {
"1-social" = {
name = "social";
};
"2-browsing" = {
name = "browsing";
};
"3-terminal" = {
name = "terminal";
};
"4-gaming" = {
name = "gaming";
};
};
window-rules = [
{
matches = [
{ app-id = "org.telegram.desktop"; }
];
default-column-width = {
fixed = 720;
};
open-on-workspace = "social";
# block-out-from = "screen-capture";
}
{
matches = [
{ app-id = "discord"; }
{ app-id = "vesktop"; }
];
default-column-width = {
fixed = 1150;
};
open-on-workspace = "social";
}
{
matches = [
{ app-id = "firefox"; }
];
default-column-width = {
fixed = 1888;
};
# match is-floating = false;
# tiled-state = false;
# open-maximized-to-edges = true;
open-on-workspace = "browsing";
}
# "terminal".matches = {
# app-id = "Terminal|com.mitchellh.ghostty|opensnitch-ui";
# open-on-workspace = "terminal";
# }
{
matches = [
{ app-id = "steam"; }
];
# tiled-state = false;
open-on-workspace = "gaming";
}
{
matches = [
{ title = "^Picture-in-Picture$"; }
{ app-id = "xdg-desktop-portal-gtk"; }
];
open-floating = true;
}
];
binds = {
"Mod+T".action.spawn = [
# open terminal
"wezterm-gui"
"start"
"--always-new-process"
];
"Mod+R".action.spawn = "fuzzel";
"Mod+Shift+L".action.spawn = "swaylock --color 030303";
"Scroll_Lock" = {
# toggle microphone
allow-when-locked = true;
action.spawn = [
"${pkgs.wireplumber}/bin/wpctl"
"set-mute"
"@DEFAULT_AUDIO_SOURCE@"
"toggle"
];
};
"Print".action."screenshot" = { };
"Mod+Q".action."close-window" = { };
"Mod+V".action."toggle-window-floating" = { };
"Mod+F".action."fullscreen-window" = { };
"Mod+Shift+F".action."expand-column-to-available-width" = { };
"Mod+C".action.center-column = { };
"Mod+Ctrl+C".action.center-visible-columns = { };
"Mod+Minus".action = {
set-column-width = "-10%";
};
"Mod+Equal".action = {
set-column-width = "+10%";
};
"Mod+Shift+Minus".action = {
set-window-height = "-10%";
};
"Mod+Shift+Equal".action = {
set-window-height = "+10%";
};
"Mod+WheelScrollUp".action.focus-column-left = { };
"Mod+WheelScrollDown".action.focus-column-right = { };
"Mod+Left".action.focus-column-left = { };
"Mod+Right".action.focus-column-right = { };
"Mod+Up".action.focus-window-up = { };
"Mod+Down".action.focus-window-down = { };
"Mod+Shift+Up".action.move-window-up = { };
"Mod+Shift+Down".action.move-window-down = { };
"Mod+Shift+Left".action.move-column-left = { };
"Mod+Shift+Right".action.move-column-right = { };
"Mod+Home".action.focus-column-first = { };
"Mod+End".action.focus-column-last = { };
"Mod+Shift+Home".action.move-column-to-first = { };
"Mod+Shift+End".action.move-column-to-last = { };
"Mod+Shift+Page_Down".action.move-workspace-down = { };
"Mod+Shift+Page_Up".action.move-workspace-up = { };
"Mod+Shift+WheelScrollUp".action.focus-workspace-up = { };
"Mod+Shift+WheelScrollDown".action.focus-workspace-down = { };
"Mod+M".action.quit = { };
"Mod+Shift+P".action.power-off-monitors = { };
}
# (switch|move) to workspace by number
// (builtins.listToAttrs (
builtins.concatMap
(
i:
let
ws = if i == 0 then 10 else i;
in
[
{
name = "Mod+${toString i}";
value.action.focus-workspace = ws;
}
{
name = "Mod+Shift+${toString i}";
value.action.move-column-to-workspace = ws;
}
]
)
[
1
2
3
4
5
6
7
8
9
0
]
));
};
};
nix-index.enable = true;
nix-your-shell.enable = true;
obs-studio = {
enable = true;
@ -465,8 +669,111 @@
# package = vesktopNoFuses;
# settings = { TODO };
};
vscode.enable = true;
waybar.enable = true;
vscode = {
enable = true;
package = pkgs.vscode;
};
waybar = {
enable = true;
settings = {
mainBar = {
modules-left = [
"niri/workspaces"
];
modules-center = [ "niri/window" ];
modules-right = [
"idle_inhibitor"
"pulseaudio"
"network"
"cpu"
"memory"
"temperature"
"niri/language"
"clock"
"tray"
"custom/power"
];
"idle_inhibitor" = {
"format" = "{icon}";
"format-icons" = {
"activated" = "";
"deactivated" = "";
};
};
"pulseaudio" = {
# "scroll-step" = 1; # %, can be a float
"format" = "{volume}% {icon} {format_source}";
"format-bluetooth" = "{volume}% {icon} {format_source}";
"format-bluetooth-muted" = " {icon} {format_source}";
"format-muted" = " {format_source}";
"format-source" = "{volume}% ";
"format-source-muted" = "";
"format-icons" = {
"headphone" = "";
"hands-free" = "";
"headset" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = [
""
""
""
];
};
"on-click" = "pavucontrol";
};
"network" = {
"format-wifi" = "{essid} ({signalStrength}%) ";
"format-ethernet" = "{ipaddr}/{cidr} ";
"tooltip-format" = "{ifname} via {gwaddr} ";
"format-linked" = "{ifname} (No IP) ";
"format-disconnected" = "Disconnected ";
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
};
"cpu" = {
"format" = "{usage}% ";
# "tooltip" = false;
};
"memory" = {
"format" = "{}% ";
};
"temperature" = {
# "thermal-zone" = 2;
# "hwmon-path" = "/sys/class/hwmon/hwmon2/temp1_input";
"critical-threshold" = 80;
# "format-critical" = "{temperatureC}°C {icon}";
"format" = "{temperatureC}°C {icon}";
"format-icons" = [
""
""
""
];
};
"clock" = {
# "timezone" = "America/New_York";
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
"format-alt" = "{:%Y-%m-%d}";
};
"tray" = {
# "icon-size" = 21;
"spacing" = 10;
};
"custom/power" = {
"format" = " ";
"tooltip" = false;
"menu" = "on-click";
"menu-file" = "$HOME/.config/waybar/power_menu.xml"; # Menu file in resources folder
"menu-actions" = {
"shutdown" = "shutdown";
"reboot" = "reboot";
"suspend" = "systemctl suspend";
"hibernate" = "systemctl hibernate";
};
};
};
};
};
wezterm = {
enable = true;
extraConfig = ''