Compare commits

...

49 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
e26ac7cbe2 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles into gitea 2024-11-11 14:02:59 +01:00
Lennart J. Kurzweg (Nx2)
66221229ca gitea, crashes 2024-11-11 14:02:21 +01:00
Lennart J. Kurzweg (Nx2)
9b36c29009 i accedentally deleted my tuda eduroam 2024-11-11 10:33:33 +01:00
Lennart J. Kurzweg (Nx2)
55587f35f6 merge fixups 2024-11-09 23:57:48 +01:00
Lennart J. Kurzweg (Nx2)
966f9d67fc Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-11-09 23:56:05 +01:00
Lennart J. Kurzweg (Nx2)
2e1c0f495b better nxsent 2024-11-09 23:56:00 +01:00
Lennart J. Kurzweg (Nx2)
ab4c26c178 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-11-09 20:24:22 +01:00
Lennart J. Kurzweg (Nx2)
91a5a6def8 manual sops merge before merge 2024-11-09 20:06:45 +01:00
Lennart J. Kurzweg (Nx2)
104d1334df huge cleanup 2024-11-09 19:48:52 +01:00
Lennart J. Kurzweg (Nx2)
c19c270775 newer curl 2024-11-08 13:48:37 +01:00
Lennart J. Kurzweg (Nx2)
c5c41087b5 dm new style 2024-11-08 13:48:27 +01:00
Lennart J. Kurzweg (Nx2)
924f48b15a nx2site001 2024-11-08 13:48:02 +01:00
Lennart J. Kurzweg (Nx2)
6abff56bbd tuda-moodle-rice 2024-11-08 13:42:49 +01:00
Lennart J. Kurzweg (Nx2)
5f9c6dd0a3 yazi more rice 2024-11-07 16:34:01 +01:00
Lennart J. Kurzweg (Nx2)
c426029a25 adb 2024-11-07 16:33:56 +01:00
Lennart J. Kurzweg (Nx2)
1790336aa5 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-11-06 13:53:22 +01:00
Lennart J. Kurzweg (Nx2)
06a630319d prettier code 2024-11-06 13:53:19 +01:00
Lennart J. Kurzweg (Nx2)
1814068cfe better zathura rice 2024-11-06 13:52:53 +01:00
Lennart J. Kurzweg (Nx2)
096f31d81a all nixd paths 2024-11-06 13:52:43 +01:00
Lennart J. Kurzweg (Nx2)
148bd4c481 accent is the always visible border 2024-11-06 13:42:44 +01:00
Lennart J. Kurzweg (Nx2)
f9d4921726 userChrome mynixos.com 2024-11-06 13:42:04 +01:00
Lennart J. Kurzweg (Nx2)
169d6eda11 ~/shared ownwership fix 2024-10-30 00:55:44 +01:00
Lennart J. Kurzweg (Nx2)
97f33c7b8d diffrent rice 2024-10-30 00:55:16 +01:00
Lennart J. Kurzweg (Nx2)
340c514a99 more fuse (still sucks) 2024-10-28 16:10:02 +01:00
Lennart J. Kurzweg (Nx2)
b3d3c983c2 nixd spelling 2024-10-28 13:43:22 +01:00
Lennart J. Kurzweg (Nx2)
3a30fc2131 Merge branch 'master' of ssh://ssh.nx2.site:20022/nx2/dotfiles 2024-10-25 02:12:55 +02:00
Lennart J. Kurzweg (Nx2)
abd5b60ffa nixd 2024-10-25 02:12:52 +02:00
Lennart J. Kurzweg (Nx2)
e3e52fb656 themed Zathura 2024-10-24 13:02:22 +02:00
Lennart J. Kurzweg (Nx2)
115a6d3c83 fcitx not working wip 2024-10-23 12:58:02 +02:00
Lennart J. Kurzweg (Nx2)
14df46a631 flake bump 2024-10-23 00:16:39 +02:00
Lennart J. Kurzweg (Nx2)
0c92fcd686 lzg theeme 2024-10-23 00:16:28 +02:00
Lennart J. Kurzweg (Nx2)
085d593ce1 new ssh 2024-10-22 23:00:30 +02:00
Lennart J. Kurzweg (Nx2)
fb082f76ed new sync version vesktop 2024-10-22 23:00:18 +02:00
Lennart J. Kurzweg (Nx2)
89ed2c0748 gs 2024-10-22 22:59:43 +02:00
Lennart J. Kurzweg (Nx2)
a32d8ad3ce better curk 2024-10-22 22:59:31 +02:00
Lennart J. Kurzweg (Nx2)
d93ae4a78b tuda eduroam 2024-10-17 17:18:07 +02:00
Lennart J. Kurzweg (Nx2)
8f3b04c191 spotify grey screen fix 2024-10-17 17:17:51 +02:00
Lennart J. Kurzweg (Nx2)
8b96d1205b flake bump 2024-10-17 14:39:25 +02:00
Lennart J. Kurzweg (Nx2)
dbeb5524a0 note for ff transparency 2024-10-17 14:39:12 +02:00
Lennart J. Kurzweg (Nx2)
2b873c8b81 no networking.wireless with nm 2024-10-12 19:50:25 +02:00
Lennart J. Kurzweg (Nx2)
2fcdf32944 no open ports from docker module 2024-10-09 23:38:03 +02:00
Lennart J. Kurzweg (Nx2)
24bb3136cf reflex and better latex in hx 2024-10-09 23:36:33 +02:00
Lennart J. Kurzweg (Nx2)
f32d77f7ff rice change 2024-10-09 23:35:49 +02:00
Lennart J. Kurzweg (Nx2)
c6f7d73f89 tuda eduroam (untested) 2024-10-09 23:35:20 +02:00
Lennart J. Kurzweg (Nx2)
1e3112b590 tuda email 2024-10-09 23:35:03 +02:00
Lennart J. Kurzweg (Nx2)
7639bed3fe tts 2024-10-09 23:32:39 +02:00
Lennart J. Kurzweg (Nx2)
d46530edd8 flake bump 2024-09-27 22:45:14 +02:00
Lennart J. Kurzweg (Nx2)
5ed4edc375 more rice 2024-09-27 21:42:51 +02:00
Lennart J. Kurzweg (Nx2)
f422551ac3 yazi only with hotkey 2024-09-27 21:42:29 +02:00
57 changed files with 2323 additions and 2725 deletions

View File

@@ -1,7 +1,8 @@
{ pkgs, inputs, ... }: { pkgs, inputs, lib, host, ... }:
{ {
imports = [ imports = ([
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
./system-modules/adb.nix
./system-modules/auto-mount.nix ./system-modules/auto-mount.nix
./system-modules/hardware-configuration.nix ./system-modules/hardware-configuration.nix
./system-modules/fuse.nix ./system-modules/fuse.nix
@@ -25,8 +26,8 @@
./system-modules/kanata.nix ./system-modules/kanata.nix
./system-modules/kodi.nix ./system-modules/kodi.nix
./system-modules/networking.nix ./system-modules/networking.nix
./system-modules/nixd.nix
./system-modules/nvidia.nix ./system-modules/nvidia.nix
./system-modules/nx2site.nix
./system-modules/ollama.nix ./system-modules/ollama.nix
./system-modules/qmk.nix ./system-modules/qmk.nix
./system-modules/sops.nix ./system-modules/sops.nix
@@ -36,7 +37,13 @@
./system-modules/users.nix ./system-modules/users.nix
./system-modules/virtualisation.nix ./system-modules/virtualisation.nix
./system-modules/ydotool.nix ./system-modules/ydotool.nix
]; ]) ++ (if (host == "NxACE") then [
./system-modules/nx2site.nix
./system-modules/postgres.nix
./system-modules/nx2site/proxy.nix
# ./system-modules/nx2site/gitea.nix
# ./system-modules/nx2site/vaultwarden.nix
] else []);
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@@ -80,7 +87,7 @@
git-crypt git-crypt
lazygit # home-manager module is bugged lazygit # home-manager module is bugged
wget wget
curl curlHTTP3
zip zip
unzip unzip
p7zip p7zip

View File

@@ -2,10 +2,10 @@ pkgs: rec {
lib = import ../nxlib/ricelib.nix pkgs.lib; lib = import ../nxlib/ricelib.nix pkgs.lib;
transparency = 0.7; transparency = 0.8;
rounding = 10; rounding = 3;
gap-size = 10; gap-size = 5;
border-width = 3; border-width = 2;
color = color =
let let
dark = (-0.5); dark = (-0.5);

338
flake.lock generated
View File

@@ -4,14 +4,15 @@
"inputs": { "inputs": {
"hyprland": [ "hyprland": [
"hyprland" "hyprland"
] ],
"systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1726437584, "lastModified": 1728710667,
"narHash": "sha256-lMIFDORuyMYHtUPrRWU5WjGcS+ZMrR4/wBSO+sgUVSY=", "narHash": "sha256-9HR9EePhzweUAUPUccByNYxKQzfFAnxfu2BXTLqOLZQ=",
"owner": "KZDKM", "owner": "KZDKM",
"repo": "Hyprspace", "repo": "Hyprspace",
"rev": "8f14fa2e10d24742d713f04c278bc7651037b74b", "rev": "e8406a7708bceb3b5bedf56b67490dbe3d27e6f8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -40,11 +41,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726665257, "lastModified": 1728902391,
"narHash": "sha256-rEzEZtd3iyVo5RJ1OGujOlnywNf3gsrOnjAn1NLciD4=", "narHash": "sha256-44bnoY0nAvbBQ/lVjmn511yL39Sv7SknV0BDxn34P3Q=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "752d0fbd141fabb5a1e7f865199b80e6e76f8d8e", "rev": "9874e08eec85b5542ca22494e127b0cdce46b786",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -87,6 +88,22 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1673956053,
@@ -107,11 +124,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1726153070, "lastModified": 1727826117,
"narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -143,7 +160,7 @@
}, },
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@@ -159,7 +176,47 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
@@ -218,11 +275,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1722623071, "lastModified": 1728669738,
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=", "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c", "rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -235,19 +292,21 @@
"inputs": { "inputs": {
"aquamarine": "aquamarine", "aquamarine": "aquamarine",
"hyprcursor": "hyprcursor", "hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprutils": "hyprutils", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"systems": "systems", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_2",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1727173505, "lastModified": 1729629261,
"narHash": "sha256-DaiWKEntVBrgy1OZEGW3izIfzyIr1jav/Jpo9tqL4EU=", "narHash": "sha256-IJtor2qFpsZkCm4UMnCHOSosW9GXKZVOm7DILtJJgoM=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "00c862686354d139a53222d41a1c80d698a50c43", "rev": "29997ef4ba8ef0a80390e80199998d1390177454",
"revCount": 5253, "revCount": 5366,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -275,11 +334,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1723143591, "lastModified": 1729596320,
"narHash": "sha256-dPcWAeRJoG5CyWC32X3XX+Og0v/k1/S1N0T5dQWT32k=", "narHash": "sha256-sBPr6O2Ad916f+L7biAjmJVx4TLDITC4joKgeOT47V8=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-plugins", "repo": "hyprland-plugins",
"rev": "b73d7b901d8cb1172dd25c7b7159f0242c625a77", "rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -292,21 +351,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"xdph",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hyprland",
"xdph",
"systems" "systems"
] ]
}, },
"locked": { "locked": {
"lastModified": 1721326555, "lastModified": 1728345020,
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", "rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -331,11 +388,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1725997860, "lastModified": 1728168612,
"narHash": "sha256-d/rZ/fHR5l1n7PeyLw0StWMNLXVU9c4HFyfskw568so=", "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "dfeb5811dd6485490cce18d6cc1e38a055eea876", "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -376,11 +433,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726874949, "lastModified": 1728941256,
"narHash": "sha256-PNnIpwGqpTvMU3N2r0wMQwK1E+t4Bb5fbJwblQvr+80=", "narHash": "sha256-WRypmcZ2Bw94lLmcmxYokVOHPJSZ7T06V49QZ4tkZeQ=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "d97af4f6bd068c03a518b597675e598f57ea2291", "rev": "fd4be8b9ca932f7384e454bcd923c5451ef2aa85",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -401,11 +458,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726840673, "lastModified": 1726874836,
"narHash": "sha256-HIPEXyRRVZoqD6U+lFS1B0tsIU7p83FaB9m7KT/x6mQ=", "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "b68dab23fc922eae99306988133ee80a40b39ca5", "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -417,7 +474,7 @@
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat", "flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_3",
@@ -441,11 +498,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726755586, "lastModified": 1728888510,
"narHash": "sha256-PmUr/2GQGvFTIJ6/Tvsins7Q43KTMvMFhvG6oaYK+Wk=", "narHash": "sha256-nsNdSldaAyu6PE3YUA+YQLqUDJh+gRbBooMMekZJwvI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c04d5652cfa9742b1d519688f65d1bbccea9eb7e", "rev": "a3c0b3b21515f74fd2665903d4ce6bc4dc81c77c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -457,11 +514,11 @@
}, },
"nixpkgs-latest": { "nixpkgs-latest": {
"locked": { "locked": {
"lastModified": 1727179133, "lastModified": 1729631290,
"narHash": "sha256-o7KxNVG37WOhrWTFfZcKwfQPjmNcEDt300iZidY5sxU=", "narHash": "sha256-zVL79jvDihxcnq9FKkAoILYWxGmxCw1DGdBnpv/B+3s=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3db77abec1bc4f1d840aa53ca22e50d18e54010e", "rev": "1f9d2cf67508efd9b5e81cdf7af556bbbfe02377",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -473,17 +530,33 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1725233747, "lastModified": 1727825735,
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": {
"lastModified": 1720386169,
"narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "194846768975b7ad2c4988bdb82572c00222c0d7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1678872516, "lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
@@ -499,13 +572,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_3": {
"locked": { "locked": {
"lastModified": 1725762081, "lastModified": 1729357638,
"narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=", "narHash": "sha256-66RHecx+zohbZwJVEPF7uuwHeqf8rykZTMCTqIrOew4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05", "rev": "bb8c2cf7ea0dd2e18a52746b2c3a5b0c73b93c22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -517,11 +590,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1726937504, "lastModified": 1729413321,
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9357f4f23713673f310988025d9dc261c20e70c6", "rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -563,11 +636,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1726969270, "lastModified": 1729449015,
"narHash": "sha256-8fnFlXBgM/uSvBlLWjZ0Z0sOdRBesyNdH0+esxqizGc=", "narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "23cbb250f3bf4f516a2d0bf03c51a30900848075", "rev": "89172919243df199fe237ba0f776c3e3e3d72367",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -578,11 +651,27 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1725634671, "lastModified": 1729265718,
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -592,6 +681,30 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1728778939,
"narHash": "sha256-WybK5E3hpGxtCYtBwpRj1E9JoiVxe+8kX83snTNaFHE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "ff68f91754be6f3427e4986d7949e6273659be1d",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@@ -602,12 +715,12 @@
"lanzaboote", "lanzaboote",
"flake-utils" "flake-utils"
], ],
"gitignore": "gitignore", "gitignore": "gitignore_2",
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1681413034, "lastModified": 1681413034,
@@ -635,6 +748,7 @@
"nixpkgs-latest": "nixpkgs-latest", "nixpkgs-latest": "nixpkgs-latest",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"yazi": "yazi",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
}, },
@@ -663,19 +777,40 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"yazi",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729391507,
"narHash": "sha256-as0I9xieJUHf7kiK2a9znDsVZQTFWhM1pLivII43Gi0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "784981a9feeba406de38c1c9a3decf966d853cca",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_3"
}, },
"locked": { "locked": {
"lastModified": 1726524647, "lastModified": 1729587807,
"narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=", "narHash": "sha256-YOc4033a/j1TbdLfkaSOSX2SrvlmuM+enIFoveNTCz4=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "e2d404a7ea599a013189aa42947f66cede0645c8", "rev": "26642e8f193f547e72d38cd4c0c4e45b49236d27",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -700,6 +835,36 @@
} }
}, },
"systems_2": { "systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@@ -716,7 +881,10 @@
}, },
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [ "hyprlang": [
"hyprland", "hyprland",
"hyprlang" "hyprlang"
@@ -739,11 +907,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1727109343, "lastModified": 1728166987,
"narHash": "sha256-1PFckA8Im7wMSl26okwOKqBZeCFLD3LvZZFaxswDhbY=", "narHash": "sha256-w6dVTguAn9zJ+7aPOhBQgDz8bn6YZ7b56cY8Kg5HJRI=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "4adb6c4c41ee5014bfe608123bfeddb26e5f5cea", "rev": "fb9c8d665af0588bb087f97d0f673ddf0d501787",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -752,16 +920,36 @@
"type": "github" "type": "github"
} }
}, },
"zen-browser": { "yazi": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5" "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1726001766, "lastModified": 1729473414,
"narHash": "sha256-ADvEWfo0AuHR06ah1nnzOyhsG05/b5QpUc7vFNbiEfM=", "narHash": "sha256-ffiEVFCUMnShcSa4hvCbT1EQeu7c2lVOk6OdaxjiUmU=",
"owner": "sxyazi",
"repo": "yazi",
"rev": "0e118b5b3a5baacf7fe62971e2bfe2b0ad972bab",
"type": "github"
},
"original": {
"owner": "sxyazi",
"repo": "yazi",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1727721329,
"narHash": "sha256-QYlWZwUSwrM7BuO+dXclZIwoPvBIuJr6GpFKv9XKFPI=",
"owner": "MarceColl", "owner": "MarceColl",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "06505a088396e2c0b9ad100302502783a6bcdb40", "rev": "e6ab73f405e9a2896cce5956c549a9cc359e5fcc",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -15,12 +15,14 @@
hyprswitch = { url = "github:h3rmt/hyprswitch/release"; }; hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };
# firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; }; # firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; };
yazi.url = "github:sxyazi/yazi";
zen-browser.url = "github:MarceColl/zen-browser-flake"; zen-browser.url = "github:MarceColl/zen-browser-flake";
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
user = "nx2"; user = "nx2";
domain = "nx2.site";
config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; }; config = { allowUnfree = true; allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) (import ./flake-modules/allowed.nix).unfree; };
@@ -41,7 +43,7 @@
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false; prime = if (host == "NxXPS") then true else false;
}; };
in { inherit inputs user host pkgs-unstable pkgs-latest secrets rice nvidia; }; in { inherit inputs user host domain pkgs-unstable pkgs-latest secrets rice nvidia; };
}; };
in { in {
NxXPS = make-nixos-system "NxXPS"; NxXPS = make-nixos-system "NxXPS";
@@ -58,13 +60,12 @@
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false; enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false; prime = if (host == "NxXPS") then true else false;
}; };
in { inherit inputs system user host pkgs-unstable pkgs-latest rice secrets nvidia; }; in { inherit inputs system user host domain pkgs-unstable pkgs-latest rice secrets nvidia; };
}; };
in { in {
"${user}@NxXPS" = make-home-configuration "NxXPS" user; "${user}@NxXPS" = make-home-configuration "NxXPS" user;
"${user}@NxNORTH" = make-home-configuration "NxNORTH" user; "${user}@NxNORTH" = make-home-configuration "NxNORTH" user;
"${user}@NxACE" = make-home-configuration "NxACE" user; "${user}@NxACE" = make-home-configuration "NxACE" user;
"tv@NxACE" = make-home-configuration "NxACE" "tv";
}; };
}; };
} }

