From 97ba42af46318e3e0f0076e143f9a1c62bdea503 Mon Sep 17 00:00:00 2001 From: NullBite Date: Fri, 16 Feb 2024 17:06:13 +0100 Subject: [PATCH] system: Add PC profile --- hosts/slab/configuration.nix | 1 + system/profile/base.nix | 1 - system/profile/default.nix | 1 + system/profile/pc.nix | 11 +++++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 system/profile/pc.nix diff --git a/hosts/slab/configuration.nix b/hosts/slab/configuration.nix index fe75e13..e9c4a57 100644 --- a/hosts/slab/configuration.nix +++ b/hosts/slab/configuration.nix @@ -32,6 +32,7 @@ ./nvidia-optimus.nix ]; nixfiles = { + profile.pc.enable = true; common.remoteAccess.enable = true; hardware.opengl.enable = true; packageSets = { diff --git a/system/profile/base.nix b/system/profile/base.nix index cb0d79d..4dc36ba 100644 --- a/system/profile/base.nix +++ b/system/profile/base.nix @@ -17,7 +17,6 @@ in # Enable system Nix configuration nix.enable = lib.mkDefault true; }; - nixfiles.binfmt.enable = lib.mkDefault true; # locale settings i18n = { diff --git a/system/profile/default.nix b/system/profile/default.nix index 8d83827..5cd0b18 100644 --- a/system/profile/default.nix +++ b/system/profile/default.nix @@ -2,5 +2,6 @@ { imports = [ ./base.nix + ./pc.nix ]; } diff --git a/system/profile/pc.nix b/system/profile/pc.nix new file mode 100644 index 0000000..20ab52d --- /dev/null +++ b/system/profile/pc.nix @@ -0,0 +1,11 @@ +{ pkgs, config, lib, ... }: +let + cfg = config.nixfiles.profile.desktop; +in +{ + options.nixfiles.profile.pc.enable = lib.mkEnableOption "the personal computer profile"; + config = lib.mkIf cfg.enable { + nixfiles.profile.base.enable = lib.mkDefault true; + nixfiles.binfmt.enable = lib.mkDefault true; + }; +}