about summary refs log tree commit diff stats
path: root/sys/svcs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-20 16:10:21 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-20 16:14:26 +0200
commit368cb6b0d25db2ae23be42ad51584de059997e51 (patch)
tree3282e45d3ebced63c8498a47e83a255c35de620b /sys/svcs
parentrefactor(hm): Rename to `modules/home` (diff)
downloadnixos-config-368cb6b0d25db2ae23be42ad51584de059997e51.zip
refactor(sys): Modularize and move to `modules/system` or `pkgs`
Diffstat (limited to '')
-rw-r--r--modules/system/services/adb/default.nix (renamed from sys/svcs/adb/default.nix)0
-rw-r--r--modules/system/services/backup/default.nix (renamed from sys/svcs/backup/default.nix)11
-rw-r--r--modules/system/services/default.nix (renamed from sys/svcs/default.nix)4
-rw-r--r--modules/system/services/issue_file/default.nix (renamed from sys/svcs/getty/default.nix)13
-rw-r--r--modules/system/services/nix/default.nix (renamed from sys/svcs/nix/default.nix)1
-rw-r--r--modules/system/services/openssh/default.nix (renamed from sys/svcs/openssh/default.nix)0
-rw-r--r--modules/system/services/serverphone/certificates/ca.crt (renamed from sys/svcs/serverphone/certificates/ca.crt)0
-rw-r--r--modules/system/services/serverphone/certificates/server.crt (renamed from sys/svcs/serverphone/certificates/server.crt)0
-rw-r--r--modules/system/services/serverphone/default.nix (renamed from sys/svcs/serverphone/default.nix)0
l---------modules/system/services/serverphone/keys/key_1 (renamed from sys/svcs/serverphone/keys/key_1)0
l---------modules/system/services/serverphone/keys/key_2 (renamed from sys/svcs/serverphone/keys/key_2)0
-rw-r--r--modules/system/services/steam/default.nix (renamed from sys/svcs/steam/default.nix)8
-rw-r--r--modules/system/services/swaylock/default.nix (renamed from sys/svcs/swaylock/default.nix)0
-rw-r--r--modules/system/services/xdg/default.nix (renamed from sys/svcs/xdg/default.nix)0
-rwxr-xr-xmodules/system/services/xdg/scripts/lf_wrapper.sh (renamed from sys/svcs/xdg/scripts/lf_wrapper.sh)0
-rwxr-xr-xmodules/system/services/xdg/scripts/ranger_wrapper.sh (renamed from sys/svcs/xdg/scripts/ranger_wrapper.sh)0
-rw-r--r--sys/svcs/dconf/default.nix10
-rw-r--r--sys/svcs/fwupd/default.nix3
-rw-r--r--sys/svcs/postgresql/default.nix5
-rw-r--r--sys/svcs/printing/default.nix31
-rw-r--r--sys/svcs/scanning/default.nix12
-rw-r--r--sys/svcs/snapper/default.nix41
22 files changed, 19 insertions, 120 deletions
diff --git a/sys/svcs/adb/default.nix b/modules/system/services/adb/default.nix
index 4055dbb1..4055dbb1 100644
--- a/sys/svcs/adb/default.nix
+++ b/modules/system/services/adb/default.nix
diff --git a/sys/svcs/backup/default.nix b/modules/system/services/backup/default.nix
index 91433bf9..705dcf23 100644
--- a/sys/svcs/backup/default.nix
+++ b/modules/system/services/backup/default.nix
@@ -9,16 +9,18 @@
     ${pkgs.snap-sync-forked}/bin/snap-sync-forked --UUID "${cfg.backupDiskUuid}" --noconfirm;
     ${pkgs.util-linux}/bin/umount "/run/media/${cfg.backupDiskUuid}";
   '';