Binary file not shown.

View File

@@ -1,9 +1,5 @@
{ pkgs, lib, user, ... }: { ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [
bash
];
programs.bash = { programs.bash = {
enable = true; enable = true;
shellAliases = { shellAliases = {
@@ -19,11 +15,5 @@ lib.mkIf (user != "tv")
"checkjobs" "checkjobs"
]; ];
enableCompletion = false; enableCompletion = false;
# initExtra = ''
# if [[ $- == *i* ]] # if interactive
# then
# eval "$(${pkgs.starship}/bin/starship init bash)"
# fi
# '';
}; };
} }

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,4 @@
{ lib, user, ... }: { lib, user, ... }:
lib.mkIf (user != "tv")
{ {
programs = { programs = {
direnv = { direnv = {

View File

@@ -6,7 +6,9 @@ lib.mkIf (host != "NxACE")
vesktop vesktop
]; ];
file.".config/vesktop/settings/settings.json".text = /* json */ ''{ file.".config/vesktop/settings/settings.json".text = let
settingsSyncVersion = "1729179678715";
in /* json */ ''{
"notifyAboutUpdates": true, "notifyAboutUpdates": true,
"autoUpdate": false, "autoUpdate": false,
"autoUpdateNotification": true, "autoUpdateNotification": true,
@@ -188,7 +190,7 @@ lib.mkIf (host != "NxACE")
"authenticated": false, "authenticated": false,
"url": "https://api.vencord.dev/", "url": "https://api.vencord.dev/",
"settingsSync": false, "settingsSync": false,
"settingsSyncVersion": 1725386648445 "settingsSyncVersion": ${settingsSyncVersion}
} }
} }
''; '';

View File

@@ -143,6 +143,38 @@ lib.mkIf (host != "NxACE")
}; };
}; };
}; };
tuda = with secrets.email.tuda; {
address = "${un}@stud.tu-darmstadt.de";
userName = tuid;
realName = "Lennart J. Kurzweg";
imap = {
port = 993;
host = "imap.stud.tu-darmstadt.de";
};
smtp = {
port = 465;
host = "smtp.tu-darmstadt.de";
tls.enable = true;
};
signature = {
text = ''
Field: MSc. AI/ML
MNr: ${mnr}
TU-ID: ${tuid}
About Me: https://nx2.site/about-me
Contact: https://nx2.site/contact
GPG: https://nx2.site/gpg
'';
showSignature = "append";
};
thunderbird = {
enable = true;
profiles = [ "nx2" ];
settings = id: {
"mail.server.server_${id}.fcc_folder" = "imap://${un}%40hs-mittweida.de@xc.hs-mittweida.de/Sent";
};
};
};
}; };
} }

View File

