aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/ni
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/ni')
-rw-r--r--modules/by-name/ni/nix/module.nix86
-rw-r--r--modules/by-name/ni/nixos-shell/module.nix5
-rw-r--r--modules/by-name/ni/nixpkgs/module.nix7
3 files changed, 53 insertions, 45 deletions
diff --git a/modules/by-name/ni/nix/module.nix b/modules/by-name/ni/nix/module.nix
index 2b91f59b..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,
...
-}: {
- # TODO(@bpeetz): Modularize <2025-02-08>
+}: let
+ nixpkgs = sources.loadFlake "nixpkgs";
- nix = {
- package = pkgs.lixPackageSets.latest.lix;
+ cfg = config.soispha.nix;
+in {
+ options.soispha.nix = {
+ enable = libraries.base.options.mkEnable "nix";
+ };
- # Disable nix channels (this is a remnant of old days)
- channel.enable = false;
+ config = lib.mkIf cfg.enable {
+ nix = {
+ package = pkgs.lixPackageSets.latest.lix;
- registry = {
- nixpkgs.flake = self.inputs.nixpkgs;
- n.flake =
- self.inputs.nixpkgs
- // {
- # Otherwise nixpkgs's config and overlays are not available:
+ # Disable nix channels (this is a remnant of old days)
+ channel.enable = false;
- # Both attrs exists, so we just override both and hope
- outputs.legacyPackages."${system}" = pkgs;
- legacyPackages."${system}" = pkgs;
- };
+ registry = {
+ nixpkgs.flake = nixpkgs;
+ n.flake =
+ nixpkgs
+ // {
+ # Otherwise nixpkgs's config and overlays are not available:
- t.flake = externalDependencies.templates;
+ # Both attrs exists, so we just override both and hope
+ outputs.legacyPackages."${system}" = pkgs;
+ legacyPackages."${system}" = pkgs;
+ };
- my_flake.flake = self;
- m.flake = self;
- };
+ t.flake = externalDependencies.templates;
- gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than 7d";
- };
+ my_flake.flake = self;
+ m.flake = self;
+ };
- settings = {
- auto-optimise-store = true;
- experimental-features = [
- "nix-command"
- "flakes"
- #"ca-derivations"
- ];
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ options = "--delete-older-than 7d";
+ };
- use-xdg-base-directories = true;
+ settings = {
+ auto-optimise-store = true;
+ experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
- #substituters = ["https://cache.ngi0.nixos.org/"];
- #trusted-public-keys = ["cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA="];
+ 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/modules/by-name/ni/nixos-shell/module.nix b/modules/by-name/ni/nixos-shell/module.nix
index 8dda2890..3556a98b 100644
--- a/modules/by-name/ni/nixos-shell/module.nix
+++ b/modules/by-name/ni/nixos-shell/module.nix
@@ -11,10 +11,11 @@
lib,
config,
pkgs,
- self,
+ sources,
...
}: let
cfg = config.soispha.nixos-shell;
+ nixpkgs = sources.loadFlake "nixpkgs";
in {
options.soispha.nixos-shell = {
enable = lib.mkEnableOption "nixos-shell";
@@ -85,7 +86,7 @@ in {
};
config = let
- vmSystem = self.inputs.nixpkgs.lib.nixosSystem {
+ vmSystem = nixpkgs.lib.nixosSystem {
inherit (cfg.configuration) specialArgs;
modules = [
diff --git a/modules/by-name/ni/nixpkgs/module.nix b/modules/by-name/ni/nixpkgs/module.nix
index 502bcff2..84d8e074 100644
--- a/modules/by-name/ni/nixpkgs/module.nix
+++ b/modules/by-name/ni/nixpkgs/module.nix
@@ -36,14 +36,13 @@ in {
];
config = {
- # TODO: this fails because of the root tempsize, which should be increased
- # contentAddressedByDefault = true;
-
hostSystem = cfg.systemName;
allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
- "pypemicro" # required by pynitrokey
+ # the plugin is lacking an license and is thus unfree, effectively
+ # its okay though (TODO: investigate <2026-05-11>)?
+ "cmp-calc"
];
};
};