about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/core/tests.nix16
-rw-r--r--modules/programs/foot/default.nix69
-rw-r--r--modules/user/aszlig/profiles/base.nix1
-rw-r--r--modules/user/aszlig/profiles/workstation/default.nix15
-rw-r--r--modules/user/aszlig/profiles/workstation/packages.nix1
-rw-r--r--modules/user/aszlig/programs/flameshot/default.nix1
-rw-r--r--modules/user/devhell/profiles/base.nix8
-rw-r--r--modules/user/devhell/profiles/packages.nix11
-rw-r--r--modules/user/devhell/profiles/services.nix10
-rw-r--r--modules/user/profpatsch/programs/scanning.nix2
-rw-r--r--modules/user/profpatsch/services/gonic.nix1
-rw-r--r--modules/user/sternenseemann/profiles/desktop-sway.nix32
-rw-r--r--modules/user/sternenseemann/services/sway.nix3
13 files changed, 90 insertions, 80 deletions
diff --git a/modules/core/tests.nix b/modules/core/tests.nix
index 0926bc5a..abfaa590 100644
--- a/modules/core/tests.nix
+++ b/modules/core/tests.nix
@@ -5,7 +5,13 @@ let
 
   isLatestKernel = config.boot.kernelPackages.kernel.version
                 == pkgs.linuxPackages_latest.kernel.version;
-  wgTestSuffix = "linux-${if isLatestKernel then "latest" else "5_4"}";
+  # Assumes nixpkgs has a test for the latest and default kernel
+  wgTestSuffix = "linux-" + (
+    if isLatestKernel
+    then "latest"
+    else lib.replaceStrings [ "." ] [ "_" ]
+      (lib.versions.majorMinor pkgs.linuxPackages.kernel.version)
+  );
 
   mkTest = attrs: if attrs.check then attrs.paths or [ attrs.path ] else [];
 
@@ -828,8 +834,12 @@ let
       path  = ["nixos" "yggdrasil"];
     }
     { check = config.boot.supportedFilesystems.zfs or false
-           && config.boot.zfs.package.version == pkgs.zfs.version;
-      path  = ["nixos" "zfs" "stable"];
+           && config.boot.zfs.package.version == pkgs.zfs_2_1.version;
+      path  = ["nixos" "zfs" "series_2_1"];
+    }
+    { check = config.boot.supportedFilesystems.zfs or false
+           && config.boot.zfs.package.version == pkgs.zfs_2_2.version;
+      path  = ["nixos" "zfs" "series_2_2"];
     }
     { check = config.boot.supportedFilesystems.zfs or false
            && config.boot.zfs.package.version == pkgs.zfs_unstable.version;
diff --git a/modules/programs/foot/default.nix b/modules/programs/foot/default.nix
index 5e10f7f8..92af6dbc 100644
--- a/modules/programs/foot/default.nix
+++ b/modules/programs/foot/default.nix
@@ -12,10 +12,9 @@ let
 
   cfg = config.vuizvui.programs.foot;
 
-  # We don't allow null, since we use null as
-  # a “fall back to foot's defaults” value for defined
-  # options in the freeform module so no null may be
-  # present in the resulting ini file.
+  # We don't allow null, since we use null as a “fall back to foot's defaults”
+  # value for defined options in the freeform module so no null may be present
+  # in the resulting ini file.
   iniAtom = with lib.types; (oneOf [
     bool
     int
@@ -25,27 +24,8 @@ let
     description = "INI atom (bool, int, float or string)";
   };
 
-  # pkgs.formats.ini doesn't allow top-level bindings
-  # without a section, so we have to wrap it a bit
   # TODO(sterni): multiple binds
-  format = {
-    type = with lib.types;
-      (attrsOf (either iniAtom (attrsOf iniAtom))) // {
-        description = ''
-          attribute set of either top-level INI atoms (bool, int, float or string) or attribute sets (sections) of INI atoms
-        '';
-      };
-    generate = name: value:
-      let
-        isSection = builtins.isAttrs;
-        topLevel = lib.filterAttrs (_: v: !(isSection v)) value;
-        sections = lib.filterAttrs (_: v: isSection v) value;
-      in
-        pkgs.writeText name ''
-          ${toKeyValue {} topLevel}
-          ${toINI {} sections}
-        '';
-  };
+  format = pkgs.formats.ini {};
 
   prettyPrint = lib.generators.toPretty {};
 
@@ -86,7 +66,9 @@ let
         else assert (wellFormedFontSet font);
           "${font.font}${formatOptions (font.options or {})}";
     in
-      lib.concatMapStringsSep "," fontconfigFont fonts;
+      if builtins.isNull fonts
+      then null # indicates default
+      else lib.concatMapStringsSep "," fontconfigFont fonts;
 
   mkFontOption = name: lib.mkOption {
     type = with lib.types; nullOr (nonEmptyListOf (either str attrs));
@@ -109,6 +91,7 @@ let
       "monospace"
     ]);
     default = null;