@@ -1,7 +1,10 @@
# { pkgs-unstable, secrets, user, system, inputs, ...}: # { pkgs-unstable, secrets, user, system, inputs, ...}:
{ rice, user, ... }: { rice, user, ... }:
# browser.tabs.allow_transparent_browser
{ {
home.file = with rice.color; { home.file = with rice.color; let
blur = builtins.toString 20;
in {
".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ '' ".mozilla/firefox/${user}/chrome/userChrome.css".text = /* css */ ''
:root{ :root{
/* Popup panels */ /* Popup panels */
@@ -104,190 +107,102 @@
scrollbar-color: rgb(161, 161, 161) transparent !important; scrollbar-color: rgb(161, 161, 161) transparent !important;
} }
} }
/* new-tab */ /* new-tab */
@-moz-document url-prefix(about:home), url-prefix(about:newtab) { @-moz-document url-prefix(about:home), url-prefix(about:newtab) {
body, html { body, html {
/* background-color: rgba(${rice.lib.hex-to-rgb-comma-string background}, ${builtins.toString rice.transparency}) !important; */ background: transparent !important;
background: transparent !important; }
}
@-moz-document domain(youtube.com) {
#background, #chips-wrapper, ytd-mini-guide-entry-renderer {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
border: ${builtins.toString rice.border-width} solid ${border};
}
body, html, ytd-app, ytd-mini-guide-renderer, div#content-container, #guide-content.ytd-app, #guide-wrapper, div#contentContainer {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, .bg-neutral-background, .threadline, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar, comment-body-header, shreddit-comment-tree{
background-color: transparent !important;
}
}
@-moz-document domain(reddit.com) {
header {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(20px);
}
body, html, reddit-sidebar-nav, shreddit-post, aside, .reddit-search-bar{
background-color: transparent !important;
}
}
@-moz-document domain(google.com) {
.sfbg {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency}) !important;
backdrop-filter: blur(${blur}px);
}
body, html, div#search > * {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
.g, .appbar {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
div#rso {
* {
background-color: transparent !important;
border: ${builtins.toString rice.border-width} solid ${border};
}
}
div#cnt > div {
}
}
@-moz-document domain(github.com) {
body, html, header, #repository-container-header, .bgColor-muted, section {
background-color: transparent !important;
}
}
@-moz-document domain(mynixos.com) {
body, html {
background-color: transparent !important;
}
header, footer {
background-color: rgba(0,0,0,0.5) !important;
border-radius: ${builtins.toString rice.rounding}px;
}
}
@-moz-document domain(moodle.informatik.tu-darmstadt.de) {
body, html , .main-inner, .main-inner * {
background-color: transparent !important;
}
.bg-primary {
background-color: rgba(${rice.lib.hex-to-rgb-comma-string accent.base}, 0.5) !important!
}
}
@-moz-document domain(nx2.site) {
html {
background: radial-gradient(rgba(255, 255, 255, 0.8) 5%, transparent 5%) !important;
background-repeat: repeat !important;
background-size: 2vmin 2vmin !important;
} }
} }
''; '';
}; };
} }
# {
# programs.firefox = {
# enable = true;
# package = pkgs-unstable.firefox;
# # package = pkgs.firefox;
# profiles.${user} = {
# # extensions = with inputs.firefox-addons; [
# # ublock-origin
# # darkreader
# # bitwarden
# # flagfox
# # sponsorblock
# # languagetool
# # istilldontcareaboutcookies
# # return-youtube-dislikes
# # ];
# extensions = with inputs.firefox-addons.packages."${system}"; [
# darkreader
# ublock-origin
# darkreader
# bitwarden
# sponsorblock
# # languagetool
# istilldontcareaboutcookies
# return-youtube-dislikes
# vimium-c
# ];
# bookmarks = [
# {
# name = "Github Code Search";
# keyword = "cs";
# url = "https://github.com/search?type=code&auto_enroll=true";
# }
# ];
# settings = {
# "accessibility.typeaheadfind.flashBar" = 0;
# "app.normandy.first_run" = false;
# "app.normandy.migrationsApplied" = 12;
# "app.normandy.user_id" = "25f4d747-3c5e-40e8-b520-caed34976e7a";
# "browser.aboutConfig.showWarning" = false;
# "browser.bookmarks.addedImportButton" = true;
# "browser.bookmarks.editDialog.confirmationHintShowCount" = 1;
# "browser.bookmarks.restore_default_bookmarks" = false;
# "browser.bookmarks.showMobileBookmarks" = true;
# "browser.contentblocking.category" = "standard";
# "browser.contextual-services.contextId" = "{7fc76500-3ce1-4c39-8fa5-8e9964c04ecc}";
# "browser.download.lastDir" = "/home/nx2/Documents";
# "browser.download.panel.shown" = true;
# "browser.download.viewableInternally.typeWasRegistered.avif" = true;
# "browser.download.viewableInternally.typeWasRegistered.webp" = true;
# "browser.eme.ui.firstContentShown" = true;
# "browser.engagement.ctrlTab.has-used" = true;
# "browser.engagement.downloads-button.has-used" = true;
# "browser.engagement.fxa-toolbar-menu-button.has-used" = true;
# "browser.laterrun.bookkeeping.sessionCount" = 1;
# "browser.migration.version" = 144;
# "browser.newtabpage.activity-stream.impressionId" = "{a6561b3f-3884-4b37-b9c1-c67e80f5792a}";
# "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
# "browser.newtabpage.activity-stream.topSitesRows" = 2;
# "browser.newtabpage.pinned" = "[{\"url\":\"https://www.youtube.com/\",\"label\":\"youtube\",\"baseDomain\":\"youtube.com\"},{\"url\":\"https://www.twitch.tv/\",\"baseDomain\":\"twitch.tv\"},{\"url\":\"https://nx2.site/\",\"label\":\"nx2\",\"baseDomain\":\"nx2.site\"},{\"url\":\"https://feddit.de\",\"label\":\"Lemmy\",\"baseDomain\":\"feddit.de\"},{\"url\":\"https://ieji.de\",\"label\":\"Mastadon\",\"baseDomain\":\"ieji.de\"},{\"url\":\"https://www.hs-mittweida.de/\",\"label\":\"HSMW\",\"baseDomain\":\"hs-mittweida.de\"},{\"url\":\"http://wiki.hyprland.org/\",\"label\":\"hyprland\",\"baseDomain\":\"wiki.hyprland.org\"},{\"url\":\"https://wiki.archlinux.org\",\"label\":\"ArchWiki\",\"baseDomain\":\"wiki.archlinux.org\"},{\"url\":\"https://chat.openai.com/\",\"label\":\"ChatGPT\",\"baseDomain\":\"chat.openai.com\"},{\"url\":\"https://www.nerdfonts.com/cheat-sheet\",\"label\":\"Nerdfonts\",\"baseDomain\":\"nerdfonts.com\"},{\"url\":\"http://127.0.0.1:8384/\",\"label\":\"Syncthing\",\"baseDomain\":\"127.0.0.1\"},{\"url\":\"https://lutris.net/\",\"label\":\"Lutris\",\"baseDomain\":\"lutris.net\"},{\"url\":\"https://www.namecheap.com/\",\"label\":\"Namecheap\",\"baseDomain\":\"namecheap.com\"},{\"url\":\"https://hub.docker.com/\",\"label\":\"Docker Hub\",\"baseDomain\":\"hub.docker.com\"},{\"url\":\"https://www.netflix.com/\",\"label\":\"Netflix\",\"baseDomain\":\"netflix.com\"},{\"url\":\"https://www.amazon.de/Amazon-Video/b/?&node=3010075031&ref=dvm_MLP_ROWEU_DE_1\",\"label\":\"Prime Video\"},{\"url\":\"https://translate.google.com/\",\"label\":\"Google Translate\",\"baseDomain\":\"translate.google.com\"}]";
# "browser.newtabpage.storageVersion" = 1;
# "browser.pageActions.persistedActions" = "{\"ids\":[\"bookmark\",\"_802a552e-13d1-4683-a40a-1e5325fba4bb_\"],\"idsInUrlbar\":[\"_802a552e-13d1-4683-a40a-1e5325fba4bb_\",\"bookmark\"],\"idsInUrlbarPreProton\":[],\"version\":1}";
# "browser.pagethumbnails.storage_version" = 3;
# "browser.pdfjs.feature-tour" = "{\"screen\":\"\",\"complete\":true}";
# "browser.policies.applied" = true;
# "browser.proton.toolbar.version" = 3;
# "browser.rights.3.shown" = true;
# "browser.search.region" = "DE";
# "browser.startup.couldRestoreSession.count" = 2;
# "browser.startup.homepage_override.mstone" = "126.0";
# "browser.theme.toolbar-theme" = 0;
# "browser.translations.neverTranslateLanguages" = "de";
# "browser.translations.panelShown" = true;
# "browser.uiCustomization.state" = "{\"placements\":{\"widget-overflow-fixed-list\":[],\"unified-extensions-area\":[\"sponsorblocker_ajay_app-browser-action\",\"_d8b32864-153d-47fb-93ea-c273c4d1ef17_-browser-action\",\"_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action\",\"linkhints_lydell_github_io-browser-action\",\"languagetool-webextension_languagetool_org-browser-action\",\"jid1-kkzogwgsw3ao4q_jetpack-browser-action\",\"_de22fd49-c9ab-4359-b722-b3febdc3a0b0_-browser-action\",\"amptra_keepa_com-browser-action\",\"pywalfox_frewacom_org-browser-action\"],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"customizableui-special-spring1\",\"urlbar-container\",\"customizableui-special-spring2\",\"save-to-pocket-button\",\"downloads-button\",\"fxa-toolbar-menu-button\",\"unified-extensions-button\",\"ublock0_raymondhill_net-browser-action\",\"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action\",\"addon_darkreader_org-browser-action\",\"_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action\"],\"toolbar-menubar\":[\"menubar-items\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"PersonalToolbar\":[\"import-button\",\"personal-bookmarks\"]},\"seen\":[\"save-to-pocket-button\",\"developer-button\",\"_d8b32864-153d-47fb-93ea-c273c4d1ef17_-browser-action\",\"ublock0_raymondhill_net-browser-action\",\"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action\",\"addon_darkreader_org-browser-action\",\"_762f9885-5a13-4abd-9c77-433dcd38b8fd_-browser-action\",\"linkhints_lydell_github_io-browser-action\",\"sponsorblocker_ajay_app-browser-action\",\"languagetool-webextension_languagetool_org-browser-action\",\"jid1-kkzogwgsw3ao4q_jetpack-browser-action\",\"_de22fd49-c9ab-4359-b722-b3febdc3a0b0_-browser-action\",\"amptra_keepa_com-browser-action\",\"_d7742d87-e61d-4b78-b8a1-b469842139fa_-browser-action\",\"pywalfox_frewacom_org-browser-action\"],\"dirtyAreaCache\":[\"nav-bar\",\"PersonalToolbar\",\"toolbar-menubar\",\"TabsToolbar\",\"unified-extensions-area\"],\"currentVersion\":20,\"newElementCount\":2}";
# "browser.urlbar.placeholderName" = "Google";
# "browser.urlbar.placeholderName.private" = "Google";
# "browser.urlbar.quicksuggest.migrationVersion" = 2;
# "browser.urlbar.quicksuggest.scenario" = "history";
# "browser.urlbar.tipShownCount.searchTip_onboard" = 4;
# "browser.urlbar.tipShownCount.searchTip_redirect" = 1;
# "datareporting.policy.dataSubmissionPolicyAcceptedVersion" = 2;
# "devtools.debugger.prefs-schema-version" = 11;
# "devtools.everOpened" = true;
# "devtools.inspector.activeSidebar" = "animationinspector";
# "devtools.inspector.selectedSidebar" = "animationinspector";
# "devtools.netmonitor.columnsData" = "[{\"name\":\"status\",\"minWidth\":30,\"width\":5.56},{\"name\":\"method\",\"minWidth\":30,\"width\":5.56},{\"name\":\"domain\",\"minWidth\":30,\"width\":11.11},{\"name\":\"file\",\"minWidth\":30,\"width\":27.78},{\"name\":\"url\",\"minWidth\":30,\"width\":25},{\"name\":\"initiator\",\"minWidth\":30,\"width\":11.11},{\"name\":\"type\",\"minWidth\":30,\"width\":5.56},{\"name\":\"transferred\",\"minWidth\":30,\"width\":11.11},{\"name\":\"contentSize\",\"minWidth\":30,\"width\":5.56},{\"name\":\"waterfall\",\"minWidth\":150,\"width\":16.67}]";
# "devtools.netmonitor.msg.visibleColumns" = "[\"data\",\"time\"]";
# "devtools.toolbox.host" = "window";
# "devtools.toolbox.sidebar.width" = 1406;
# "devtools.toolsidebar-height.inspector" = 350;
# "devtools.toolsidebar-width.inspector" = 816;
# "devtools.toolsidebar-width.inspector.splitsidebar" = 513;
# "distribution.iniFile.exists.appversion" = "126.0";
# "distribution.iniFile.exists.value" = true;
# "distribution.nixos.bookmarksProcessed" = true;
# "doh-rollout.doneFirstRun" = true;
# "doh-rollout.home-region" = "DE";
# "dom.forms.autocomplete.formautofill" = true;
# "dom.push.userAgentID" = "d5b33ca6eafc45e5b8ce2161eb075680";
# "extensions.activeThemeID" = "{9b84b6b4-07c4-4b4b-ba21-394d86f6e9ee}";
# "extensions.blocklist.pingCountVersion" = -1;
# "extensions.databaseSchema" = 36;
# "extensions.getAddons.databaseSchema" = 6;
# "extensions.lastAppBuildId" = "20240509170740";
# "extensions.lastAppVersion" = "126.0";
# "extensions.lastPlatformVersion" = "126.0";
# "extensions.pendingOperations" = false;
# "extensions.pictureinpicture.enable_picture_in_picture_overrides" = true;
# "extensions.quarantinedDomains.list" = "autoatendimento.bb.com.br,ibpf.sicredi.com.br,ibpj.sicredi.com.br,internetbanking.caixa.gov.br,www.ib12.bradesco.com.br,www2.bancobrasil.com.br";
# "extensions.systemAddonSet" = "{\"schema\":1,\"addons\":{}}";
# "extensions.ui.dictionary.hidden" = true;
# "extensions.ui.extension.hidden" = false;
# "extensions.ui.lastCategory" = "addons://list/extension";
# "extensions.ui.locale.hidden" = true;
# "extensions.ui.sitepermission.hidden" = true;
# "extensions.webcompat.enable_shims" = true;
# "extensions.webcompat.perform_injections" = true;
# "extensions.webcompat.perform_ua_overrides" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.addon@darkreader.org" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.amptra@keepa.com" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.jid1-D7momAzRw417Ag@jetpack" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.jid1-KKzOGWgsW3Ao4Q@jetpack" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.languagetool-webextension@languagetool.org" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.linkhints@lydell.github.io" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.screenshots@mozilla.org" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.sponsorBlocker@ajay.app" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.uBlock0@raymondhill.net" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.{446900e4-71c2-419f-a6a7-df9c091e268b}" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.{762f9885-5a13-4abd-9c77-433dcd38b8fd}" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.{802a552e-13d1-4683-a40a-1e5325fba4bb}" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.{d8b32864-153d-47fb-93ea-c273c4d1ef17}" = true;
# "extensions.webextensions.ExtensionStorageIDB.migrated.{de22fd49-c9ab-4359-b722-b3febdc3a0b0}" = true;
# "extensions.webextensions.uuids" = "{\"formautofill@mozilla.org\":\"62543e0a-fb48-4cb5-bb50-7bc1d34123eb\",\"pictureinpicture@mozilla.org\":\"72b053a7-04e4-443d-9eb0-788fee741317\",\"screenshots@mozilla.org\":\"b0da1868-7ce5-4126-836c-cb27f7c90fd1\",\"webcompat-reporter@mozilla.org\":\"53128b30-09e3-498f-b327-8297bca2a694\",\"webcompat@mozilla.org\":\"e3fce76c-5b97-4ed2-a127-5f54ea2b55a6\",\"default-theme@mozilla.org\":\"edf40636-48ae-479c-bb15-d2c1c594f4f3\",\"addons-search-detection@mozilla.com\":\"65723b37-68b8-4463-964e-000a9efc4bee\",\"google@search.mozilla.org\":\"e8fd2d91-fda9-450d-9410-c475b13cd126\",\"wikipedia@search.mozilla.org\":\"2cb739cf-5028-4ba1-8df8-a6b4035d3e3f\",\"bing@search.mozilla.org\":\"2836d1bb-c71f-451a-a7c9-5ed0304a71fb\",\"ddg@search.mozilla.org\":\"8280c1b4-90bb-4ca8-b1e3-9c64c1cb4740\",\"{d8b32864-153d-47fb-93ea-c273c4d1ef17}\":\"6cd42543-07ad-499d-ac1f-f755b26bc2c5\",\"uBlock0@raymondhill.net\":\"d57779a5-82b8-40d3-8a7b-05b25c9e86ac\",\"{802a552e-13d1-4683-a40a-1e5325fba4bb}\":\"ac3677b0-913d-4025-a37c-5cad38597584\",\"{446900e4-71c2-419f-a6a7-df9c091e268b}\":\"6978384a-6166-415d-ab6e-a6adfbe6731d\",\"addon@darkreader.org\":\"b691cdc2-fb80-4767-9baf-bc63d916deb6\",\"{762f9885-5a13-4abd-9c77-433dcd38b8fd}\":\"6830a911-9fbf-4c6a-b07b-0293a16f919d\",\"linkhints@lydell.github.io\":\"040ed779-4e1a-4be8-bb2f-1202d6406573\",\"jid1-q4sG8pYhq8KGHs@jetpack\":\"1c3283fc-303b-4984-aa6a-3d599b7dc543\",\"sponsorBlocker@ajay.app\":\"22d4703c-dabe-4d7c-95c7-3d1527e19ef6\",\"jid1-D7momAzRw417Ag@jetpack\":\"fd28819b-1fe8-401b-8d1b-ba42808f4983\",\"{ceb74424-e8e6-4023-b972-a12e50e17fcb}\":\"ef19aad8-0b64-49d3-84f0-af90c440df49\",\"languagetool-webextension@languagetool.org\":\"b3622472-5123-41be-8b48-f2040b0d2424\",\"jid1-KKzOGWgsW3Ao4Q@jetpack\":\"283cf64b-0d7a-4fd6-8579-876ba162e3eb\",\"{de22fd49-c9ab-4359-b722-b3febdc3a0b0}\":\"4c6ae857-dccb-4a09-a2eb-8351afef4cb9\",\"amptra@keepa.com\":\"85562121-cb4f-4138-a608-d61bd0c2852a\",\"{bc5ae657-5db8-4f8a-b558-e7343e127fee}\":\"d5468646-933b-4941-9ab2-007faf58f8c1\",\"{9b84b6b4-07c4-4b4b-ba21-394d86f6e9ee}\":\"6e250173-0b11-41a3-b3f9-f1527394f0c6\"}";
# "gecko.handlerService.defaultHandlersVersion" = 1;
# "identity.fxaccounts.account.device.name" = "nx2s Firefox on NxXPS";
# "identity.fxaccounts.account.telemetry.sanitized_uid" = "13f64fe3ab835d96147cefb0f5c11287";
# "identity.fxaccounts.lastSignedInUserHash" = "u2qaIKiezOjW/0+5BuKsVe+1+U7k3SSH4qAuEPoL7Tc=";
# "identity.fxaccounts.toolbar.accessed" = true;
# "media.eme.enabled" = true;
# "media.gmp-gmpopenh264.abi" = "x86_64-gcc3";
# "media.gmp-gmpopenh264.hashValue" = "53a58bfb4c8124ad4f7655b99bfdea290033a085e0796b19245b33b91c0948fdac9f0c3e817130b352493a65d9a7a0fc8a7c1eedc618cdaa2b4580734a11cd9c";
# "media.gmp-gmpopenh264.version" = "2.3.2";
# "media.gmp-manager.buildID" = "20240509170740";
# "media.gmp-widevinecdm.abi" = "x86_64-gcc3";
# "media.gmp-widevinecdm.hashValue" = "661ad969099a89a278384f56a17ae912c3542d585ea4981f3b9a3c6e1a07f8da6ffad9db29cee194bf7834adc3ca258c775cd2b0980e3e6cb7ee8b39600dad58";
# "media.gmp-widevinecdm.version" = "4.10.2710.0";
# "media.gmp.storage.version.observed" = 1;
# "media.videocontrols.picture-in-picture.video-toggle.has-used" = true;
# "network.dns.disablePrefetch" = true;
# "network.http.speculative-parallel-limit" = 0;
# "network.predictor.enabled" = false;
# "network.prefetch-next" = false;
# "network.proxy.type" = 4;
# "nimbus.syncdefaultsstore.upgradeDialog" = "{\"slug\":\"upgrade-spotlight-rollout\",\"branch\":{\"slug\":\"treatment\",\"ratio\":1,\"feature\":{\"value\":null,\"enabled\":true,\"featureId\":\"upgradeDialog\"},\"features\":null},\"active\":true,\"experimentType\":\"rollout\",\"source\":\"rs-loader\",\"userFacingName\":\"Upgrade Spotlight Rollout\",\"userFacingDescription\":\"Experimenting on onboarding content when you upgrade Firefox.\",\"lastSeen\":\"2024-04-09T08:41:11.293Z\",\"featureIds\":[\"upgradeDialog\"],\"prefs\":[],\"isRollout\":true}";
# "nimbus.syncdefaultsstore.upgradeDialog.enabled" = false;
# "pdfjs.enabledCache.state" = true;
# "pdfjs.migrationVersion" = 2;
# "pref.privacy.disable_button.view_passwords" = false;
# "privacy.purge_trackers.date_in_cookie_database" = "0";
# "privacy.sanitize.pending" = "[{\"id\":\"newtab-container\",\"itemsToClear\":[],\"options\":{}}]";
# "security.sandbox.content.tempDirSuffix" = "83e3690e-e3e1-4bf5-b085-737b3a2792c9";
# "services.settings.clock_skew_seconds" = 0;
# "services.sync.username" = secrets.email.gmail-online.mail;
# "signon.autofillForms" = false;
# "signon.rememberSignons" = false;
# "storage.vacuum.last.index" = 2;
# "toolkit.telemetry.cachedClientID" = "d2c7964b-01ee-49bf-94a9-329bd47d7606";
# "toolkit.telemetry.pioneer-new-studies-available" = true;
# "toolkit.telemetry.previousBuildID" = "20240509170740";
# "toolkit.telemetry.reportingpolicy.firstRun" = false;
# };
# };
# };
# }

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, rice, user, ... }: { pkgs, lib, rice, user, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
fish fish
@@ -81,7 +80,7 @@ lib.mkIf (user != "tv")
lzd = "lazydocker"; lzd = "lazydocker";
d = "docker"; d = "docker";
dcmp = "docker compose"; dcmp = "docker compose";
nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}''; # nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}'';
# ya = "yazi"; # function # ya = "yazi"; # function
# nxfiglet = "figlet"; # nxfiglet = "figlet";
@@ -91,12 +90,15 @@ lib.mkIf (user != "tv")
if not set -q IN_NIX_SHELL if not set -q IN_NIX_SHELL
nxfetch nxfetch
# yazi # yazi
set tmp (mktemp -t "yazi-cwd.XXXXX") if set -q SESSION_FROM_DE
yazi $argv --cwd-file="$tmp" set -e SESSION_FROM_DE
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd" cd -- "$cwd"
end
rm -f -- "$tmp"
end end
rm -f -- "$tmp"
end end
''; '';
functions = { functions = {

View File

@@ -1,270 +0,0 @@
{ config, pkgs, rice, lib, user, ... }:
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
foot
];
programs.foot = {
enable = true;
# background = rice.color.background;
# foreground = rice.color.foreground;
# cursor = rice.color.foreground;
# color0 = rice.color.black.base;
# color8 = rice.color.black.bright;
# color1 = rice.color.red.base;
# color9 = rice.color.red.bright;
# color2 = rice.color.green.base;
# color10 = rice.color.green.bright;
# color3 = rice.color.yellow.base;
# color11 = rice.color.yellow.bright;
# color4 = rice.color.blue.base;
# color12 = rice.color.blue.bright;
# color5 = rice.color.magenta.base;
# color13 = rice.color.magenta.bright;
# color6 = rice.color.cyan.base;
# color14 = rice.color.cyan.bright;
# color7 = rice.color.white.base;
# color15 = rice.color.white.bright;
# background_opacity = builtins.toString rice.transparency;
# window_padding_width = 5;
# remember_window_size = false;
# settings = {
# main = {
# shell = ''$SHELL (if set, otherwise user's default shell from /etc/passwd)'';
# term = ''foot (or xterm-256color if built with -Dterminfo=disabled)'';
# login-shell = ''no'';
# # app-id = ''foot'';
# title = ''foot'';
# locked-title = ''no'';
# font = ''${rice.font.code.name}:size=8'';
# font-size-adjustment = ''0.5'';
# line-height = "<font metrics>";
# letter-spacing = ''0'';
# horizontal-letter-offset = ''0'';
# vertical-letter-offset = ''0'';
# underline-offset = "<font metrics>";
# underline-thickness = "<font underline thickness>";
# # box-drawings-uses-font-glyphs = "no";
# # dpi-aware = ''no'';
# # initial-window-size-pixels = ''700x500'';
# # initial-window-size-chars = "<COLSxROWS>";
# # initial-window-mode = ''windowed'';
# pad = ''5x5'';
# resize-by-cells = ''yes'';
# resize-keep-grid = ''yes'';
# resize-delay-ms = ''100'';
# # bold-text-in-bright = false;
# word-delimiters = '',│`|:"'()[]{}<>'';
# selection-target = ''primary'';
# workers = "<number of logical CPUs>";
# utmp-helper = ''/usr/lib/utempter/utempter'';
# # environment = {
# # name = ''value'';
# # };
# };
# bell = {
# urgent = ''no'';
# notify = ''no'';
# visual = ''no'';
# command = '''';
# command-focused = ''no'';
# };
# desktop-notifications = {
# command = ''notify-send --wait --app-name ''${app-id} --icon ''${app-id} --category ''${category} --urgency ''${urgency} --expire-time ''${expire-time} --hint STRING:image-path:''${icon} --hint BOOLEAN:suppress-sound:''${muted} --hint STRING:sound-name:''${sound-name} --replace-id ''${replace-id} ''${action-argument} --print-id -- ''${title} ''${body}'';
# command-action-argument = ''--action ''${action-name}=''${action-label}'';
# close = ''""'';
# inhibit-when-focused = ''yes'';
# };
# scrollback = {
# lines = ''1000'';
# multiplier = ''3.0'';
# indicator-position = ''relative'';
# indicator-format = ''""'';
# };
# url = {
# launch = ''xdg-open ''${url}'';
# label-letters = ''sadfjklewcmpgh'';
# osc8-underline = ''url-mode'';
# protocols = ''http, https, ftp, ftps, file, gemini, gopher'';
# uri-characters = ''abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
# };
# cursor = {
# style = ''block'';
# color = "<inverse foreground/background>";
# blink = ''no'';
# blink-rate = ''500'';
# beam-thickness = ''1.5'';
# underline-thickness = "<font underline thickness>";
# };
# mouse = {
# hide-when-typing = ''no'';
# alternate-scroll-mode = ''yes'';
# };
# touch = {
# long-press-delay = ''400'';
# };
# colors = {
# alpha = ''1.0'';
# background = ''242424'';
# foreground = ''ffffff'';
# flash = ''7f7f00'';
# flash-alpha = ''0.5'';
# # Normal/regular colors (color palette 0-7)
# regular0 = ''242424'';
# regular1 = ''f62b5a'';
# regular2 = ''47b413'';
# regular3 = ''e3c401'';
# regular4 = ''24acd4'';
# regular5 = ''f2affd'';
# regular6 = ''13c299'';
# regular7 = ''e6e6e6'';
# # Bright colors (color palette 8-15)
# bright0 = ''616161'';
# bright1 = ''ff4d51'';
# bright2 = ''35d450'';
# bright3 = ''e9e836'';
# bright4 = ''5dc5f8'';
# bright5 = ''feabf2'';
# bright6 = ''24dfc4'';
# bright7 = ''ffffff'';
# # dimmed colors (see foot.ini(5) man page)
# # dim0 = "<not set>";
# # ...
# # dim7 = "<not-set>";
# # The remaining 256-color palette
# # 16 = <256-color palette #16>
# # ...
# # 255 = <256-color palette #255>
# # Misc colors
# selection-foreground = "<inverse foreground/background>";
# selection-background = "<inverse foreground/background>";
# jump-labels = "<regular0> <regular3>";
# scrollback-indicator = "<regular0> <bright4>";
# search-box-no-match = "<regular0> <regular1>";
# search-box-match = "<regular0> <regular3>";
# urls = "<regular3>";
# };
# csd = {
# preferred = ''server'';
# size = ''26'';
# font = "<primary font>";
# color = "<foreground color>";
# hide-when-maximized = ''no'';
# double-click-to-maximize = ''yes'';
# border-width = ''0'';
# border-color = "<csd.color>";
# button-width = ''26'';
# button-color = "<background color>";
# button-minimize-color = "<regular4>";
# button-maximize-color = "<regular2>";
# button-close-color = "<regular1>";
# };
# key-bindings = {
# scrollback-up-page = ''Shift+Page_Up'';
# scrollback-up-half-page = ''none'';
# scrollback-up-line = ''none'';
# scrollback-down-page = ''Shift+Page_Down'';
# scrollback-down-half-page = ''none'';
# scrollback-down-line = ''none'';
# scrollback-home = ''none'';
# scrollback-end = ''none'';
# clipboard-copy = ''Control+Shift+c XF86Copy'';
# clipboard-paste = ''Control+Shift+v XF86Paste'';
# primary-paste = ''Shift+Insert'';
# search-start = ''Control+Shift+r'';
# font-increase = ''Control+plus Control+equal Control+KP_Add'';
# font-decrease = ''Control+minus Control+KP_Subtract'';
# font-reset = ''Control+0 Control+KP_0'';
# spawn-terminal = ''Control+Shift+n'';
# minimize = ''none'';
# maximize = ''none'';
# fullscreen = ''none'';
# pipe-visible = ''[sh -c "xurls | fuzzel | xargs -r firefox"] none'';
# pipe-scrollback = ''[sh -c "xurls | fuzzel | xargs -r firefox"] none'';
# pipe-selected = ''[xargs -r firefox] none'';
# pipe-command-output = ''[wl-copy] none'';
# show-urls-launch = ''Control+Shift+o'';
# show-urls-copy = ''none'';
# show-urls-persistent = ''none'';
# prompt-prev = ''Control+Shift+z'';
# prompt-next = ''Control+Shift+x'';
# unicode-input = ''Control+Shift+u'';
# noop = ''none'';
# };
# search-bindings = {
# cancel = ''Control+g Control+c Escape'';
# commit = ''Return'';
# find-prev = ''Control+r'';
# find-next = ''Control+s'';
# cursor-left = ''Left Control+b'';
# cursor-left-word = ''Control+Left Mod1+b'';
# cursor-right = ''Right Control+f'';
# cursor-right-word = ''Control+Right Mod1+f'';
# cursor-home = ''Home Control+a'';
# cursor-end = ''End Control+e'';
# delete-prev = ''BackSpace'';
# delete-prev-word = ''Mod1+BackSpace Control+BackSpace'';
# delete-next = ''Delete'';
# delete-next-word = ''Mod1+d Control+Delete'';
# extend-char = ''Shift+Right'';
# extend-to-word-boundary = ''Control+w Control+Shift+Right'';
# extend-to-next-whitespace = ''Control+Shift+w'';
# extend-line-down = ''Shift+Down'';
# extend-backward-char = ''Shift+Left'';
# extend-backward-to-word-boundary = ''Control+Shift+Left'';
# extend-backward-to-next-whitespace = ''none'';
# extend-line-up = ''Shift+Up'';
# clipboard-paste = ''Control+v Control+Shift+v Control+y XF86Paste'';
# primary-paste = ''Shift+Insert'';
# unicode-input = ''none'';
# quit = ''none'';
# scrollback-up-page = ''Shift+Page_Up'';
# scrollback-up-half-page = ''none'';
# scrollback-up-line = ''none'';
# scrollback-down-page = ''Shift+Page_Down'';
# scrollback-down-half-page = ''none'';
# scrollback-down-line = ''none'';
# scrollback-home = ''none'';
# scrollback-end = ''none'';
# };
# url-bindings = {
# cancel = ''Control+g Control+c Control+d Escape'';
# toggle-url-visible = ''t'';
# };
# text-bindings = {
# "\x03" = ''Mod4+c'';
# };
# mouse-bindings = {
# scrollback-up-mouse = ''BTN_WHEEL_BACK'';
# scrollback-down-mouse = ''BTN_WHEEL_FORWARD'';
# font-increase = ''Control+BTN_WHEEL_BACK'';
# font-decrease = ''Control+BTN_WHEEL_FORWARD'';
# selection-override-modifiers = ''Shift'';
# primary-paste = ''BTN_MIDDLE'';
# select-begin = ''BTN_LEFT'';
# select-begin-block = ''Control+BTN_LEFT'';
# select-extend = ''BTN_RIGHT'';
# select-extend-character-wise = ''Control+BTN_RIGHT'';
# select-word = ''BTN_LEFT-2'';
# select-word-whitespace = ''Control+BTN_LEFT-2'';
# select-quote = ''BTN_LEFT-3'';
# select-row = ''BTN_LEFT-4'';
# # vim: ft = ''dosini'';
# };
# };
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, user, rice, ... }: { pkgs, rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
git git
@@ -11,9 +10,7 @@ lib.mkIf (user != "tv")
# List of directories to check # List of directories to check
directories=( directories=(
"$HOME/nix-dots" "$HOME/nix-dots"
"$HOME/shared/nx-obsidian-vault" "$HOME/obsidian-vault"
"$HOME/shared/HSMW/Praxis/BCAM/bolt-llmserver"
"$HOME/shared/HSMW/Praxis/BCAM/bcam-tools"
"$HOME/Pictures/wallpapers" "$HOME/Pictures/wallpapers"
) )
echo "" echo ""
@@ -56,13 +53,19 @@ lib.mkIf (user != "tv")
windowSize = "normal"; windowSize = "normal";
gui.theme = with rice.color; { gui.theme = with rice.color; {
lightTheme = false; lightTheme = false;
activeBorderColor = [ border "bold"]; activeBorderColor = [ foreground "bold" ];
inactiveBorderColor = [ black.bright ]; inactiveBorderColor = [ border ];
optionsTextColor = [ blue.base ]; optionsTextColor = [ tertiary.base ];
selectedLineBgColor = [ foreground ]; selectedLineBgColor = [ secondary.base ];
selectedRangeByColor = [ magenta.bright ]; selectedRangeByColor = [ weird.bright ];
showRandomTip = true; showRandomTip = true;
animateExplosion = true; animateExplosion = true;
cherryPickedCommitFgColor = [ accent.base ]; # Foreground color of copied commit
cherryPickedCommitBgColor = [ secondary.dark ]; # Background color of copied commit
markedBaseCommitFgColor = [ accent.base ]; # Foreground color of marked base commit (for rebase)
markedBaseCommitBgColor = [ secondary.dark ]; # Background color of marked base commit (for rebase)
unstagedChangesColor = [ negative.base ]; # Color for file with unstaged changes
defaultFgColor = [ "default" ]; # Default text color
}; };
}; };
}; };

