about summary refs log tree commit diff stats
path: root/modules/common/default.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/default.nix130
1 files changed, 111 insertions, 19 deletions
diff --git a/modules/common/default.nix b/modules/common/default.nix
index 1c00c710..a272bd52 100644
--- a/modules/common/default.nix
+++ b/modules/common/default.nix
@@ -1,12 +1,33 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 # This file contains common configuration applied to every host.
 # It should only `enable` options defined in the `modules/by-name` directory.
 {
   config,
   pkgs,
   lib,
+  # Needed for nixos-shell
+  libraries,
+  modules,
+  openPRsNixpkgs,
+  packageSets,
+  system,
+  self,
+  externalDependencies,
+  externalBinaries,
   ...
 }: {
+  # TODO(@bpeetz): Move this file to default options in their respective modules. <2025-05-31>
+
   soispha = {
+    age.enable = true;
     boot.enable = true;
     cleanup.enable = true;
     documentation.enable = true;
@@ -16,17 +37,60 @@
       enableEmoji = true;
     };
 
+    hardware = {
+      enable = lib.mkDefault true;
+    };
     home-manager.enable = true;
     impermanence = {
       enable = true;
 
       directories = [
         "/etc/nixos"
-        "/var/log"
         "/var/lib/systemd"
-        "/var/lib/nixos"
       ];
     };
+
+    nixos-shell = {
+      enable = lib.mkDefault true;
+      configuration = {
+        specialArgs = {
+          inherit
+            libraries
+            modules
+            ;
+        };
+        value = lib.mkMerge [
+          {
+            _module.args = {
+              inherit
+                # extra package sources
+                openPRsNixpkgs
+                packageSets
+                # extra information
+                system
+                # nix registry
+                self
+                externalDependencies
+                # bins
+                # TODO: Integrate these into `pkgs/by-name` <2024-05-22>
+                externalBinaries
+                ;
+            };
+          }
+
+          {
+            require = [
+              ./nixos_shell_configuration.nix
+
+              ../../modules
+              ../../modules/common
+            ];
+          }
+        ];
+      };
+      mounts = {};
+    };
+
     polkit.enable = true;
     power.enable = true;
     xdg.enable = true;
@@ -36,7 +100,17 @@
         enable = true;
         user = "soispha";
       };
+      backup = {
+        storagebox = {
+          enable = lib.mkDefault true;
+          user = "u459143-sub1";
+        };
+        local = {
+          enable = lib.mkDefault true;
+        };
+      };
       fwupd.enable = true;
+      mako.enable = true;
       mpd = {
         enable = true;
         directories = let
@@ -58,10 +132,9 @@
       scanning.enable = true;
       snapper.enable = true;
       water-reminder.enable = true;
-      steam.enable = false;
       systemDiff.enable = true;
       unison = {
-        enable = true;
+        enable = lib.mkDefault true;
 
         foreign.userName = "soispha";
         dataDir = "${config.home-manager.users.soispha.xdg.dataHome}/unison";
@@ -74,14 +147,20 @@
               config.home-manager.users.soispha.home.file);
         in
           [
-            # already synchronized by the taskserver
+            # TODO(@bpeetz): Move these to their respective modules <2025-05-09>
+            # Already synchronized by TaskChampion sync server
             "~/.local/share/task"
+            # Already synchronized by atuin sync server
+            "~/.local/share/atuin"
+            # Already synchronized by mbsync
+            "~/.local/share/maildir"
 
             # Should not be synchronized
             "~/.local/share/unison"
 
-            # Is just to big to be synchronized (# TODO: Work around that <2024-08-31> )
+            # These are just to big to be synchronized (# TODO: Work around that <2024-08-31> )
             "~/media/music"
+            "~/.local/share/Steam"
           ]
           ++ homeManagerSymlinks;
 
@@ -91,8 +170,6 @@
           "~/.local/share"
           "~/.local/.Trash-1000"
 
-          "~/.mozilla/firefox"
-
           "~/media"
           "~/school"
           "~/repos"
@@ -101,19 +178,30 @@
     };
 
     programs = {
+      i3bar-river.enable = true;
+      i3status-rust.enable = true;
+
+      qutebrowser = {
+        enable = true;
+      };
+
       nvim = {
         enable = true;
         shell = pkgs.zsh;
       };
-      atuin.enable = true;
+      atuin = {
+        enable = true;
+        enableAge = lib.mkDefault true;
+      };
       cargo.enable = true;
       direnv.enable = true;
       git.enable = true;
       imv.enable = true;
       less.enable = true;
       lf.enable = true;
+      gpg.enable = true;
       river = {
-        enable = true;
+        enable = lib.mkDefault true;
         init = {
           rules = [
             {
@@ -147,12 +235,12 @@
               title = "*";
               action = "ssd";
             }
-            # This remove the focus border around Firefox (which is useful because the Firefox is nearly always in its own tag.)
-            {
-              app-id = "firefox";
-              title = "*";
-              action = "csd";
-            }
+            # # This remove the focus border around Firefox (which is useful because the Firefox is nearly always in its own tag.)
+            # {
+            #   app-id = "firefox";
+            #   title = "*";
+            #   action = "csd";
+            # }
           ];
           generalSettings = {
             # background
@@ -175,8 +263,8 @@
             pointer-12951-6505-ZSA_Technology_Labs_Moonlander_Mark_I = [["pointer-accel" "0"] ["accel-profile" "none"]];
           };
           backgroundStart = [
+            # TODO(@bpeetz): Move these to systemd units/their own modules <2025-05-18>
             pkgs.gammastep
-            pkgs.yambar
 
             pkgs.mako
             ["${lib.getExe pkgs.swaybg}" "--image" "${./abstract-nord.png}"]
@@ -185,19 +273,23 @@
           ];
         };
       };
-      firefox.enable = true;
       mpv.enable = true;
+      steam.enable = true;
+      ssh.enable = true;
       swaylock.enable = true;
       timewarrior.enable = true;
       taskwarrior = {
         enable = true;
+        enableAge = lib.mkDefault true;
+
         hooks = import ./hooks {inherit pkgs lib config;};
       };
       tskm = {
         enable = true;
         projects = builtins.fromJSON (builtins.readFile ./projects.json);
       };
-      yambar.enable = true;
+      nix-index.enable = true;
+      yambar.enable = false;
       yt.enable = true;
       zathura.enable = true;
       zsh.enable = true;