change hyprland dotfiles lap/desk automaticaly chosen on the smayzy.desktop/laptop.enable option

This commit is contained in:
smayzy 2025-07-13 15:44:41 +02:00
parent 4b0fbf5900
commit a17e38a905
5 changed files with 65 additions and 41 deletions

View File

@ -6,6 +6,7 @@
../../modules/home-manager/webapps.nix ../../modules/home-manager/webapps.nix
../../modules/home-manager/lf/lf.nix ../../modules/home-manager/lf/lf.nix
../../modules/home-manager/kitty.nix ../../modules/home-manager/kitty.nix
../../modules/home-manager/hyprland.nix
]; ];
smayzy.webapps.enable = true; smayzy.webapps.enable = true;
@ -27,15 +28,6 @@
recursive = true; recursive = true;
force = true; force = true;
}; };
".config/mako/config" = {
source = builtins.toPath ../../dotfiles/mako/config;
force = true;
};
".config/wofi" = {
source = builtins.toPath ../../dotfiles/wofi;
recursive = true;
force = true;
};
"wallpaper" = { "wallpaper" = {
source = builtins.toPath ../../wallpapers; source = builtins.toPath ../../wallpapers;
recursive = true; recursive = true;

View File

@ -10,21 +10,6 @@
]; ];
home.file = { home.file = {
".config/hypr" = { };
source = builtins.toPath ../../dotfiles/hypr-desk;
recursive = true;
force = true;
};
".config/waybar" = {
source = builtins.toPath ../../dotfiles/waybar-desk;
recursive = true;
force = true;
};
".config/wlogout" = {
source = builtins.toPath ../../dotfiles/wlogout-desk;
recursive = true;
force = true;
};
};
} }

View File

@ -14,7 +14,10 @@
}; };
home-manager = { home-manager = {
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = {
inherit inputs;
smayzy = config.smayzy;
};
users = { users = {
smayzy = import ./home.nix; smayzy = import ./home.nix;
}; };

View File

@ -10,20 +10,5 @@
]; ];
home.file = { home.file = {
".config/hypr" = {
source = builtins.toPath ../../dotfiles/hypr-lap;
recursive = true;
force = true;
};
".config/waybar" = {
source = builtins.toPath ../../dotfiles/waybar-lap;
recursive = true;
force = true;
};
".config/wlogout" = {
source = builtins.toPath ../../dotfiles/wlogout-lap;
recursive = true;
force = true;
};
}; };
} }

View File

@ -0,0 +1,59 @@
{ lib, config, pkgs, smayzy, ... }:
let
mkIf = lib.mkIf;
in
{
config = mkIf smayzy.hyprland.enable {
home.file = builtins.foldl' lib.recursiveUpdate {} [
{
".config/mako/config" = {
source = builtins.toPath ../../dotfiles/mako/config;
force = true;
};
".config/wofi" = {
source = builtins.toPath ../../dotfiles/wofi;
recursive = true;
force = true;
};
}
(mkIf smayzy.desktop.enable {
".config/hypr" = {
source = builtins.toPath ../../dotfiles/hypr-desk;
recursive = true;
force = true;
};
".config/waybar" = {
source = builtins.toPath ../../dotfiles/waybar-desk;
recursive = true;
force = true;
};
".config/wlogout" = {
source = builtins.toPath ../../dotfiles/wlogout-desk;
recursive = true;
force = true;
};
})
(mkIf smayzy.laptop.enable {
".config/hypr" = {
source = builtins.toPath ../../dotfiles/hypr-lap;
recursive = true;
force = true;
};
".config/waybar" = {
source = builtins.toPath ../../dotfiles/waybar-lap;
recursive = true;
force = true;
};
".config/wlogout" = {
source = builtins.toPath ../../dotfiles/wlogout-lap;
recursive = true;
force = true;
};
})
];
};
}