mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
update
This commit is contained in:
parent
2b7b63a18c
commit
638ef7093e
140 changed files with 307 additions and 121 deletions
80
modules/desktop/astal/default.nix
Normal file
80
modules/desktop/astal/default.nix
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
primaryMonitorName =
|
||||
if builtins.length config.monitors > 0
|
||||
then (builtins.elemAt config.monitors 0).name
|
||||
else "";
|
||||
|
||||
packageName = "fireproof-shell";
|
||||
cfg = config.modules.astral;
|
||||
package = inputs.ags.lib.bundle {
|
||||
inherit pkgs;
|
||||
src = ./.;
|
||||
name = packageName;
|
||||
gtk4 = true;
|
||||
entry = "app.ts";
|
||||
extraPackages = with inputs.ags.packages.${pkgs.system}; [
|
||||
battery
|
||||
bluetooth
|
||||
hyprland
|
||||
network
|
||||
tray
|
||||
notifd
|
||||
mpris
|
||||
wireplumber
|
||||
];
|
||||
};
|
||||
in {
|
||||
options = {
|
||||
modules.astral.primaryMonitor = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = primaryMonitorName;
|
||||
example = "DP-1";
|
||||
};
|
||||
modules.astral.notificationIgnores = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = ["/^Spotify/"];
|
||||
example = ["/^Spotify/"];
|
||||
};
|
||||
modules.astral.trayIgnore = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = ["/spotify/"];
|
||||
example = ["/spotify/"];
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.systemPackages = [package inputs.ags.packages.${pkgs.system}.agsFull];
|
||||
|
||||
fireproof.home-manager = {
|
||||
systemd.user.services.astal = {
|
||||
Unit = {
|
||||
Description = "Astal";
|
||||
Documentation = "https://github.com/Aylur/astal";
|
||||
After = ["graphical-session.target"];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${package}/bin/${packageName}";
|
||||
Restart = "on-failure";
|
||||
KillMode = "mixed";
|
||||
Slice = "app-graphical.slice";
|
||||
Environment = [
|
||||
"ASTRAL_PRIMARY_MONITOR=${cfg.primaryMonitor}"
|
||||
"ASTRAL_NOTIFICATION_IGNORE=${lib.concatStringsSep "," cfg.notificationIgnores}"
|
||||
"ASTRAL_TRAY_IGNORE=${lib.concatStringsSep "," cfg.trayIgnore}"
|
||||
];
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue