diff options
| author | Fuwn <[email protected]> | 2024-09-20 05:36:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-20 05:36:20 -0700 |
| commit | d9747c64b038943253eaafdc59a49d5face46dab (patch) | |
| tree | b452d15a7f20e9f4bb70ec9f9040137bec1072f8 /modules/core/software/services | |
| parent | himeji: move containers over from seti (diff) | |
| download | nixos-config-d9747c64b038943253eaafdc59a49d5face46dab.tar.xz nixos-config-d9747c64b038943253eaafdc59a49d5face46dab.zip | |
modules: server and core modules
Diffstat (limited to 'modules/core/software/services')
| -rw-r--r-- | modules/core/software/services/adb.nix | 12 | ||||
| -rw-r--r-- | modules/core/software/services/ananicy.nix | 8 | ||||
| -rw-r--r-- | modules/core/software/services/dbus.nix | 15 | ||||
| -rw-r--r-- | modules/core/software/services/default.nix | 24 | ||||
| -rw-r--r-- | modules/core/software/services/libinput.nix | 13 | ||||
| -rw-r--r-- | modules/core/software/services/logrotate.nix | 24 | ||||
| -rw-r--r-- | modules/core/software/services/ollama.nix | 6 | ||||
| -rw-r--r-- | modules/core/software/services/printing.nix | 19 | ||||
| -rw-r--r-- | modules/core/software/services/xserver.nix | 10 |
9 files changed, 131 insertions, 0 deletions
diff --git a/modules/core/software/services/adb.nix b/modules/core/software/services/adb.nix new file mode 100644 index 0000000..d106ead --- /dev/null +++ b/modules/core/software/services/adb.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + programs.adb.enable = true; + + services.udev = { + packages = [ pkgs.android-udev-rules ]; + + extraRules = '' + SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="adbusers" + ''; + }; +} diff --git a/modules/core/software/services/ananicy.nix b/modules/core/software/services/ananicy.nix new file mode 100644 index 0000000..bdc9bbd --- /dev/null +++ b/modules/core/software/services/ananicy.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + services.ananicy = { + enable = false; + package = pkgs.ananicy-cpp; + rulesProvider = pkgs.ananicy-rules-cachyos; + }; +} diff --git a/modules/core/software/services/dbus.nix b/modules/core/software/services/dbus.nix new file mode 100644 index 0000000..8b25bf9 --- /dev/null +++ b/modules/core/software/services/dbus.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: +{ + services.dbus = { + enable = true; + implementation = "broker"; + + packages = with pkgs; [ + dconf + gcr + udisks2 + # flatpak + # xdg-desktop-portal + ]; + }; +} diff --git a/modules/core/software/services/default.nix b/modules/core/software/services/default.nix new file mode 100644 index 0000000..4b9ccf6 --- /dev/null +++ b/modules/core/software/services/default.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +{ + imports = [ + # ./adb.nix + ./ananicy.nix + ./dbus.nix + ./libinput.nix + ./logrotate.nix + ./ollama.nix + # ./printing.nix + ./xserver.nix + ]; + + services = { + printing.enable = false; + gnome.gnome-keyring.enable = true; + fstrim.enable = false; + gvfs.enable = true; + udev.packages = with pkgs; [ pkgs.logitech-udev-rules ]; + thermald.enable = true; + irqbalance.enable = true; + gpm.enable = true; + }; +} diff --git a/modules/core/software/services/libinput.nix b/modules/core/software/services/libinput.nix new file mode 100644 index 0000000..643f814 --- /dev/null +++ b/modules/core/software/services/libinput.nix @@ -0,0 +1,13 @@ +{ + services.libinput = { + enable = true; + + mouse = { + accelProfile = "flat"; + }; + + touchpad = { + accelProfile = "flat"; + }; + }; +} diff --git a/modules/core/software/services/logrotate.nix b/modules/core/software/services/logrotate.nix new file mode 100644 index 0000000..2dedf2e --- /dev/null +++ b/modules/core/software/services/logrotate.nix @@ -0,0 +1,24 @@ +{ pkgs, lib, ... }: +{ + services.logrotate.settings = { + "/var/log/audit/audit.log" = { }; + + header = { + global = true; + dateext = true; + dateformat = "-%Y-%m-%d"; + nomail = true; + missingok = true; + copytruncate = true; + priority = 1; + frequency = "daily"; + rotate = 7; + minage = 1; + compress = true; + compresscmd = "${lib.getExe' pkgs.zstd "zstd"}"; + compressoptions = " -Xcompression-level 10"; + compressext = "zst"; + uncompresscmd = "${lib.getExe' pkgs.zstd "unzstd"}"; + }; + }; +} diff --git a/modules/core/software/services/ollama.nix b/modules/core/software/services/ollama.nix new file mode 100644 index 0000000..d737250 --- /dev/null +++ b/modules/core/software/services/ollama.nix @@ -0,0 +1,6 @@ +{ + services.ollama = { + enable = true; + acceleration = "cuda"; + }; +} diff --git a/modules/core/software/services/printing.nix b/modules/core/software/services/printing.nix new file mode 100644 index 0000000..f7a38de --- /dev/null +++ b/modules/core/software/services/printing.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + services = { + printing = { + enable = true; + + drivers = with pkgs; [ + gutenprint + hplip + ]; + }; + + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + }; +} diff --git a/modules/core/software/services/xserver.nix b/modules/core/software/services/xserver.nix new file mode 100644 index 0000000..f1833a4 --- /dev/null +++ b/modules/core/software/services/xserver.nix @@ -0,0 +1,10 @@ +{ + services.xserver = { + xkb = { + layout = "us"; + options = "caps:escape"; + }; + + videoDrivers = [ "nvidia" ]; + }; +} |