aboutsummaryrefslogtreecommitdiffstats
path: root/modules/by-name/ni/nixpkgs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-16 16:42:51 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-05-16 16:42:51 +0200
commit8bed94a028a88ed03354cba62a0cccaab6dcb61e (patch)
tree0360a64ea1bfc9c285d5ace0bf27f6f0579e905a /modules/by-name/ni/nixpkgs
parentflake: Rename `nixVim` input to `nixvim` (diff)
downloadnixos-config-8bed94a028a88ed03354cba62a0cccaab6dcb61e.zip
flake: Pack arguments in attribute sets
This avoids having to change 3+ files, if you need to add a new argument.
Diffstat (limited to 'modules/by-name/ni/nixpkgs')
-rw-r--r--modules/by-name/ni/nixpkgs/config.nix4
-rw-r--r--modules/by-name/ni/nixpkgs/module.nix35
2 files changed, 35 insertions, 4 deletions
diff --git a/modules/by-name/ni/nixpkgs/config.nix b/modules/by-name/ni/nixpkgs/config.nix
index 0d99336c..ea8f3c45 100644
--- a/modules/by-name/ni/nixpkgs/config.nix
+++ b/modules/by-name/ni/nixpkgs/config.nix
@@ -9,11 +9,11 @@
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
{
cfg,
- myPkgs,
lib,
+ packageSets,
...
}: let
- myPkgsOverlay = self: super: myPkgs;
+ myPkgsOverlay = self: super: packageSets.soispha;
in {
nixpkgs = {
hostPlatform = cfg.systemName;
diff --git a/modules/by-name/ni/nixpkgs/module.nix b/modules/by-name/ni/nixpkgs/module.nix
index 07beae3e..fcde9505 100644
--- a/modules/by-name/ni/nixpkgs/module.nix
+++ b/modules/by-name/ni/nixpkgs/module.nix
@@ -10,8 +10,9 @@
{
lib,
config,
+ packageSets,
...
-} @ args: let
+}: let
cfg = config.soispha.nixpkgs;
in {
options.soispha.nixpkgs = {
@@ -22,5 +23,35 @@ in {
type = lib.types.str;
};
};
- config = lib.mkIf cfg.enable (import ./config.nix (args // {inherit cfg;}));
+ config = let
+ myPkgsOverlay = self: super: packageSets.soispha;
+ in
+ lib.mkIf cfg.enable
+ {
+ nixpkgs = {
+ hostPlatform = cfg.systemName;
+
+ overlays = [
+ myPkgsOverlay
+ ];
+
+ 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
+
+ # TODO(@bpeetz): Allow moving them to their respective module. <2025-04-25>
+ "steam"
+ "steam-unwrapped"
+ "steam-original"
+ "steam-run"
+ ];
+ };
+ };
+ };
}