View File

@@ -1,16 +1,15 @@
{ pkgs, pkgs-unstable, ... }: { pkgs, pkgs-unstable, ... }:
{ {
# there also is a system module # there also is a system module
home.packages = with pkgs; [ home.packages = (with pkgs; [
gnupg gnupg
gpg-tui gpg-tui
] ++ ( with pkgs-unstable; [ ]) ++ ( with pkgs-unstable; [
pinentry-all pinentry-all
]); ]);
# services.pcscd.enable = true; # services.pcscd.enable = true;
services.gpg-agent = services.gpg-agent = let
let
min2sec = min: (min * 60); min2sec = min: (min * 60);
in { in {
enable = true; enable = true;
@@ -22,7 +21,7 @@
enableFishIntegration = true; enableFishIntegration = true;
defaultCacheTtlSsh = min2sec 60; defaultCacheTtlSsh = min2sec 60;
defaultCacheTtl = min2sec 30; defaultCacheTtl = min2sec 30;
# pinentryPackage = pkgs.pinentry-gtk2; # pinentryPackage = pkgs.pinentry-curses;
}; };
home.file.".gnupg/gpg.conf".text = '' home.file.".gnupg/gpg.conf".text = ''

View File

@@ -1,5 +1,4 @@
{ config, pkgs, lib, rice, user, ... }: { config, pkgs, lib, rice, user, ... }: let
let
# theme-name = "Colloid-Pink-Dark-Compact"; # theme-name = "Colloid-Pink-Dark-Compact";
# theme-package = pkgs.colloid-gtk-theme.override { # theme-package = pkgs.colloid-gtk-theme.override {
# themeVariants = [ "pink" ]; # themeVariants = [ "pink" ];
@@ -14,9 +13,7 @@ let
tweaks = [ "rimless" "black" ]; tweaks = [ "rimless" "black" ];
variant = "macchiato"; variant = "macchiato";
}; };
in in {
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# gnome.gnome-themes-extra # gnome.gnome-themes-extra
# gnome.adwaita-icon-theme # gnome.adwaita-icon-theme

View File

@@ -2,8 +2,9 @@
{ {
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
nixfmt-classic # nix formater # nixfmt-classic # nix formater
nil # nix language server # nil # nix language server
# nixd # specified in nixd.nix
python311Packages.python-lsp-server python311Packages.python-lsp-server
ruff ruff
ruff-lsp ruff-lsp
@@ -13,7 +14,8 @@
marksman # markdown marksman # markdown
vale-ls # style-checker lsp (needs vale) vale-ls # style-checker lsp (needs vale)
ltex-ls # Ltex (language tool) ltex-ls # Ltex (language tool)
] ++ (with pkgs-unstable; [ ] ++ (with pkgs-unstable; [
bash-language-server
helix helix
]); ]);
sessionVariables = { sessionVariables = {
@@ -60,7 +62,7 @@
}; };
}; };
keys.normal = { keys.normal = {
"C-g" = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"]; "C-g" = [ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ];
"A-`" = [ "no_op" ]; "A-`" = [ "no_op" ];
"`" = [ "no_op" ]; "`" = [ "no_op" ];
}; };
@@ -72,10 +74,14 @@
}; };
languages = { languages = {
language = [ language = [
# { {
# name = "latex"; name = "nix";
# language-servers = ["texlab" "spellchek"]; language-servers = [ "nixd" "nil" ];
# } }
{
name = "latex";
language-servers = [ "texlab" "language-tool" ];
}
{ {
name = "markdown"; name = "markdown";
# language-servers = [ "marksman" "style-check" "language-tool" ]; # language-servers = [ "marksman" "style-check" "language-tool" ];
@@ -118,6 +124,9 @@
} }
]; ];
language-server = { language-server = {
"nixd" = {
command = "nixd";
};
"style-check" = { "style-check" = {
command = lib.getExe pkgs.vale-ls; command = lib.getExe pkgs.vale-ls;
}; };
@@ -232,7 +241,7 @@
}; };
"ui.cursor.match" = { # Matching bracket etc. "ui.cursor.match" = { # Matching bracket etc.
"bg" = green.dark; "bg" = green.dark;
"modifiers" = [ "reversed" ]; "modifiers" = [ ];
}; };
"ui.gutter" = { "ui.gutter" = {
"bg" = black.base; "bg" = black.base;

View File

@@ -1,109 +1,107 @@
{ pkgs, lib, user, ... }: { pkgs, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [ home = {
pkgs.hyprland-autoname-workspaces packages = with pkgs; [ hyprland-autoname-workspaces ];
]; file.".config/hyprland-autoname-workspaces/config.toml".text = ''
version = "1.1.14"
home.file.".config/hyprland-autoname-workspaces/config.toml".text = '' [class]
version = "1.1.14" VirtualBox = ""
steam = "󰓓"
"VirtualBox Manager" = ""
"com.obsproject.Studio" = ""
"[Ff]irefox" = "󰈹"
"[Tt]hunderbird" = ""
pcbnew = ""
".*.exe" = ""
Element = "󰘨"
Signal = "󱅵"
Gimp = ""
VSCodium = "󰨞"
"[sS]potify" = ""
virt-manager = ""
lutris = "󰊗"
DEFAULT = "{class}"
"epicgameslauncher.exe" = "󰯷"
"[Cc]ode" = "󰨞"
"galaxyclient.exe" = "󰮡"
pavucontrol = "󰕾"
"Tor Browser" = "󰾔"
mpv = ""
chatterino = ""
libreoffice-writer = ""
kitty = ""
"cyberpunk2077.exe" = "󰾲"
KiCad = ""
"[tT]hunar" = ""
"riotclientux.exe" = "󰰌"
libreoffice-calc = ""
"org.remmina.Remmina" = "󰢹"
"org.inkscape.Inkscape" = "󰕙"
"VirtualBox Machine" = ""
Bitwarden = ""
"[gG]imp-.*" = ""
Chromium = ""
obsidian = "󰠮"
"leagueclientux.exe" = "󰰌"
zathura = "󰈦"
code-oss = "󰨞"
codium-url-handler = "󰨞"
discord = "󰙯"
vesktop = "󰙯"
blueman-manager = "󰂯"
Alacritty = ""
zoom = "󰬡"
spotify = ""
[class] [class_active]
VirtualBox = "" "(?i)ExampleOneTerm" = "icon"
steam = "󰓓"
"VirtualBox Manager" = ""
"com.obsproject.Studio" = ""
"[Ff]irefox" = "󰈹"
"[Tt]hunderbird" = ""
pcbnew = ""
".*.exe" = ""
Element = "󰘨"
Signal = "󱅵"
Gimp = ""
VSCodium = "󰨞"
"[sS]potify" = ""
virt-manager = ""
lutris = "󰊗"
DEFAULT = "{class}"
"epicgameslauncher.exe" = "󰯷"
"[Cc]ode" = "󰨞"
"galaxyclient.exe" = "󰮡"
pavucontrol = "󰕾"
"Tor Browser" = "󰾔"
mpv = ""
chatterino = ""
libreoffice-writer = ""
kitty = ""
"cyberpunk2077.exe" = "󰾲"
KiCad = ""
"[tT]hunar" = ""
"riotclientux.exe" = "󰰌"
libreoffice-calc = ""
"org.remmina.Remmina" = "󰢹"
"org.inkscape.Inkscape" = "󰕙"
"VirtualBox Machine" = ""
Bitwarden = ""
"[gG]imp-.*" = ""
Chromium = ""
obsidian = "󰠮"
"leagueclientux.exe" = "󰰌"
zathura = "󰈦"
code-oss = "󰨞"
codium-url-handler = "󰨞"
discord = "󰙯"
vesktop = "󰙯"
blueman-manager = "󰂯"
Alacritty = ""
zoom = "󰬡"
spotify = ""
[class_active] [initial_class]
"(?i)ExampleOneTerm" = "icon"
[initial_class] [initial_class_active]
[initial_class_active] [workspaces_name]
[workspaces_name] [title_in_class]
[title_in_class] [title_in_class_active]
[title_in_class_active] [title_in_initial_class]
[title_in_initial_class] [title_in_initial_class_active]
[title_in_initial_class_active] [initial_title_in_class]
[initial_title_in_class] [initial_title]
"Spotify Premium" = ""
[initial_title] [initial_title_in_class_active]
"Spotify Premium" = ""
[initial_title_in_class_active] [initial_title_in_initial_class]
[initial_title_in_initial_class] [initial_title_in_initial_class_active]
[initial_title_in_initial_class_active] [exclude]
aProgram = "^$"
"" = "^$"
"(?i)fcitx" = ".*"
"[Ss]team" = "^(Friends List.*)?$"
"explorer.exe" = ".*"
"(?i)TestApp" = ""
[exclude] [format]
aProgram = "^$" dedup = false
"" = "^$" dedup_inactive_fullscreen = false
"(?i)fcitx" = ".*" delim = " "
"[Ss]team" = "^(Friends List.*)?$" workspace = "{id}:{clients}"
"explorer.exe" = ".*" workspace_empty = "{id}"
"(?i)TestApp" = "" client = "{icon}"
client_fullscreen = "{icon}"
[format] client_active = "{icon}"
dedup = false client_dup = "{icon}{counter_sup}"
dedup_inactive_fullscreen = false client_dup_active = "*{icon}*{delim}{icon}{counter_unfocused_sup}"
delim = " " client_dup_fullscreen = "[{icon}]{delim}{icon}{counter_unfocused_sup}"
workspace = "{id}:{clients}" '';
workspace_empty = "{id}" };
client = "{icon}"
client_fullscreen = "{icon}"
client_active = "{icon}"
client_dup = "{icon}{counter_sup}"
client_dup_active = "*{icon}*{delim}{icon}{counter_unfocused_sup}"
client_dup_fullscreen = "[{icon}]{delim}{icon}{counter_unfocused_sup}"
'';
} }

View File

@@ -46,9 +46,7 @@ let
}; };
}; };
}; };
in in {
lib.mkIf (user != "tv")
{
home.packages = (with pkgs; [ home.packages = (with pkgs; [
# hyprland itself is a system package # hyprland itself is a system package
hyprland-protocols hyprland-protocols
@@ -164,8 +162,8 @@ lib.mkIf (user != "tv")
gaps_in = builtins.div rice.gap-size 2; gaps_in = builtins.div rice.gap-size 2;
gaps_out = rice.gap-size; gaps_out = rice.gap-size;
border_size = rice.border-width; border_size = rice.border-width;
"col.active_border" = "rgba(${rice.lib.nohash rice.color.border}ff) rgba(${rice.lib.nohash rice.color.border2}ff) 90deg"; "col.active_border" = "rgba(${rice.lib.nohash rice.color.border2}ff) rgba(${rice.lib.nohash rice.color.border}ff) 90deg";
"col.inactive_border" = "rgba(${rice.lib.nohash rice.color.background}ff) rgba(${rice.lib.nohash rice.color.border2}ff) 90deg"; "col.inactive_border" = "rgba(${rice.lib.nohash rice.color.background}ff) rgba(${rice.lib.nohash rice.color.border}ff) 90deg";
# cursor_inactive_timeout = 10; # cursor_inactive_timeout = 10;
@@ -230,7 +228,7 @@ lib.mkIf (user != "tv")
dwindle = { dwindle = {
preserve_split = true; # you probably want this preserve_split = true; # you probably want this
no_gaps_when_only = false; no_gaps_when_only = true;
}; };
# master = { # master = {
@@ -267,10 +265,10 @@ lib.mkIf (user != "tv")
"opacity ${transparency}, code-oss" "opacity ${transparency}, code-oss"
"opacity ${transparency}, VSCodium" "opacity ${transparency}, VSCodium"
"opacity ${transparency}, Code" "opacity ${transparency}, Code"
"opacity ${transparency}, sent" # "opacity ${transparency}, sent"
"opacity ${transparency}, neovide" "opacity ${transparency}, neovide"
"opacity ${transparency}, obsidian" "opacity ${transparency}, obsidian"
"opacity ${transparency}, zathura" # "opacity ${transparency}, zathura"
# "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Alacritty" # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Alacritty"
# "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Kitty" # "bordercolor rgba(${rice.lib.nohash rice.color.foreground}ff) rgba(${rice.lib.nohash rice.color.background}${rice.lib.float-to-drune rice.transparency}), Kitty"
"opacity ${transparency}, discord" "opacity ${transparency}, discord"
@@ -297,6 +295,7 @@ lib.mkIf (user != "tv")
"float, title:^(Compact folders)$" "float, title:^(Compact folders)$"
"tile, sent" "tile, sent"
"fullscreen, wlogout" "fullscreen, wlogout"
"fullscreen, sent"
"workspace 14, lutris" "workspace 14, lutris"
"workspace 100, title:^(Apex Legends)$" "workspace 100, title:^(Apex Legends)$"
"workspace 100, ^(cyberpunk2077.exe)$" "workspace 100, ^(cyberpunk2077.exe)$"
@@ -332,6 +331,7 @@ lib.mkIf (user != "tv")
"SUPER, F5, exec, nx_gcal_event force-lookup" "SUPER, F5, exec, nx_gcal_event force-lookup"
"SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate" "SUPER SHIFT, F5, exec, nx_gcal_event reauthenticate"
"SUPER, F6, exec, kitty -e 'htop'" "SUPER, F6, exec, kitty -e 'htop'"
"SUPER, F7, exec, kitty -e 'nmtui'"
''SUPER, F8, exec, find ~/Pictures/wallpapers/* -type f -not -path "~/Pictures/wallpapers/.git/*" | sort -R | head -n 1 | xargs swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120'' ''SUPER, F8, exec, find ~/Pictures/wallpapers/* -type f -not -path "~/Pictures/wallpapers/.git/*" | sort -R | head -n 1 | xargs swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120''
''SUPER, F9, exec, kitty -e sh -c 'change_colors_json $(swww query | sed -n 1p | sed -e "s-.*image: --g") && nh home switch && firefox /home/${user}/.config/color-pallete.html' '' ''SUPER, F9, exec, kitty -e sh -c 'change_colors_json $(swww query | sed -n 1p | sed -e "s-.*image: --g") && nh home switch && firefox /home/${user}/.config/color-pallete.html' ''
''SUPER SHIFT, F9, exec, firefox /home/${user}/.config/color-pallete.html '' ''SUPER SHIFT, F9, exec, firefox /home/${user}/.config/color-pallete.html ''
@@ -385,7 +385,7 @@ lib.mkIf (user != "tv")
"SUPER, R, exec, rofi -show drun" "SUPER, R, exec, rofi -show drun"
# "SUPER, T, exec, alacritty" # "SUPER, T, exec, alacritty"
# "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace"" # "SUPER SHIFT, T, exec, alacritty -e sh -c "ssh nxace""
"SUPER, T, exec, kitty" "SUPER, T, exec, SESSION_FROM_DE=TRUE kitty"
"SUPER SHIFT, T, exec, kitty -e sh -c 'ssh nxace'" "SUPER SHIFT, T, exec, kitty -e sh -c 'ssh nxace'"
# "SUPER, Z, " # "SUPER, Z, "
"SUPER, U, exec, thunderbird " "SUPER, U, exec, thunderbird "

View File

@@ -1,37 +1,32 @@
{ config, pkgs, rice, lib, user, ... }: { rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [
kitty
];
programs.kitty = { programs.kitty = {
enable = true; enable = true;
font = { font = {
name = rice.font.code.name2; name = rice.font.code.name2;
package = rice.font.code.package; package = rice.font.code.package;
}; };
settings = { settings = with rice.color; {
background = rice.color.background; background = background;
foreground = rice.color.foreground; foreground = foreground;
cursor = rice.color.foreground; cursor = foreground;
color0 = rice.color.black.base; color0 = black.base;
color8 = rice.color.black.bright; color8 = black.bright;
color1 = rice.color.red.base; color1 = red.base;
color9 = rice.color.red.bright; color9 = red.bright;
color2 = rice.color.green.base; color2 = green.base;
color10 = rice.color.green.bright; color10 = green.bright;
color3 = rice.color.yellow.base; color3 = yellow.base;
color11 = rice.color.yellow.bright; color11 = yellow.bright;
color4 = rice.color.blue.base; color4 = blue.base;
color12 = rice.color.blue.bright; color12 = blue.bright;
color5 = rice.color.magenta.base; color5 = magenta.base;
color13 = rice.color.magenta.bright; color13 = magenta.bright;
color6 = rice.color.cyan.base; color6 = cyan.base;
color14 = rice.color.cyan.bright; color14 = cyan.bright;
color7 = rice.color.white.base; color7 = white.base;
color15 = rice.color.white.bright; color15 = white.bright;
background_opacity = builtins.toString rice.transparency; background_opacity = builtins.toString rice.transparency;
window_padding_width = 5; window_padding_width = 5;
remember_window_size = false; remember_window_size = false;
}; };

View File

@@ -1,10 +1,6 @@
{ pkgs, rice, lib, user, ... }: { pkgs, rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [ home.packages = with pkgs; [ libnotify ];
pkgs.mako
pkgs.libnotify
];
services.mako = with rice; { services.mako = with rice; {
enable = true; enable = true;
defaultTimeout = 5000; # in ms defaultTimeout = 5000; # in ms

6
home-modules/nixd.nix Normal file
View File

@@ -0,0 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
nixd
];
}

View File

@@ -1,9 +1,6 @@
{ config, pkgs, secrets, lib, user, ... }: { config, pkgs, secrets, ... }: let
let sep = " ";
sep = " "; in {
in
lib.mkIf (user != "tv")
{
home = { home = {
file."${config.xdg.dataHome}/nx-gcal-event-credentials.json".text = '' file."${config.xdg.dataHome}/nx-gcal-event-credentials.json".text = ''
{ {
@@ -26,7 +23,7 @@ lib.mkIf (user != "tv")
# (pkgs.python311.withPackages (python-pkgs: [ # (pkgs.python311.withPackages (python-pkgs: [
# python-pkgs.google # python-pkgs.google
# ])) # ]))
(writeScriptBin "nx_gcal_event" '' (writeScriptBin "nx_gcal_event" /* python */ ''
#!${pkgs.python3}/bin/python3 #!${pkgs.python3}/bin/python3
import datetime import datetime
import os import os

99
home-modules/nx2site.nix Normal file
View File

@@ -0,0 +1,99 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(writeShellApplication {
name = "nxmd";
text = let
ascii_size = (pkgs.writers.writePython3Bin "ascii_size" {
# libraries = with pkgs.python311Packages; [ ];
flakeIgnore = [];
} /* python */ ''
from sys import argv
with open(argv[1], "r", encoding='utf-8') as f:
raw = f.read()
sraw = raw.split("\n")
linestart = 0
lineend = 0
started = False
for linenum in range(len(sraw)):
if sraw[linenum].strip() == "```ascii":
linestart = linenum
started = True
if started and sraw[linenum].strip() == "```":
lineend = linenum
break
maxwidth = 0
for linenum in range(linestart, lineend):
linewidth = len(sraw[linenum])
if linewidth > maxwidth:
maxwidth = linewidth
print(f"Maximum length of the `ascii` code clock is {maxwidth} characters.")
px = (1 / maxwidth) * 1500
vw = (1 / maxwidth) * 150
snew = sraw
snew[3] = "aaw: " + str(round(vw, 2))
snew[4] = "aawm: " + str(round(px, 2))
new = "\n".join(snew)
with open(argv[1], "w", encoding='utf-8') as f:
f.write(new)
print(f"The resulting font sizes are {px}px (aawm) and {vw}vw (aam).")
print(f"You can now use the push operation on {argv[1]}.")
''
);
in /* bash */ ''
ord=$(date +"%e" | awk '{printf("%d%s\n", $1, ($1==11||$1==12||$1==13)?"th":((($1%10)==1)?"st":((($1%10)==2)?"nd":((($1%10)==3)?"rd":"th"))))}')
nxdate="$(date +'%A the ')"
nxdate="$nxdate""$ord"
nxdate="$nxdate""$(date +' of %B %Y')"
if [[ $# -eq 0 ]]; then
echo "Error: No arguments provided."
echo "Usage: $0 push <markdown-file>"
exit 1
fi
if [[ "$1" == "push" ]]; then
if [[ ! "$2" =~ \.md$ ]]; then
echo "Error: Second argument must be a markdown (.md) file"
echo "Usage: $0 push <markdown-file>"
exit 1
fi
pandoc \
"$2" \
--highlight-style=breezeDark \
--standalone \
--mathjax \
--ascii \
--template /var/nginx/assets/template.html \
--metadata pdate="$nxdate" \
--verbose --from markdown-markdown_in_html_blocks+raw_html \
-o /var/nginx/webroot/"$(basename "$2" .md )".html
echo pushed "$2"
elif [[ "$1" == "ascii-size" ]]; then
if [[ ! "$2" =~ \.md$ ]]; then
echo "Error: Second argument must be a markdown (.md) file"
echo "Usage: $0 ascii-size <markdown-file>"
exit 1
fi
${ascii_size}/bin/ascii_size "$2"
else
echo "Error: First argument must be 'push'"
echo "Usage: $0 push <markdown-file>"
exit 1
fi
'';
})
];
}

View File

@@ -1,5 +1,4 @@
{ config, pkgs, lib, user, ... }: { config, pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
libreoffice libreoffice

View File

@@ -1,21 +1,20 @@
{ config, pkgs, lib, user, ... }: { pkgs, ... }:
let
python-with-packages = pkgs.python3.withPackages (pp: with pp; [
ipython
pipdeptree
requests
google google-api-python-client google-auth-httplib2 google-auth-oauthlib
debugpy
black
]);
in
lib.mkIf (user != "tv")
{ {
home.packages = [ home = let
python-with-packages python-with-packages = pkgs.python3.withPackages (pp: with pp; [
]; ipython
pipdeptree
home.sessionVariables = { requests
PYTHONPATH = "${python-with-packages}/${python-with-packages.sitePackages}"; google google-api-python-client google-auth-httplib2 google-auth-oauthlib
debugpy
black
]);
in {
packages = [
python-with-packages
];
sessionVariables = {
PYTHONPATH = "${python-with-packages}/${python-with-packages.sitePackages}";
};
}; };
} }

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, user, ... }: { pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{ {
qt = { qt = {
platformTheme = "gtk"; platformTheme = "gtk";

View File

@@ -1,114 +1,113 @@
{ pkgs, rice, lib, user, ... }: { pkgs, rice, ... }: {
let
trdr = "${rice.lib.float-to-drune rice.transparency}";
in
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [ home.packages = with pkgs; [
rofi-wayland rofi-wayland
]; ];
home.file.".config/rofi/config.rasi".text = '' home.file = let
configuration { trdr = "${rice.lib.float-to-drune rice.transparency}";
show-icons: false; in with rice.color; {
display-drun: ""; ".config/rofi/config.rasi".text = ''
disable-history: false; configuration {
drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>] [<span weight='light' size='small'><i>({exec})</i></span>]"; show-icons: false;
} display-drun: "";
disable-history: false;
drun-display-format: "{name} [<span weight='light' size='small'><i>({generic})</i></span>] [<span weight='light' size='small'><i>({exec})</i></span>]";
}
* { * {
font: "${rice.font.code.name2} 12"; font: "${rice.font.code.name2} 12";
foreground: ${rice.color.foreground}; foreground: ${foreground};
background-color: ${rice.color.background}${trdr}; background-color: ${background}${trdr};
padding: 0px; padding: 0px;
margin: 0px; margin: 0px;
spacing: 0px; spacing: 0px;
border-width: 0px; border-width: 0px;
} }
#window { #window {
background-color: ${rice.color.background}${trdr}; background-color: ${background}${trdr};
border: ${builtins.toString rice.border-width}px; border: ${builtins.toString rice.border-width}px;
border-radius: ${builtins.toString rice.rounding}; border-radius: ${builtins.toString rice.rounding};
border-color: ${rice.color.border}; border-color: ${border};
} }
#mainbox { #mainbox {
border: 0; border: 0;
padding: 0; padding: 0;
} }
#message { #message {
border: 0px; border: 0px;
} }
#textbox { #textbox {
text-color: ${rice.color.foreground}; text-color: ${foreground};
} }
#listview { #listview {
fixed-height: 0; fixed-height: 0;
border: 0px; border: 0px;
spacing: 0px ; spacing: 0px ;
scrollbar: false; scrollbar: false;
padding: 0px; padding: 0px;
} }
#element { #element {
border: 0; border: 0;
padding: 0px; padding: 0px;
border-radius: ${if rice.rounding > 0 then "2" else "0"}px; border-radius: ${if rice.rounding > 0 then "2" else "0"}px;
} }
#element.normal.normal { background-color: ${rice.color.background}${trdr}; text-color: ${rice.color.accent.base}; } #element.normal.normal { background-color: ${background}${trdr}; text-color: ${accent.base}; }
#element.selected.normal { background-color: ${rice.color.tertiary.base}${trdr}; text-color: ${rice.color.background}; } #element.selected.normal { background-color: ${tertiary.base}${trdr}; text-color: ${background}; }
#element.alternate.normal { background-color: ${rice.color.background}${trdr}; text-color: ${rice.color.secondary.base}; } #element.alternate.normal { background-color: ${background}${trdr}; text-color: ${secondary.base}; }
#scrollbar { #scrollbar {
width: ${builtins.toString rice.border-width}px ; width: ${builtins.toString rice.border-width}px ;
border: 0; border: 0;
handle-width: 8px ; handle-width: 8px ;
padding: 0; padding: 0;
} }
#sidebar { #sidebar {
border: ${builtins.toString rice.border-width}px dash; border: ${builtins.toString rice.border-width}px dash;
} }
#button.selected { #button.selected {
text-color: ${rice.color.foreground}; text-color: ${foreground};
} }
#inputbar { #inputbar {
spacing: 0; spacing: 0;
text-color: ${rice.color.background}; text-color: ${background};
background-color: ${rice.color.accent.base}${trdr}; background-color: ${accent.base}${trdr};
padding: 0; padding: 0;
margine-bottom: 2px; margine-bottom: 2px;
children: [ prompt,textbox-prompt-colon,entry,case-indicator ]; children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
} }
#prompt { #prompt {
spacing: 0; spacing: 0;
background-color: transparent; background-color: transparent;
text-color: ${rice.color.foreground}; text-color: ${foreground};
} }
#textbox-prompt-colon { #textbox-prompt-colon {
expand: false; expand: false;
str: ">"; str: ">";
margin: 0px 0.3em 0em 0em ; margin: 0px 0.3em 0em 0em ;
text-color: ${rice.color.background}; text-color: ${background};
background-color: transparent; background-color: transparent;
} }
#case-indicator { #case-indicator {
spacing: 0; spacing: 0;
text-color: ${rice.color.foreground}; text-color: ${foreground};
background-color: transparent; background-color: transparent;
} }
#entry { #entry {
spacing: 0; spacing: 0;
text-color: ${rice.color.background}; text-color: ${background};
background-color: transparent; background-color: transparent;
placeholder: ""; placeholder: "";
} }
element-text, element-icon { element-text, element-icon {
background-color: inherit; background-color: inherit;
text-color: inherit; text-color: inherit;
} }
''; '';
};
} }

