44 lines
832 B
Nix

{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
options.me = {
lvfs.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install lvfs.";
};
};
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
];
})
]
);
}