Compare commits

...

17 commits

Author SHA1 Message Date
Ingolf Wagner
e1cb5e8f57
⬆️ nixos-unstable-small -> nixpkgs-unstable 2025-02-18 21:29:05 +13:00
Ingolf Wagner
a83bbcb9bd
🐛 fix taskwarrior flake package installation mistake 2025-02-18 20:03:37 +13:00
Ingolf Wagner
99d8b79580
🐛 don't override taskwarrior flake inputs 2025-02-18 19:17:53 +13:00
Ingolf Wagner
b838caa222
🔧 sharpen the xorg component a bit 2025-02-18 17:08:58 +13:00
Ingolf Wagner
9e96d809d3
🔥 get rid of not used tools 2025-02-17 22:48:53 +13:00
Ingolf Wagner
55eaa80e98
⬆️ update nixos-healthchecks 2025-02-16 16:26:42 +13:00
Ingolf Wagner
3aacad45f3
🐛 fix wireguard forwarding 2025-02-16 16:26:18 +13:00
Ingolf Wagner
f721410bdd
install nixos-healthchecks 2025-02-14 23:36:56 +13:00
Ingolf Wagner
9a33ca1283
nix-serve -> harmonia for nix-cache 2025-02-14 21:46:45 +13:00
Ingolf Wagner
83ef3a0b9b
⬆️ update nixos-healthchecks 2025-02-14 21:46:14 +13:00
Ingolf Wagner
8c839e282d
🔧 remove vsync because it does not work 2025-02-14 20:32:09 +13:00
Ingolf Wagner
a7b0ddfa5d
🩹 fix pulseaudio warning 2025-02-14 20:16:23 +13:00
Ingolf Wagner
ea82349a38
🐛 remove handbreak because it's broken 2025-02-14 19:56:52 +13:00
Ingolf Wagner
3dad841848
🐛 remove simplescreenrecorder because it's broken 2025-02-14 19:56:51 +13:00
Ingolf Wagner
8807164c20
🐛 remove obs-studio because it's broken 2025-02-14 19:56:50 +13:00
Ingolf Wagner
25e0fd8212
🐛 remove xtrlock-pam because it's broken 2025-02-14 19:56:49 +13:00
Ingolf Wagner
7a3a6f3498
introduce vsync for intel graphic cards 2025-02-14 19:56:46 +13:00
16 changed files with 267 additions and 193 deletions

View file