View File

@@ -1,4 +1,4 @@
{ pkgs, rice, user, ... }: { pkgs, rice, ... }:
let let
my-sent = pkgs.sent.override { my-sent = pkgs.sent.override {
patches = [ patches = [
@@ -11,25 +11,14 @@ in
{ {
home = { home = {
packages = [ packages = [
# pkgs.sent
my-sent my-sent
(pkgs.writeShellApplication {
name = "nxsent";
text = with rice.color; let
in /* bash */ ''
echo "$@" | sent -c "${accent.base}" -b "${background}"
'';
})
]; ];
file.".local/share/sent.patch".text = ''
diff --git a/config.def.h b/config.def.h
index 60eb376..64e7f05 100644
--- a/config.def.h
+++ b/config.def.h
@@ -9,8 +9,8 @@ static char *fontfallbacks[] = {
#define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */
static const char *colors[] = {
- "#000000", /* foreground color */
- "#FFFFFF", /* background color */
+ "${rice.color.foreground}", /* foreground color */
+ "${rice.color.background}", /* background color */
};
static const float linespacing = 1.4;
'';
}; };
} }

View File

@@ -1,36 +1,27 @@
{ config, pkgs, lib, system, user, allowed, secrets, ... }: { pkgs, domain, ... }:
lib.mkIf (user != "tv")
{ {
home = {
packages = with pkgs; [ sshfs ];
file.".ssh/config".text = ''
HOST nxace
HostName ssh.${domain}
User nx2
Port 50022
home.packages = with pkgs; [ HOST nxacel
sshfs HostName 192.168.178.32
]; User nx2
Port 50022
HOST nxrpil
HostName 192.168.178.31
User nx2
Port 22
home.file.".ssh/config".text = '' HOST nxgit
HOST nxace HostName ssh.${domain}
HostName nx2.site User git
User nx2 Port 20022
Port 50022 '';
};
HOST nxacel
HostName 192.168.178.32
User nx2
Port 50022
HOST nxrpi
HostName nx2.site
User pi
Port 50023
HOST nxrpil
HostName 192.168.178.31
User pi
Port 50023
HOST nxgit
HostName git.nx2.site
User git
Port 20022
'';
} }

View File

@@ -1,10 +1,5 @@
{ pkgs, lib, user, rice, ... }: { lib, rice, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [
pkgs.starship
];
programs.starship = { programs.starship = {
enable = true; enable = true;
# enableBashIntegration = true; # enableBashIntegration = true;

18
home-modules/tts.nix Executable file
View File

@@ -0,0 +1,18 @@
{ pkgs, lib, user, ... }:
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
(writeShellApplication {
name = "ttss";
text = let
cmd = inp: "piper -m /home/nx2/tts/en_GB-cori-high.onnx --output_raw ${inp} | ffmpeg -hide_banner -loglevel error -f s16le -ar 22050 -ac 1 -i - -f wav - | mpv -";
in /* bash */ ''
if [ -p /dev/stdin ]; then
${cmd "</dev/stdin"}
else
${cmd ''<<< "$@"''}
fi
'';
})
];
}

View File

@@ -1,9 +1,6 @@
{ pkgs, lib, user, ... }: { pkgs, ... }: let
let
vws = pkgs.vale.withStyles (s: [ s.alex s.google ]); vws = pkgs.vale.withStyles (s: [ s.alex s.google ]);
in in {
lib.mkIf (user != "tv")
{
home = { home = {
packages = [ packages = [
vws vws

View File

@@ -68,7 +68,7 @@ class Palette:
def ensure_color(c: Color, alter_sat: bool) -> list[int]: def ensure_color(c: Color, alter_sat: bool) -> list[int]:
hue, lum, sat = c.hls hue, lum, sat = c.hls
if alter_sat: if alter_sat:
new_sat = min(sat**0.5, 1) new_sat = min((sat**0.5) + 0.4, 1)
else: else:
new_sat = sat new_sat = sat
new_lum = max(lum, 0.5) new_lum = max(lum, 0.5)
@@ -123,7 +123,7 @@ if __name__ == "__main__":
accent = ensure_color(c=palette[0], alter_sat=False) accent = ensure_color(c=palette[0], alter_sat=False)
secondary = ensure_color(c=palette[1], alter_sat=True) secondary = ensure_color(c=palette[1], alter_sat=True)
tertiary = ensure_color(c=palette[2], alter_sat=False) tertiary = ensure_color(c=palette[2], alter_sat=False)
weird = alter_hue(ilist=secondary, hue=180) weird = alter_hue(ilist=accent, hue=80)
special = alter_hue(ilist=accent, hue=180) special = alter_hue(ilist=accent, hue=180)
foreground = alter_l(accent, 0.9) foreground = alter_l(accent, 0.9)
background = alter_l(accent, 0.1) background = alter_l(accent, 0.1)

View File

@@ -1,9 +1,6 @@
{ lib, pkgs, user, rice, ... }: { lib, pkgs, user, rice, ... }: let
let
sep = " "; sep = " ";
in in {
lib.mkIf (user != "tv")
{
home.packages = home.packages =
let let
waybar_mode_script = /*bash*/ '' waybar_mode_script = /*bash*/ ''
@@ -100,10 +97,10 @@ lib.mkIf (user != "tv")
exec = "cclock"; exec = "cclock";
restart-interval = 60; restart-interval = 60;
}; };
"custom/ctimeremaining" = { # "custom/ctimeremaining" = {
exec = "nx_gcal_event lookup"; # exec = "nx_gcal_event lookup";
restart-interval = 60; # restart-interval = 60;
}; # };
"custom/mode" = { "custom/mode" = {
exec = "cat /tmp/waybar-mode"; exec = "cat /tmp/waybar-mode";
interval = "once"; interval = "once";
@@ -184,7 +181,6 @@ lib.mkIf (user != "tv")
#clock, #clock,
#custom-cclock, #custom-cclock,
#custom-ctimeremaining,
#custom-mode, #custom-mode,
#battery, #battery,
#cpu, #cpu,

View File

@@ -1,98 +1,85 @@
{ config, pkgs, lib, user, rice,... }: { pkgs, rice,... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home = {
wlogout packages = with pkgs; [ wlogout ];
]; file = {
".config/wlogout/style.css".text = /* css */ ''
* { all: unset; }
home.file.".config/wlogout/style.css".text = '' window {
* { all: unset; } font-family: ${rice.font.code.name}, monospace;
font-size: 12pt;
color: ${rice.color.foreground};
background-color: rgba(0, 0, 0, ${builtins.toString rice.transparency});
}
window { button {
font-family: ${rice.font.code.name}, monospace; transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
font-size: 12pt; text-shadow: none;
color: ${rice.color.foreground}; border: none;
background-color: rgba(0, 0, 0, ${builtins.toString rice.transparency}); color: ${rice.color.foreground};
} background-color: ${rice.color.background};
margin: 5px;
}
button { button:hover {
transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; color: ${rice.color.blue.base};
text-shadow: none; }
border: none;
color: ${rice.color.foreground};
background-color: ${rice.color.background};
margin: 5px;
}
button:hover { button:focus {
color: ${rice.color.blue.base} ; color: ${rice.color.blue.base};
} }
'';
button:focus { ".config/wlogout/layout".text = /* json */ ''
color: ${rice.color.blue.base} ; {
} "label": "lock",
''; "action": "hyprlock",
"text": "[L]ock",
home.file.".config/wlogout/layout".text = '' "height": 0,
{ "width": 0,
"label": "lock", "keybind": "l"
"action": "hyprlock", }
"text": "[L]ock", {
"height": 0, "label": "reboot",
"width": 0, "action": "systemctl reboot",
"keybind": "l" "text": "[R]eboot",
} "height": 0,
{ "width": 0,
"label": "reboot", "keybind": "r"
"action": "systemctl reboot", }
"text": "[R]eboot", {
"height": 0, "label": "shutdown",
"width": 0, "action": "systemctl poweroff",
"keybind": "r" "text": "[S]hutdown",
} "height": 0,
{ "width": 0,
"label": "shutdown", "keybind": "s"
"action": "systemctl poweroff", }
"text": "[S]hutdown", {
"height": 0, "label": "logout",
"width": 0, "action": "hyprctl dispatch exit 0",
"keybind": "s" "text": "Lo[g]out",
} "height": 0,
{ "width": 0,
"label": "logout", "keybind": "g"
"action": "hyprctl dispatch exit 0", }
"text": "Lo[g]out", {
"height": 0, "label": "suspend",
"width": 0, "action": "systemctl suspend",
"keybind": "g" "text": "S[u]spend",
} "height": 0,
{ "width": 0,
"label": "suspend", "keybind": "u"
"action": "systemctl suspend", }
"text": "S[u]spend", {
"height": 0, "label": "hibernate",
"width": 0, "action": "systemctl hibernate",
"keybind": "u" "text": "[H]ibernate",
} "height": 0,
{ "width": 0,
"label": "hibernate", "keybind": "h"
"action": "systemctl hibernate", }
"text": "[H]ibernate", '';
"height": 0, };
"width": 0, };
"keybind": "h"
}
'';
# lock { background-image: image(url("./lock.png")); }
# lock:focus { background-image: image(url("./lock-hover.png")); }
# logout { background-image: image(url("./logout.png")); }
# logout:focus { background-image: image(url("./logout-hover.png")); }
# suspend { background-image: image(url("./suspend.png")); }
# suspend:focus { background-image: image(url("./suspend-hover.png")); }
# shutdown { background-image: image(url("./power.png")); }
# shutdown:focus { background-image: image(url("./power-hover.png")); }
# reboot { background-image: image(url("./restart.png")); }
# reboot:focus { background-image: image(url("./restart-hover.png")); }
# hibernate { background-image: image(url("./hibernate.png")); }
# hibernate:hover { background-image: image(url("./hibernate-hover.png"));}
} }

View File

@@ -1,16 +1,15 @@
{ pkgs, lib, user, rice, ... }: { pkgs, system, rice, inputs, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
yazi # yazi
dragon dragon
unar unar
]; ];
programs.yazi = { programs.yazi = {
enable = true; enable = true;
# package = inputs.yazi.packages.${system}.default; package = inputs.yazi.packages.${system}.default;
enableFishIntegration = true; enableFishIntegration = true;
settings = { settings = {
manager = { manager = {
@@ -28,76 +27,96 @@ lib.mkIf (user != "tv")
]; ];
}; };
opener = { opener = {
edit = [ "edit" = [
{ run = ''hx "$@"''; desc = "helix"; block = true;} { run = ''hx "$@"''; desc = "helix"; block = true;}
{ run = ''codium "$@"''; orphan = true;} { run = ''codium "$@"''; orphan = true;}
{ run = ''nano "$@"''; desc = "nano"; block = true;} { run = ''nano "$@"''; desc = "nano"; block = true;}
]; ];
play = [ "play" = [
{ run = ''mpv "$@"''; } { run = ''mpv "$@"''; }
{ run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; desc = "Show mediainfo";} { run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; desc = "Show mediainfo";}
]; ];
archive = [ "archive" = [
{ run = ''unar "$1"''; desc = "Extract here"; } { run = ''unar "$1"''; desc = "Extract here"; }
{ run = ''tar -x "$1"''; desc = "tar -x"; }
{ run = ''unzip "$1"''; desc = "unzip"; }
]; ];
image = [ "image" = [
{ run = ''imv "$@"''; desc = "imv";} { run = ''imv "$@"''; desc = "imv";}
{ run = ''gimp "$@"''; desc = "gimp";} { run = ''gimp "$@"''; desc = "gimp";}
{ run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$@"''; desc = "swww wallpaper";} { run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$@"''; desc = "swww wallpaper";}
]; ];
font = [ "svg" = [
{ run = ''fontpreview "$@"''; desc = "fontpreview"; } { run = ''inkscape "$@"''; desc = "inkscape";}
{ run = ''firefoc "$@"''; desc = "firefox";}
]; ];
document = [ "font" = [
{ run = ''fontpreview "$@"''; desc = "fontpreview"; }
{ run = ''fontforge "$@"''; desc = "fortforge"; }
];
"document" = [
{ run = ''zathura "$@"''; desc = "zathura"; } { run = ''zathura "$@"''; desc = "zathura"; }
{ run = ''xournal "$@"''; desc = "xournal"; } { run = ''xournal "$@"''; desc = "xournal"; }
{ run = ''firefox "$@"''; desc = "firefox"; } { run = ''firefox "$@"''; desc = "firefox"; }
]; ];
browser = [ "browser" = [
{ run = ''firefox "$@"''; desc = "firefox"; } { run = ''firefox "$@"''; desc = "firefox"; }
{ run = ''zen "$@"''; desc = "zen"; }
{ run = ''chromium --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"''; desc = "chromium"; }
{ run = ''w3m "$@"''; desc = "w3m"; }
{ run = ''lynx "$@"''; desc = "lynx"; }
]; ];
office = [ "office" = [
{ run = ''libreoffice "$@"''; desc = "libreoffice"; } { run = ''libreoffice "$@"''; desc = "libreoffice"; }
{ run = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; } { run = ''libreoffice --view "$@"''; desc = "libreoffice read-only"; }
]; ];
shell = [ "shell" = [
{ run = ''sh -c "$@"''; desc = "sh -c"; }
{ run = ''bash -c "$@"''; desc = "bash -c"; } { run = ''bash -c "$@"''; desc = "bash -c"; }
{ run = ''fish -c "$@"''; desc = "fish -c"; }
{ run = ''sh -c "$@"''; desc = "sh -c"; }
]; ];
python = [ "python" = [
{ run = ''python "$@"''; desc = "python"; } { run = ''python "$@"''; desc = "python"; }
]; ];
"directory" = [
{ run = ''lazygit "$@"''; desc = "python"; }
];
}; };
open.rules = [ open.rules = [
{ mime = "text/*"; use = "edit"; } { mime = "text/html"; use = ["edit" "browser"]; }
{ mime = "text/plain"; use = "edit"; } { mime = "text/htm"; use = ["edit" "browser"]; }
{ mime = "text/html"; use = ["edit" "browser"]; } { mime = "text/x-python"; use = "python"; }
{ mime = "text/htm"; use = ["edit" "browser"]; } { mime = "text/*"; use = "edit"; }
{ mime = "application/x-httpd-php"; use = ["edit" "browser"]; }
{ mime = "application/json"; use = "edit"; } { mine = "inode/x-empty"; use = "edit"; }
{ mime = "application/ld+json"; use = "edit"; } { mine = "inode/directory"; use = "edit"; }
{ mime = "image/*"; use = "image"; }
{ mime = "image/svg"; use = ["image" "edit"]; } { mime = "image/*"; use = "image"; }
{ mime = "application/pdf"; use = "document"; } { mime = "image/svg"; use = ["image" "edit"]; }
{ mime = "application/epub"; use = "document"; }
{ mime = "video/*"; use = "video"; } { mime = "video/*"; use = "video"; }
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
{ mime = "application/vnd.ms-powerpoint"; use = "office"; } { mime = "application/x-httpd-php"; use = ["edit" "browser"]; }
{ mime = "application/vnd.ms-excel"; use = "office"; } { mime = "application/json"; use = "edit"; }
{ mime = "application/ld+json"; use = "edit"; }
{ mime = "application/pdf"; use = "document"; }
{ mime = "application/epub"; use = "document"; }
{ mime = "application/vnd.oasis.opendocument.*"; use = "office"; }
{ mime = "application/vnd.ms-powerpoint"; use = "office"; }
{ mime = "application/vnd.ms-excel"; use = "office"; }
{ mime = "application/vnd.openxmlformats-officedocument.*"; use = ["office" "edit"]; } { mime = "application/vnd.openxmlformats-officedocument.*"; use = ["office" "edit"]; }
{ mime = "application/rtf"; use = "office"; } { mime = "application/rtf"; use = "office"; }
{ mime = "application/x-sh"; use = ["edit" "shell"]; } { mime = "application/x-sh"; use = ["edit" "shell"]; }
{ mime = "application/x-python-code"; use = "python"; } { mime = "application/x-python-code"; use = "python"; }
{ mime = "text/x-python"; use = "python"; } { mime = "application/xml"; use = "edit"; }
{ mime = "application/xml"; use = "edit"; } { mime = "application/xul"; use = "edit"; }
{ mime = "application/xul"; use = "edit"; } { mime = "application/x-bzip"; use = "archive"; }
{ mime = "application/x-bzip"; use = "archive"; } { mime = "application/x-bzip2"; use = "archive"; }
{ mime = "application/x-bzip2"; use = "archive"; } { mime = "application/gzip"; use = "archive"; }
{ mime = "application/gzip"; use = "archive"; } { mime = "application/vnd.rar"; use = "archive"; }
{ mime = "application/vnd.rar"; use = "archive"; } { mime = "application/x-tar"; use = "archive"; }
{ mime = "application/x-tar"; use = "archive"; } { mime = "application/zip"; use = "archive"; }
{ mime = "application/zip"; use = "archive"; } { mime = "application/x-7z-compressed"; use = "archive"; }
{ mime = "application/x-7z-compressed"; use = "archive"; }
]; ];
}; };
theme = with rice.color; { theme = with rice.color; {
@@ -149,12 +168,12 @@ lib.mkIf (user != "tv")
hovered = { underline = true; }; hovered = { underline = true; };
}; };
which = { which = {
mask = { bg = "#3c3836"; }; mask = { bg = black.base; };
cand = { fg = "#83a598"; }; cand = { fg = accent.base; };
rest = { fg = "#928374"; }; rest = { fg = secondary.base; };
desc = { fg = "#fe8019"; }; desc = { fg = tertiary.base; };
separator = " "; separator = " ";
separator_style = { fg = "#504945"; }; separator_style = { fg = foreground; };
}; };
help = { help = {
on = { fg = "#fe8019"; }; on = { fg = "#fe8019"; };

36
home-modules/zathura.nix Normal file
View File

@@ -0,0 +1,36 @@
{ pkgs, rice, ... }:
{
programs.zathura = {
enable = true;
options = with rice.color; {
completion-bg = background;
completion-fg = foreground;
completion-highlight-bg = background;
completion-highlight-fg = accent.base;
default-bg = "rgba(${rice.lib.hex-to-rgb-comma-string background},${builtins.toString rice.transparency})";
default-fg = foreground;
highlight-active-color = "rgba(${rice.lib.hex-to-rgb-comma-string accent.base},0.5)";
highlight-color = "rgba(${rice.lib.hex-to-rgb-comma-string secondary.base},0.5)";
highlight-fg = "rgba(${rice.lib.hex-to-rgb-comma-string secondary.base},0.5)";
index-active-bg = background;
inputbar-bg = background;
inputbar-fg = foreground;
notification-bg = background;
notification-error-bg = background;
notification-error-fg = foreground;
notification-fg = foreground;
notification-warning-bg = background;
notification-warning-fg = foreground;
recolor = true;
recolor-darkcolor = foreground;
recolor-keephue = true;
recolor-lightcolor = background;
selection-clipboard = "clipboard";
statusbar-bg = black.base;
statusbar-fg = foreground;
n-completion-items = 9999999999999;
exec-command = "open";
};
};
}

View File

@@ -1,5 +1,4 @@
{ config, pkgs, lib, user, ... }: { pkgs, ... }:
lib.mkIf (user != "tv")
{ {
home.packages = [ home.packages = [
pkgs.zoxide pkgs.zoxide

View File

@@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, lib, host, user, inputs, ... }: { pkgs, pkgs-unstable, host, user, inputs, ... }:
{ {
imports = [ imports = [
./home-modules/auto-mount.nix ./home-modules/auto-mount.nix
@@ -24,9 +24,12 @@
./home-modules/latex.nix ./home-modules/latex.nix
./home-modules/mako.nix ./home-modules/mako.nix
# ./home-modules/matrix.nix # ./home-modules/matrix.nix
# ./home-modules/nm.nix
./home-modules/nh.nix ./home-modules/nh.nix
./home-modules/nixd.nix
./home-modules/nvidia.nix ./home-modules/nvidia.nix
./home-modules/nx-gcal-event.nix ./home-modules/nx2site.nix
# ./home-modules/nx-gcal-event.nix
./home-modules/obs.nix ./home-modules/obs.nix
./home-modules/office.nix ./home-modules/office.nix
./home-modules/ollama.nix ./home-modules/ollama.nix
@@ -42,6 +45,7 @@
./home-modules/sops.nix ./home-modules/sops.nix
./home-modules/ssh.nix ./home-modules/ssh.nix
./home-modules/starship.nix ./home-modules/starship.nix
./home-modules/tts.nix
./home-modules/vale.nix ./home-modules/vale.nix
./home-modules/virt-manager.nix ./home-modules/virt-manager.nix
./home-modules/vscode.nix ./home-modules/vscode.nix
@@ -49,17 +53,19 @@
./home-modules/waybar.nix ./home-modules/waybar.nix
./home-modules/wlogout.nix ./home-modules/wlogout.nix
./home-modules/yazi.nix ./home-modules/yazi.nix
./home-modules/zoxide.nix ]; ./home-modules/zathura.nix
./home-modules/zoxide.nix
];
home.username = user; home.username = user;
home.homeDirectory = "/home/${user}"; home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05"; home.stateVersion = "24.05";
home.packages = with pkgs; [ home.packages = with pkgs; [
chromium chromium
zathura # zathura
xfce.thunar xfce.thunar
spotify # spotify
spicetify-cli spicetify-cli
swww playerctl swww playerctl
@@ -74,6 +80,7 @@
sssnake pipes sssnake pipes
dig dig
screen screen
reflex
gnumake gnumake
cmake cmake
@@ -85,12 +92,14 @@
wl-clipboard wl-clipboard
xclip xclip
xournal xournal
ghostscript
inputs.zen-browser.packages."${system}".default inputs.zen-browser.packages."${system}".default
] ++ (with pkgs-unstable; [ ] ++ (with pkgs-unstable; [
obsidian obsidian
firefox firefox
spotify
]) ++ (if host != "NxACE" then (with pkgs; [ ]) ++ (if host != "NxACE" then (with pkgs; [
signal-desktop signal-desktop
zoom-us zoom-us

File diff suppressed because one or more lines are too long

7
system-modules/adb.nix Normal file
View File

@@ -0,0 +1,7 @@
{ host, lib, ... }:
lib.mkIf (host != "NxACE")
{
programs.adb = {
enable = true;
};
}

View File

@@ -1,7 +1,7 @@
{ config, pkgs, pkgs-unstable, lib, host, inputs, ... }: { config, pkgs, pkgs-unstable, lib, host, domain, inputs, ... }:
let let
grub-theme-ascii-diana = (pkgs.fetchFromGitea { grub-theme-ascii-diana = (pkgs.fetchFromGitea {
domain = "git.nx2.site"; domain = "git.${domain}";
owner = "nx2"; owner = "nx2";
repo = "grub-theme-ascii-diana"; repo = "grub-theme-ascii-diana";
rev = "0.5.0"; rev = "0.5.0";

View File

@@ -1,5 +1,4 @@
{ pkgs, user, host, lib, ... }: { pkgs, user, ... }:
if (host != "NxACE") then
{ {
services.greetd = { services.greetd = {
enable = true; enable = true;
@@ -23,30 +22,3 @@ if (host != "NxACE") then
TTYVTDisallocate = true; TTYVTDisallocate = true;
}; };
} }
else
{
environment.systemPackages = with pkgs; [
sddm
# where-is-my-sddm-theme
];
services.xserver = {
displayManager = {
defaultSession = "hyprland";
sddm = {
enable = true;
# theme = "where_is_my_sddm_theme";
settings = {
theme = {
# background = /home/nx2/Pictures/
passwordFontSize = 12;
passwordInputCursorVisible = true;
};
};
};
autoLogin = lib.mkIf (host == "NxACE") {
enable = true;
user = "tv";
};
};
};
}

View File

@@ -15,6 +15,7 @@
users.users."${user}".extraGroups = [ "docker" ]; users.users."${user}".extraGroups = [ "docker" ];
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
443
8384 8384
]; ];
} }

View File

@@ -1,28 +1,87 @@
{ pkgs-unstable, ... }: { pkgs, pkgs-unstable, ... }:
{ {
# i18n.inputMethod = {
# type = "fcitx5";
# enable = true;
# fcitx5.addons = with pkgs; [
# fcitx5-gtk # alternatively, kdePackages.fcitx5-qt
# fcitx5-chinese-addons # table input method support
# fcitx5-nord # a color theme
# ];
# };
i18n.inputMethod = { i18n.inputMethod = {
enabled = "fcitx5"; enabled = "fcitx5";
# type = "fcitx5"; # for later than 24.05 fcitx5.waylandFrontend = true;
# enable = true; fcitx5.addons = with pkgs; [
fcitx5 = { fcitx5-gtk # alternatively, kdePackages.fcitx5-qt
waylandFrontend = true; fcitx5-chinese-addons # table input method support
addons = with pkgs-unstable; [ fcitx5-nord # a color theme
rime-data ];
fcitx5-rime
fcitx5-gtk
fcitx5-chinese-addons
fcitx5-catppuccin
];
};
};
services.xserver.desktopManager.runXdgAutostartIfNone = true;
environment.variables = {
GLFW_IM_MODULE = "fcitx";
GTK_IM_MODULE = "fcitx";
INPUT_METHOD = "fcitx";
XMODIFIERS = "@im=fcitx";
IMSETTINGS_MODULE = "fcitx";
QT_IM_MODULE = "fcitx";
SDL_IM_MODULE = "fcitx";
}; };
# i18n.inputMethod = {
# enabled = "fcitx5";
# ignoreUserConfig = true;
# waylandFrontend = true;
# fcitx5 = {
# addons = with pkgs-unstable; [
# rime-data
# fcitx5-rime
# # Chinese
# fcitx5-chinese-addons
# fcitx5-table-extra
# fcitx5-pinyin-moegirl
# fcitx5-pinyin-zhwiki
# # Japanese
# # fcitx5-mozc
# ];
# settings = {
# globalOptions = {
# Hotkey = {
# # Enumerate when press trigger key repeatedly
# EnumerateWithTriggerKeys = "True";
# # Skip first input method while enumerating
# EnumerateSkipFirst = "False";
# };
# "Hotkey/EnumerateForwardKeys" = { "0" = "Control+space"; };
# "Hotkey/EnumerateBackwardKeys" = { "0" = "Control+Shift+space"; };
# "Hotkey/PrevPage" = { "0" = "Up"; };
# "Hotkey/NextPage" = { "0" = "Down"; };
# "Hotkey/PrevCandidate" = { "0" = "Shift+Tab"; };
# "Hotkey/NextCandidate" = { "0" = "Tab"; };
# Behavior = {
# ActiveByDefault = "False"; # Active By Default
# ShareInputState = "No"; # Share Input State
# PreeditEnabledByDefault = "True"; # Show preedit in application
# ShowInputMethodInformation = "True"; # Show Input Method Information when switch input method
# showInputMethodInformationWhenFocusIn = "False"; # Show Input Method Information when changing focus
# CompactInputMethodInformation = "True"; # Show compact input method information
# ShowFirstInputMethodInformation = "True"; # Show first input method information
# DefaultPageSize = "5"; # Default page size
# OverrideXkbOption = "False"; # Override Xkb Option
# PreloadInputMethod = "True"; # Preload input method to be used by default
# };
# };
# inputMethod = {
# "Groups/0" = {
# "Name" = "Default";
# "Default Layout" = "us";
# "DefaultIM" = "mozc";
# };
# "Groups/0/Items/0" = {
# "Name" = "keyboard-us";
# "Layout" = null;
# };
# "Groups/0/Items/1" = {
# "Name" = "mozc";
# "Layout" = null;
# };
# "GroupOrder" = {
# "0" = "Default";
# };
# };
# };
# };
# };
} }

View File

@@ -1,7 +1,12 @@
{ config, pkgs, ...}: { config, pkgs, ...}:
{ {
environment.systemPackages = with pkgs; [ environment = {
jmtpfs systemPackages = with pkgs; [
]; jmtpfs
simple-mtpfs
android-file-transfer
];
};
programs.fuse.userAllowOther = true;
} }

View File

@@ -16,7 +16,7 @@
fileSystems = if host != "NxACE" then { fileSystems = if host != "NxACE" then {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; }; "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid:1000" "gid:100" ]; }; "/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
} else { } else {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; }; "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };

View File

@@ -1,18 +1,32 @@
{ pkgs, lib, host, secrets, ... }:
{ config, pkgs, host, ... }:
let
in
{ {
networking.nameservers = [ # sops.secrets = {
"1.1.1.1" # "wireless-networking.env" = {};
"8.8.8.8" # };
];
networking.hostName = host; networking = {
nameservers = [
networking.networkmanager = { "1.1.1.1"
enable = true; "8.8.8.8"
];
hostName = host;
networkmanager = {
enable = true;
};
enableIPv6 = true;
firewall.allowedTCPPorts = [
80
443
];
};
environment.etc = {
"ssl/certs/tuda-eduroam-root.crt".source = "${pkgs.cacert.unbundled}/etc/ssl/certs/T-TeleSec_GlobalRoot_Class_2:1.crt";
};
sops.secrets = {
"eduroam/tuda_nmconnection" = {
mode = "0600";
owner = "root";
path = "/etc/NetworkManager/system-connections/eduroam.nmconnection";
};
}; };
networking.enableIPv6 = false;
} }

8
system-modules/nixd.nix Normal file
View File

@@ -0,0 +1,8 @@
{ inputs, ... }:
{
nix.nixPath = [
"nixpkgs=${inputs.nixpkgs}"
"nixpkgs-unstable=${inputs.nixpkgs-unstable}"
"nixpkgs-latest=${inputs.nixpkgs-latest}"
];
}

View File

@@ -1,45 +1,47 @@
{ config, pkgs, lib, user, host, ... }: { config, pkgs, domain, secrets, ... }:
# lib.mkIf false
lib.mkIf (host == "NxACE")
# ((import ./nx2site/proxy.nix { inherit config pkgs lib user; }) //
(
{ {
sops.secrets = { sops.secrets = {
"nx2site/namecheap.pw" = { }; "nx2site/namecheap.pw" = { };
# "nx2site/cloudflare/api-token-dns-edit" = { };
"nx2site/cloudflare/global-api-key" = { };
}; };
systemd = { systemd = {
timers."namecheap-dynamic-dns" = { timers."dynamic-dns" = {
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnBootSec = "2m"; OnBootSec = "2m";
OnUnitActiveSec = "10m"; OnUnitActiveSec = "10m";
Unit = "namecheap-dynamic-dns.service"; Unit = "dynamic-dns.service";
}; };
}; };
services."namecheap-dynamic-dns" = let services."dynamic-dns" = let
u = let u = let
domain = "nx2.site"; account_id = secrets.email.gmail-online.mail;
passord-file-path = config.sops.secrets."nx2site/namecheap.pw".path; zone_id = "33fecab36e060f49d492127345ea95a0";
# passord-file-path = config.sops.secrets."nx2site/namecheap.pw".path; record_id = {
log-file-path = "/var/log/update_namecheap.log"; base = "58d3412e8d88889d1a611b3669f0700f";
count-file-path = "/var/log/update_namecheap-count.txt"; sub = "fc861353142bc05d5dbad1799178e6a1";
in pkgs.writers.writePython3Bin "update_namecheap" { base6 = "d1b90e21d2d747dcb30448bd65312927";
sub6 = "b8082b7afe9e80971fc9f9dda16ec284";
};
passord-file-path = config.sops.secrets."nx2site/cloudflare/global-api-key".path;
log-file-path = "/var/log/couldflare.log";
count-file-path = "/var/log/cloudflare-count.txt";
in pkgs.writers.writePython3Bin "dyn_dns" {
libraries = with pkgs.python311Packages; [ requests ]; libraries = with pkgs.python311Packages; [ requests ];
flakeIgnore = [ "E501" "E305" "E701" "E704" "E302" "E114" "F841" ]; flakeIgnore = [ "E501" "E305" "E701" "E704" "E302" "E114" "F841" "E121" "E261" "E303"];
} '' } /* python */ ''
import requests import requests
import argparse import subprocess
import socket
from datetime import datetime from datetime import datetime
def get_public_ip(): return requests.get('https://ipinfo.io/ip').text.strip() def get_public_ip(ipv6=False):
return subprocess.run(['${pkgs.curl}/bin/curl', '-s', '-6' if ipv6 else '-4', 'https://ifconfig.me'], capture_output=True, text=True).stdout.strip()
def get_dns_ip(): return socket.gethostbyname_ex('${domain}')[2][0] def main():
def main(force_update):
my_ip = get_public_ip() my_ip = get_public_ip()
dns_ip = get_dns_ip() my_ip6 = get_public_ip(ipv6=True)
with open("${count-file-path}", "r") as f: with open("${count-file-path}", "r") as f:
content = f.read() content = f.read()
@@ -49,73 +51,136 @@ lib.mkIf (host == "NxACE")
with open("${count-file-path}", "w") as f: with open("${count-file-path}", "w") as f:
f.write(str(count)) f.write(str(count))
if not (force_update or my_ip != dns_ip): # 4
print(f"Host IP and DNS response are both {my_ip} --> No Action") with open("${passord-file-path}", 'r') as pw_file:
exit(0) pw = pw_file.read().strip()
else:
with open("${passord-file-path}", 'r') as pw_file: pw = pw_file.read().strip()
# Perform DNS updates # Perform DNS updates
resp_base = requests.get(f"https://dynamicdns.park-your-domain.com/update?host=@&domain=${domain}&password={pw}&ip={my_ip}") # https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record
resp_subd = requests.get(f"https://dynamicdns.park-your-domain.com/update?host=*&domain=${domain}&password={pw}&ip={my_ip}") resp_base = requests.patch(
'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.base}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip,
"type": "A"
}
)
# Reset the count file resp_subd = requests.patch(
with open("${count-file-path}", 'w') as f: f.write('0') 'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.sub}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip,
"type": "A"
}
)
now_str = datetime.now().strftime('%Y/%m/%d-%R') if resp_base.status_code != 200:
log_entry = f"At {now_str} - from {dns_ip} to {my_ip} - {count} times - Response {resp_base.status_code}{' - (forced)' if force_update else ' '}\n" print(resp_base.text)
print(log_entry, end="")
with open("${log-file-path}", 'a') as log_file: log_file.write(log_entry)
now_str = datetime.now().strftime('%Y/%m/%d-%R')
log_entry = f"At {now_str} - to {my_ip} - Response {resp_base.status_code}\n"
print(log_entry, end="")
with open("${log-file-path}", 'a') as log_file:
log_file.write(log_entry)
# Perform DNS updates
# https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-update-dns-record
resp_base = requests.patch(
'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.base6}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip6,
"type": "AAAA"
}
)
resp_subd = requests.patch(
'https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records/${record_id.sub6}',
headers={
'Content-Type': 'application/json',
'X-Auth-Email': '${account_id}',
'X-Auth-Key': pw
},
json={
"comment": "Domain verification record",
"name": "${domain}",
"proxied": True,
"settings": {},
"tags": [],
"ttl": 1, # automatic
"content": my_ip6,
"type": "AAAA"
}
)
if resp_base.status_code != 200:
print(resp_base.text)
now_str = datetime.now().strftime('%Y/%m/%d-%R')
log_entry = f"At {now_str} - to {my_ip6} - Response {resp_base.status_code}\n"
print(log_entry, end="")
with open("${log-file-path}", 'a') as log_file: log_file.write(log_entry)
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser() main()
parser.add_argument('-f', '--force', action='store_true', help='Force update')
args = parser.parse_args()
main(args.force)
''; '';
in { in {
script = '' script = ''
set -eu set -eu
${u}/bin/update_namecheap ${u}/bin/dyn_dns
''; '';
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "root";
}; };
}; };
}; };
# I can't use this becasue API Access for Namecheap needs a static whitelisted IP, which I don't have
# security.acme = {
# acceptTerms = true;
# certs."nx2site" = { };
# };
environment.systemPackages = with pkgs; [
certbot
(writeShellApplication {
name = "refresh_ssl_certificate";
runtimeInputs = [ certbot ];
# https://forum.endeavouros.com/t/tutorial-add-a-systemd-boot-loader-menu-entry-for-a-windows-installation-using-a-separate-esp-partition/37431
text = let
webroot = /home/nx2/nx2site/staticweb/content;
in /*bash*/ ''
cartbot
ls ${webroot}
'';
})
];
networking.hosts = { # docker network inspect nx2site_default | grep -E "Name|IPv4" | tr "\n" " " | sed -r 's- +- -g;s-\n?"Name": -\n-g' | sed -r '1d;2d;s-"(.+?)", "IPv4Address": "(.+)/16",- "\2" = [ "\1.docker" ];-g' networking.hosts = { # docker network inspect nx2site_default | grep -E "Name|IPv4" | tr "\n" " " | sed -r 's- +- -g;s-\n?"Name": -\n-g' | sed -r '1d;2d;s-"(.+?)", "IPv4Address": "(.+)/16",- "\2" = [ "\1.docker" ];-g'
"172.1.2.1" = [ "staticweb.docker" ]; # "172.1.2.1" = [ "staticweb.docker" ];
"172.1.3.1" = [ "matrix.docker" ]; # "172.1.3.1" = [ "matrix.docker" ];
# "172.1.0.9" = [ "matrixdb.docker" ]; # "172.1.0.9" = [ "matrixdb.docker" ];
"172.1.4.1" = [ "matrix-ss.docker" ]; # "172.1.4.1" = [ "matrix-ss.docker" ];
# "172.1.0.7" = [ "matrix-ssdb.docker" ]; # "172.1.0.7" = [ "matrix-ssdb.docker" ];
"172.1.5.1" = [ "pw.docker" ]; "172.1.5.1" = [ "pw.docker" ];
"172.1.6.1" = [ "git.docker" ]; "172.1.6.1" = [ "git.docker" ];
# "172.1.0.10" = [ "gitdb.docker" ]; # "172.1.0.10" = [ "gitdb.docker" ];
"172.1.7.1" = [ "nn.docker" ]; # "172.1.7.1" = [ "nn.docker" ];
"172.1.8.1" = [ "llm.docker" ]; # "172.1.8.1" = [ "llm.docker" ];
# "172.1.9.1" = [ "proxy.docker" ]; # "172.1.9.1" = [ "proxy.docker" ];
"172.1.10.1" = [ "share.docker" ]; # "172.1.10.1" = [ "share.docker" ];
"172.1.11.1" = [ "odq.docker" ]; # "172.1.11.1" = [ "odq.docker" ];
}; };
}) }

View File

@@ -0,0 +1,71 @@
{ config, pkgs-unstable, domain, ... }:
{
sops.secrets = {
"postgres-pw" = { owner = "gitea"; };
};
services.gitea = {
enable = true;
package = pkgs-unstable.gitea;
group = "gitea"; # default
user = "gitea"; # default
appName = "NxGit";
stateDir = "/var/lib/gitea"; # default
useWizard = false; # default
# camoHmacKeyFile = ;
customDir = "${config.services.gitea.stateDir}/custom"; # default
database = {
createDatabase = false; # default
host = "127.0.0.1"; # default
port = 5432;
passwordFile = config.sops.secrets."postgres-pw".path;
# path = "${config.services.gitea.stateDir}/data/gitea.db"; # default
# socket = "/run/postgresql";
socket = null;
type = "postgres";
name = "gitea"; # default
user = "gitea"; # default
};
dump = {
enable = true;
backupDir = "${config.services.gitea.stateDir}/dump"; # default
file = null; # default
interval = "daily";
type = "zip"; # default
};
extraConfig = null; # default
lfs = {
enable = false; # default
contentDir = "${config.services.gitea.stateDir}/data/lfs"; # default
};
mailerPasswordFile = null; # default
metricsTokenFile = null; # default
repositoryRoot = "${config.services.gitea.stateDir}/repositories"; # default
settings = {
log = {
LEVEL = "Info";
# LEVEL = "Error";
ROOT_PATH = "${config.services.gitea.stateDir}/log"; # default
};
i18n = {
LANGS = "en-US";
};
server = {
DISABLE_SSH = false; # default
SSH_PORT = 20022;
DOMAIN = "pw2.${domain}";
HTTP_ADDR = "http://${config.services.gitea.settings.server.DOMAIN}:${toString config.services.gitea.settings.server.HTTP_PORT}/";
HTTP_PORT = 3000; # default
PROTOCOL = "http"; # default
ROOT_URL = "https:pw2.${domain}/"; # default
STATIC_ROOT_PATH = "${config.services.gitea.stateDir}/static";
};
session = {
COOKIE_SECURE = true;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
}

View File

@@ -1,35 +1,56 @@
{ config, pkgs, lib, user }: { config, pkgs, lib, domain, ... }:
lib.mkIf false
{ {
sops.secrets = { sops.secrets = {
"nx2site/sslCertificate.pem" = { owner = config.services.nginx.user; }; "nx2site/sslCertificate.pem" = { owner = config.services.nginx.user; };
"nx2site/sslCertificateKey.pem" = { owner = config.services.nginx.user; }; "nx2site/sslCertificateKey.pem" = { owner = config.services.nginx.user; };
"nx2site/dhparams.pem" = { owner = config.services.nginx.user; }; "nx2site/dhparams.pem" = { owner = config.services.nginx.user; };
}; };
services.nginx = { security.acme = {
acceptTerms = true;
defaults = {
email = "acme@${domain}";
webroot = "/var/nginx/webroot";
group = "nginx";
};
certs = {
"${domain}" = {
extraDomainNames = builtins.map (subd: "${subd}.${domain}") [ "git" "git2" "pw" "pw2" "sync" ];
};
};
};
users.users."nginx" = {
extraGroups = [ "nginx" "acme" ];
useDefaultShell = false;
linger = true;
home = "/var/nginx/";
homeMode = "770";
createHome = true;
isSystemUser = true;
isNormalUser = false;
};
systemd.services.nginx.serviceConfig.ProtectHome = "read-only";
services.nginx = let
dl = [
{ addr = "0.0.0.0"; port = 443; ssl = true; }
{ addr = "0.0.0.0"; port = 80; ssl = false; }
{ addr = "[::0]"; port = 443; ssl = true; }
{ addr = "[::0]"; port = 80; ssl = false; }
];
in {
enable = true; enable = true;
user = "nginx";
group = "nginx";
additionalModules = []; additionalModules = [];
# appendConfig = ''''; # appendConfig = '''';
clientMaxBodySize = "20m"; clientMaxBodySize = "20m";
defaultHTTPListenPort = 80; defaultHTTPListenPort = 80;
defaultListenAddresses = [ "0.0.0.0" ] ++ lib.optional config.networking.enableIPv6 "[::0]"; defaultListenAddresses = [ "0.0.0.0" ] ++ lib.optional config.networking.enableIPv6 "[::0]";
defaultListen = [ { defaultListen = dl;
addr = "0.0.0.0";
ssl = true;
port = 443;
proxyProtocol = true;
}];
defaultMimeTypes = "${pkgs.mailcap}/etc/nginx/mime.types"; defaultMimeTypes = "${pkgs.mailcap}/etc/nginx/mime.types";
defaultSSLListenPort = 443; defaultSSLListenPort = 443;
enableQuicBPF = true; enableQuicBPF = true;
enableReload = true; enableReload = true;
# eventsConfig = '''';
# logError = ;
# mapHashBucketSize = ;
# mapHashMaxSize = ;
package = pkgs.nginxQuic; package = pkgs.nginxQuic;
# preStart = true;
proxyResolveWhileRunning = false; proxyResolveWhileRunning = false;
proxyTimeout = "20s"; proxyTimeout = "20s";
recommendedBrotliSettings = true; recommendedBrotliSettings = true;
@@ -39,142 +60,81 @@ lib.mkIf false
recommendedTlsSettings = true; recommendedTlsSettings = true;
recommendedZstdSettings = true; recommendedZstdSettings = true;
serverTokens = false; serverTokens = false;
# sslCiphers = true;
sslDhparam = config.sops.secrets."nx2site/dhparams.pem".path; sslDhparam = config.sops.secrets."nx2site/dhparams.pem".path;
sslProtocols = "TLSv1.2 TLSv1.3"; sslProtocols = "TLSv1.2 TLSv1.3";
statusPage = false; statusPage = false;
streamConfig = ""; # udp config streamConfig = ""; # udp config
validateConfigFile = true; validateConfigFile = true;
upstreams = {
"staticweb".servers = { "staticweb.docker:80" = {}; };
"matrix".servers = { "matrix.docker:80" = {}; };
"matrix-ss".servers = { "matrix-ss.docker:80" = {}; };
"pw".servers = { "pw.docker:80" = {}; };
"git".servers = { "git.docker:80" = {}; };
"nn".servers = { "nn.docker:80" = {}; };
"llm".servers = { "llm.docker:80" = {}; };
"share".servers = { "share.docker:80" = {}; };
"sync".servers = { "localhost:8384" = {}; };
};
virtualHosts = let virtualHosts = let
sslCertificate = config.sops.secrets."nx2site/sslCertificate.pem".path; vh = {
sslCertificateKey = config.sops.secrets."nx2site/sslCertificateKey.pem".path; kTLS = true;
kTLS = true; http2 = true; http3 = true; http3_hq = true; quic = true; http2 = true;
in http3 = true;
{ http3_hq = true;
"nx2.site" = { quic = true;
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic; addSSL = true;
listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ]; enableACME = true;
};
in {
"${domain}" = vh // {
root = "/var/nginx/webroot";
default = true;
listen = dl;
locations = { locations = {
"/" = { "/" = {
proxyPass = "http://staticweb"; extraConfig = ''
# extraConfig = [ ''add_header Alt-Svc 'h3=":443"; ma=86400';'' ''add_header Cache-Control "public";'' ] ++ common-location-conf; index index.html;
}; if ($request_uri ~ ^/(.*)\.html(\?|$)) {
"/.well-known/matrix/client" = { return 301 /$1;
return = ''200 '{"m.homeserver": {"base_url": "https://matrix.nx2.site"}, "org.matrix.msc3575.proxy": {"url": "https://matrix-ss.nx2.site"}}' ''; }
extraConfig = [ "default_type application/json;" "add_header Access-Control-Allow-Origin *;" ]; try_files $uri $uri.html $uri/ /404.html =404;
}; '';
"/.well-known/matrix/server" = {
return = ''200 '{"m.server":"matrix.nx2.site:443"}' '';
extraConfig = [ "default_type application/json;" "add_header Access-Control-Allow-Origin *;" ];
};
"~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync)" = {
proxyPass = "http://matrix-ss";
# extraConfig = [ ''proxy_set_header X-Forwarded-For $remote_addr;'' ''proxy_set_header X-Forwarded-Proto $scheme;'' ''proxy_set_header Host $host;'' ];
};
"~ ^(\/_matrix|\/_synapse\/client)" = {
return = ''200 '{"m.server":"matrix.nx2.site:443"}' '';
# extraConfig = [];
}; };
"~^(/ba)$" = { return = "301 /BA.pdf"; };
"/.well-known/matrix/client" = { return = "502"; };
"/.well-known/matrix/server" = { return = "502"; };
}; };
}; };
"matrix.nx2.site" = { "matrix.${domain}" = {
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic; listen = dl;
listen = [ locations = { "~.*" = { return = "502"; }; };
{ addr = "0.0.0.0"; port = 443; ssl = true; } };
{ addr = "0.0.0.0"; port = 8448; ssl = true; } "pw.${domain}" = vh // {
]; listen = dl;
locations = { locations = let d = "pw.docker:80"; in {
"/" = { "/" = { proxyPass = "http://${d}"; };
proxyPass = "http://matrix"; "/admin" = { proxyPass = "http://${d}"; };
# extraConfig = [ ''add_header Alt-Svc 'h3=":443"; ma=86400';'' ''add_header Cache-Control "public";'' ] ++ common-location-conf; "/notifications/hub" = { proxyPass = "http://${d}"; };
}; "/notifications/hub/negotiate" = { proxyPass = "http://${d}"; };
}; };
}; };
"matrix-ss.nx2.site" = { "pw2.${domain}" = vh // {
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic; listen = dl;
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ]; locations = let d = "127.0.0.1:3000"; in {
# "resolver 1.1.1.1;" "/" = { proxyPass = "http://${d}"; };
# "client_max_body_size 500M;" "/admin" = { proxyPass = "http://${d}"; };
# ]; "/notifications/hub" = { proxyPass = "http://${d}"; };
locations = { "/notifications/hub/negotiate" = { proxyPass = "http://${d}"; };
"/" = { proxyPass = "http://pw"; };
}; };
}; };
# "dev.nx2.site" = { "sync.${domain}" = vh // {
# inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic; listen = dl;
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ]; locations = { "/" = { proxyPass = "http://127.0.0.1:11434"; }; };
# locations = {
# "/" = {
# proxyPass = "http://dev";
# };
# };
# };
"pw.nx2.site" = {
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic;
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ];
locations = {
"/" = { proxyPass = "http://pw"; };
"/admin" = { proxyPass = "http://pw"; };
"/notifications/hub" = { proxyPass = "http://pw"; };
"/notifications/hub/negotiate" = { proxyPass = "http://pw"; };
};
}; };
"share.nx2.site" = { "git.${domain}" = vh // {
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic; listen = dl;
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ]; locations = { "/" = { proxyPass = "http://git.docker:3000"; }; };
locations = {
"/" = { proxyPass = "http://share"; # ''proxy_hide_header Content-Disposition;''
# ''proxy_set_header Content-Disposition $upstream_http_content_disposition;''
# ''proxy_set_header X-Real-IP $remote_addr;''
# ''proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;''
# ''proxy_set_header Host $http_host;''
# ];
};
"/socket.io" = {
proxyPass = "http://share/socket.io";
proxyWebsockets = true;
# extraConfig = [
# ''proxy_http_version 1.1;''
# ''proxy_set_header Upgrade $http_upgrade;''
# ''proxy_set_header Connection "upgrade";''
# ];
};
};
}; };
"sync.nx2.site" = { "git2.${domain}" = vh // {
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic; listen = dl;
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ]; locations = { "/" = { proxyPass = "http://127.0.0.1:8222"; }; };
locations = {
"/" = { proxyPass = "http://sync"; };
};
}; };
"git.nx2.site" = { "~^(.*).${domain}$" = {
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic; listen = dl;
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ]; root = "/var/nginx/webroot";
locations = { locations = { "~.*" = { return = "301 https://${domain}/502.html"; }; };
"/" = { proxyPass = "http://git"; };
};
};
"~^(.*)\.nx2\.site$" = {
inherit sslCertificate sslCertificateKey kTLS http2 http3 http3_hq quic;
# listen = [ { addr = "0.0.0.0"; port = 443; ssl = true; } ];
root = "/home/nx2/nx2site/staticweb/xcontent/";
locations = {
"~.*" = { return = "502 /502.html"; };
};
}; };
}; };
}; };
} }

View File

View File

@@ -0,0 +1,83 @@
{ config, pkgs, lib, user, ... }:
{
services = {
postgresql = {
enable = true;
package = pkgs.postgresql_12;
dataDir = "/var/lib/postgresql/${config.services.postgresql.package.psqlSchema}"; # default
# identMap = ''
# ${user} ${user} ${user}
# '';
enableJIT = false; # default
initdbArgs = []; # default
checkConfig = true; # default
enableTCPIP = false;
# # extraPlugins =
initialScript = null; # default
authentication = lib.mkForce ''
# TYPE DATABASE USER ADDRESS METHOD
local all all trust
host all all 127.0.0.1/32 trust #scram-sha-256
host all all ::1/128 trust #scram-sha-256
'';
# recoveryConfig = null;
ensureDatabases = [
"gitea"
# "vaultwarden"
];
settings = {
port = 5432; # default
listen_addresses = "localhost";
log_line_prefix = "[%p] "; # default
shared_preload_libraries = [ ]; # default
};
ensureUsers = [
# {
# name = "${user}";
# ensureDBOwnership = false;
# ensureClauses = {
# login = true;
# # inherit
# createdb = true;
# bypassrls = true;
# superuser = true;
# createrole = true;
# replication = true;
# };
# }
{
# as liong as there is no declarative user management you gotta set a pw by hand
# sudo -u postgres psql -c "ALTER USER gitea PASSWORD 'new-passwd';"
name = "gitea";
ensureDBOwnership = true;
}
];
};
# postgresqlBackup = {
# enable
# startAt
# location
# databases
# backupAll
# compression
# }
# postgresqlWalReceiver.receivers."main" = {
# postgresqlPackage = pkgs.postgresql_15;
# directory = /mnt/pg_wal/main/;
# slot = "main_wal_receiver";
# connection = "postgresql://user@somehost";
# compress
# extraArgs
# synchronous
# environment
# statusInterval
# };
# }
};
}

View File

@@ -1,5 +1,10 @@
{ config, lib, user, host, secrets, ...}: {
let config,
lib,
user,
host,
secrets,
... }: let
# helper funcitons # helper funcitons
conv = _: device: with device; { "${name}" = {id = id;};}; conv = _: device: with device; { "${name}" = {id = id;};};
justname = devices: (builtins.map (device: device.name)) devices; justname = devices: (builtins.map (device: device.name)) devices;
@@ -24,15 +29,11 @@ let
daniel-dcim = { name = "daniel-dcim"; path = "/vault/Pictures/Daniel"; }; daniel-dcim = { name = "daniel-dcim"; path = "/vault/Pictures/Daniel"; };
tessa-dcim = { name = "tessa-dcim"; path = "/vault/Pictures/Tessa"; }; tessa-dcim = { name = "tessa-dcim"; path = "/vault/Pictures/Tessa"; };
}; };
in in {
lib.mkIf (user != "tv")
{
sops.secrets = { sops.secrets = {
"syncthing/${host}/cert.pem" = { owner = user; }; "syncthing/${host}/cert.pem" = { owner = user; };
"syncthing/${host}/key.pem" = { owner = user; }; "syncthing/${host}/key.pem" = { owner = user; };
}; };
services.syncthing = with (builtins.mapAttrs conv devices); { services.syncthing = with (builtins.mapAttrs conv devices); {
enable = true; enable = true;
user = "${user}"; user = "${user}";

View File

@@ -1,22 +1,31 @@
{ pkgs, lib, host, user, ... }: { pkgs, user, ... }:
{ {
users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish
users.users."${user}" = { users.users."${user}" = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "audio" "video" "docker" "libvirtd" "uinput" "input" "ydotool" ]; extraGroups = [
"networkmanager"
"wheel"
"audio"
"video"
"docker"
"libvirtd"
"uinput"
"input"
"ydotool"
"acme"
"nginx"
"adbusers"
"gitea"
"postgres"
];
useDefaultShell = true; useDefaultShell = true;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key
]; ];
}; };
users.users.tv = lib.mkIf (host == "NxACE") {
isNormalUser = true;
extraGroups = [ "networkmanager" "audio" "video" "uinput" ];
useDefaultShell = true;
};
programs = { programs = {
bash = { bash = {