about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--modules/by-name/di/direnv/module.nix8
-rw-r--r--modules/by-name/lo/locale/module.nix3
-rw-r--r--modules/by-name/ni/nix/module.nix82
-rw-r--r--pkgs/by-name/fu/fupdate-sys/package.nix41
4 files changed, 78 insertions, 56 deletions
diff --git a/modules/by-name/di/direnv/module.nix b/modules/by-name/di/direnv/module.nix
index 7c81e671..363f5cea 100644
--- a/modules/by-name/di/direnv/module.nix
+++ b/modules/by-name/di/direnv/module.nix
@@ -10,6 +10,7 @@
 {
   config,
   lib,
+  pkgs,
   ...
 }: let
   cfg = config.soispha.programs.direnv;
@@ -20,7 +21,12 @@ in {
 
   config.home-manager.users.soispha.programs.direnv = lib.mkIf cfg.enable {
     enable = true;
-    nix-direnv.enable = true;
+
+    nix-direnv = {
+      enable = true;
+      package = pkgs.nix-direnv.override {nix = config.nix.package;};
+    };
+
     config = {
       warn_timeout = 0;
       # strict_env = true;
diff --git a/modules/by-name/lo/locale/module.nix b/modules/by-name/lo/locale/module.nix
index 3c9c646c..0aa812ec 100644
--- a/modules/by-name/lo/locale/module.nix
+++ b/modules/by-name/lo/locale/module.nix
@@ -43,6 +43,9 @@ in {
         LC_TIME = "sv_SE.UTF-8";
         LC_COLLATE = "C.UTF-8";
       };
+      extraLocales = [
+          "fr_FR.UTF-8/UTF-8"
+      ];
     };
 
     # Layout
diff --git a/modules/by-name/ni/nix/module.nix b/modules/by-name/ni/nix/module.nix
index ed4462f4..65b6ed5c 100644
--- a/modules/by-name/ni/nix/module.nix
+++ b/modules/by-name/ni/nix/module.nix
@@ -9,63 +9,71 @@
 # If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
   pkgs,
+  libraries,
+  config,
+  lib,
   # flakes
   sources,
   self,
   system,
   externalDependencies,
   ...
-}:
-let
+}: let
   nixpkgs = sources.loadFlake "nixpkgs";
+
+  cfg = config.soispha.nix;
 in {
-  # TODO(@bpeetz): Modularize <2025-02-08>
+  options.soispha.nix = {
+    enable = libraries.base.options.mkEnable "nix";
+  };
 
-  nix = {
-    package = pkgs.lixPackageSets.latest.lix;
+  config = lib.mkIf cfg.enable {
+    nix = {
+      package = pkgs.lixPackageSets.latest.lix;
 
-    # Disable nix channels  (this is a remnant of old days)
-    channel.enable = false;
+      # Disable nix channels  (this is a remnant of old days)
+      channel.enable = false;
 
-    registry = {
-      nixpkgs.flake = nixpkgs;
-      n.flake =
-        nixpkgs
-        // {
-          # Otherwise nixpkgs's config and overlays are not available:
+      registry = {
+        nixpkgs.flake = nixpkgs;
+        n.flake =
+          nixpkgs
+          // {
+            # Otherwise nixpkgs's config and overlays are not available:
 
-          # Both attrs exists, so we just override both and hope
-          outputs.legacyPackages."${system}" = pkgs;
-          legacyPackages."${system}" = pkgs;
-        };
+            # Both attrs exists, so we just override both and hope
+            outputs.legacyPackages."${system}" = pkgs;
+            legacyPackages."${system}" = pkgs;
+          };
 
-      t.flake = externalDependencies.templates;
+        t.flake = externalDependencies.templates;
 
-      my_flake.flake = self;
-      m.flake = self;
-    };
+        my_flake.flake = self;
+        m.flake = self;
+      };
 
-    gc = {
-      automatic = true;
-      dates = "weekly";
-      options = "--delete-older-than 7d";
-    };
+      gc = {
+        automatic = true;
+        dates = "weekly";
+        options = "--delete-older-than 7d";
+      };
 
-    settings = {
-      auto-optimise-store = true;
-      experimental-features = [
-        "nix-command"
-        "flakes"
-      ];
+      settings = {
+        auto-optimise-store = true;
+        experimental-features = [
+          "nix-command"
+          "flakes"
+        ];
 
-      use-xdg-base-directories = true;
+        use-xdg-base-directories = true;
 
-      fallback = true; # Build from source, if binary can't be substituted
+        fallback = true; # Build from source, if binary can't be substituted
 
-      keep-failed = false; # keep failed tmp build dirs
-      pure-eval = true; # restrict file system and network access to hash
+        keep-failed = false; # keep failed tmp build dirs
+        pure-eval = true; # restrict file system and network access to hash
 
-      sandbox-fallback = false; # Don't disable the sandbox, if the kernel doesn't support it
+        sandbox-fallback = false; # Don't disable the sandbox, if the kernel doesn't support it
+      };
     };
   };
 }
diff --git a/pkgs/by-name/fu/fupdate-sys/package.nix b/pkgs/by-name/fu/fupdate-sys/package.nix
index 7fd4674b..6672c2f2 100644
--- a/pkgs/by-name/fu/fupdate-sys/package.nix
+++ b/pkgs/by-name/fu/fupdate-sys/package.nix
@@ -11,7 +11,7 @@
   writeShellApplication,
   # Dependencies
   git,
-  nixos-rebuild,
+  nixos-rebuild-ng,
   sudo,
   openssh,
   coreutils,
@@ -19,20 +19,25 @@
   gnugrep,
   gnused,
   systemd,
-}:
-writeShellApplication {
-  name = "fupdate-sys";
-  text = builtins.readFile ./fupdate-sys.sh;
-  inheritPath = false;
-  runtimeInputs = [
-    git
-    nixos-rebuild
-    sudo
-    openssh
-    coreutils
-    mktemp
-    gnugrep
-    gnused
-    systemd
-  ];
-}
+  lixPackageSets,
+}: let
+  nixos-rebuild-without-nix = nixos-rebuild-ng.override {
+    nix = lixPackageSets.latest.lix;
+  };
+in
+  writeShellApplication {
+    name = "fupdate-sys";
+    text = builtins.readFile ./fupdate-sys.sh;
+    inheritPath = false;
+    runtimeInputs = [
+      git
+      nixos-rebuild-without-nix
+      sudo
+      openssh
+      coreutils
+      mktemp
+      gnugrep
+      gnused
+      systemd
+    ];
+  }