@ -13,7 +13,7 @@ with lib;
};
config = mkIf (config.components.chaospott.enable && config.components.gui.audio.enable) {
hardware.pulseaudio.zeroconf.discovery.enable = true;
services.pulseaudio.zeroconf.discovery.enable = true;
environment.systemPackages = with pkgs; [
paprefs
];

View file

@ -12,45 +12,54 @@ with lib;
default = config.components.gui.enable;
};
config = mkIf (config.components.gui.audio.enable) {
config = mkMerge [
(mkIf (config.components.gui.audio.enable) {
security.rtkit.enable = true;
security.rtkit.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
hardware.pulseaudio.enable = false;
environment.systemPackages = with pkgs; [
alsa-utils
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
# PulseAudio control
# ------------------
ponymix
pavucontrol
lxqt.pavucontrol-qt
];
environment.systemPackages = with pkgs; [
alsa-utils
services.pipewire = {
#enable = true;
systemWide = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# PulseAudio control
# ------------------
ponymix
pavucontrol
lxqt.pavucontrol-qt
];
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
})
services.pipewire = {
enable = true;
systemWide = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
{
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
};
# this is always true
# seems other options enable this one
services.pipewire.enable = config.components.gui.audio.enable;
services.pulseaudio.enable = false;
}
];
}

View file

@ -16,6 +16,7 @@ with lib;
./browser.nix
./cups.nix
./home-manager
./kde.nix
./kmonad.nix
./noti.nix # todo: make this different (use password store and such)
./pass.nix

19
components/gui/kde.nix Normal file
View file

@ -0,0 +1,19 @@
{
config,
pkgs,
lib,
...
}:
{
options.components.gui.kde.enable = lib.mkOption {
type = lib.types.bool;
default = config.components.gui.enable;
};
config = lib.mkIf (config.components.gui.kde.enable) {
services.desktopManager.plasma6.enable = true;
};
}

View file

@ -14,72 +14,85 @@ with lib;
default = config.components.gui.enable;
};
config = mkIf (config.components.gui.xorg.enable && config.components.gui.enable) {
# system.custom.fonts.enable = true;
services.displayManager = {
defaultSession = lib.mkDefault "none+i3";
autoLogin.enable = lib.mkDefault true;
autoLogin.user = config.users.users.mainUser.name;
};
services.xserver = {
enable = true;
displayManager = {
lightdm.enable = lib.mkDefault true;
};
desktopManager.xterm.enable = false;
windowManager.i3.enable = true;
# mouse/touchpad
# --------------
};
services.libinput = {
enable = true;
touchpad = {
disableWhileTyping = true;
tapping = true;
scrollMethod = "twofinger";
accelSpeed = "1.3";
naturalScrolling = true;
horizontalScrolling = true;
};
};
# Packages
# --------
environment.systemPackages = with pkgs; [
xclip
xtrlock-pam
xorg.xev
dmenu
arandr
xcalib
flameshot
feh
];
# Xresources config
# -----------------
# spread the Xresource config
# across different files
# just add a file into `/etc/X11/Xresource.d/` and it will be
# evaluated.
services.xserver.displayManager.sessionCommands = ''
for file in `ls /etc/X11/Xresource.d/`
do
${pkgs.xorg.xrdb}/bin/xrdb -merge /etc/X11/Xresource.d/$file
done
'';
environment.etc."/X11/Xresource.d/.keep".text = "";
options.components.gui.xorg.lightdm.enable = mkOption {
type = lib.types.bool;
default = config.components.gui.xorg.enable;
};
options.components.gui.xorg.sddm.enable = mkOption {
type = lib.types.bool;
default = !config.components.gui.xorg.lightdm.enable;
};
config = mkMerge [
(mkIf (config.components.gui.xorg.lightdm.enable && config.components.gui.xorg.enable) {
services.displayManager = {
defaultSession = "none+i3";
autoLogin.enable = lib.mkDefault true;
autoLogin.user = config.users.users.mainUser.name;
};
services.xserver.displayManager.lightdm.enable = true;
})
(mkIf (config.components.gui.xorg.sddm.enable && config.components.gui.xorg.enable) {
services.xserver.displayManager.sddm.enable = true;
})
(mkIf (config.components.gui.xorg.enable && config.components.gui.enable) {
services.xserver.enable = true;
services.xserver.windowManager.i3.enable = true;
services.libinput = {
enable = true;
touchpad = {
disableWhileTyping = true;
tapping = true;
scrollMethod = "twofinger";
accelSpeed = "1.3";
naturalScrolling = true;
horizontalScrolling = true;
};
};
# Packages
# --------
environment.systemPackages = with pkgs; [
xclip
#xtrlock-pam
xorg.xev
dmenu
arandr
xcalib
flameshot
feh
];
# Xresources config
# -----------------
# spread the Xresource config
# across different files
# just add a file into `/etc/X11/Xresource.d/` and it will be
# evaluated.
services.xserver.displayManager.sessionCommands = ''
for file in `ls /etc/X11/Xresource.d/`
do
${pkgs.xorg.xrdb}/bin/xrdb -merge /etc/X11/Xresource.d/$file
done
'';
environment.etc."/X11/Xresource.d/.keep".text = "";
})
];
}

View file

