parent
5d27b3d975
commit
f3e06554e4
105 changed files with 245 additions and 254 deletions
nixosModules/desktop/manager
|
@ -1,41 +1,36 @@
|
|||
self: {
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = let
|
||||
# Libs
|
||||
inherit (lib) removePrefix;
|
||||
|
||||
cfg = config.roles.desktop;
|
||||
agsCfg = hmCfg.programs.ags;
|
||||
hmCfg = config.home-manager.users.${cfg.user};
|
||||
|
||||
ags = hmCfg.programs.ags-v2.package;
|
||||
hyprland = hmCfg.wayland.windowManager.hyprland.finalPackage;
|
||||
|
||||
agsConfig = let
|
||||
homeFiles = config.home-manager.users.${cfg.user}.home.file;
|
||||
agsDir = "${removePrefix "/home/${cfg.user}/" config.environment.variables.FLAKE}/nixosModules/ags-v2/config";
|
||||
|
||||
nodeModules = homeFiles."${agsDir}/node_modules".source;
|
||||
tsconfig = homeFiles."${agsDir}/tsconfig.json".source;
|
||||
varsTs = homeFiles."${agsDir}/widgets/lockscreen/vars.ts".source;
|
||||
nodeModules = homeFiles."${agsCfg.configDir}/node_modules".source;
|
||||
tsconfig = homeFiles."${agsCfg.configDir}/tsconfig.json".source;
|
||||
varsTs = homeFiles."${agsCfg.configDir}/widgets/lockscreen/vars.ts".source;
|
||||
in
|
||||
pkgs.runCommandLocal "agsConfig" {} ''
|
||||
cp -ar ${tsconfig} ./tsconfig.json
|
||||
cp -ar ${../../ags-v2/config}/* ./.
|
||||
cp -ar ${../../ags/config}/* ./.
|
||||
chmod +w -R ./.
|
||||
cp -ar ${varsTs} ./widgets/lockscreen/vars.ts
|
||||
cp -ar ${nodeModules} ./node_modules
|
||||
${ags}/bin/ags bundle ./app.ts $out
|
||||
${agsCfg.package}/bin/ags bundle ./app.ts $out
|
||||
'';
|
||||
in {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.ags-v2.enable;
|
||||
assertion = cfg.ags.enable;
|
||||
message = ''
|
||||
The Display Manager requires AGSv2 to be enabled.
|
||||
The Display Manager requires AGS to be enabled.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
@ -54,7 +49,7 @@ self: {
|
|||
name = "agsGreeter";
|
||||
|
||||
runtimeInputs = [
|
||||
ags
|
||||
agsCfg.package
|
||||
hyprland
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue