feat: add nysh as systemd unit and remove swaync

This commit is contained in:
Nydragon 2024-10-02 19:05:14 +02:00
parent 68aa9ba923
commit a48eb45a48
Signed by: nydragon
SSH key fingerprint: SHA256:iQnIC12spf4QjWSbarmkD2No1cLMlu6TWoV7K6cYF5g
9 changed files with 70 additions and 22 deletions

View file

@ -20,12 +20,9 @@ lib.mkIf osConfig.programs.hyprland.enable {
];
exec-once = [
"${pkgs.swaynotificationcenter}/bin/swaync"
"${pkgs.nextcloud-client}/bin/nextcloud --background"
"${pkgs.kdeconnect}/bin/kdeconnect-indicator"
"${pkgs.protonmail-bridge-gui}/bin/protonmail-bridge-gui --no-window"
"${pkgs.waybar}/bin/waybar"
"${pkgs.nysh}/bin/nysh"
# keepassxc ignores themeing and doesnt show up in system tray otherwise
# Dirty solution but hey

View file

@ -115,19 +115,13 @@ lib.mkIf osConfig.programs.sway.enable {
#: }}}
#: Startup {{{
startup = [
{ command = "${pkgs.swaynotificationcenter}/bin/swaync"; }
{ command = "${pkgs.nextcloud-client}/bin/nextcloud --background"; }
{ command = "${pkgs.kdeconnect}/bin/kdeconnect-indicator"; }
{ command = "${pkgs.protonmail-bridge-gui}/bin/protonmail-bridge-gui --no-window"; }
{ command = "${pkgs.nysh}/bin/nysh"; }
{
command = "${pkgs.scripts.set-background}/bin/set-background -f ${wallpaper}";
always = true;
}
{
command = "${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config --reload-css";
always = true;
}
];
#: }}}
assigns = {

View file

@ -103,7 +103,6 @@
htop
eza
bat
swaynotificationcenter
nfs-utils
];

View file

@ -31,7 +31,6 @@
services = {
blueman-applet.enable = true;
swayidle.enable = true;
swaync.enable = true;
syncthing.enable = true;
};

View file

@ -14,15 +14,21 @@
./home.nix
];
modules.system = {
networking = {
bluetooth.enable = true;
wifi.enable = true;
modules = {
system = {
networking = {
bluetooth.enable = true;
wifi.enable = true;
};
type = {
graphical.enable = true;
workstation.enable = true;
gaming.enable = true;
};
};
type = {
graphical.enable = true;
workstation.enable = true;
gaming.enable = true;
services = {
nysh.enable = true;
};
};

View file

@ -39,7 +39,6 @@
};
services = {
swaync.enable = true;
blueman-applet.enable = true;
swayidle.enable = true;
syncthing.enable = true;
@ -95,6 +94,8 @@
scripts.genswitch
scripts.gentest
scripts.editsym
scripts.deployswitch
scripts.deploytest
];
};
};

View file

@ -1,7 +1,7 @@
{
self,
inputs,
lib,
inputs',
...
}:
{
@ -10,7 +10,7 @@
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit self inputs;
inherit self inputs inputs';
};
verbose = true;
};

View file

@ -1,6 +1,8 @@
{
imports = [
./media.nix
./nysh.nix
./system
./container
./server

50
options/nysh.nix Normal file
View file

@ -0,0 +1,50 @@
{
lib,
inputs',
config,
...
}:
let
inherit (lib) mkEnableOption mkOption;
inherit (lib.types) package;
cfg = config.modules.services.nysh;
in
{
options.modules.services.nysh = {
enable = mkEnableOption "nysh";
package = mkOption {
type = package;
default = inputs'.nysh.packages.nysh;
};
};
config = {
systemd.user.services.nysh = {
wantedBy = [ "graphical-session.target" ];
unitConfig = {
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
serviceConfig = {
Type = "simple";
ExecStart = "/bin/sh -lc ${cfg.package}/bin/nysh";
Restart = "on-failure";
};
};
# systemd.user.services.nysh = {
#Install.WantedBy = [ "graphical-session.target" ];
#Unit = {
#After = [ "graphical-session-pre.target" ];
#PartOf = [ "graphical-session.target" ];
#};
#Service = {
#Type = "simple";
#ExecStart = "/bin/sh -lc ${cfg.package}/bin/nysh";
#Restart = "on-failure";
#};
#};
};
}