@ -136,7 +136,7 @@ in
home-manager.sharedModules = [
{
programs.obs-studio = {
enable = true;
enable = false;
plugins = with pkgs.obs-studio-plugins; [
obs-backgroundremoval
obs-vaapi
@ -161,17 +161,17 @@ in
# obs studio stuff
obs-cli
v4l-utils
obs-cmd
#obs-cmd
# to record your screen
# ---------------------
simplescreenrecorder
#simplescreenrecorder
screenKey
#obs-studio
# to transcode video material
# ---------------------------
handbrake
# handbrake
ffmpeg-full
];

143
flake.lock generated
View file

@ -82,11 +82,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1739259543,
"narHash": "sha256-AW5UFLVstsfzTUVRJGJLmyhc9wDxo/1aROjsawEBD/c=",
"lastModified": 1739856890,
"narHash": "sha256-DMiV3Sp15mMGGfpbYvQ4uxf9yKrijkYG25fhNfSlCfI=",
"ref": "refs/heads/main",
"rev": "15e8df894e8ca457dadb8953750b28363f1bae6c",
"revCount": 5648,
"rev": "27a3126d6836bc0d46c46a0353443d27cec5430b",
"revCount": 5692,
"type": "git",
"url": "https://git.clan.lol/clan/clan-core"
},
@ -104,11 +104,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1723143645,
"narHash": "sha256-/71L2ZBM9AmUpEQC19Rf7AxA+BhIquObB8aZDkfVRz8=",
"lastModified": 1739428569,
"narHash": "sha256-uvW5PQqw4+cqjoaoPB/frHY7EjO+ehRryOHAkJKYX5A=",
"owner": "mrvandalo",
"repo": "clan-fact-generators",
"rev": "620c5d3185594b3e2d91e29a7590f44abae4319c",
"rev": "882fc040fcd283044a940a5e11e81a7e86aa76ce",
"type": "github"
},
"original": {
@ -164,11 +164,11 @@
]
},
"locked": {
"lastModified": 1738765162,
"narHash": "sha256-3Z40qHaFScWUCVQrGc4Y+RdoPsh1R/wIh+AN4cTXP0I=",
"lastModified": 1739634831,
"narHash": "sha256-xFnU+uUl48Icas2wPQ+ZzlL2O3n8f6J2LrzNK9f2nng=",
"owner": "nix-community",
"repo": "disko",
"rev": "ff3568858c54bd306e9e1f2886f0f781df307dff",
"rev": "fa5746ecea1772cf59b3f34c5816ab3531478142",
"type": "github"
},
"original": {
@ -202,11 +202,11 @@
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1736899990,
"narHash": "sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51++0xNWUxw=",
"lastModified": 1739223196,
"narHash": "sha256-vAxN2f3rvl5q62gQQjZGVSvF93nAsOxntuFz+e/655w=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "91ca1f82d717b02ceb03a3f423cbe8082ebbb26d",
"rev": "a89108e6272426f4eddd93ba17d0ea101c34fb21",
"type": "github"
},
"original": {
@ -595,11 +595,11 @@
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1729744850,
"narHash": "sha256-2tggkyfZKEHPsubKxqW1KhN9vzNJVpxLdFtyaFNTJR0=",
"lastModified": 1739598659,
"narHash": "sha256-HcR9D2T1EZyb4l83UIodxqbxe+hE+ahseWuW3+Mg+Uw=",
"owner": "mrvandalo",
"repo": "nixos-healthchecks",
"rev": "22119198994f20ba6d68efa2c1106aae83d74a8f",
"rev": "91d79a446bc2e0bab83731bda4b64aa9992e04bd",
"type": "github"
},
"original": {
@ -615,11 +615,11 @@
]
},
"locked": {
"lastModified": 1738753876,
"narHash": "sha256-yXT82kERWL4R81hfun9BuT478Q6ut0dJzdQjAxjRS38=",
"lastModified": 1739845242,
"narHash": "sha256-rNMXpDubNWGLTs45MuoH9YHtXfXye/fn2u4YMSTPt9I=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f20b7a8ab527a2482f13754dc00b2deaddc34599",
"rev": "5cfbf5cc37a3bd1da07ae84eea1b828909c4456b",
"type": "github"
},
"original": {
@ -700,11 +700,11 @@
"treefmt-nix": "treefmt-nix_3"
},
"locked": {
"lastModified": 1738399995,
"narHash": "sha256-2s+b7M2UayudwHQTVSo2RSF1sKbasqCXHYbE3XStVVI=",
"lastModified": 1739018452,
"narHash": "sha256-HC9kugsuRpPdR1dfRV0hTIqAn+PSR9rn8QWCETILI4o=",
"owner": "nix-community",
"repo": "nixos-anywhere",
"rev": "d4a3ecf32bd3cc9d243e0a2f37de91bc84b14216",
"rev": "e8e5d63e46f99fc75d300fb0d0447456d5057698",
"type": "github"
},
"original": {
@ -715,11 +715,11 @@
},
"nixos-facter-modules": {
"locked": {
"lastModified": 1736931726,
"narHash": "sha256-aY55yiifyo1XPPpbpH0kWlV1g2dNGBlx6622b7OK8ks=",
"lastModified": 1738752252,
"narHash": "sha256-/nA3tDdp/2g0FBy8966ppC2WDoyXtUWaHkZWL+N3ZKc=",
"owner": "numtide",
"repo": "nixos-facter-modules",
"rev": "fa11d87b61b2163efbb9aed7b7a5ae0299e5ab9c",
"rev": "60f8b8f3f99667de6a493a44375e5506bf0c48b1",
"type": "github"
},
"original": {
@ -730,11 +730,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1738638143,
"narHash": "sha256-ZYMe4c4OCtIUBn5hx15PEGr0+B1cNEpl2dsaLxwY2W0=",
"lastModified": 1739798439,
"narHash": "sha256-GyipmjbbQEaosel/+wq1xihCKbv0/e1LU00x/8b/fP4=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "9bdd53f5908453e4d03f395eb1615c3e9a351f70",
"rev": "3e2ea8a49d4d76276b0f4e2041df8ca5c0771371",
"type": "github"
},
"original": {
@ -850,11 +850,11 @@
},
"nixpkgs-legacy_2411": {
"locked": {
"lastModified": 1738702386,
"narHash": "sha256-nJj8f78AYAxl/zqLiFGXn5Im1qjFKU8yBPKoWEeZN5M=",
"lastModified": 1739758141,
"narHash": "sha256-uq6A2L7o1/tR6VfmYhZWoVAwb3gTy7j4Jx30MIrH0rE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "030ba1976b7c0e1a67d9716b17308ccdab5b381e",
"rev": "c618e28f70257593de75a7044438efc1c1fc0791",
"type": "github"
},
"original": {
@ -938,11 +938,11 @@
},
"nixpkgs-unstable-small": {
"locked": {
"lastModified": 1738758495,
"narHash": "sha256-CZ8T4vP3ag2hwkpSZjatxJb55ouszvmnWw09qxGW9TU=",
"lastModified": 1739822428,
"narHash": "sha256-eVH9Ggf0eojNMoRkksP7SfOMpI8ITLNfmoZrKyfQ8hU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ceaea203f3ae1787b1bd13f021f686391696fc5b",
"rev": "a3a07ac733f5aa4a1b1800d4a4042b65c6a9865f",
"type": "github"
},
"original": {
@ -1001,16 +1001,16 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1738758495,
"narHash": "sha256-CZ8T4vP3ag2hwkpSZjatxJb55ouszvmnWw09qxGW9TU=",
"lastModified": 1739742245,
"narHash": "sha256-oAgAV4fLWMIPqsEyZVVdk7c0SUdDOV1E7Epq0EIUQs4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ceaea203f3ae1787b1bd13f021f686391696fc5b",
"rev": "f0204ef4baa3b6317dee1c84ddeffbd293638836",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable-small",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -1031,11 +1031,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1738178544,
"narHash": "sha256-UbM+zJFlze877N5j2YMLKYFX7t05VvmuNX2M0vJ7RfI=",
"lastModified": 1739736696,
"narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "975ac0ab33ee7fea64842047a96f5d679d90913c",
"rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f",
"type": "github"
},
"original": {
@ -1045,6 +1045,22 @@
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1727122398,
"narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"permown": {
"inputs": {
"nixpkgs": [
@ -1230,11 +1246,11 @@
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1738198321,
"narHash": "sha256-lhnHBXO9Y8xEn92JqxjancdL8Gh16ONuxZp60iZfmX4=",
"lastModified": 1739753812,
"narHash": "sha256-zrdDM2wruRklLfdOCPbQ3E1n0lf92pqass3dtzwYr1k=",
"owner": "nix-community",
"repo": "srvos",
"rev": "7d5a4aaadac9ff63f9ed4347df95175aceee5079",
"rev": "6eb9f48ae6f452827cf611dd020ca1f33b115ebf",
"type": "github"
},
"original": {
@ -1263,15 +1279,16 @@
"systems": "systems_3",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1738611626,
"narHash": "sha256-IgjqlYPaS8Bg+jc6a691w27XDFhBeM7gkP4eDcR2EBs=",
"lastModified": 1739826051,
"narHash": "sha256-q1E9/4Hyahz/+Bd6HEKZq+Wi9HpI4XmAZG3P8CALT1E=",
"owner": "danth",
"repo": "stylix",
"rev": "d513f59da5856978c363d2f82103f708f4a6024d",
"rev": "7feb1c29bf39ebe6b2984b2f77f9ad38f486e311",
"type": "github"
},
"original": {
@ -1365,18 +1382,16 @@
"taskwarrior": {
"inputs": {
"flake-parts": "flake-parts_7",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs": "nixpkgs_8",
"taskshell": "taskshell",
"treefmt-nix": "treefmt-nix_6"
},
"locked": {
"lastModified": 1727417586,
"narHash": "sha256-z3ahlvbUWENgrvatJYd7FtPL0OoV4E+zNZiBzRx9S1E=",
"lastModified": 1739862146,
"narHash": "sha256-otEGbR3b7iBTzjIVZ7kMp37h/EkPXiMYZ7+XPbQKIsY=",
"owner": "mrvandalo",
"repo": "taskwarrior-flake",
"rev": "9433b3b1c4afb18c554d067fadf37d979b129b09",
"rev": "ebf7f6d27b9f39fabc328a82504835cf847d8250",
"type": "github"
},
"original": {
@ -1441,6 +1456,22 @@
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1737565458,
"narHash": "sha256-y+9cvOA6BLKT0WfebDsyUpUa/YxKow9hTjBp6HpQv68=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "ae31625ba47aeaa4bf6a98cf11a8d4886f9463d9",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
@ -1627,11 +1658,11 @@
]
},
"locked": {
"lastModified": 1738680491,
"narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=",
"lastModified": 1739829690,
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "64dbb922d51a42c0ced6a7668ca008dded61c483",
"rev": "3d0579f5cc93436052d94b73925b48973a104204",
"type": "github"
},
"original": {

View file

@ -27,7 +27,7 @@
nixpkgs-legacy_2405.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-legacy_2411.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
permown.inputs.nixpkgs.follows = "nixpkgs";
permown.url = "github:mrVanDalo/module.permown";
polygon-art.url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git";
@ -41,7 +41,6 @@
stylix.inputs.home-manager.follows = "home-manager";
stylix.inputs.nixpkgs.follows = "nixpkgs";
stylix.url = "github:danth/stylix";
taskwarrior.inputs.nixpkgs.follows = "nixpkgs";
taskwarrior.url = "github:mrvandalo/taskwarrior-flake";
#taskwarrior.url = "git+file:///home/palo/dev/nixos/taskwarrior-flake";
telemetry.inputs.nixpkgs.follows = "nixpkgs";
@ -307,7 +306,9 @@
boot.loader.systemd-boot.configurationLimit = lib.mkDefault 10;
boot.loader.generic-extlinux-compatible.configurationLimit = lib.mkDefault 10;
boot.loader.grub.configurationLimit = lib.mkDefault 10;
environment.systemPackages = [ pkgs.systemctl-find-service-config ];
environment.systemPackages = [
pkgs.systemctl-find-service-config
];
}
)
# My Structure

View file

@ -4,7 +4,6 @@
enable = true;
defaultEditor = lib.mkDefault true;
};
programs.helix = {
enable = true;
};
# enable = true;
#};
}

View file

@ -18,7 +18,7 @@ with lib;
jetbrains.idea-ultimate
vscode
zed-editor
#zed-editor
# minicom # for flipper zero

View file

@ -9,7 +9,7 @@ with lib;
{
config = mkIf config.gui.enable {
programs.obs-studio.enable = true;
programs.obs-studio.enable = false;
home.packages = [
emoji-picker
signal-desktop

View file

@ -23,6 +23,7 @@ in
home.packages = [
pkgs.timewarrior
pkgs.bugwarrior
taskwarrior
pkgs.tasksh

View file

@ -55,6 +55,7 @@
components.virtualisation.enable = true;
components.gui.enable = true;
components.gui.audio.enable = false;
components.mainUser.enable = true;
components.media.enable = true;
components.media.tts-client.enable = false;

View file

@ -56,8 +56,11 @@
components.network.enable = true;
components.network.nginx.landingpage.enable = false;
components.network.wifi.enable = false;
components.virtualisation.enable = true; # we only enable this stuff where we need it explicitly
components.virtualisation.podman.enable = false;
components.virtualisation.virtualbox.enable = false;
virtualisation.oci-containers.backend = "docker";
features.network.fail2ban.enable = true;

View file

@ -31,7 +31,7 @@ in
ping -c 1 -W 5 ${config.clan.core.facts.services.wireguard_ip.public."wireguard.wg0.ip".value}
'';
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
boot.kernel.sysctl."net.ipv4.conf.wg0.forwarding" = true;
# Enable WireGuard
networking.wg-quick.interfaces = {

View file

@ -4,12 +4,11 @@
pkgs,
...
}:
let
port = 5005;
in
{
# nixpkgs.config.packageOverrides = p: {
# nix-serve = p.haskellPackages.nix-serve-ng;
# };
# generate private key with:
# nix-store --generate-binary-cache-key my-secret-key my-public-key
clan.core.facts.services."nix-serve" = {
@ -26,34 +25,31 @@
'';
};
services.nix-serve = {
services.harmonia = {
enable = true;
secretKeyFile = config.clan.core.facts.services.nix-serve.secret."nix-serve.key".path;
port = 5005;
signKeyPaths = [ config.clan.core.facts.services.nix-serve.secret."nix-serve.key".path ];
settings = {
bind = "127.0.0.1:${toString port}";
priority = 100;
};
};
healthchecks.closed.public.ports.nix-serve = [ config.services.nix-serve.port ];
healthchecks.http.nix-serve = {
healthchecks.closed.public.ports.nix-cache = [ port ];
healthchecks.http.nix-cache = {
url = "cache.${config.networking.hostName}.wg0/nix-cache-info";
expectedContent = "Priority: 50";
expectedContent = "Priority: ${toString config.services.harmonia.settings.priority}";
};
services.nginx = {
enable = true;
virtualHosts."cache.${config.networking.hostName}.wg0" = {
locations."/".extraConfig = ''
proxy_pass http://localhost:${toString config.services.nix-serve.port};
allow ${config.wireguard.wg0.subnet};
deny all;
'';
# curl https://cache.nixos.org/nix-cache-info
# lower priority means ask first.
locations."= /nix-cache-info".extraConfig = ''
alias ${pkgs.writeText "cache-info" ''
StoreDir: /nix/store
WantMassQuery: 1
Priority: 50
''};
proxy_pass http://localhost:${toString port};
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
allow ${config.wireguard.wg0.subnet};
deny all;
'';