begin to create checks to make nixos modules home-manager independent

This commit is contained in:
greyweather committed 2026-08-28 15:19:06 +01:00
1 parent 22d431e271
commit 2ca8b405e8
17 files changed
+100 -210

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@
programs.noctalia.enable = true;
home-manager.sharedModules = [
{
({ lib, config, ... }: {
home.activation = {
symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
target = ".local/state/noctalia/settings.toml";
@@ -24,7 +24,7 @@
xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${config.info.hostName}/noctalia/settings.toml";
xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${config.info.hostName}/noctalia/plugins";
}
})
];
};
};
+2 -2
View File
@@ -38,12 +38,12 @@
};
home-manager.sharedModules = [
{
({ lib, config, ... }: {
home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
target = ".config/niri/config.kdl";
source = "dotfiles/${config.info.hostName}/niri.kdl";
});
}
})
];
};
};
@@ -1,4 +1,23 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, lib, config, ...}: {
options.features.applications.gui.equibop.enable = lib.mkEnableOption "equibop";
config = let
mkIfElse = with lib; p: yes: no: mkMerge [
(mkIf p yes)
(mkIf (!p) no)
];
in lib.mkIf (config.features.applications.gui.equibop.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.sharedModules = [
{
features.applications.gui.equibop.enable = lib.mkDefault true;
}
];
} {
environment.systemPackages = [ pkgs.equibop ];
});
};
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
options.features.applications.gui.equibop.enable = lib.mkEnableOption "equibop";
+14 -5
View File
@@ -2,11 +2,20 @@
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
options.features.applications.gui.kitty.enable = lib.mkEnableOption "kitty";
config.home-manager.sharedModules = lib.mkIf (config.features.applications.gui.kitty.enable) [
{
features.applications.gui.kitty.enable = true;
}
];
config = let
mkIfElse = with lib; p: yes: no: mkMerge [
(mkIf p yes)
(mkIf (!p) no)
];
in lib.mkIf (config.features.applications.gui.kitty.enable) (mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.sharedModules = [
{
features.applications.gui.kitty.enable = lib.mkDefault true;
}
];
} {
environment.systemPackages = [ pkgs.kitty ];
});
};
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
+10 -6
View File
@@ -2,18 +2,22 @@
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
config.home-manager.sharedModules = lib.mkIf (config.features.applications.gui.vscode.enable) [
{
features.applications.gui.vscode.enable = true;
}
];
config = {
environment.systemPackages = [ pkgs.vscode ];
home-manager.sharedModules = lib.mkIf (config.features.applications.gui.vscode.enable) [
{
features.applications.gui.vscode.enable = lib.mkDefault true;
}
];
};
};
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
options.features.applications.gui.vscode.enable = lib.mkEnableOption "vscode";
config = lib.mkIf (config.features.applications.gui.vscode.enable) {
home.packages = [ pkgs.vscode ];
home.packages = lib.mkIf (config.info.isStandalone) [ pkgs.vscode ];
home.activation = {
linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (config.helpers.mkSymlinkActivationScript {
+6
View File
@@ -81,5 +81,11 @@
enable = true;
powerOnBoot = false;
};
home-manager.sharedModules = [
({ config, ... }: {
info.isStandalone = false;
})
];
};
}
+4 -2
View File
@@ -1,12 +1,14 @@
{ inputs, self, ... }: {
flake.homeModules.global = { config, pkgs, ... }: {
flake.homeModules.global = { lib, config, pkgs, ... }: {
nix.gc = {
automatic = true;
persistent = true;
dates = "Sun 05:00";
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config = lib.mkIf (config.info.isStandalone) {
allowUnfree = true;
};
home = {
stateVersion = config.info.stateVersion;
+1 -1
View File
@@ -52,7 +52,7 @@
isStandalone = lib.mkOption {
type = lib.types.bool;
default = false;
default = true;
};
};
+2 -1
View File
@@ -35,6 +35,7 @@
gui = {
kitty.enable = true;
vscode.enable = true;
equibop.enable = true;
};
extraPackages = with pkgs; [
@@ -97,7 +98,6 @@
};
gui = {
equibop.enable = true;
floorp.enable = true;
remmina.enable = true;
spotify = {
@@ -116,6 +116,7 @@
signal-desktop
xarchiver
kdePackages.filelight
kdePackages.kate
loupe
];
};
+5 -3
View File
@@ -2,18 +2,20 @@
flake.homeConfigurations.takamaki = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
modules = with self.homeModules; [
global
graphics
takamaki
];
};
flake.homeModules.takamaki = { pkgs, config, lib, ... }: {
imports = with self.homeModules; [
global
graphics
];
info = {
rootPath = "/home/grey/flake";
hostName = "takamaki";
stateVersion = "26.11";
isStandalone = true;
};
features = {