-  cfg = config.soispha.fs.backup;
+
+  cfg = config.soispha.backup;
 in {
-  options.soispha.fs.backup = {
-    enable = lib.mkEnableOption (lib.mdDoc "backups with snap-sync");
+  options.soispha.backup = {
+    enable = lib.mkEnableOption "backups with my forked snap-sync";
     backupDiskUuid = lib.mkOption {
       type = lib.types.str;
       example = lib.literalExpression "d1d20ae7-3d8a-44da-86da-677dbbb10c89";
-      description = lib.mdDoc "The UUID of the backup disk";
+      description = "The UUID of the backup disk";
     };
   };
+
   config = lib.mkIf cfg.enable {
     systemd = {
       services.backup = {
@@ -31,6 +33,7 @@ in {
           ExecStart = "${backup-script}/bin/backsnap";
         };
       };
+
       timers.backup = {
         wantedBy = ["timers.target"];
         unitConfig = {
diff --git a/sys/svcs/default.nix b/modules/system/services/default.nix
index 56a16055..76ef26e2 100644
--- a/sys/svcs/default.nix
+++ b/modules/system/services/default.nix
@@ -1,16 +1,16 @@
 {...}: {
   imports = [
+    #./serverphone
     ./adb
     ./backup
     ./dconf
     ./fwupd
-    ./getty
+    ./issue_file
     ./nix
     ./openssh
     ./postgresql
     ./printing
     ./scanning
-    #./serverphone
     ./snapper
     ./steam
     ./swaylock
diff --git a/sys/svcs/getty/default.nix b/modules/system/services/issue_file/default.nix
index 7e8a4e46..930be1d9 100644
--- a/sys/svcs/getty/default.nix
+++ b/modules/system/services/issue_file/default.nix
@@ -1,10 +1,7 @@
-{
-  lib,
-  config,
-  ...
-}: {
-  services.getty = {
-    greetingLine = lib.mkForce ''
+{config, ...}: {
+  environment.etc.issue = {
+    # Friendly greeting on the virtual consoles.
+    text = ''
       [?25l[?7l                                           
                 ▗▄▄▄       ▗▄▄▄▄    ▄▄▄▖         
                 ▜███▙       ▜███▙  ▟███▛         
@@ -27,7 +24,7 @@
                ▟███▛  ▜███▙       ▜███▙          
                ▝▀▀▀    ▀▀▀▀▘       ▀▀▀▘          
                                                  
-        NixOS ${config.system.nixos.label} 
+       NixOS ${config.system.nixos.label} 
         --------------
       
         date: \d
diff --git a/sys/svcs/nix/default.nix b/modules/system/services/nix/default.nix
index 5766fcdd..65fc7273 100644
--- a/sys/svcs/nix/default.nix
+++ b/modules/system/services/nix/default.nix
@@ -1,5 +1,6 @@
 {
   pkgs,
+
   # flakes
   nixpkgs_as_input,
   templates,
diff --git a/sys/svcs/openssh/default.nix b/modules/system/services/openssh/default.nix
index b733dbe7..b733dbe7 100644
--- a/sys/svcs/openssh/default.nix
+++ b/modules/system/services/openssh/default.nix
diff --git a/sys/svcs/serverphone/certificates/ca.crt b/modules/system/services/serverphone/certificates/ca.crt
index 7a4ae6f9..7a4ae6f9 100644
--- a/sys/svcs/serverphone/certificates/ca.crt
+++ b/modules/system/services/serverphone/certificates/ca.crt
diff --git a/sys/svcs/serverphone/certificates/server.crt b/modules/system/services/serverphone/certificates/server.crt
index f994cdc8..f994cdc8 100644
--- a/sys/svcs/serverphone/certificates/server.crt
+++ b/modules/system/services/serverphone/certificates/server.crt
diff --git a/sys/svcs/serverphone/default.nix b/modules/system/services/serverphone/default.nix
index 20125a75..20125a75 100644
--- a/sys/svcs/serverphone/default.nix
+++ b/modules/system/services/serverphone/default.nix
diff --git a/sys/svcs/serverphone/keys/key_1 b/modules/system/services/serverphone/keys/key_1
index 67720882..67720882 120000
--- a/sys/svcs/serverphone/keys/key_1
+++ b/modules/system/services/serverphone/keys/key_1
diff --git a/sys/svcs/serverphone/keys/key_2 b/modules/system/services/serverphone/keys/key_2
index 24df7207..24df7207 120000
--- a/sys/svcs/serverphone/keys/key_2
+++ b/modules/system/services/serverphone/keys/key_2
diff --git a/sys/svcs/steam/default.nix b/modules/system/services/steam/default.nix
index 54091493..6e507fd9 100644
--- a/sys/svcs/steam/default.nix
+++ b/modules/system/services/steam/default.nix
@@ -7,16 +7,16 @@
   cfg = config.soispha.services.steam;
 in {
   options.soispha.services.steam = {
-    enable = lib.mkOption {
-      default = false;
-      description = lib.mdDoc "Steam";
-    };
+    enable = lib.mkEnableOption "Stream";
   };
+
   config = lib.mkIf cfg.enable {
     programs.steam = {
       enable = true;
     };
+
     environment.systemPackages = [
+      # TODO: Why is this package needed? <2024-05-16>
       pkgs.wineWowPackages.waylandFull
     ];
   };
diff --git a/sys/svcs/swaylock/default.nix b/modules/system/services/swaylock/default.nix
index 6cbcef28..6cbcef28 100644
--- a/sys/svcs/swaylock/default.nix
+++ b/modules/system/services/swaylock/default.nix
diff --git a/sys/svcs/xdg/default.nix b/modules/system/services/xdg/default.nix
index 5140a832..5140a832 100644
--- a/sys/svcs/xdg/default.nix
+++ b/modules/system/services/xdg/default.nix
diff --git a/sys/svcs/xdg/scripts/lf_wrapper.sh b/modules/system/services/xdg/scripts/lf_wrapper.sh
index 16603fe4..16603fe4 100755
--- a/sys/svcs/xdg/scripts/lf_wrapper.sh
+++ b/modules/system/services/xdg/scripts/lf_wrapper.sh
diff --git a/sys/svcs/xdg/scripts/ranger_wrapper.sh b/modules/system/services/xdg/scripts/ranger_wrapper.sh
index e148bf19..e148bf19 100755
--- a/sys/svcs/xdg/scripts/ranger_wrapper.sh
+++ b/modules/system/services/xdg/scripts/ranger_wrapper.sh
diff --git a/sys/svcs/dconf/default.nix b/sys/svcs/dconf/default.nix
deleted file mode 100644
index db35208e..00000000
--- a/sys/svcs/dconf/default.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  config,
-  lib,
-  pkgs,
-  ...
-}: {
-  # needed to make home-manager play nice with some apps. See:
-  # https://nix-community.github.io/home-manager/index.html#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal
-  programs.dconf.enable = true;
-}
diff --git a/sys/svcs/fwupd/default.nix b/sys/svcs/fwupd/default.nix
deleted file mode 100644
index 999ca72b..00000000
--- a/sys/svcs/fwupd/default.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{...}: {
-  services.fwupd.enable = true;
-}
diff --git a/sys/svcs/postgresql/default.nix b/sys/svcs/postgresql/default.nix
deleted file mode 100644
index 09cca2ef..00000000
--- a/sys/svcs/postgresql/default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{config, ...}: {
-  services.postgresql = {
-    enable = !config.soispha.laptop.enable;
-  };
-}
diff --git a/sys/svcs/printing/default.nix b/sys/svcs/printing/default.nix
deleted file mode 100644
index ea197bbf..00000000
--- a/sys/svcs/printing/default.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{...}: {
-  services.avahi = {
-    enable = true;
-    nssmdns4 = true;
-    nssmdns6 = true;
-    openFirewall = true;
-  };
-  services.printing = {
-    enable = true;
-    startWhenNeeded = true;
-    webInterface = true;
-
-    # deletes `/var/cache/cups`, `/var/lib/cups` and `/var/spool/cups` on cups startup
-    stateless = true;
-
-    drivers = [];
-  };
-  hardware = {
-    printers = {
-      ensurePrinters = [
-        {
-          name = "Brother";
-          description = "Brother DCP-9022CDW";
-          model = "everywhere";
-          deviceUri = "dnssd://Brother%20DCP-9022CDW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-30055c773bcf";
-        }
-      ];
-      ensureDefaultPrinter = "Brother";
-    };
-  };
-}
diff --git a/sys/svcs/scanning/default.nix b/sys/svcs/scanning/default.nix
deleted file mode 100644
index 6621e08f..00000000
--- a/sys/svcs/scanning/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{pkgs, ...}: {
-  hardware = {
-    sane = {
-      enable = true;
-      extraBackends = [pkgs.sane-airscan];
-    };
-  };
-
-  users.users.soispha.extraGroups = [
-    "scanner" # for permission to access the scanner.
-  ];
-}
diff --git a/sys/svcs/snapper/default.nix b/sys/svcs/snapper/default.nix
deleted file mode 100644
index 41e4b381..00000000
--- a/sys/svcs/snapper/default.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{...}: {
-  services.snapper = {
-    configs = {
-      srv = {
-        SUBVOLUME = "/srv";
-        FSTYPE = "btrfs";
-        # users and groups allowed to work with config
-        ALLOW_GROUPS = ["wheel"];
-
-        # sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
-        # directory
-        SYNC_ACL = true;
-
-        # run daily number cleanup
-        NUMBER_CLEANUP = false;
-
-        # limit for number cleanup
-        NUMBER_MIN_AGE = 1800;
-        NUMBER_LIMIT = 50;
-        NUMBER_LIMIT_IMPORTANT = 10;
-
-        # create hourly snapshots
-        TIMELINE_CREATE = true;
-
-        # cleanup hourly snapshots after some time
-        TIMELINE_CLEANUP = true;
-
-        # limits for timeline cleanup
-        TIMELINE_MIN_AGE = 1800;
-        TIMELINE_LIMIT_HOURLY = 7;
-        TIMELINE_LIMIT_DAILY = 3;
-        TIMELINE_LIMIT_WEEKLY = 2;
-        TIMELINE_LIMIT_MONTHLY = 0;
-        TIMELINE_LIMIT_YEARLY = 2;
-
-        # cleanup empty pre-post-pairs
-        EMPTY_PRE_POST_CLEANUP = true;
-      };
-    };
-  };
-}