mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
Merge pull request #294 from JumpIn-Git/main
improve home-manager module
This commit is contained in:
commit
1f7a8a3ced
1 changed files with 9 additions and 20 deletions
|
|
@ -96,27 +96,16 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [cfg.package];
|
||||||
home.activation =
|
xdg.configFile = {
|
||||||
lib.optionalAttrs (cfg.autostart_sh != "") {
|
"mango/config.conf" = lib.mkIf (cfg.settings != "") {
|
||||||
createMangoScript = lib.hm.dag.entryAfter ["clearMangoConfig"] ''
|
text = cfg.settings;
|
||||||
cat ${autostart_sh} > $HOME/.config/mango/autostart.sh
|
|
||||||
chmod +x $HOME/.config/mango/autostart.sh
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
// lib.optionalAttrs (cfg.settings != "") {
|
|
||||||
createMangoConfig = lib.hm.dag.entryAfter ["clearMangoConfig"] ''
|
|
||||||
cat > $HOME/.config/mango/config.conf <<EOF
|
|
||||||
${cfg.settings}
|
|
||||||
EOF
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
// {
|
|
||||||
clearMangoConfig = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
||||||
rm -rf $HOME/.config/mango
|
|
||||||
mkdir -p $HOME/.config/mango
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
"mango/autostart.sh" = lib.mkIf (cfg.autostart_sh != "") {
|
||||||
|
source = autostart_sh;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
systemd.user.targets.mango-session = lib.mkIf cfg.systemd.enable {
|
systemd.user.targets.mango-session = lib.mkIf cfg.systemd.enable {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "mango compositor session";
|
Description = "mango compositor session";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue