Init:start-nix

This commit is contained in:
dichgrem
2025-07-22 12:18:15 +08:00
parent 7ce7214a74
commit e57cdd246c
178 changed files with 22667 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
_: {
services = {
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
audio.enable = true;
jack.enable = true;
pulse.enable = true;
wireplumber.enable = true;
};
};
}

14
modules/services/daed.nix Normal file
View File

@@ -0,0 +1,14 @@
{
hostname,
lib,
...
}:
with lib; let
inherit (import ../../hosts/${hostname}/env.nix) Transparent-Proxy;
in {
config = mkIf Transparent-Proxy {
services.daed = {
enable = true;
};
};
}

29
modules/services/ddm.nix Normal file
View File

@@ -0,0 +1,29 @@
{
hostname,
pkgs,
...
}: let
inherit (import ../../hosts/${hostname}/env.nix) WM;
in {
services = {
greetd = {
enable = true;
vt = 1;
settings = {
default_session = {
user = "greeter";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet -c ${WM} -t --user-menu";
};
};
};
};
systemd.services.greetd.serviceConfig = {
Type = "idle";
StandardInput = "tty";
StandardOutput = "tty";
StandardError = "journal";
TTYReset = true;
TTYVHangup = true;
TTYVTDisallocate = true;
};
}

25
modules/services/keyd.nix Normal file
View File

@@ -0,0 +1,25 @@
_: {
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["*"];
settings = {
main = {
capslock = "overload(alt, esc)";
};
"alt" = {
c = "backspace";
d = "delete";
e = "enter";
h = "left";
j = "down";
k = "up";
l = "right";
capslock = "capslock";
};
};
};
};
};
}

13
modules/services/misc.nix Normal file
View File

@@ -0,0 +1,13 @@
_: {
services = {
fstrim = {
enable = true;
interval = "weekly";
};
gvfs.enable = true;
scx = {
enable = true;
scheduler = "scx_lavd";
};
};
}

22
modules/services/ntp.nix Normal file
View File

@@ -0,0 +1,22 @@
_: {
services.ntpd-rs = {
enable = true;
settings = {
source = [
{
address = "ntppool1.time.nl";
mode = "nts";
}
{
address = "ntppool2.time.nl";
mode = "nts";
}
{
address = "nts.netnod.se";
mode = "nts";
}
];
};
useNetworkingTimeServers = false;
};
}

16
modules/services/qemu.nix Normal file
View File

@@ -0,0 +1,16 @@
{
hostname,
lib,
...
}:
with lib; let
inherit (import ../../hosts/${hostname}/env.nix) QEMU-VM-Use-Case;
in {
config = mkIf QEMU-VM-Use-Case {
services = {
spice-vdagentd.enable = true;
spice-webdavd.enable = true;
};
virtualisation.libvirtd.enable = true;
};
}