diff --git a/nix/configuration/hosts/neelix/default.nix b/nix/configuration/hosts/neelix/default.nix index 4f289b9..d107b70 100644 --- a/nix/configuration/hosts/neelix/default.nix +++ b/nix/configuration/hosts/neelix/default.nix @@ -28,4 +28,5 @@ me.graphical = true; me.graphics_card_type = "intel"; me.kodi.enable = true; + me.lvfs.enable = true; } diff --git a/nix/configuration/hosts/odo/default.nix b/nix/configuration/hosts/odo/default.nix index 8297768..cb952cb 100644 --- a/nix/configuration/hosts/odo/default.nix +++ b/nix/configuration/hosts/odo/default.nix @@ -45,4 +45,5 @@ me.latex.enable = true; me.launch_keyboard.enable = true; me.sway.enable = true; + me.lvfs.enable = true; } diff --git a/nix/configuration/roles/lvfs/default.nix b/nix/configuration/roles/lvfs/default.nix index 9514b3d..8ca93f9 100644 --- a/nix/configuration/roles/lvfs/default.nix +++ b/nix/configuration/roles/lvfs/default.nix @@ -8,26 +8,36 @@ { imports = [ ]; - config = lib.mkMerge [ - { - services.fwupd.enable = true; + options.me = { + lvfs.enable = lib.mkOption { + type = lib.types.bool; + default = false; + example = true; + description = "Whether we want to install lvfs."; + }; + }; - environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { - hideMounts = true; - directories = [ - { - directory = "/var/lib/fwupd"; - user = "root"; - group = "root"; - mode = "0755"; - } + config = lib.mkIf config.me.lvfs.enable ( + lib.mkMerge [ + { + services.fwupd.enable = true; + environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) { + hideMounts = true; + directories = [ + { + directory = "/var/lib/fwupd"; + user = "root"; + group = "root"; + mode = "0755"; + } + ]; + }; + } + (lib.mkIf config.me.graphical { + environment.systemPackages = with pkgs; [ + gnome-firmware ]; - }; - } - (lib.mkIf config.me.graphical { - environment.systemPackages = with pkgs; [ - gnome-firmware - ]; - }) - ]; + }) + ] + ); }