+    apply = buildIniFontList;
   };
 
   commandBindOptions = [
@@ -127,7 +110,9 @@ let
       "command bind set must contain a cmd and a bind attr: ${prettyPrint exampleCommandBindSet}";
 
   buildIniCommandBind = bind:
-    if builtins.isString bind
+    if builtins.isNull bind
+    then null # indicates default
+    else if builtins.isString bind
     then bind
     else assert wellformedCommandBindSet bind;
       "[${bind.cmd}] ${bind.bind}";
@@ -141,23 +126,10 @@ let
       '';
       example = lib.literalExample (prettyPrint exampleCommandBindSet);
       default = null;
+      apply = buildIniCommandBind;
     };
 
-  # convert some fancy options we support to a format formats.ini can deal
-  # with and remove all optional options (in this case options which default
-  # to null), so we don't have to track upstreams defaults, but foot can
-  # decide for itself while we still can treat some options specially.
-  iniReady = settings:
-    let
-      withoutNulls =
-        lib.filterAttrsRecursive (_: x: x != null) settings;
-      attrTransforms =
-        (lib.genAttrs fontOptions (n: (_: buildIniFontList))) // {
-          key-bindings =
-            lib.genAttrs commandBindOptions (n: (_: buildIniCommandBind));
-        };
-    in
-      mapAttrsByAttrs withoutNulls attrTransforms;
+  withoutNulls = lib.filterAttrsRecursive (_: x: x != null);
 
 in {
   options.vuizvui.programs.foot = {
@@ -166,7 +138,9 @@ in {
     settings = lib.mkOption {
       type = lib.types.submodule {
         freeformType = format.type;
-        options = (lib.genAttrs fontOptions mkFontOption) // {
+        options = {
+          main =
+            lib.genAttrs fontOptions mkFontOption;
           key-bindings =
             lib.genAttrs commandBindOptions mkCommandBindOption;
         };
@@ -199,6 +173,15 @@ in {
     environment.systemPackages = [ pkgs.foot pkgs.foot.terminfo ];
 
     environment.etc."xdg/foot/foot.ini".source =
-      format.generate "foot.ini" (iniReady cfg.settings);
+      # null indicates default value for defined options. We need to remove
+      # those from the final config so foot will use its default.
+      format.generate "foot.ini" (withoutNulls cfg.settings);
+
+    # TODO(sterni): bash, zsh
+    programs.fish = lib.mkIf config.programs.fish.enable {
+      interactiveShellInit = ''
+        source "${pkgs.path + "/nixos/modules/programs/foot/config.fish"}"
+      '';
+    };
   };
 }
diff --git a/modules/user/aszlig/profiles/base.nix b/modules/user/aszlig/profiles/base.nix
index c84e37ae..b84fe05b 100644
--- a/modules/user/aszlig/profiles/base.nix
+++ b/modules/user/aszlig/profiles/base.nix
@@ -61,6 +61,7 @@ in {
 
     environment.systemPackages = with pkgs; [
       binutils
+      bpftrace
       cacert
       ddrescue
       file
diff --git a/modules/user/aszlig/profiles/workstation/default.nix b/modules/user/aszlig/profiles/workstation/default.nix
index 586701c1..d6e264fa 100644
--- a/modules/user/aszlig/profiles/workstation/default.nix
+++ b/modules/user/aszlig/profiles/workstation/default.nix
@@ -49,14 +49,17 @@ in {
 
     vuizvui.lazyPackages = import ./lazy-packages.nix pkgs;
 
-    hardware = {
-      pulseaudio.enable = true;
-      pulseaudio.package = pkgs.pulseaudioFull;
-      opengl = {
-        driSupport32Bit = true;
-      };
+    security.rtkit.enable = true;
+    services.pipewire = {
+      enable = true;
+      alsa.enable = true;
+      alsa.support32Bit = true;
+      pulse.enable = true;
+      jack.enable = true;
     };
 
+    hardware.graphics.enable32Bit = true;
+
     fonts = {
       fontDir.enable = true;
       enableGhostscriptFonts = true;
diff --git a/modules/user/aszlig/profiles/workstation/packages.nix b/modules/user/aszlig/profiles/workstation/packages.nix
index 8beda8fc..83e7eec9 100644
--- a/modules/user/aszlig/profiles/workstation/packages.nix
+++ b/modules/user/aszlig/profiles/workstation/packages.nix
@@ -48,7 +48,6 @@ pkgs: with pkgs; [
   openssl
   p7zip
   pavucontrol
-  pulseaudio
   vuizvui.aszlig.pvolctrl
   pv
   python3
diff --git a/modules/user/aszlig/programs/flameshot/default.nix b/modules/user/aszlig/programs/flameshot/default.nix
index 51799aa5..f261a8ce 100644
--- a/modules/user/aszlig/programs/flameshot/default.nix
+++ b/modules/user/aszlig/programs/flameshot/default.nix
@@ -10,7 +10,6 @@ let
     drawThickness = 2;
     savePath = "$HOME/screenshots";
     savePathFixed = true;
-    checkForUpdates = false;
   };
 
 in {
diff --git a/modules/user/devhell/profiles/base.nix b/modules/user/devhell/profiles/base.nix
index 34c54270..ecb1fe41 100644
--- a/modules/user/devhell/profiles/base.nix
+++ b/modules/user/devhell/profiles/base.nix
@@ -32,8 +32,8 @@ in {
     hardware = {
       enableAllFirmware = true;
       nitrokey.enable = true;
-      opengl = {
-        driSupport32Bit = true;
+      graphics = {
+        enable32Bit = true;
       };
     };
 
@@ -97,7 +97,7 @@ in {
         startAgent = false;
       };
       bash = {
-        enableCompletion = true;
+        completion.enable = true;
       };
       singularity = {
         enable = true;
@@ -108,7 +108,7 @@ in {
       starship = {
         enable = true;
         settings = {
-          command_timeout = 1000;
+          command_timeout = 2000;
           nix_shell.disabled = false;
         };
       };
diff --git a/modules/user/devhell/profiles/packages.nix b/modules/user/devhell/profiles/packages.nix
index 510634de..f198ca1a 100644
--- a/modules/user/devhell/profiles/packages.nix
+++ b/modules/user/devhell/profiles/packages.nix
@@ -43,14 +43,17 @@ in {
 
     environment.systemPackages = with pkgs; [
       #dogdns
+      #gomuks
       #mnamer
       #nixopsUnstable
       #onefetch
       #spek
+      #visidata
       #wordgrinder
       #wuzz
       abook
       accountsservice
+      adwaita-icon-theme
       alacritty
       apg
       aria2
@@ -122,11 +125,9 @@ in {
       gitui
       glab
       glow
-      gnome.adwaita-icon-theme
       gnufdisk
       gnumake
       gnupg
-      gomuks
       gopass
       gpg-tui
       gpgme
@@ -198,8 +199,10 @@ in {
       ntfsprogs
       nvtopPackages.amd
       oculante
+      ollama
       oneshot
       openssl
+      oterm
       p7zip
       pamixer
       pandoc
@@ -252,9 +255,8 @@ in {
       steam-tui
       stow
       strace
-      tasksh
-      taskwarrior
       taskwarrior-tui
+      taskwarrior3
       tealdeer
       termdown
       termshark
@@ -277,7 +279,6 @@ in {
       vanilla-dmz
       virt-manager
       virt-viewer
-      visidata
       viu
       vivid
       vlock
diff --git a/modules/user/devhell/profiles/services.nix b/modules/user/devhell/profiles/services.nix
index 6a448287..f5eac5a7 100644
--- a/modules/user/devhell/profiles/services.nix
+++ b/modules/user/devhell/profiles/services.nix
@@ -57,12 +57,22 @@ in {
     services.dbus.packages = [ pkgs.mako ];
 
     services = {
+      avahi.enable = true;
       pcscd.enable = true;
       gpm.enable = true;
       openssh.enable = true;
       udisks2.enable = true;
       haveged.enable = true;
       automatic-timezoned.enable = true;
+      geoclue2 = {
+        enable = true;
+        geoProviderUrl = "https://beacondb.net/v1/geolocate";
+        enableWifi = true;
+        enableNmea = true;
+        enableModemGPS = false;
+        enableCDMA = false;
+        enable3G = false;
+      };
       globalprotect = {
         enable = true;
         csdWrapper = "${pkgs.openconnect}/libexec/openconnect/hipreport.sh";
diff --git a/modules/user/profpatsch/programs/scanning.nix b/modules/user/profpatsch/programs/scanning.nix
index 1b5e1f02..e4d14715 100644
--- a/modules/user/profpatsch/programs/scanning.nix
+++ b/modules/user/profpatsch/programs/scanning.nix
@@ -23,7 +23,7 @@ in {
     hardware.sane = {
       enable = true;
       netConf = cfg.remoteScanners;
-      extraBackends = [ unfreeAndNonDistributablePkgs.hplipWithPlugin ];
+      # extraBackends = [ unfreeAndNonDistributablePkgs.hplipWithPlugin ];
 
       drivers.scanSnap = {
         enable = true;
diff --git a/modules/user/profpatsch/services/gonic.nix b/modules/user/profpatsch/services/gonic.nix
index c5801081..ee34e333 100644
--- a/modules/user/profpatsch/services/gonic.nix
+++ b/modules/user/profpatsch/services/gonic.nix
@@ -80,6 +80,7 @@ in {
            "-music-path" cfg.musicDir
            "-podcast-path" cfg.podcastDir
            "-playlists-path" cfg.playlistsDir
+           "-scan-watcher-enabled"
          ]
          ++ lib.optionals (cfg.scanIntervalMinutes != null) [
            "-scan-interval" (toString cfg.scanIntervalMinutes)
diff --git a/modules/user/sternenseemann/profiles/desktop-sway.nix b/modules/user/sternenseemann/profiles/desktop-sway.nix
index 530255ac..06442c78 100644
--- a/modules/user/sternenseemann/profiles/desktop-sway.nix
+++ b/modules/user/sternenseemann/profiles/desktop-sway.nix
@@ -82,7 +82,7 @@ in
         xwayland qt5.qtwayland
         wl-clipboard               # instead of xsel
         mako                       # notifications
-        gnome.adwaita-icon-theme
+        adwaita-icon-theme
         wdisplays                  # display layout GUI
       ];
 
@@ -96,19 +96,21 @@ in
       vuizvui.programs.foot = {
         enable = true;
         settings = {
-          include = "${pkgs.foot.themes}/share/foot/themes/selenized-white";
-
-          dpi-aware = true;
-          font = [
-            {
-              font = defaultFont;
-              options = { size = 8; };
-            }
-            {
-              font = defaultEmojiFont;
-              options = { size = 8; };
-            }
-          ];
+          main = {
+            include = "${pkgs.foot.themes}/share/foot/themes/selenized-white";
+
+            dpi-aware = true;
+            font = [
+              {
+                font = defaultFont;
+                options = { size = 8; };
+              }
+              {
+                font = defaultEmojiFont;
+                options = { size = 8; };
+              }
+            ];
+          };
 
           tweak = {
             grapheme-shaping = "yes";
@@ -152,7 +154,7 @@ in
 
     (lib.mkIf cfg.nextcloud.enable {
       vuizvui.user.sternenseemann.services.sway.extraConfig = ''
-        exec ${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon --start --components=secrets
+        exec ${pkgs.gnome-keyring}/bin/gnome-keyring-daemon --start --components=secrets
         exec ${pkgs.nextcloud-client}/bin/nextcloud
       '';
 
diff --git a/modules/user/sternenseemann/services/sway.nix b/modules/user/sternenseemann/services/sway.nix
index 673e9a03..7891c79f 100644
--- a/modules/user/sternenseemann/services/sway.nix
+++ b/modules/user/sternenseemann/services/sway.nix
@@ -204,7 +204,7 @@ in {
 
     security.pam.services.swaylock = {};
 
-    hardware.opengl.enable = true;
+    hardware.graphics.enable = true;
 
     environment.etc = {
       "sway/config".text = ''
@@ -356,6 +356,7 @@ in {
           format = "%status: %percentage"
           status_chr = "⚡"
           status_bat = "🔋"
+          status_idle = "💤"
           status_unk = "❓"
           status_full = "💯"
           low_threshold = 10