create shared niri config, refactor generic feature modules
This commit is contained in:
23 files changed
+353
-410
No files matched your search
@@ -1,21 +1,19 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.remmina.enable = lib.mkEnableOption "Remmina";
|
||||
})) ];
|
||||
{ inputs, self, ... }: let
|
||||
optionName = "features.applications.gui.remmina.enable";
|
||||
in {
|
||||
imports = [ (inputs.helpers.mkStandardFeature.flakeModule "graphics" optionName "Remmina") ];
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.remmina.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.${config.info.userName}.features.applications.gui.remmina.enable = lib.mkDefault true;
|
||||
} {
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
imports = [ (inputs.helpers.mkStandardFeature.nixosModule { inherit config optionName; } {
|
||||
environment.systemPackages = with pkgs; [
|
||||
remmina
|
||||
freerdp
|
||||
];
|
||||
});
|
||||
}) ];
|
||||
};
|
||||
|
||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.remmina.enable) {
|
||||
imports = [ (inputs.helpers.mkStandardFeature.homeModule { inherit config optionName; } {
|
||||
home.packages = with pkgs; [
|
||||
remmina
|
||||
freerdp
|
||||
@@ -25,6 +23,6 @@
|
||||
target = "${config.home.homeDirectory}/.local/share/remmina";
|
||||
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/remmina";
|
||||
});
|
||||
};
|
||||
}) ];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user