Compare commits
62 Commits
0b01ed04f5
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
473a6f5b75
|
|||
|
521193d91d
|
|||
|
8adeeff9eb
|
|||
|
57788942b2
|
|||
|
6261e4f490
|
|||
|
e975e069d1
|
|||
|
6936ebeaf7
|
|||
|
5952720feb
|
|||
|
299d08a16a
|
|||
|
ea0af9342c
|
|||
|
7780f62cb5
|
|||
|
d98bb6cbdd
|
|||
|
405485f122
|
|||
|
a7214db68c
|
|||
|
49eeb9fe76
|
|||
|
76f3efe1b4
|
|||
|
823d8b9bb6
|
|||
|
ba9a3c7168
|
|||
|
1aef3db69d
|
|||
|
fc2407940c
|
|||
|
87047b5b1b
|
|||
|
b309aa3893
|
|||
|
019149b39b
|
|||
|
f59f0ea20a
|
|||
|
9105831fbb
|
|||
|
4658b8392e
|
|||
|
e65c27a81f
|
|||
|
7eccc1a627
|
|||
|
7e9b84d0ea
|
|||
|
5b2582afdd
|
|||
|
7d198f1996
|
|||
|
2e84738c9f
|
|||
|
a76bf52727
|
|||
|
1f811718c8
|
|||
|
c07c872c91
|
|||
|
8b3864084f
|
|||
|
30e3fa2b08
|
|||
|
dbb5973c46
|
|||
|
ffa6af675d
|
|||
|
075ece2829
|
|||
|
349cbfa263
|
|||
|
f3f390aae4
|
|||
|
73ed248c12
|
|||
|
24f42ee146
|
|||
|
c0ad5ed316
|
|||
|
ca4d08e799
|
|||
|
5affe511ce
|
|||
|
975a92eaae
|
|||
|
28c430568d
|
|||
|
3737a61fa5
|
|||
|
0c8e2c702d
|
|||
|
2a12de6682
|
|||
|
ca8496b606
|
|||
|
ec5c8ff820
|
|||
|
4f78af4181
|
|||
|
21a2587c13
|
|||
|
a786c3bd99
|
|||
|
50ebd68e57
|
|||
|
4f3b94d5f3
|
|||
|
d200079cdb
|
|||
|
af1a606c1a
|
|||
|
d054442c28
|
1
.envrc
1
.envrc
@@ -1,3 +1,4 @@
|
||||
# -*- mode: sh; -*-
|
||||
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
|
||||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
|
||||
fi
|
||||
|
||||
143
flake.lock
generated
143
flake.lock
generated
@@ -6,7 +6,8 @@
|
||||
"devenv"
|
||||
],
|
||||
"flake-compat": [
|
||||
"devenv"
|
||||
"devenv",
|
||||
"flake-compat"
|
||||
],
|
||||
"git-hooks": [
|
||||
"devenv",
|
||||
@@ -18,11 +19,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748883665,
|
||||
"narHash": "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=",
|
||||
"lastModified": 1760971495,
|
||||
"narHash": "sha256-IwnNtbNVrlZIHh7h4Wz6VP0Furxg9Hh0ycighvL5cZc=",
|
||||
"owner": "cachix",
|
||||
"repo": "cachix",
|
||||
"rev": "f707778d902af4d62d8dd92c269f8e70de09acbe",
|
||||
"rev": "c5bfd933d1033672f51a863c47303fc0e093c2d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -32,10 +33,32 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"claude-desktop": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764098187,
|
||||
"narHash": "sha256-H6JjWXhKqxZ8QLMoqndZx9e5x0Sv5AiipSmqvIxIbgo=",
|
||||
"owner": "k3d3",
|
||||
"repo": "claude-desktop-linux-flake",
|
||||
"rev": "b2b040cb68231d2118906507d9cc8fd181ca6308",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "k3d3",
|
||||
"repo": "claude-desktop-linux-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devenv": {
|
||||
"inputs": {
|
||||
"cachix": "cachix",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"git-hooks": "git-hooks",
|
||||
"nix": "nix",
|
||||
"nixpkgs": [
|
||||
@@ -43,11 +66,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755961020,
|
||||
"narHash": "sha256-Fs0CWiUA78Qgbc9zVk+zUN7pEkMPffnd//JsDtUUWBM=",
|
||||
"lastModified": 1764669403,
|
||||
"narHash": "sha256-aJCOp0CV/9KIR2LTwSbZZN3j9Avg7umYyaqDFPoOVhI=",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"rev": "abb198476023189fc45a01bd6502f5ca6ea62bd0",
|
||||
"rev": "3f2d25e7af748127da0571266054575dd8fec5ab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -59,11 +82,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"lastModified": 1761588595,
|
||||
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -76,16 +99,15 @@
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"devenv",
|
||||
"nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"lastModified": 1760948891,
|
||||
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -112,6 +134,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
@@ -125,11 +165,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750779888,
|
||||
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
|
||||
"lastModified": 1760663237,
|
||||
"narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
|
||||
"rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -167,11 +207,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755914636,
|
||||
"narHash": "sha256-VJ+Gm6YsHlPfUCpmRQxvdiZW7H3YPSrdVOewQHAhZN8=",
|
||||
"lastModified": 1764780230,
|
||||
"narHash": "sha256-/hLZoLxzr2jwMStuUofB6PZm2eE3kpw91WObm66vPUs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "8b55a6ac58b678199e5bba701aaff69e2b3281c0",
|
||||
"rev": "af324afa72de6d23162f0cdcb0716afe6e626683",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -186,7 +226,10 @@
|
||||
"devenv",
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-parts": [
|
||||
"devenv",
|
||||
"flake-parts"
|
||||
],
|
||||
"git-hooks-nix": [
|
||||
"devenv",
|
||||
"git-hooks"
|
||||
@@ -203,16 +246,16 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755029779,
|
||||
"narHash": "sha256-3+GHIYGg4U9XKUN4rg473frIVNn8YD06bjwxKS1IPrU=",
|
||||
"lastModified": 1761648602,
|
||||
"narHash": "sha256-H97KSB/luq/aGobKRuHahOvT1r7C03BgB6D5HBZsbN8=",
|
||||
"owner": "cachix",
|
||||
"repo": "nix",
|
||||
"rev": "b0972b0eee6726081d10b1199f54de6d2917f861",
|
||||
"rev": "3e5644da6830ef65f0a2f7ec22830c46285bfff6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"ref": "devenv-2.30",
|
||||
"ref": "devenv-2.30.6",
|
||||
"repo": "nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -224,11 +267,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755404379,
|
||||
"narHash": "sha256-Q6ZxZDBmD/B988Jjbx7/NchxOKIpOKBBrx9Yb0zMzpQ=",
|
||||
"lastModified": 1764475780,
|
||||
"narHash": "sha256-77jL5H5x51ksLiOUDjY0ZK8e2T4ZXLhj3ap8ETvknWI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "ebbc1c05f786ae39bb5e04e57bf2c10c44a649e3",
|
||||
"rev": "5a3ff8c1a09003f399f43d5742d893c0b1ab8af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -239,11 +282,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1755615617,
|
||||
"narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=",
|
||||
"lastModified": 1764517877,
|
||||
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20075955deac2583bb12f07151c2df830ef346b4",
|
||||
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -255,7 +298,7 @@
|
||||
},
|
||||
"pumo-system-info": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
@@ -282,11 +325,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753595452,
|
||||
"narHash": "sha256-vqkSDvh7hWhPvNjMjEDV4KbSCv2jyl2Arh73ZXe274k=",
|
||||
"lastModified": 1764663772,
|
||||
"narHash": "sha256-sHqLmm0wAt3PC4vczJeBozI1/f4rv9yp3IjkClHDXDs=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "a5431dd02dc23d9ef1680e67777fed00fe5f7cda",
|
||||
"revCount": 665,
|
||||
"rev": "26531fc46ef17e9365b03770edd3fb9206fcb460",
|
||||
"revCount": 713,
|
||||
"type": "git",
|
||||
"url": "https://git.outfoxxed.me/quickshell/quickshell"
|
||||
},
|
||||
@@ -297,6 +340,7 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"claude-desktop": "claude-desktop",
|
||||
"devenv": "devenv",
|
||||
"home-manager": "home-manager",
|
||||
"nix-index-database": "nix-index-database",
|
||||
@@ -335,11 +379,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754988908,
|
||||
"narHash": "sha256-t+voe2961vCgrzPFtZxha0/kmFSHFobzF00sT8p9h0U=",
|
||||
"lastModified": 1764483358,
|
||||
"narHash": "sha256-EyyvCzXoHrbL467YSsQBTWWg4sR96MH1sPpKoSOelB4=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "3223c7a92724b5d804e9988c6b447a0d09017d48",
|
||||
"rev": "5aca6ff67264321d47856a2ed183729271107c9c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -363,6 +407,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -370,11 +429,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754886070,
|
||||
"narHash": "sha256-MZDmxOkVKL1HY72bliN8Gxh0SYkHUa3W/1fTU2ke36I=",
|
||||
"lastModified": 1764648680,
|
||||
"narHash": "sha256-B/nmawJ75/951Xs9ludSxDVd/txFY+odmcbinySqMQo=",
|
||||
"owner": "youwen5",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "e37d2b326311320c8571111b3ef89b29d26d4b64",
|
||||
"rev": "897df2f2ad4880563ce801fa29f348a4e98f0a20",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
90
flake.nix
90
flake.nix
@@ -34,6 +34,11 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
claude-desktop = {
|
||||
url = "github:k3d3/claude-desktop-linux-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
zen-browser = {
|
||||
url = "github:youwen5/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -83,77 +88,54 @@
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
homeConfigurations = let
|
||||
extraSpecialArgs = {inherit inputs outputs system;};
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
defaultUserModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
withUserModules = modules: nixpkgs.lib.lists.flatten (defaultUserModules ++ [modules]);
|
||||
in {
|
||||
"phundrak@alys" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
modules = [
|
||||
./users/phundrak/host/alys.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
inherit extraSpecialArgs pkgs;
|
||||
modules = withUserModules ./users/phundrak/host/alys.nix;
|
||||
};
|
||||
"phundrak@marpa" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
modules = [
|
||||
./users/phundrak/host/marpa.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
inherit extraSpecialArgs pkgs;
|
||||
modules = withUserModules ./users/phundrak/host/marpa.nix;
|
||||
};
|
||||
"phundrak@gampo" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
modules = [
|
||||
./users/phundrak/host/gampo.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
inherit extraSpecialArgs pkgs;
|
||||
modules = withUserModules ./users/phundrak/host/gampo.nix;
|
||||
};
|
||||
"phundrak@tilo" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
modules = [
|
||||
./users/phundrak/host/tilo.nix
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
inherit extraSpecialArgs pkgs;
|
||||
modules = withUserModules ./users/phundrak/host/tilo.nix;
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
nixosConfigurations = let
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
defaultSystemModules = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
withSystemModules = modules: nixpkgs.lib.lists.flatten (defaultSystemModules ++ [modules]);
|
||||
in {
|
||||
alys = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/alys/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
inherit specialArgs;
|
||||
modules = withSystemModules ./hosts/alys/configuration.nix;
|
||||
};
|
||||
gampo = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/gampo/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
inherit specialArgs;
|
||||
modules = withSystemModules ./hosts/gampo/configuration.nix;
|
||||
};
|
||||
marpa = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/marpa/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
inherit specialArgs;
|
||||
modules = withSystemModules ./hosts/marpa/configuration.nix;
|
||||
};
|
||||
tilo = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/tilo/configuration.nix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
inherit specialArgs;
|
||||
modules = withSystemModules ./hosts/tilo/configuration.nix;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -34,9 +34,11 @@
|
||||
};
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
corne.allowHidAccess = true;
|
||||
ibmTrackpoint.disable = true;
|
||||
opentablet.enable = true;
|
||||
input = {
|
||||
corne.allowHidAccess = true;
|
||||
ibmTrackpoint.disable = true;
|
||||
opentablet.enable = true;
|
||||
};
|
||||
sound.enable = true;
|
||||
};
|
||||
misc.keymap = "fr-bepo";
|
||||
|
||||
@@ -9,6 +9,36 @@
|
||||
../../system
|
||||
];
|
||||
|
||||
fileSystems = {
|
||||
"/home".options = [
|
||||
"compress=zstd:3" # Good balance of compression vs speed
|
||||
"space_cache=v2" # Better performance
|
||||
"noatime" # Don't update access times (less writes)
|
||||
];
|
||||
"/mnt/ai" = {
|
||||
device = "/dev/disk/by-uuid/47e87286-caaa-4e43-b2fd-b9eceac90fe9";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd:3" # Good balance of compression vs speed
|
||||
"space_cache=v2" # Better performance
|
||||
"noatime" # Don't update access times (less writes)
|
||||
];
|
||||
};
|
||||
"/mnt/games" = {
|
||||
device = "/dev/disk/by-uuid/a8453133-76dc-44bd-a825-444c3305fd9b";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd:3" # Good balance of compression vs speed
|
||||
"space_cache=v2" # Better performance
|
||||
"noatime" # Don't update access times (less writes)
|
||||
];
|
||||
};
|
||||
"/games" = {
|
||||
device = "/dev/disk/by-uuid/77d32db8-2e85-4593-b6b8-55d4f9d14e1a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
mySystem = {
|
||||
boot = {
|
||||
extraModprobeConfig = ''
|
||||
@@ -21,21 +51,27 @@
|
||||
desktop = {
|
||||
hyprland.enable = true;
|
||||
niri.enable = true;
|
||||
waydroid.enable = true;
|
||||
xserver = {
|
||||
enable = true;
|
||||
de = "gnome";
|
||||
};
|
||||
};
|
||||
dev.docker = {
|
||||
enable = true;
|
||||
podman.enable = true;
|
||||
autoprune.enable = true;
|
||||
dev = {
|
||||
docker = {
|
||||
enable = true;
|
||||
podman.enable = true;
|
||||
autoprune.enable = true;
|
||||
};
|
||||
qemu.enable = true;
|
||||
};
|
||||
hardware = {
|
||||
amdgpu.enable = true;
|
||||
bluetooth.enable = true;
|
||||
corne.allowHidAccess = true;
|
||||
opentablet.enable = true;
|
||||
input = {
|
||||
corne.allowHidAccess = true;
|
||||
opentablet.enable = true;
|
||||
};
|
||||
sound = {
|
||||
enable = true;
|
||||
jack = true;
|
||||
@@ -72,6 +108,7 @@
|
||||
enable = true;
|
||||
autostart = true;
|
||||
};
|
||||
languagetool.enable = true;
|
||||
};
|
||||
users = {
|
||||
root.disablePassword = true;
|
||||
@@ -85,16 +122,16 @@
|
||||
mode = "0440";
|
||||
};
|
||||
|
||||
services.udev.extraHwdb = ''
|
||||
mouse:usb:047d:80a6:*
|
||||
LIBINPUT_MIDDLE_EMULATION_ENABLED=1
|
||||
'';
|
||||
|
||||
security = {
|
||||
polkit.enable = true;
|
||||
rtkit.enable = true;
|
||||
};
|
||||
|
||||
fileSystems."/games" = {
|
||||
device = "/dev/disk/by-uuid/77d32db8-2e85-4593-b6b8-55d4f9d14e1a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
extraHosts: ENC[AES256_GCM,data:YRHvHINgAQv4z+8awMzHY1uZS/K9qSaFsk8G5J2zF5P5YOt4x62eefXgmhWeKZzJI5AIi0312iMQl5qGv+lAkP+VC7j/h1rh7peBDEBU6LvcMgFU2XqxidM/CoKfMkJF8+/4bb+3r1LC/rEeXITTUQsOmoacdyCeKe5yxLaHyic/FaZIJq13wCg/QQSLfenc2Db0Pbxv5/cbRILhKT+ssElVipA40aZpgL7QmD542vObSEa6K4fZd0rawF/nOyibfpPN7Ak8DrYvfygNMw/QAGKY2XosxC86tjxhrIBHRakqmWpV+smoUO6XBFjU2sbwalafYVFdrvYL9BVAPtMZ25Sc5QMm87RCHqzqYdQHKs8C3JpVBHWnyL+0e5DNQrFrml0/FD5nFYsT6zDKVb/rN3YmxvTvKl7FpPKpv3Kke9WG+HnPs90hPy8Jpmg52vLMhaybx6dpJxzcF+ctBSI3J78hfweOCGvNGshCKpME1dujMPctH/kfYcm2j/ixKLjl0ZSbYeI9+l9oURBDwKzmKjAqhwnjuo3sL++ZsRU5Ue1zz9gsxS40R9eYevbq7JiQPX331pY2du1SRoKOxvPpXsDqe+CY5pW2RgPszjEIuDxyoveZolXg/zjlk0Ic/cOxrbflp7bTfQCQqEC7YJ5tRmtctk2lRGQkOFIg9Tn8ReifFxfhDrPFzc8X5vZgH73aqZSd/OkVybI3vEILV5uas0fPL7AHAKnBmeDV3mBNvF8aoZhD5CG8iRd1otta/3AQ660QV8IDoauq8fySC8Kee5B3kG75sqHvwF4Gu6CpSChXkjpiIqVmW0PntJueVHifuGJYkvhkX/CTHK7xm1HhtANnGrk6cr2APjWk1vpOaCmjFNqKTOV9d1HjaNWYTz4AZ+Uq2Za3UzN3oZCtZb96,iv:Z64+4oR/AfSgA7oZ/NPDLOtcmcXO5B4OQIGjOEK1Pf4=,tag:0I/1gXnBH7u6HTbQUz5Fpw==,type:str]
|
||||
extraHosts: ENC[AES256_GCM,data:i2B5DEjVm7P0V77oVzGIgU08dcpmxy8EgoJz4nPuhfpOBZI1BQpRTOOoSVRZzY6SNpLQCcNDVCwvuhtS12w7NAgIFvBhSigzwJVaWZiC78qTjXanbjSW6fvT1SQqb+YOD+4qkpuuxT5pdBKkyHZvjGM6elyA0K6JzpiCE33+Ag/4SIFTyDrdhJN2HQule54aBDVObg5s7zmPnDo9bCX0XXXCbFpdOfJMKI+89c+Gfm0dJrnDwHcks3p1ZrrSfLn3NhC+Rryc8FHMCtw936WKv+TcP124XGYxXrdEFKngB/pJLhUZlzDeC4v33xtPemOdQrK7vGjO0YZ7WBbO5oXvHw6R1pqC7iMDWjKQBbPit8IB3rngXeMOPEHxbEp1W0MEHbp3bg4GH/SAnxKkfeAFxhMNMBolO12KTntaLCurTSKXhXCIn9SSxFcoWK6kIeo6cpejcHdqGbtV8eL3znZ+MXzvEDRwiy5Sofxa31aAoItwX7kK1YHbpMT95jfr8rKc4yR7tkJWmJkmU494x/lhLkyQbXj25cNcJE7v+hLtQkJ1gdHRgYxYJFxG+VbroSS5HjkRvameuLMfk5dHxg+0bifXEV1FjhKtZqM5JQNEFOHUzvrs5u8m3NKNr13onuT5soh3GKAlh8AMX7p5Etud0BpQPdU7HT5WXRyuP7JMZL5wsjRsGWRxnQaQbnV6qg1b1JP25b6iRj0DFHZJeIEEOU20wDwDQDCoXzJS8vlMbZOC0W9/NVWgwz+UAWQz/yxzRGbconWr6zUhvwcwYBtDhYb6KD0GFxn6yfB/zfMvRHZz8AFF4w00Bx4F2L3nvF4lltnkHkdy9Qql6RsshsVFpPjrhzCrABFBrP0js1OCRw==,iv:Mx7LgF/1z/aZtyvIYafELx2tg2VZ3wTpV0zI04DLxU0=,tag:ZZImkH5/6atDOIzaXJC0Bg==,type:str]
|
||||
mopidy:
|
||||
spotify: ENC[AES256_GCM,data:SaDT0iSWhsgVOi1s+Nzbr0Mur3t2Zd9z/KIUshGWtbPfkXXIoiJeJFtoZIz5NL/t5FooYsNfU1mGYgDeVYSD4BPibW8hiCYrX6L6OX+Q6ZEWXXx/1eBEs2/q0BrWGvy7frcurq/Px4R3ax0dXJe/YKbpAtU7+bQl,iv:F2zT+uMVBMnSEZqgcRmV8/fc3G/g2fKDuHuBzkyBRN0=,tag:CD8fuOQfe6QCrj4BUh0/xw==,type:str]
|
||||
bandcamp: ENC[AES256_GCM,data:diEx2fbkOR1oUav81jU5bNt/KNmbOaVzLV+G3zBUVXE7nEQpZNqVom0rgNrEVDGzH3u/IaA5eqG5ce9lE0BomeY8Z4MWI1xujhX5KsXdv21aw4UwsNgyLPuWhkN2POUMfCJlvekc/TFfFvJHyysx8aKxeI4dsg==,iv:cxx0cVkjOPG+hMD8JctJHdcICJt7ozpfRBVSCDBo6Ro=,tag:JRjwwvieGaGZJ+k56HWFaw==,type:str]
|
||||
emailPassword: ENC[AES256_GCM,data:LALAvyuNN9bfa8D6ZK1YiFXRfxLOBi9kXA0N0Kr7h18eAI4hWQ==,iv:WtidILFfWCMKylax52JP+X57GfZyYlxJtiwrC6SADik=,tag:NvOrsL3fbmxQZp06GZhUZA==,type:str]
|
||||
ssh:
|
||||
hosts: ENC[AES256_GCM,data:j7+Ua5G8dePL5GO+Tf8+hnoJsSfKo2z4I0OcVfSyJ3dc6yyYZVho8iG9bqPAqVR5d7SJr391zCLMJp/jRDpDFLkzQB54udVKI8ob0C2w2xBznPZJsC7qZMptQ+n4IHO1ZROSi/vBadCUfEWKNO9e8gsroBYmliy/31M5IlA85Vx6q4Zx0qIFylfIhBDto3jD2DRcbjWP8NvjJcY7YLrN2sv8RR7QqX1q+0ZxpgFhg+W+a5Dz8JBVsPEdjNJqFAKAmUGKXf4bpEIS5lLUxxZweizEiWgo4nYJgA0kqVYEOiErOPgtpnBKiJlR+fLGuVwdGxVOUMvttZtyIgHc4CWgOJ0h67h4eVii+zeLn0GPJl3i2g5bjOArHKLfkKGduqii4n/1p9VvVTAOn5dj0/NtD2JNJF9kUDr1nMyMa1xA35gzv1vp/U55L6ZU/BRpBPzka6i8nGnCkDVdoUG0DKhN9ooXRpUS9L+W1iz480fzb6i/tfmlhx7Ms1T9VybYFkGLNkxnsrt5Oc24o0XD5/A1j8bJgNWo6aWSA748ZWtN0mXDzB5sH4TVtaZAGlyU9r/x5oCuWPN2qhZ8d2i7g5rceZW5ang/uyXNt8Le5cKvLw3Rhf4BTFhQ6+VJ4/SpdfnLZ17djjbwZO1DT5Nb0RUObcilcwbmUwqvmLbcrdmsfQMOcetRwFpIdoX6MjkRiC1WZ4cz8bMU7ArnK/n15dsIdaiiUfuOJAiBYut1PaJBoZDe8pXzOE6U1s57sejUf1T7NHp2epyevCAYuVG71dAFLn1oLM+FWXuBm6ogFLujoFh7XCVVqdf6j348/ekzBxDIemzS4G1+zflG3AteLWcslGVTNmx0rb3GlSHGNVNZoeHvYAHIIEyWpY4Yd01R8RhjrFXQo9comnpoQXSlFDvuUGTxuUpsariAof4wKLdpqj8Dc4ZaDvd1pAGVh7RBqR4rn4kClbWUVcSFy7QWs9T5Sw0fU/bLL76N6x9Y44P5NQLAJvZ0z8rhIPl0u8OwIhhEwkhWdFLSulk/N7+DVqrRpj7bB5hB8jZWspsl44IdiZWY3UPs7zs=,iv:3q4FYxDWPGyMqeKoSTRxSPvqZXzwg/NeHZh70d38HYM=,tag:jA8/5yi74/mOuu/b83WEeg==,type:str]
|
||||
hosts: ENC[AES256_GCM,data:nuMA50lZVxi/b2Y95Om00DIXkfHV+5epXzgFJTUk1r78y71/q/1wDa0bb9bqaMhElivDrX2mzS7IplLqLry43VkGAiE00WrdT7pLM+NSDtm7VV3kake7qorkpydxczHeVg5VP/b1FMzpQ1gFoAVg6iY9tYBnfTa5MdQI3ktQBRYWU5XmVMFNquTBG10wOKxgTUdkh6smcYmU5YlDUdeM6gTt9QPSHlglOGCe/w3tuXOWkBNcNtNiwQoaKTwIkhisu8R6h/qwtOBBt0wEpOv+KtdYQ0Y9o7/KiN2mG24+/mASfAYTAhifSnCY0vDe145gkrQzFttzZDI6l4OgjYF9rIsP+hKwUChGObW90HVVKQbJ8oDoG+l9L+IxLxs8v/v1690Xtra+PPvZCgGqhXqpoqBL/OgNdR26p/G8Oid81Nb0ob8DstYLjYlcg7ZjPiruMtRwhKoa4z++pe+poepGAPHdKkLvAvzFUKwcqRfR7RNgNgZR8hFAe7Tg5m3ApF+koGWjcoKCyALgc/hP6LTBmiJuj6OySFl1cTtkKHPsYXa49St+lOB32MXCH2ysAI6860ZcJqpAFTQ1Yd2XYu+Xrbxcm381mE02Tw20+VP2OPyEYt+ida2TKAzM3aXiMGTRpSkwzkKXsRoBskVQxv3z+6c+w87I9ZmoZHqHM7dWcRAuj2bT2ZWeExPyEmUFczMjCcFFEepnlKWOYmkUZmjDfqZ1mtR3bBK271AnVHakS5jajbhhyu6VDMLYIQmBPDFpZnyCE2qgb9FbXBbqoq+qc/9w+7gCdXNnb1tDdiJ8E4k7no6oU5jrRMGHNX3UOMDs/Y9NS0vPsnqBpr7Pf+H6bxncXWoaimijoi1OxvUFMbRvT5uUgP/JNDZDGBhlY3zRiUnDhTuHF5vP8wisqsba7zwpoqIchI3hbxm+lWXt09ZTnR2A1uR3DTlEEjGUMpD5K5CWkgTalgaHYI9jh9n66rYop9evlngZlg5Cth/Lieh/34fcIUzHAQMbxUKqoRU9zHHQJ51AZIovTtegXmgPmQ8fw6F3uBQ5gg+T1CiaCqs5nUd9ERM=,iv:DNg2EEPmylLf2CqR9eqJYzngGizTraPNImIGTJwl8kI=,tag:StZ6H+1ec/i0l94Cv+AhOA==,type:str]
|
||||
sops:
|
||||
age:
|
||||
- recipient: age1ajemtm502nn2n4q7v4j8meyd5mxtcqngkkedxq2pqzuwu78zp93qnw8q48
|
||||
@@ -61,7 +61,7 @@ sops:
|
||||
QmJKNDJUY0RSakhwNWlkOVpib0trc1kK0tQxD9I82pjfs54eruu+IjzVUmcVBCPw
|
||||
9mp1xKiYRRMXt3YQn6MPiyuuX3l3UB5MH0RJMNtRq0D961rs+iiS5A==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-08-07T09:16:46Z"
|
||||
mac: ENC[AES256_GCM,data:3PIJps2hoavPJ6ig+943FE73lBhCfxv8vuzmgTtooH386V12/PQN+Opt/ZoIbXU9w21XelZ/C5xPr8rcuw5ADx9K/KjdMm8jyLCO6/+iBf6SjnbC3E0DyiDit50UtWxKc32ryiJ8m5hYfX6O2H8WIGFa+6wp5KISV9pkc09CNZA=,iv:xzwEhhBJQOlde8Ib+tZpv+2CHfR83dFevdwERkYTsTE=,tag:SzdcZH19kSTnNs16754IMw==,type:str]
|
||||
lastmodified: "2025-11-28T12:26:45Z"
|
||||
mac: ENC[AES256_GCM,data:T4/aWHN9ILjaI1WAyO8VUQz87H0dmWjC3E6WnlNaRmTr5kDgpm6nYJHFGnrEEFUTPzAGluMTJzC3Sji6CqLKX7opOUtoDgUqiNHgz0oz7B28+RFGqxspo3IoCM4lJNrKBkZHnrKJFPUooYKc8aNm/goWWHQ/dL2uQ46Hvx9zK+o=,iv:Xq5XcYxkBCWMLFCgCYmkPgwBWMXpLFBPZY3iTTnXRcs=,tag:ZAPZAAv+qy4BM47aCgK89g==,type:str]
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.10.2
|
||||
version: 3.11.0
|
||||
|
||||
@@ -36,5 +36,9 @@ in {
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
time.timeZone = cfg.timezone;
|
||||
console.keyMap = cfg.keymap;
|
||||
services = {
|
||||
orca.enable = false;
|
||||
envfs.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
{
|
||||
imports = [./hyprland.nix ./niri.nix ./xserver.nix];
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./niri.nix
|
||||
./waydroid.nix
|
||||
./xserver.nix
|
||||
];
|
||||
}
|
||||
|
||||
15
system/desktop/waydroid.nix
Normal file
15
system/desktop/waydroid.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.desktop.waydroid;
|
||||
in {
|
||||
options.mySystem.desktop.waydroid.enable = mkEnableOption "Enables Waydroid";
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.waydroid.enable = cfg.enable;
|
||||
environment.systemPackages = [pkgs.waydroid-helper];
|
||||
};
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
imports = [./docker.nix];
|
||||
imports = [./docker.nix ./qemu.nix];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
@@ -13,9 +14,18 @@ in {
|
||||
autoprune.enable = mkEnableOption "Enable autoprune";
|
||||
};
|
||||
|
||||
config = {
|
||||
virtualisation = {
|
||||
docker = mkIf (cfg.enable && !cfg.podman.enable) {
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
dive # A tool for exploring each layer in a docker image
|
||||
grype # Vulnerability scanner for container images and filesystems
|
||||
]
|
||||
++ lists.optionals cfg.podman.enable [
|
||||
podman-compose
|
||||
podman-desktop
|
||||
];
|
||||
virtualisation = mkIf cfg.enable {
|
||||
docker = mkIf (!cfg.podman.enable) {
|
||||
enable = true;
|
||||
enableNvidia = cfg.nvidia.enable;
|
||||
autoPrune.enable = cfg.autoprune.enable;
|
||||
|
||||
33
system/dev/qemu.nix
Normal file
33
system/dev/qemu.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.dev.qemu;
|
||||
in {
|
||||
options.mySystem.dev.qemu = {
|
||||
enable = mkEnableOption "Enable QEMU";
|
||||
users = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = ["phundrak"];
|
||||
example = ["user1" "user2"];
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.virt-manager.enable = true;
|
||||
users.groups.libvirtd.members = cfg.users;
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
quickemu
|
||||
swtpm
|
||||
];
|
||||
systemd.tmpfiles.rules = ["L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware"];
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
};
|
||||
}
|
||||
@@ -9,14 +9,54 @@ with lib; let
|
||||
in {
|
||||
options.mySystem.hardware.amdgpu.enable = mkEnableOption "Enables an AMD GPU configuration";
|
||||
config = mkIf cfg.enable {
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
hardware.graphics.extraPackages = with pkgs; [rocmPackages.clr.icd];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
mesa # Mesa drivers for AMD GPUs
|
||||
rocmPackages.clr # common language runtime for ROCm
|
||||
rocmPackages.clr.icd # ROCm ICD for OpenCL
|
||||
rocmPackages.rocblas # ROCm BLAS library
|
||||
rocmPackages.hipblas #
|
||||
rocmPackages.rpp # High-performance computer vision library
|
||||
nvtopPackages.amd # GPU utilization monitoring
|
||||
];
|
||||
};
|
||||
amdgpu = {
|
||||
initrd.enable = true;
|
||||
opencl.enable = true;
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
clinfo
|
||||
amdgpu_top
|
||||
nvtopPackages.amd
|
||||
];
|
||||
systemd = {
|
||||
packages = with pkgs; [lact];
|
||||
services.lactd.wantedBy = ["multi-user.target"];
|
||||
tmpfiles.rules = let
|
||||
rocmEnv = pkgs.symlinkJoin {
|
||||
name = "rocm-combined";
|
||||
paths = with pkgs.rocmPackages; [
|
||||
clr
|
||||
clr.icd
|
||||
rocblas
|
||||
hipblas
|
||||
rpp
|
||||
];
|
||||
};
|
||||
in [
|
||||
"L+ /opt/rocm - - - - ${rocmEnv}"
|
||||
];
|
||||
};
|
||||
environment.variables = {
|
||||
ROCM_PATH = "/opt/rocm"; # Set ROCm path
|
||||
HIP_VISIBLE_DEVICES = "1"; # Use only the eGPU (ID 1)
|
||||
ROCM_VISIBLE_DEVICES = "1"; # Optional: ROCm equivalent for visibility
|
||||
# LD_LIBRARY_PATH = "/opt/rocm/lib"; # Add ROCm libraries
|
||||
HSA_OVERRIDE_GFX_VERSION = "10.3.0"; # Set GFX version override
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
imports = [
|
||||
./amdgpu.nix
|
||||
./bluetooth.nix
|
||||
./corne.nix
|
||||
./ibm-trackpoint.nix
|
||||
./opentablet.nix
|
||||
./sound.nix
|
||||
./input
|
||||
];
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.hardware.corne;
|
||||
cfg = config.mySystem.hardware.input.corne;
|
||||
in {
|
||||
options.mySystem.hardware.corne.allowHidAccess = mkEnableOption "Enable HID access to the corne keyboard";
|
||||
options.mySystem.hardware.input.corne.allowHidAccess = mkEnableOption "Enable HID access to the corne keyboard";
|
||||
config.services.udev = mkIf cfg.allowHidAccess {
|
||||
extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
8
system/hardware/input/default.nix
Normal file
8
system/hardware/input/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./corne.nix
|
||||
./ibm-trackpoint.nix
|
||||
./opentablet.nix
|
||||
./trackball.nix
|
||||
];
|
||||
}
|
||||
@@ -4,9 +4,9 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.hardware.ibmTrackpoint;
|
||||
cfg = config.mySystem.hardware.input.ibmTrackpoint;
|
||||
in {
|
||||
options.mySystem.hardware.ibmTrackpoint.disable = mkEnableOption "Disable IBM’s trackpoint on ThinkPad";
|
||||
options.mySystem.hardware.input.ibmTrackpoint.disable = mkEnableOption "Disable IBM’s trackpoint on ThinkPad";
|
||||
config.services.udev = mkIf cfg.disable {
|
||||
extraRules = ''
|
||||
ATTRS{name}=="*TPPS/2 IBM TrackPoint", ENV{ID_INPUT}="", ENV{ID_INPUT_MOUSE}="", ENV{ID_INPUT_POINTINGSTICK}=""
|
||||
@@ -4,9 +4,9 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.hardware.opentablet;
|
||||
cfg = config.mySystem.hardware.input.opentablet;
|
||||
in {
|
||||
options.mySystem.hardware.opentablet.enable = mkEnableOption "Enables OpenTablet drivers";
|
||||
options.mySystem.hardware.input.opentablet.enable = mkEnableOption "Enables OpenTablet drivers";
|
||||
config.hardware.opentabletdriver = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
daemon.enable = true;
|
||||
3
system/hardware/input/trackball.nix
Normal file
3
system/hardware/input/trackball.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
services.libinput.mouse.middleEmulation = true;
|
||||
}
|
||||
@@ -1,5 +1,16 @@
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.network.tailscale;
|
||||
in {
|
||||
options.mySystem.network.tailscale = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
config.services.tailscale.enable = cfg.enable;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,20 @@ in {
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
gamescopeSession.enable = true;
|
||||
extraCompatPackages = [pkgs.proton-ge-bin];
|
||||
package = pkgs.steam.override {
|
||||
extraEnv = {
|
||||
MANGOHUD = true;
|
||||
OBS_VKCAPTURE = true;
|
||||
RADV_TEX_ANISO = 16;
|
||||
};
|
||||
extraLibraries = p: with p; [atk];
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
qt5.qtmultimedia
|
||||
qt5.qtbase
|
||||
libpulseaudio
|
||||
];
|
||||
};
|
||||
};
|
||||
gamescope = {
|
||||
enable = true;
|
||||
|
||||
@@ -9,26 +9,26 @@ in {
|
||||
options.mySystem.services.calibre = {
|
||||
enable = mkEnableOption "Enable Calibre Web";
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "phundrak";
|
||||
};
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "users";
|
||||
};
|
||||
dataDir = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
example = "/tank/calibre/conf";
|
||||
default = "/tank/calibre/conf";
|
||||
};
|
||||
library = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
example = "/tank/calibre/library";
|
||||
default = "/tank/calibre/library";
|
||||
};
|
||||
};
|
||||
config.services.calibre-web = mkIf cfg.enable {
|
||||
inherit (cfg) enable user group dataDir;
|
||||
inherit (cfg) enable user dataDir group;
|
||||
options = {
|
||||
calibreLibrary = cfg.library;
|
||||
enableBookConversion = true;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
./endlessh.nix
|
||||
./fwupd.nix
|
||||
./jellyfin.nix
|
||||
./languagetool.nix
|
||||
./plex.nix
|
||||
./printing.nix
|
||||
./ssh.nix
|
||||
|
||||
@@ -9,16 +9,16 @@ in {
|
||||
options.mySystem.services.jellyfin = {
|
||||
enable = mkEnableOption "Enable Jellyfin";
|
||||
dataDir = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "/tank/jellyfin/data";
|
||||
example = "/tank/jellyfin/data";
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "phundrak";
|
||||
};
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "users";
|
||||
};
|
||||
};
|
||||
|
||||
20
system/services/languagetool.nix
Normal file
20
system/services/languagetool.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.mySystem.services.languagetool;
|
||||
in {
|
||||
options.mySystem.services.languagetool = {
|
||||
enable = mkEnableOption "Enables languagetool";
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8081;
|
||||
example = 80;
|
||||
};
|
||||
};
|
||||
config.services.languagetool = mkIf cfg.enable {
|
||||
inherit (cfg) enable port;
|
||||
};
|
||||
}
|
||||
@@ -9,17 +9,17 @@ in {
|
||||
options.mySystem.services.plex = {
|
||||
enable = mkEnableOption "Enable Plex";
|
||||
group = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "users";
|
||||
example = "users";
|
||||
description = "Group under which Plex runs";
|
||||
};
|
||||
dataDir = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
example = "/tank/plex-config";
|
||||
};
|
||||
user = mkOption {
|
||||
type = types.string;
|
||||
type = types.str;
|
||||
default = "phundrak";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -21,7 +21,7 @@ in {
|
||||
phundrak = mkIf cfg.phundrak.enable {
|
||||
isNormalUser = true;
|
||||
description = "Lucien Cartier-Tilet";
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "dialout" "podman"];
|
||||
extraGroups = ["networkmanager" "wheel" "docker" "dialout" "podman" "plugdev" "games" "audio" "input"];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keyFiles = lib.filesystem.listFilesRecursive ../../keys;
|
||||
};
|
||||
|
||||
@@ -19,7 +19,6 @@ in {
|
||||
extraPackages = mkIf cfg.extras (with pkgs.bat-extras; [
|
||||
batman
|
||||
batpipe
|
||||
batgrep
|
||||
]);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "askpass" ''
|
||||
${pkgs.wofi}/bin/wofi -d -P -L 1 -p "$(printf $1 | sed s/://)"''
|
||||
${pkgs.rofi}/bin/rofi -dmenu -password -no-fixed-num-lines -p $(printf \"$*\" | sed 's/://')''
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "rofi-emoji" ''
|
||||
SELECTED_EMOJI=$(grep -v "#" ~/.config/emoji | ${pkgs.wofi}/bin/wofi --dmenu -p "Select emoji" -i | awk '{print $1}' | tr -d '\n')
|
||||
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
|
||||
printf "%s" "$SELECTED_EMOJI" | ${pkgs.wl-clipboard-rs}/bin/wl-copy
|
||||
else
|
||||
printf "%s" "$SELECTED_EMOJI" | ${pkgs.xclip}/bin/xclip -sel clip
|
||||
fi
|
||||
|
||||
if [ "$XDG_SESSION_TYPE" = "wayland" ]
|
||||
then EMOJI=$(${pkgs.wl-clipboard-rs}/bin/wl-paste)
|
||||
else EMOJI=$(${pkgs.xclip}/bin/xclip -o)
|
||||
fi
|
||||
|
||||
test -z "$EMOJI" && notify-send "No emoji copied" -u low && exit
|
||||
EMOJI="$EMOJI copied to clipboard"
|
||||
${pkgs.libnotify}/bin/notify-send -u low "$EMOJI"
|
||||
''
|
||||
@@ -1,6 +1,6 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "ytplay" ''
|
||||
URL=$(${pkgs.wofi}/bin/wofi --dmenu -i -p "Video URL")
|
||||
URL=$(rofi -dmenu -i -p "Video URL")
|
||||
if [ -z "$URL" ]; then
|
||||
echo "You need to provide a URL"
|
||||
exit 1
|
||||
@@ -9,7 +9,7 @@ pkgs.writeShellScriptBin "ytplay" ''
|
||||
grep -E "webm.*[0-9]+x[0-9]" | \
|
||||
awk '{print $3 " " $1}' | \
|
||||
sort -gu | \
|
||||
${pkgs.wofi}/bin/wofi --dmenu -i -p "Resolution")
|
||||
rofi -dmenu -i -p "Resolution")
|
||||
mapfile -t RESOLUTION <<< "$RESOLUTION_CHOICE"
|
||||
RESOLUTION_CODE=''${RESOLUTION[0]}
|
||||
${pkgs.mpv}/bin/mpv --ytdl-format="''${RESOLUTION_CODE}+bestaudio/best" "$URL"
|
||||
|
||||
@@ -7,17 +7,17 @@ with lib; let
|
||||
cfg = config.home.desktop;
|
||||
in {
|
||||
imports = [
|
||||
./emoji.nix
|
||||
./eww.nix
|
||||
./hyprland.nix
|
||||
./kdeconnect.nix
|
||||
./kitty.nix
|
||||
./obs.nix
|
||||
./qt.nix
|
||||
./rofi
|
||||
./swaync.nix
|
||||
./waybar.nix
|
||||
./wlr-which-key.nix
|
||||
./wlsunset.nix
|
||||
./wofi.nix
|
||||
];
|
||||
|
||||
options.home.desktop.fullDesktop = mkEnableOption "Enable options for graphical environments";
|
||||
@@ -28,5 +28,7 @@ in {
|
||||
kitty.enable = mkDefault cfg.fullDesktop;
|
||||
obs.enable = mkDefault cfg.fullDesktop;
|
||||
qt.enable = mkDefault cfg.fullDesktop;
|
||||
rofi.enable = mkDefault cfg.fullDesktop;
|
||||
wlr-which-key.enable = mkDefault cfg.fullDesktop;
|
||||
};
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,13 @@
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.desktop.hyprland;
|
||||
rofi-emoji = import ../cli/scripts/rofi-emoji.nix {inherit pkgs;};
|
||||
laptops = ["gampo"];
|
||||
in {
|
||||
imports = [
|
||||
./swaync.nix
|
||||
./waybar.nix
|
||||
./wlsunset.nix
|
||||
./hyprpaper.nix
|
||||
];
|
||||
|
||||
options.home.desktop.hyprland = {
|
||||
@@ -20,7 +20,6 @@ in {
|
||||
emacsPkg = mkOption {
|
||||
type = types.package;
|
||||
default = config.home.dev.editors.emacs.package or pkgs.emacs;
|
||||
# default = pkgs.emacs;
|
||||
example = pkgs.emacs;
|
||||
};
|
||||
host = mkOption {
|
||||
@@ -35,14 +34,16 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.desktop = {
|
||||
hyprpaper.enable = true;
|
||||
rofi.enable = mkDefault true;
|
||||
swaync.enable = mkDefault true;
|
||||
waybar = {
|
||||
enable = mkDefault true;
|
||||
battery = mkDefault (builtins.elem cfg.host laptops);
|
||||
};
|
||||
wlsunset.enable = mkDefault true;
|
||||
wofi.enable = mkDefault true;
|
||||
};
|
||||
services.blueman-applet.enable = true;
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
@@ -50,8 +51,8 @@ in {
|
||||
importantPrefixes = ["$left" "$right" "$up" "$down" "$menu"];
|
||||
settings = {
|
||||
input = {
|
||||
kb_layout = "fr";
|
||||
kb_variant = "bepo_afnor";
|
||||
kb_layout = "fr,us";
|
||||
kb_variant = "bepo_afnor,";
|
||||
# kb_options = "caps:ctrl_modifier";
|
||||
numlock_by_default = true;
|
||||
follow_mouse = 1;
|
||||
@@ -63,6 +64,8 @@ in {
|
||||
"marpa" = [
|
||||
"DP-1, 3440x1440@144, 1080x550, 1"
|
||||
"DP-2, 2560x1080@60, 0x0, 1, transform, 1"
|
||||
# "DP-2, 1366x768@60, 0x0, 1"
|
||||
# "DP-2, 1829x1143@60, 0x0, 1"
|
||||
];
|
||||
"gampo" = [];
|
||||
}."${cfg.host}";
|
||||
@@ -79,7 +82,7 @@ in {
|
||||
new_status = "inherit";
|
||||
};
|
||||
workspace = [
|
||||
"4, layoutopt:orientation:bottom"
|
||||
"10, layoutopt:orientation:bottom"
|
||||
"1, layoutopt:orientation:bottom"
|
||||
];
|
||||
decoration = {
|
||||
@@ -104,6 +107,7 @@ in {
|
||||
"pactl load-module module-switch-on-connect"
|
||||
"${pkgs.mpc}/bin/mpc stop"
|
||||
"${pkgs.networkmanagerapplet}/bin/nm-applet"
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
];
|
||||
};
|
||||
extraConfig = ''
|
||||
@@ -111,108 +115,12 @@ in {
|
||||
$right = r
|
||||
$up = s
|
||||
$down = t
|
||||
$menu = ${pkgs.wofi}/bin/wofi --show drun
|
||||
$menu = rofi -combi-modi drun,calc -show combi
|
||||
|
||||
bind = SUPER, Return, exec, ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux
|
||||
bind = SUPER, Space, submap, leader
|
||||
bind = , Print, submap, screenshot
|
||||
bind = SUPER, Space, exec, ${pkgs.wlr-which-key}/bin/wlr-which-key
|
||||
bind = , Print, exec, ${pkgs.wlr-which-key}/bin/wlr-which-key -k s
|
||||
|
||||
submap = leader
|
||||
bind = , l, exec, plock
|
||||
bind = , l, submap, reset
|
||||
bind = , a, submap, apps
|
||||
bind = , b, submap, buffers
|
||||
bind = , w, submap, windows
|
||||
bind = , escape, submap, reset
|
||||
bind = CTRL, g, submap, reset
|
||||
|
||||
submap = apps
|
||||
bind = , b, exec, zen
|
||||
bind = , b, submap, reset
|
||||
bind = SHIFT, b, exec, qutebrowser
|
||||
bind = SHIFT, b, submap, reset
|
||||
bind = , d, exec, vesktop
|
||||
bind = , d, submap, reset
|
||||
bind = , e, exec, ${cfg.emacsPkg}/bin/emacsclient -c -n
|
||||
bind = , e, submap, reset
|
||||
bind = , g, exec, ${pkgs.gimp}/bin/gimp
|
||||
bind = , g, submap, reset
|
||||
bind = , n, exec, ${pkgs.nemo}/bin/nemo
|
||||
bind = , n, submap, reset
|
||||
bind = , r, submap, rofi
|
||||
bind = , u, exec, $menu
|
||||
bind = , u, submap, reset
|
||||
bind = , escape, submap, reset
|
||||
bind = CTRL, g, submap, reset
|
||||
submap = buffers
|
||||
bind = , d, killactive,
|
||||
bind = , d, submap, reset
|
||||
bind = , escape, submap, reset
|
||||
bind = CTRL, g, submap, reset
|
||||
submap = resize
|
||||
binde = , $left, resizeactive, -10 0
|
||||
binde = , $right, resizeactive, 10 0
|
||||
binde = , $up, resizeactive, 0 -10
|
||||
binde = , $down, resizeactive, 0 10
|
||||
bind = , q, submap, reset
|
||||
bind = , escape, submap, reset
|
||||
bind = CTRL, g, submap, reset
|
||||
submap = rofi
|
||||
bind = , e, exec, ${rofi-emoji}/bin/rofi-emoji
|
||||
bind = , e, submap, reset
|
||||
bind = , r, exec, $menu
|
||||
bind = , r, submap, reset
|
||||
bind = , y, exec, ytplay
|
||||
bind = , y, submap, reset
|
||||
bind = , escape, submap, reset
|
||||
bind = CTRL, g, submap, reset
|
||||
submap = screenshot
|
||||
bind = , Print, exec, screenshot
|
||||
bind = , Print, submap, reset
|
||||
bind = , d, exec, screenshot -d 3
|
||||
bind = , d, submap, reset
|
||||
bind = Shift, d, exec, screenshot -sced 3
|
||||
bind = Shift, d, submap, reset
|
||||
bind = , e, exec, screenshot -sec
|
||||
bind = , e, submap, reset
|
||||
bind = , s, exec, screenshot -s
|
||||
bind = , s, submap, reset
|
||||
bind = Shift, s, exec, screenshot -sc
|
||||
bind = Shift, s, submap, reset
|
||||
bind = , escape, submap, reset
|
||||
bind = CTRL, g, submap, reset
|
||||
submap = windows
|
||||
bind = , period, submap, resize
|
||||
bind = , $left, movefocus, l
|
||||
bind = , $left, submap, reset
|
||||
bind = , $right, movefocus, r
|
||||
bind = , $right, submap, reset
|
||||
bind = , $up, movefocus, u
|
||||
bind = , $up, submap, reset
|
||||
bind = , $down, movefocus, d
|
||||
bind = , $down, submap, reset
|
||||
bind = SHIFT, $left, movewindow, l
|
||||
bind = SHIFT, $left, submap, reset
|
||||
bind = SHIFT, $right, movewindow, r
|
||||
bind = SHIFT, $right, submap, reset
|
||||
bind = SHIFT, $up, movewindow, u
|
||||
bind = SHIFT, $up, submap, reset
|
||||
bind = SHIFT, $down, movewindow, d
|
||||
bind = SHIFT, $down, submap, reset
|
||||
bind = CTRL_SHIFT, $left, moveworkspacetomonitor, e+0 +1
|
||||
bind = CTRL_SHIFT, $left, submap, reset
|
||||
bind = CTRL_SHIFT, $right, moveworkspacetomonitor, e+0 -1
|
||||
bind = CTRL_SHIFT, $right, submap, reset
|
||||
bind = , d, killactive,
|
||||
bind = , d, submap, reset
|
||||
bind = , f, fullscreen,
|
||||
bind = , f, submap, reset
|
||||
bind = SHIFT, f, togglefloating,
|
||||
bind = SHIFT, f, submap, reset
|
||||
bind = , escape, submap, reset
|
||||
bind = CTRL, g, submap, reset
|
||||
|
||||
submap = reset
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPause, exec, playerctl pause
|
||||
bindl = , XF86AudioStop, exec, playerctl stop
|
||||
@@ -226,22 +134,17 @@ in {
|
||||
bindl = , XF86MonBrightnessDown, exec, xbacklight -perceived -dec 2
|
||||
bindl = , XF86KbdBrightnessUp, exec, xbacklight -perceived -inc 2
|
||||
bindl = , XF86KbdBrightnessDown, exec, xbacklight -perceived -dec 2
|
||||
bind = SUPER, a, exec, hyprctl switchxkblayout glove80-keyboard next
|
||||
bind = SUPER, $left, movefocus, l
|
||||
bind = SUPER, $right, movefocus, r
|
||||
bind = SUPER, $up, movefocus, u
|
||||
bind = SUPER, $down, movefocus, d
|
||||
bind = SUPER_SHIFT, $left, movewindow, l
|
||||
bind = SUPER_SHIFT, $left, submap, reset
|
||||
bind = SUPER_SHIFT, $right, movewindow, r
|
||||
bind = SUPER_SHIFT, $right, submap, reset
|
||||
bind = SUPER_SHIFT, $up, movewindow, u
|
||||
bind = SUPER_SHIFT, $up, submap, reset
|
||||
bind = SUPER_SHIFT, $down, movewindow, d
|
||||
bind = SUPER_SHIFT, $down, submap, reset
|
||||
bind = SUPER_CTRL_SHIFT, $left, moveworkspacetomonitor, e+0 +1
|
||||
bind = SUPER_CTRL_SHIFT, $left, submap, reset
|
||||
bind = SUPER_CTRL_SHIFT, $right, moveworkspacetomonitor, e+0 -1
|
||||
bind = SUPER_CTRL_SHIFT, $right, submap, reset
|
||||
bind = SUPER, Tab, cyclenext,
|
||||
bind = SUPER_SHIFT, Tab, cyclenext, prev
|
||||
bindm = SUPER, mouse:272, movewindow
|
||||
@@ -270,23 +173,5 @@ in {
|
||||
bind = SUPER_SHIFT, asterisk, movetoworkspace, 10
|
||||
'';
|
||||
};
|
||||
services = {
|
||||
blueman-applet.enable = true;
|
||||
wpaperd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default = {
|
||||
path = "/home/phundrak/Pictures/Wallpapers/nord";
|
||||
duration = "5m";
|
||||
sorting = "random";
|
||||
mode = "center";
|
||||
recursive = true;
|
||||
};
|
||||
DP-3 = {
|
||||
mode = "fit-border-color";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
88
users/modules/desktop/hyprpaper.nix
Normal file
88
users/modules/desktop/hyprpaper.nix
Normal file
@@ -0,0 +1,88 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.desktop.hyprpaper;
|
||||
in {
|
||||
options.home.desktop.hyprpaper = {
|
||||
enable = mkEnableOption "Enables Hyprpaper";
|
||||
default = mkOption {
|
||||
type = types.str;
|
||||
default = "/home/phundrak/Pictures/Wallpapers/nord/Nordic6.jpg";
|
||||
example = "/home/user/image.jpg";
|
||||
};
|
||||
wallpapers-dir = mkOption {
|
||||
type = types.str;
|
||||
default = "/home/phundrak/Pictures/Wallpapers/nord/";
|
||||
example = "/home/user/Pictures/";
|
||||
};
|
||||
rotation-interval = mkOption {
|
||||
type = types.str;
|
||||
default = "5m";
|
||||
example = "10m";
|
||||
description = "Interval between wallpaper rotations";
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.hyprpaper = {
|
||||
inherit (cfg) enable;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
preload = cfg.default;
|
||||
wallpaper = ", ${cfg.default}";
|
||||
};
|
||||
};
|
||||
systemd.user = {
|
||||
services.hyprpaper-rotation = {
|
||||
Unit = {
|
||||
Description = "Rotate Hyprpaper wallpaper";
|
||||
After = "graphical-session.target";
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecCondition = "${pkgs.procps}/bin/pidof Hyprland";
|
||||
ExecStart = "${config.home.homeDirectory}/.config/hypr/hyprpaper-rotate.sh";
|
||||
};
|
||||
};
|
||||
|
||||
timers.hyprpaper-rotation = {
|
||||
Unit = {
|
||||
Description = "Timer for rotating Hyprpaper wallpaper";
|
||||
};
|
||||
Timer = {
|
||||
OnBootSec = cfg.rotation-interval;
|
||||
OnUnitActiveSec = cfg.rotation-interval;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["timers.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file.".config/hypr/hyprpaper-rotate.sh" = {
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
WALLPAPER_DIR="${cfg.wallpapers-dir}"
|
||||
|
||||
# Find a random wallpaper
|
||||
WP=$(find "$WALLPAPER_DIR" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n 1)
|
||||
|
||||
if [ -z "$WP" ]; then
|
||||
echo "No wallpapers found in $WALLPAPER_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Setting wallpaper to: $WP"
|
||||
|
||||
# Load and set the wallpaper
|
||||
${pkgs.hyprland}/bin/hyprctl hyprpaper preload "$WP" && ${pkgs.hyprland}/bin/hyprctl hyprpaper wallpaper ",$WP"
|
||||
'';
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
107
users/modules/desktop/rofi/default.nix
Normal file
107
users/modules/desktop/rofi/default.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.desktop.rofi;
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
options.home.desktop.rofi = {
|
||||
enable = mkEnableOption "Enable Rofi";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [rofi-bluetooth];
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
rofi-calc
|
||||
rofi-emoji
|
||||
];
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
location = "center";
|
||||
modes = ["drun" "emoji" "calc" "combi"];
|
||||
extraConfig.show-icons = true;
|
||||
theme = {
|
||||
"*" = {
|
||||
font = "Cascadia Code 14";
|
||||
blur = true;
|
||||
padding = mkLiteral "10px";
|
||||
background-color = mkLiteral "transparent";
|
||||
border-radius = mkLiteral "0px";
|
||||
};
|
||||
window = {
|
||||
width = mkLiteral "1050px";
|
||||
height = mkLiteral "625px";
|
||||
location = mkLiteral "center";
|
||||
blur = true;
|
||||
border = mkLiteral "2px";
|
||||
border-radius = mkLiteral "3px";
|
||||
border-color = mkLiteral "#61afef";
|
||||
background-color = mkLiteral "transparent";
|
||||
padding = mkLiteral "0px";
|
||||
margin = mkLiteral "30px 50px";
|
||||
};
|
||||
mainbox = {
|
||||
orientation = mkLiteral "horizontal";
|
||||
children = map mkLiteral ["borderbox"];
|
||||
spacing = mkLiteral "0px";
|
||||
padding = mkLiteral "0px";
|
||||
};
|
||||
borderbox = {
|
||||
orientation = mkLiteral "horizontal";
|
||||
children = map mkLiteral ["imagebox" "contentbox"];
|
||||
padding = mkLiteral "0px";
|
||||
spacing = mkLiteral "0px";
|
||||
border-radius = mkLiteral "3px";
|
||||
};
|
||||
contentbox = {
|
||||
orientation = mkLiteral "vertical";
|
||||
children = map mkLiteral ["entry" "listview"];
|
||||
spacing = mkLiteral "0px";
|
||||
padding = mkLiteral "0px";
|
||||
expand = true;
|
||||
};
|
||||
imagebox = {
|
||||
background-image = mkLiteral "url(\"${./image.jpg}\")";
|
||||
background-repeat = false;
|
||||
size = mkLiteral "200px 625px";
|
||||
};
|
||||
element = {
|
||||
border-radius = mkLiteral "0px";
|
||||
};
|
||||
"element-text, element-icon" = {
|
||||
padding = mkLiteral "6px 8px";
|
||||
spacing = mkLiteral "2px";
|
||||
text-color = mkLiteral "#fab387";
|
||||
};
|
||||
"element selected" = {
|
||||
background-color = mkLiteral "#191919";
|
||||
text-color = mkLiteral "#e5c07b";
|
||||
border-radius = mkLiteral "3px";
|
||||
};
|
||||
prompt = {
|
||||
enabled = false;
|
||||
background-color = mkLiteral "transparent";
|
||||
text-color = mkLiteral "#61afef";
|
||||
padding = mkLiteral "5px 10px";
|
||||
};
|
||||
entry = {
|
||||
padding = mkLiteral "8px";
|
||||
expand = false;
|
||||
font = "Cascadia Code 14";
|
||||
text-color = mkLiteral "#fab387";
|
||||
border-radius = mkLiteral "0px 3px 0px 0px";
|
||||
background-color = mkLiteral "#292e36";
|
||||
};
|
||||
listview = {
|
||||
lines = mkLiteral "1";
|
||||
background-color = mkLiteral "rgba(46, 52, 64, 0.8)";
|
||||
border-radius = mkLiteral "0px 0px 3px 0px";
|
||||
padding = mkLiteral "5px";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
users/modules/desktop/rofi/image.jpg
Normal file
BIN
users/modules/desktop/rofi/image.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 228 KiB |
189
users/modules/desktop/wlr-which-key.nix
Normal file
189
users/modules/desktop/wlr-which-key.nix
Normal file
@@ -0,0 +1,189 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
literalExpression
|
||||
mkIf
|
||||
mkOption
|
||||
mkEnableOption
|
||||
types
|
||||
;
|
||||
cfg = config.home.desktop.wlr-which-key;
|
||||
yamlFormat = pkgs.formats.yaml {};
|
||||
|
||||
# Convert kebab-case to snake_case
|
||||
toSnakeCase = str: builtins.replaceStrings ["-"] ["_"] str;
|
||||
|
||||
# Recursively filter out null values and convert kebab-case keys to snake_case
|
||||
filterNulls = value:
|
||||
if lib.isAttrs value
|
||||
then lib.mapAttrs' (n: v: lib.nameValuePair (toSnakeCase n) (filterNulls v)) (lib.filterAttrs (n: v: v != null) value)
|
||||
else if lib.isList value
|
||||
then map filterNulls value
|
||||
else value;
|
||||
menuEntryType = types.submodule {
|
||||
freeformType = yamlFormat.type;
|
||||
options = with types; {
|
||||
key = mkOption {
|
||||
type = str;
|
||||
example = "p";
|
||||
};
|
||||
desc = mkOption {
|
||||
type = str;
|
||||
example = "Power";
|
||||
};
|
||||
cmd = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "echo example";
|
||||
};
|
||||
keep-open = mkOption {
|
||||
type = nullOr bool;
|
||||
default = null;
|
||||
example = true;
|
||||
};
|
||||
submenu = mkOption {
|
||||
type = nullOr (listOf menuEntryType);
|
||||
default = null;
|
||||
example = literalExpression ''
|
||||
[
|
||||
{ key = "s"; desc = "Suspend"; cmd = "systemctl suspend"; }
|
||||
{ key = "r"; desc = "Reboot"; cmd = "systemctl reboot"; }
|
||||
{ key = "o"; desc = "Poweroff"; cmd = "systemctl poweroff"; }
|
||||
]
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
settingsType = types.submodule {
|
||||
freeformType = yamlFormat.type;
|
||||
options = with types; {
|
||||
background = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "#282828FF";
|
||||
};
|
||||
color = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "#FBF1C7FF";
|
||||
};
|
||||
border = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "#8EC07CFF";
|
||||
};
|
||||
anchor = mkOption {
|
||||
type = nullOr (enum ["center" "top" "bottom" "left" "right" "top-left" "top-right" "bottom-left" "bottom-right"]);
|
||||
default = null;
|
||||
example = "top-left";
|
||||
};
|
||||
margin-top = mkOption {
|
||||
type = nullOr int;
|
||||
default = null;
|
||||
example = "0";
|
||||
};
|
||||
margin-right = mkOption {
|
||||
type = nullOr int;
|
||||
default = null;
|
||||
example = "0";
|
||||
};
|
||||
margin-bottom = mkOption {
|
||||
type = nullOr int;
|
||||
default = null;
|
||||
example = "0";
|
||||
};
|
||||
margin-left = mkOption {
|
||||
type = nullOr int;
|
||||
default = null;
|
||||
example = "0";
|
||||
};
|
||||
font = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "monospace 10";
|
||||
};
|
||||
separator = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = " ➜ ";
|
||||
};
|
||||
border-width = mkOption {
|
||||
type = nullOr (either float int);
|
||||
default = null;
|
||||
example = 4.0;
|
||||
};
|
||||
corder-r = mkOption {
|
||||
type = nullOr (either float int);
|
||||
default = null;
|
||||
example = 20.0;
|
||||
};
|
||||
padding = mkOption {
|
||||
type = nullOr (either float int);
|
||||
default = null;
|
||||
example = 15.0;
|
||||
};
|
||||
rows-per-column = mkOption {
|
||||
type = nullOr int;
|
||||
default = null;
|
||||
example = 5;
|
||||
};
|
||||
column-padding = mkOption {
|
||||
type = nullOr (either float int);
|
||||
default = null;
|
||||
example = 25.0;
|
||||
};
|
||||
inhibit-compositor-keyboard-shortcuts = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
auto_kbd_layout = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
namespace = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
example = "wlr_which_key";
|
||||
};
|
||||
menu = mkOption {
|
||||
type = listOf menuEntryType;
|
||||
default = [];
|
||||
example = literalExpression ''
|
||||
[
|
||||
{
|
||||
key = "p";
|
||||
desc = "Power";
|
||||
submenu = [
|
||||
{ key = "s"; desc = "Suspend"; cmd = "systemctl suspend"; }
|
||||
{ key = "r"; desc = "Reboot"; cmd = "systemctl reboot"; }
|
||||
{ key = "o"; desc = "Poweroff"; cmd = "systemctl poweroff"; }
|
||||
];
|
||||
}
|
||||
]
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.home.desktop.wlr-which-key = {
|
||||
enable = mkEnableOption "Enables wlr-which-key";
|
||||
package = lib.mkPackageOption pkgs "wlr-which-key" {};
|
||||
settings = mkOption {
|
||||
type = settingsType;
|
||||
default = {};
|
||||
description = "Configuration written to {file}`$XDG_CONFIG_HOME/wlr-which-key/config.yaml`.";
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
xdg.configFile = {
|
||||
"wlr-which-key/config.yaml".source = yamlFormat.generate "wlr-which-key-config.yml" (filterNulls cfg.settings);
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.desktop.wofi;
|
||||
in {
|
||||
options.home.desktop.wofi.enable = mkEnableOption "Enable wofi support";
|
||||
config.programs.wofi = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
settings = {
|
||||
modi = "ssh,drun,combi";
|
||||
sidebar-mode = false;
|
||||
width = 50;
|
||||
line-margin = 10;
|
||||
lines = 6;
|
||||
columns = 2;
|
||||
display-ssh = "";
|
||||
display-run = "";
|
||||
display-drun = "";
|
||||
display-window = "";
|
||||
display-combi = "";
|
||||
show-icons = true;
|
||||
};
|
||||
# from https://github.com/alxndr13/wofi-nord-theme
|
||||
style = ''
|
||||
* {
|
||||
font-family: "Hack", monospace;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: #3B4252;
|
||||
}
|
||||
|
||||
#input {
|
||||
margin: 5px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
background-color: #3B4252;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#inner-box {
|
||||
background-color: #383C4A;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 2px;
|
||||
padding: 10px;
|
||||
background-color: #383C4A;
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#text {
|
||||
padding: 4px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#entry:nth-child(even){
|
||||
background-color: #404552;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #4C566A;
|
||||
}
|
||||
|
||||
#text:selected {
|
||||
background: transparent;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
18
users/modules/dev/ai/claude.nix
Normal file
18
users/modules/dev/ai/claude.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.dev.ai.claude;
|
||||
in {
|
||||
options.home.dev.ai.claude.enable = mkEnableOption "Enables Claude-related packages";
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [inputs.claude-desktop.packages.${system}.claude-desktop-with-fhs];
|
||||
programs.claude-code = {
|
||||
inherit (cfg) enable;
|
||||
};
|
||||
};
|
||||
}
|
||||
19
users/modules/dev/ai/default.nix
Normal file
19
users/modules/dev/ai/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.dev.ai;
|
||||
in {
|
||||
imports = [
|
||||
./ollama.nix
|
||||
./claude.nix
|
||||
];
|
||||
|
||||
options.home.dev.ai.enable = mkEnableOption "Enables AI features";
|
||||
config.home.dev.ai = mkIf cfg.enable {
|
||||
ollama.enable = mkDefault cfg.enable;
|
||||
claude.enable = mkDefault cfg.enable;
|
||||
};
|
||||
}
|
||||
32
users/modules/dev/ai/ollama.nix
Normal file
32
users/modules/dev/ai/ollama.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.dev.ai.ollama;
|
||||
in {
|
||||
options.home.dev.ai.ollama = {
|
||||
enable = mkEnableOption "Enables Ollama";
|
||||
gpu = mkOption {
|
||||
type = types.nullOr (types.enum [false "rocm" "cuda"]);
|
||||
example = "rocm";
|
||||
default = null;
|
||||
description = "Which type of GPU should be used for hardware acceleration";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.ollama = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
acceleration = cfg.gpu;
|
||||
host = "0.0.0.0";
|
||||
environmentVariables = {
|
||||
OLLAMA_CONTEXT_LENGTH = "8192";
|
||||
OLLAMA_MAX_LOADED_MODELS = "1";
|
||||
OLLAMA_KEEP_ALIVE = "10m";
|
||||
};
|
||||
};
|
||||
home.sessionVariables.OLLAMA_API_BASE = "http://${config.services.ollama.host}:11434/";
|
||||
};
|
||||
}
|
||||
@@ -7,8 +7,8 @@ with lib; let
|
||||
cfg = config.home.dev;
|
||||
in {
|
||||
imports = [
|
||||
./ai
|
||||
./editors
|
||||
./ollama.nix
|
||||
./vcs
|
||||
];
|
||||
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (
|
||||
epkgs: [
|
||||
epkgs.mu4e
|
||||
epkgs.pdf-tools
|
||||
]
|
||||
emacsDefaultPackage = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
|
||||
epkgs:
|
||||
with epkgs; [
|
||||
mu4e
|
||||
pdf-tools
|
||||
]
|
||||
));
|
||||
cfg = config.home.dev.editors.emacs;
|
||||
in {
|
||||
@@ -25,7 +26,10 @@ in {
|
||||
};
|
||||
|
||||
config = {
|
||||
home.packages = [pkgs.emacs-all-the-icons-fonts];
|
||||
home.packages = with pkgs; [
|
||||
emacs-all-the-icons-fonts
|
||||
emacs-lsp-booster
|
||||
];
|
||||
programs.emacs = mkIf cfg.enable {
|
||||
enable = true;
|
||||
inherit (cfg) package;
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.home.dev.ollama;
|
||||
in {
|
||||
options.home.dev.ollama = {
|
||||
enable = mkEnableOption "Enables Ollama";
|
||||
gpu = mkOption {
|
||||
type = types.nullOr types.enum ["none" "amd" "nvidia"];
|
||||
example = "amd";
|
||||
default = "none";
|
||||
description = "Which type of GPU should be used for hardware acceleration";
|
||||
};
|
||||
};
|
||||
|
||||
config.services.ollama = mkIf cfg.enable {
|
||||
inherit (cfg) enable;
|
||||
environmentVariables = {
|
||||
OLLAMA_CONTEXT_LENGTH = "8192";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -90,9 +90,47 @@ in {
|
||||
else cfg.sendmail.user;
|
||||
in {
|
||||
enable = true;
|
||||
userEmail = cfg.email;
|
||||
userName = cfg.name;
|
||||
extraConfig = {
|
||||
ignores = [
|
||||
".env"
|
||||
".direnv/"
|
||||
|
||||
"*~"
|
||||
"\#*\#"
|
||||
"*.elc"
|
||||
"auto-save-list"
|
||||
".\#*"
|
||||
"*_flymake.*"
|
||||
"/auto/"
|
||||
".projectile"
|
||||
".dir-locals.el"
|
||||
|
||||
"# Org mode files"
|
||||
".org-id-locations"
|
||||
"*_archive"
|
||||
|
||||
"*.out"
|
||||
"*.o"
|
||||
"*.so"
|
||||
|
||||
"# Archives"
|
||||
"*.7zz"
|
||||
"*.dmg"
|
||||
"*.gz"
|
||||
"*.iso"
|
||||
"*.jar"
|
||||
"*.rar"
|
||||
"*.tar"
|
||||
"*.zip"
|
||||
|
||||
"*.log"
|
||||
"*.sqlite"
|
||||
|
||||
"dist/"
|
||||
];
|
||||
settings = {
|
||||
user = {
|
||||
inherit (cfg) name email;
|
||||
};
|
||||
color.ui = "auto";
|
||||
column.ui = "auto";
|
||||
tag.sort = "version:refname";
|
||||
@@ -180,99 +218,62 @@ in {
|
||||
insteadOf = "labs:";
|
||||
};
|
||||
};
|
||||
};
|
||||
ignores = [
|
||||
".env"
|
||||
".direnv/"
|
||||
|
||||
"*~"
|
||||
"\#*\#"
|
||||
"*.elc"
|
||||
"auto-save-list"
|
||||
".\#*"
|
||||
"*_flymake.*"
|
||||
"/auto/"
|
||||
".projectile"
|
||||
".dir-locals.el"
|
||||
|
||||
"# Org mode files"
|
||||
".org-id-locations"
|
||||
"*_archive"
|
||||
|
||||
"*.out"
|
||||
"*.o"
|
||||
"*.so"
|
||||
|
||||
"# Archives"
|
||||
"*.7zz"
|
||||
"*.dmg"
|
||||
"*.gz"
|
||||
"*.iso"
|
||||
"*.jar"
|
||||
"*.rar"
|
||||
"*.tar"
|
||||
"*.zip"
|
||||
|
||||
"*.log"
|
||||
"*.sqlite"
|
||||
|
||||
"dist/"
|
||||
];
|
||||
aliases = {
|
||||
a = "add --all";
|
||||
aca = "!git add --all && git commit --amend";
|
||||
acan = "!git add --all && git commit --amend --no-edit";
|
||||
ap = "add --patch";
|
||||
b = "branch";
|
||||
bd = "branch -d";
|
||||
bdd = "branch -D";
|
||||
c = "commit -S";
|
||||
ca = "commit -Sa";
|
||||
can = "commit -Sa --no-edit";
|
||||
cm = "commit -Sm";
|
||||
cam = "commit -Sam";
|
||||
co = "checkout";
|
||||
cob = "checkout -b";
|
||||
cod = "checkout develop";
|
||||
cl = "clone";
|
||||
cl1 = "clone --depth 1";
|
||||
f = "fetch";
|
||||
fp = "fetch --prune";
|
||||
ps = "push";
|
||||
psf = "push --force-with-lease";
|
||||
pso = "push origin";
|
||||
psfo = "push --force-with-lease origin";
|
||||
pushall = "!git remote \vert{} xargs -L1 git push";
|
||||
psl = "!git remote \vert{} xargs -L1 git push";
|
||||
pullall = "!git remote \vert{} xargs -L1 git pull";
|
||||
pll = "!git remote \vert{} xargs -L1 git pull";
|
||||
pl = "pull";
|
||||
pb = "pull --rebase";
|
||||
r = "rebase";
|
||||
ra = "rebase --abort";
|
||||
rc = "rebase --continue";
|
||||
rd = "rebase develop";
|
||||
ri = "rebase -i";
|
||||
rmf = "rm -f";
|
||||
rmd = "rm -r";
|
||||
rmdf = "rm -rf";
|
||||
sm = "submodule";
|
||||
sms = "submodule status";
|
||||
sma = "submodule add";
|
||||
smu = "submodule update";
|
||||
smui = "submodule update --init";
|
||||
smuir = "submodule update --init --recursive";
|
||||
st = "stash";
|
||||
stc = "stash clear";
|
||||
stp = "stash pop";
|
||||
stw = "stash show";
|
||||
u = "reset --";
|
||||
d = "diff -w";
|
||||
l = "log --all --oneline --graph --decorate --pretty=format':%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||
s = "status";
|
||||
staged = "diff --cached";
|
||||
upstream = "!git push -u origin HEAD";
|
||||
unstage = "reset --";
|
||||
alias = {
|
||||
a = "add --all";
|
||||
aca = "!git add --all && git commit --amend";
|
||||
acan = "!git add --all && git commit --amend --no-edit";
|
||||
ap = "add --patch";
|
||||
b = "branch";
|
||||
bd = "branch -d";
|
||||
bdd = "branch -D";
|
||||
c = "commit -S";
|
||||
ca = "commit -Sa";
|
||||
can = "commit -Sa --no-edit";
|
||||
cm = "commit -Sm";
|
||||
cam = "commit -Sam";
|
||||
co = "checkout";
|
||||
cob = "checkout -b";
|
||||
cod = "checkout develop";
|
||||
cl = "clone";
|
||||
cl1 = "clone --depth 1";
|
||||
f = "fetch";
|
||||
fp = "fetch --prune";
|
||||
ps = "push";
|
||||
psf = "push --force-with-lease";
|
||||
pso = "push origin";
|
||||
psfo = "push --force-with-lease origin";
|
||||
pushall = "!git remote \vert{} xargs -L1 git push";
|
||||
psl = "!git remote \vert{} xargs -L1 git push";
|
||||
pullall = "!git remote \vert{} xargs -L1 git pull";
|
||||
pll = "!git remote \vert{} xargs -L1 git pull";
|
||||
pl = "pull";
|
||||
pb = "pull --rebase";
|
||||
r = "rebase";
|
||||
ra = "rebase --abort";
|
||||
rc = "rebase --continue";
|
||||
rd = "rebase develop";
|
||||
ri = "rebase -i";
|
||||
rmf = "rm -f";
|
||||
rmd = "rm -r";
|
||||
rmdf = "rm -rf";
|
||||
sm = "submodule";
|
||||
sms = "submodule status";
|
||||
sma = "submodule add";
|
||||
smu = "submodule update";
|
||||
smui = "submodule update --init";
|
||||
smuir = "submodule update --init --recursive";
|
||||
st = "stash";
|
||||
stc = "stash clear";
|
||||
stp = "stash pop";
|
||||
stw = "stash show";
|
||||
u = "reset --";
|
||||
d = "diff -w";
|
||||
l = "log --all --oneline --graph --decorate --pretty=format':%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||
s = "status";
|
||||
staged = "diff --cached";
|
||||
upstream = "!git push -u origin HEAD";
|
||||
unstage = "reset --";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -29,8 +29,8 @@ in {
|
||||
sshKey = mkOption {
|
||||
type = with types; nullOr (either path str);
|
||||
example = "~/.ssh/id_ed25519.pub";
|
||||
default = "~/.ssh/id_ed25519.pub";
|
||||
description = "Path to the public SSH key or its content.";
|
||||
default = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
|
||||
description = "Path to the private SSH key for signing.";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -45,14 +45,17 @@ in {
|
||||
default-command = "st";
|
||||
pager = ":builtin";
|
||||
show-cryptographic-signatures = true;
|
||||
conflict-marker-style = "git"; # Support for vc-jj.el
|
||||
diff-formatter = ":git"; # Support for vc-jj.el
|
||||
diff-editor = ":builtin";
|
||||
inherit (cfg) editor;
|
||||
};
|
||||
signing = mkIf cfg.signing.enable {
|
||||
behavior = "own";
|
||||
backend = "ssh";
|
||||
key = cfg.signing.sshKey;
|
||||
backends."ssh.allowed-signers" = "~/.ssh/allowed_signers";
|
||||
backends."ssh.program" = "${pkgs.openssh}/bin/ssh-keygen";
|
||||
backends.ssh.allowed-signers = "${config.home.homeDirectory}/.ssh/allowed_signers";
|
||||
backends.ssh.program = "${pkgs.openssh}/bin/ssh-keygen";
|
||||
};
|
||||
aliases = {
|
||||
blame = ["file" "annotate"];
|
||||
|
||||
@@ -17,6 +17,7 @@ in {
|
||||
config = {
|
||||
programs.ssh = mkIf cfg.enable {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
includes = lists.optional (cfg.hosts != null) cfg.hosts;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -40,6 +40,16 @@ with lib; let
|
||||
dcud = "docker compose up -d";
|
||||
dcudp = "docker compose up -d --pull=always";
|
||||
dcr = "docker compose restart";
|
||||
pc = "podman compose";
|
||||
pcd = "podman compose down";
|
||||
pcl = "podman compose logs";
|
||||
pclf = "podman compose logs -f";
|
||||
pcp = "podman compose pull";
|
||||
pcu = "podman compose up";
|
||||
pcud = "podman compose up -d";
|
||||
pcudp = "podman compose up -d --pull=always";
|
||||
pcr = "podman compose restart";
|
||||
|
||||
enw = "emacsclient -nw";
|
||||
e = "emacsclient -n -c";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// "width": 1280, // Waybar width
|
||||
"spacing": 2, // Gaps between modules (4px)
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["hyprland/workspaces", "hyprland/submap", "hyprland/window"],
|
||||
"modules-left": ["hyprland/workspaces", "hyprland/language", "hyprland/submap", "hyprland/window"],
|
||||
"modules-center": [],
|
||||
"modules-right": ["idle_inhibitor", "mpd", "pulseaudio", "network", "cpu",
|
||||
"memory", "temperature", "battery", "clock", "tray"],
|
||||
@@ -35,16 +35,12 @@
|
||||
"unlocked": ""
|
||||
}
|
||||
},
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"sway/scratchpad": {
|
||||
"format": "{icon} {count}",
|
||||
"show-empty": false,
|
||||
"format-icons": ["", ""],
|
||||
"tooltip": true,
|
||||
"tooltip-format": "{app}: {title}"
|
||||
},
|
||||
{
|
||||
"hyprland/language": {
|
||||
"format": "Lang: {}",
|
||||
"format-en": "gaming",
|
||||
},
|
||||
},
|
||||
"mpd": {
|
||||
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
|
||||
"format-disconnected": "Disconnected ",
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
Sent from GNU/Emacs
|
||||
|
||||
*** Sauvez un arbre, mangez un castor ***
|
||||
*** Save a tree, eat a beaver ***
|
||||
@@@ Sauvez un arbre, mangez un castor @@@
|
||||
@@@ Save a tree, eat a beaver @@@
|
||||
'';
|
||||
in {
|
||||
home.file.".signature" = {
|
||||
|
||||
@@ -1,21 +1,49 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./light-home.nix
|
||||
./packages.nix
|
||||
./email.nix
|
||||
./wlr-which-key
|
||||
../modules
|
||||
];
|
||||
|
||||
config = let
|
||||
emacsPkg = with pkgs; ((emacsPackagesFor emacsNativeComp).emacsWithPackages (
|
||||
epkgs: [
|
||||
epkgs.mu4e
|
||||
epkgs.pdf-tools
|
||||
]
|
||||
emacsPackage = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages (
|
||||
epkgs:
|
||||
with epkgs; [
|
||||
mu4e
|
||||
pdf-tools
|
||||
tree-sitter
|
||||
tree-sitter-langs
|
||||
(treesit-grammars.with-grammars (grammar:
|
||||
with grammar; [
|
||||
tree-sitter-bash
|
||||
tree-sitter-c
|
||||
tree-sitter-cpp
|
||||
tree-sitter-css
|
||||
tree-sitter-dockerfile
|
||||
tree-sitter-http
|
||||
tree-sitter-javascript
|
||||
tree-sitter-jsdoc
|
||||
tree-sitter-json
|
||||
tree-sitter-just
|
||||
tree-sitter-markdown
|
||||
tree-sitter-markdown-inline
|
||||
tree-sitter-nix
|
||||
tree-sitter-rust
|
||||
tree-sitter-sql
|
||||
tree-sitter-toml
|
||||
tree-sitter-typescript
|
||||
tree-sitter-typst
|
||||
tree-sitter-vue
|
||||
tree-sitter-yaml
|
||||
]))
|
||||
]
|
||||
));
|
||||
askpass = import ../modules/cli/scripts/askpass.nix {inherit pkgs;};
|
||||
launchWithEmacsclient = import ../modules/cli/scripts/launch-with-emacsclient.nix {
|
||||
@@ -30,21 +58,35 @@
|
||||
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "${emacsPkg}/bin/emacsclient -c -a ${emacsPkg}/bin/emacs";
|
||||
EDITOR = "${config.home.dev.editors.emacs.package}/bin/emacsclient -c -a ${config.home.dev.editors.emacs.package}/bin/emacs";
|
||||
LAUNCH_EDITOR = "${launchWithEmacsclient}/bin/launch-with-emacsclient";
|
||||
SUDO_ASKPASS = "${askpass}/bin/askpass";
|
||||
LSP_USE_PLISTS = "true";
|
||||
OPENAI_API_URL = "http://localhost:1234/";
|
||||
};
|
||||
|
||||
desktop.waybar.style = ./config/waybar/style.css;
|
||||
dev.ollama = {
|
||||
enable = true;
|
||||
gpu = "amd";
|
||||
dev = {
|
||||
ai.claude.enable = true;
|
||||
editors.emacs.package = emacsPackage;
|
||||
vcs.jj.signing.enable = true;
|
||||
};
|
||||
fullDesktop = true;
|
||||
shell.fish.enable = true;
|
||||
file."${config.home.homeDirectory}/.ssh/allowed_signers" = {
|
||||
enable = true;
|
||||
text = lib.strings.join "\n" (
|
||||
map (file: let
|
||||
content = lib.strings.trim (builtins.readFile file);
|
||||
parts = lib.strings.splitString " " content;
|
||||
email = lib.lists.last parts;
|
||||
in "${email} namespaces=\"git\" ${content}")
|
||||
(lib.filesystem.listFilesRecursive ../../keys)
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
manual.html.enable = true;
|
||||
manual = {
|
||||
html.enable = true;
|
||||
manpages.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
imports = [../home.nix];
|
||||
home = {
|
||||
cli.nh.flake = "${config.home.homeDirectory}/.dotfiles";
|
||||
dev.ai.ollama = {
|
||||
enable = true;
|
||||
gpu = "rocm";
|
||||
};
|
||||
desktop.hyprland.host = "marpa";
|
||||
phundrak.sshKey = {
|
||||
content = builtins.readFile ../../../keys/id_marpa.pub;
|
||||
|
||||
@@ -36,11 +36,11 @@ with lib; {
|
||||
signal-desktop-bin
|
||||
|
||||
# Misc
|
||||
bitwarden
|
||||
bitwarden-desktop
|
||||
gplates
|
||||
libnotify
|
||||
nextcloud-client
|
||||
onlyoffice-bin
|
||||
onlyoffice-desktopeditors
|
||||
scrcpy
|
||||
syncthing
|
||||
watchmate
|
||||
@@ -54,7 +54,6 @@ with lib; {
|
||||
openmw
|
||||
openttd-jgrpp
|
||||
moonlight-qt
|
||||
modrinth-app
|
||||
|
||||
# Gnome stuff
|
||||
gnome-tweaks
|
||||
@@ -66,26 +65,25 @@ with lib; {
|
||||
# Graphics
|
||||
inkscape
|
||||
gimp
|
||||
gimpPlugins.fourier
|
||||
gimpPlugins.farbfeld
|
||||
gimpPlugins.gmic
|
||||
|
||||
# Dev
|
||||
dbeaver-bin
|
||||
devenv
|
||||
dive # A tool for exploring each layer in a docker image
|
||||
grype # Vulnerability scanner for container images and filesystems
|
||||
kicad # Working on my custom keyboard
|
||||
podman-desktop
|
||||
podman-compose
|
||||
nodejs
|
||||
sqlite
|
||||
tectonic # better LaTeX engine
|
||||
virt-manager
|
||||
wakatime-cli
|
||||
zeal
|
||||
|
||||
## LSP servers
|
||||
bash-language-server
|
||||
docker-language-server
|
||||
kdePackages.qtdeclarative # For QML LSP
|
||||
nil # Nix
|
||||
nixd
|
||||
marksman
|
||||
python3 # for Emacs and LSP
|
||||
vscode-json-languageserver
|
||||
yaml-language-server # Yaml (Docker, GitHub Actions, ...)
|
||||
];
|
||||
}
|
||||
|
||||
4
users/phundrak/wlr-which-key/center-window.nix
Normal file
4
users/phundrak/wlr-which-key/center-window.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "center-window" ''
|
||||
${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch centerwindow
|
||||
''
|
||||
4
users/phundrak/wlr-which-key/close-window.nix
Normal file
4
users/phundrak/wlr-which-key/close-window.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "close-window" ''
|
||||
${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch killactive
|
||||
''
|
||||
232
users/phundrak/wlr-which-key/default.nix
Normal file
232
users/phundrak/wlr-which-key/default.nix
Normal file
@@ -0,0 +1,232 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config.home.desktop.wlr-which-key.settings = {
|
||||
font = "Cascadia Code 12";
|
||||
background = "#3b4252d0";
|
||||
color = "#eceff4";
|
||||
border = "#2e3440";
|
||||
border_width = 2;
|
||||
corner_r = 10;
|
||||
rows_per_column = 5;
|
||||
column_padding = 25;
|
||||
inhibit_compositor_keyboard_shortcuts = true;
|
||||
auto_kbd_layout = true;
|
||||
menu = let
|
||||
left = "c";
|
||||
down = "t";
|
||||
up = "s";
|
||||
right = "r";
|
||||
center-window = import ./center-window.nix {inherit pkgs;};
|
||||
close-window = import ./close-window.nix {inherit pkgs;};
|
||||
float-window = import ./float-window.nix {inherit pkgs;};
|
||||
focus-urgent = import ./focus-urgent.nix {inherit pkgs;};
|
||||
fullscreen = import ./fullscreen.nix {inherit pkgs;};
|
||||
logout = import ./logout.nix {inherit pkgs;};
|
||||
ytplay = import ../../modules/cli/scripts/ytplay.nix {inherit pkgs;};
|
||||
in [
|
||||
{
|
||||
key = "a";
|
||||
desc = "Apps";
|
||||
submenu = [
|
||||
{
|
||||
key = "b";
|
||||
desc = "Browser";
|
||||
cmd = "zen";
|
||||
}
|
||||
{
|
||||
key = "B";
|
||||
desc = "Qutebrowser";
|
||||
cmd = "${pkgs.qutebrowser}/bin/qutebrowser";
|
||||
}
|
||||
{
|
||||
key = "d";
|
||||
desc = "Discord";
|
||||
cmd = "${pkgs.vesktop}/bin/vesktop";
|
||||
}
|
||||
{
|
||||
key = "e";
|
||||
desc = "Emacs";
|
||||
cmd = "${config.home.dev.editors.emacs.package}/bin/emacsclient -c -n";
|
||||
}
|
||||
{
|
||||
key = "g";
|
||||
desc = "Gimp";
|
||||
cmd = "${pkgs.gimp}/bin/gimp";
|
||||
}
|
||||
{
|
||||
key = "n";
|
||||
desc = "Nemo";
|
||||
cmd = "${pkgs.nemo-with-extensions}/bin/nemo";
|
||||
}
|
||||
{
|
||||
key = "N";
|
||||
desc = "Nextcloud";
|
||||
cmd = "${pkgs.nextcloud-client}/bin/nextcloud";
|
||||
}
|
||||
{
|
||||
key = "r";
|
||||
desc = "Rofi";
|
||||
submenu = [
|
||||
{
|
||||
key = "b";
|
||||
desc = "Bluetooth";
|
||||
cmd = "${pkgs.rofi-bluetooth}/bin/rofi-bluetooth";
|
||||
}
|
||||
{
|
||||
key = "c";
|
||||
desc = "calc";
|
||||
cmd = "rofi -show calc";
|
||||
}
|
||||
{
|
||||
key = "e";
|
||||
desc = "Emoji";
|
||||
cmd = "rofi -show emoji";
|
||||
}
|
||||
{
|
||||
key = "r";
|
||||
desc = "App Menu";
|
||||
cmd = "rofi -show drun";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "SSH";
|
||||
cmd = "rofi -show ssh";
|
||||
}
|
||||
{
|
||||
key = "y";
|
||||
desc = "YouTube";
|
||||
cmd = "${ytplay}/bin/ytplay";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
key = "b";
|
||||
desc = "Buffers";
|
||||
submenu = [
|
||||
{
|
||||
key = "c";
|
||||
desc = "Center";
|
||||
cmd = "${center-window}/bin/center-window";
|
||||
}
|
||||
{
|
||||
key = "d";
|
||||
desc = "Close";
|
||||
cmd = "${close-window}/bin/close-window";
|
||||
}
|
||||
{
|
||||
key = "f";
|
||||
desc = "Fullscreen";
|
||||
cmd = "${fullscreen}/bin/fullscreen";
|
||||
}
|
||||
{
|
||||
key = "F";
|
||||
desc = "Float";
|
||||
cmd = "${float-window}/bin/float-window";
|
||||
}
|
||||
{
|
||||
key = "u";
|
||||
desc = "Urgent";
|
||||
cmd = "${focus-urgent}/bin/focus-urgent";
|
||||
}
|
||||
{
|
||||
key = ".";
|
||||
desc = "Resize";
|
||||
submenu = [
|
||||
{
|
||||
key = left;
|
||||
desc = "Decrease Width";
|
||||
cmd = "echo decrease width";
|
||||
keep-open = true;
|
||||
}
|
||||
{
|
||||
key = down;
|
||||
desc = "Increase Height";
|
||||
cmd = "echo decrease height";
|
||||
keep-open = true;
|
||||
}
|
||||
{
|
||||
key = up;
|
||||
desc = "Decrease Height";
|
||||
cmd = "echo decrease height";
|
||||
keep-open = true;
|
||||
}
|
||||
{
|
||||
key = right;
|
||||
desc = "Increase Width";
|
||||
cmd = "echo increase width";
|
||||
keep-open = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
key = "p";
|
||||
desc = "Power";
|
||||
submenu = [
|
||||
{
|
||||
key = "l";
|
||||
desc = "Logout";
|
||||
cmd = "";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Suspend";
|
||||
cmd = "systemctl suspend";
|
||||
}
|
||||
{
|
||||
key = "r";
|
||||
desc = "Reboot";
|
||||
cmd = "systemctl reboot";
|
||||
}
|
||||
{
|
||||
key = "o";
|
||||
desc = "Poweroff";
|
||||
cmd = "systemctl poweroff";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Screenshots";
|
||||
submenu = [
|
||||
{
|
||||
key = "Print";
|
||||
desc = "Screenshot";
|
||||
cmd = "screenshot";
|
||||
}
|
||||
{
|
||||
key = "d";
|
||||
desc = "Delayed";
|
||||
cmd = "screenshot -d 3";
|
||||
}
|
||||
{
|
||||
key = "D";
|
||||
desc = "Select, Delay, Edit, and Copy";
|
||||
cmd = "screenshot -secd 3";
|
||||
}
|
||||
{
|
||||
key = "e";
|
||||
desc = "Select, Edit, and Copy";
|
||||
cmd = "screenshot -sec";
|
||||
}
|
||||
{
|
||||
key = "g";
|
||||
desc = "Select, Gimp, and Copy";
|
||||
cmd = "screenshot -sgc";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Select and Copy";
|
||||
cmd = "screenshot -sc";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
4
users/phundrak/wlr-which-key/float-window.nix
Normal file
4
users/phundrak/wlr-which-key/float-window.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "float" ''
|
||||
${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch togglefloating
|
||||
''
|
||||
4
users/phundrak/wlr-which-key/focus-urgent.nix
Normal file
4
users/phundrak/wlr-which-key/focus-urgent.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "focus-urgent" ''
|
||||
${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch focusurgentorlast
|
||||
''
|
||||
4
users/phundrak/wlr-which-key/fullscreen.nix
Normal file
4
users/phundrak/wlr-which-key/fullscreen.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "fullscreen" ''
|
||||
${pkgs.procps}/bin/pidof -x Hyprland && ${pkgs.hyprland}/bin/hyprctl dispatch fullscreen
|
||||
''
|
||||
4
users/phundrak/wlr-which-key/logout.nix
Normal file
4
users/phundrak/wlr-which-key/logout.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writeShellScriptBin "logout" ''
|
||||
${pkgs.procps}/bin/pidof -x Hyprland && uwsm stop
|
||||
''
|
||||
Reference in New Issue
Block a user