parent
5d27b3d975
commit
f3e06554e4
105 changed files with 245 additions and 254 deletions
nixosModules/desktop
|
@ -36,11 +36,11 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
ags-v2.enable = mkOption {
|
||||
ags.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether we want to enable AGSv2 for the DE shell.
|
||||
Whether we want to enable AGS for the DE shell.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ self: {
|
|||
inherit (self.inputs) hyprgrass hyprland hyprland-plugins;
|
||||
in {
|
||||
imports = [
|
||||
(import ../../ags-v2 self)
|
||||
(import ../../ags self)
|
||||
|
||||
./modules/dconf.nix
|
||||
./modules/printer.nix
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
hmCfg = config.home-manager.users.${cfg.user};
|
||||
hyprPkg = hmCfg.wayland.windowManager.hyprland.finalPackage;
|
||||
|
||||
# See nixosModules/ags-v2/packages.nix
|
||||
lockPkg = hmCfg.programs.ags-v2.lockPkg;
|
||||
# See nixosModules/ags/packages.nix
|
||||
lockPkg = hmCfg.programs.ags.lockPkg;
|
||||
|
||||
runInDesktop = pkgs.writeShellApplication {
|
||||
name = "runInDesktop";
|
||||
|
|
|
@ -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