From 226610c9260626595d13d4dd98e4c3519537ccaa Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Thu, 23 Jan 2025 21:32:10 -0500 Subject: [PATCH] Do not install steam or terraform on neelix. --- nix/configuration/hosts/odo/default.nix | 2 + nix/configuration/roles/steam/default.nix | 17 +++--- nix/configuration/roles/terraform/default.nix | 55 ++++++++++++------- 3 files changed, 46 insertions(+), 28 deletions(-) diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index fc5317d..a693e7a 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -50,5 +50,7 @@ me.qemu.enable = true; me.rust.enable = true; me.sound.enable = true; + me.steam.enable = true; me.sway.enable = true; + me.terraform.enable = true; } diff --git a/nix/configuration/roles/steam/default.nix b/nix/configuration/roles/steam/default.nix index 998e610..61705ee 100644 --- a/nix/configuration/roles/steam/default.nix +++ b/nix/configuration/roles/steam/default.nix @@ -8,16 +8,18 @@ { imports = [ ]; - options.me.games = lib.mkOption { - type = lib.types.bool; - default = config.me.graphical; - example = true; - description = "Whether we want to install games."; + options.me = { + steam.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install steam."; + }; }; - config = ( + config = lib.mkIf config.me.steam.enable ( lib.mkMerge [ - (lib.mkIf config.me.games { + (lib.mkIf config.me.graphical { allowedUnfree = [ "steam" "steam-original" @@ -45,5 +47,4 @@ }) ] ); - } diff --git a/nix/configuration/roles/terraform/default.nix b/nix/configuration/roles/terraform/default.nix index 0204d3d..0254fba 100644 --- a/nix/configuration/roles/terraform/default.nix +++ b/nix/configuration/roles/terraform/default.nix @@ -13,26 +13,41 @@ in { imports = [ ]; - environment.systemPackages = with pkgs; [ - terraform - alias_tf - ]; - - allowedUnfree = [ - "terraform" - ]; - - environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { - hideMounts = true; - users.talexander = { - directories = [ - { - directory = ".terraform.d"; - user = "talexander"; - group = "talexander"; - mode = "0755"; - } - ]; + options.me = { + terraform.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install terraform."; }; }; + + config = lib.mkIf config.me.terraform.enable ( + lib.mkMerge [ + { + environment.systemPackages = with pkgs; [ + terraform + alias_tf + ]; + + allowedUnfree = [ + "terraform" + ]; + + environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { + hideMounts = true; + users.talexander = { + directories = [ + { + directory = ".terraform.d"; + user = "talexander"; + group = "talexander"; + mode = "0755"; + } + ]; + }; + }; + } + ] + ); }