From 52c4a9861048081887066e2c47403a82b0a1b21c Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 27 Feb 2025 02:00:40 +0100 Subject: [PATCH] system --- flake.nix | 15 +++++++++++---- system/nix.nix | 6 +++++- system/sops.nix | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 4c907ca0..0d300e4f 100644 --- a/flake.nix +++ b/flake.nix @@ -39,14 +39,21 @@ defaultConfig = { desktop = true; + unfree = [ + "steam" + "steam-unwrapped" + ]; }; makeHost = host: let - config = defaultConfig // import ./hosts/${host}/config.nix; + conf = defaultConfig // import ./hosts/${host}/config.nix; in lib.nixosSystem { - system = config.system; - pkgs = import nixpkgs {system = config.system;}; + system = conf.system; + pkgs = import nixpkgs { + system = conf.system; + config.allowUnfreePredicate = ( pkg: builtins.elem (lib.getName pkg) conf.unfree ); + }; specialArgs = inputs; modules = [ ./hosts/${host}/default.nix @@ -54,7 +61,7 @@ ./system {networking.hostName = host;} ] - ++ lib.optionals config.desktop [ + ++ lib.optionals conf.desktop [ ./home ]; }; diff --git a/system/nix.nix b/system/nix.nix index 870b737e..ccadc8ca 100644 --- a/system/nix.nix +++ b/system/nix.nix @@ -1,4 +1,4 @@ -{...}: { +{ lib, ...}: { nix = { gc = { automatic = true; @@ -12,4 +12,8 @@ trusted-users = ["root" "@wheel"]; }; }; + + # nixpkgs.config.allowUnfreePredicate = (pkg: builtins.elem (lib.getName pkg) [ + # "steam" + # ]); } diff --git a/system/sops.nix b/system/sops.nix index cbf89233..3bd65523 100644 --- a/system/sops.nix +++ b/system/sops.nix @@ -1,5 +1,5 @@ { sops-nix, ... }: { imports = [ sops-nix.nixosModules.sops ]; - sops.age.keyFile = /persist/data/home/lilith/.config.sops/age/keys.txt; + sops.age.keyFile = /persist/data/home/lilith/.config/sops/age/keys.txt; }