Manually start systemd services
This commit is contained in:
parent
5d6908823b
commit
b993476df8
8 changed files with 36 additions and 68 deletions
|
@ -115,4 +115,5 @@ in {
|
|||
enabled = "ibus";
|
||||
ibus.engines = with pkgs.ibus-engines; [anthy];
|
||||
};
|
||||
services.polkit.enable = true;
|
||||
}
|
||||
|
|
13
config/programs/foot.nix
Normal file
13
config/programs/foot.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{...}: {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "FiraCode Nerd Font:size=12";
|
||||
dpi-aware = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,54 +7,9 @@
|
|||
systemd.user.services.keepassxc = {
|
||||
Unit = {
|
||||
Description = "keepassxc";
|
||||
After = ["graphical-session-pre.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.keepassxc}/bin/keepassxc";
|
||||
};
|
||||
};
|
||||
xdg.configFile."keepassxc/keepassxc.ini".text = ''
|
||||
[General]
|
||||
ConfigVersion=1
|
||||
|
||||
[Browser]
|
||||
CustomProxyLocation=
|
||||
Enabled=true
|
||||
|
||||
[FdoSecrets]
|
||||
Enabled=true
|
||||
|
||||
[GUI]
|
||||
AdvancedSettings=true
|
||||
ApplicationTheme=dark
|
||||
TrayIconAppearance=monochrome-light
|
||||
|
||||
[KeeShare]
|
||||
Active="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Active/>\n</KeeShare>\n"
|
||||
Foreign="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <Foreign/>\n</KeeShare>\n"
|
||||
Own="<?xml version=\"1.0\"?>\n<KeeShare xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n <PrivateKey/>\n <PublicKey/>\n</KeeShare>\n"
|
||||
QuietSuccess=true
|
||||
|
||||
[PasswordGenerator]
|
||||
AdditionalChars=
|
||||
AdvancedMode=true
|
||||
Braces=true
|
||||
Dashes=true
|
||||
EASCII=false
|
||||
EnsureEvery=false
|
||||
ExcludedChars=
|
||||
Length=10
|
||||
Logograms=true
|
||||
Math=true
|
||||
Punctuation=true
|
||||
Quotes=true
|
||||
SpecialChars=true
|
||||
|
||||
[Security]
|
||||
IconDownloadFallback=true
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
systemd.user.services.mako = {
|
||||
Unit = {
|
||||
Description = "mako";
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.mako}/bin/mako --default-timeout 30000";
|
||||
|
|
|
@ -70,12 +70,6 @@ in {
|
|||
systemd.user.services.plover = {
|
||||
Unit = {
|
||||
Description = "plover";
|
||||
After = ["tray.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
Requires = ["tray.target"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${plover-env}/bin/plover";
|
||||
|
|
|
@ -59,6 +59,20 @@
|
|||
'';
|
||||
installPhase = "true";
|
||||
};
|
||||
start-extra-services = pkgs.writeTextFile {
|
||||
name = "start-extra-services";
|
||||
destination = "/bin/start-extra-services";
|
||||
exexcutable = true;
|
||||
|
||||
text = ''
|
||||
sleep 5
|
||||
${pkgs.systemd}/bin/systemctl --user start swayidle
|
||||
${pkgs.systemd}/bin/systemctl --user start keepassxc
|
||||
${pkgs.systemd}/bin/systemctl --user start plover
|
||||
${pkgs.systemd}/bin/systemctl --user start wl-clipboard
|
||||
${pkgs.systemd}/bin/systemctl --user start mako
|
||||
'';
|
||||
};
|
||||
# bash script to let dbus know about important env variables and
|
||||
# propogate them to relevent services run at the end of sway config
|
||||
# see
|
||||
|
@ -100,6 +114,7 @@ in {
|
|||
./wl-clipboard.nix
|
||||
./mako.nix
|
||||
./swayidle.nix
|
||||
./foot.nix
|
||||
];
|
||||
home.file.".config/wofi/config".text = ''
|
||||
allow_markup = true
|
||||
|
@ -138,6 +153,7 @@ in {
|
|||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
"${modifier}+Return" = "exec ${pkgs.foot}/bin/foot";
|
||||
"${modifier}+d" = "exec ${pkgs.wofi}/bin/wofi --show drun";
|
||||
"Print" = "mode screenshot";
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
|
@ -160,15 +176,15 @@ in {
|
|||
modes = {
|
||||
screenshot = {
|
||||
Print = "exec ${screenshot_then_switch} copy area";
|
||||
"Shift+Print" = "exec ${screenshot_then_switch} save area $HOME/Pictures/grim-$(date --iso=s).png";
|
||||
"Shift+Print" = "exec ${screenshot_then_switch} save area $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
|
||||
a = "exec ${screenshot_then_switch} copy active";
|
||||
"Shift+a" = "exec ${screenshot_then_switch} save active $HOME/Pictures/grim-$(date --iso=s).png";
|
||||
"Shift+a" = "exec ${screenshot_then_switch} save active $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
|
||||
s = "exec ${screenshot_then_switch} copy screen";
|
||||
"Shift+s" = "exec ${screenshot_then_switch} save screen $HOME/Pictures/grim-$(date --iso=s).png";
|
||||
"Shift+s" = "exec ${screenshot_then_switch} save screen $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
|
||||
o = "exec ${screenshot_then_switch} copy output";
|
||||
"Shift+o" = "exec ${screenshot_then_switch} save output $HOME/Pictures/grim-$(date --iso=s).png";
|
||||
"Shift+o" = "exec ${screenshot_then_switch} save output $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
|
||||
w = "exec ${screenshot_then_switch} copy window";
|
||||
"Shift+w" = "exec ${screenshot_then_switch} save window $HOME/Pictures/grim-$(date --iso=s).png";
|
||||
"Shift+w" = "exec ${screenshot_then_switch} save window $HOME/Pictures/grim-$(date --iso=s | sed 's/:/-/g').png";
|
||||
Escape = ''mode "default"'';
|
||||
Return = ''mode "default"'';
|
||||
};
|
||||
|
@ -188,6 +204,7 @@ in {
|
|||
exec ${dbus-sway-environment}/bin/dbus-sway-environment
|
||||
exec ${configure-gtk}/bin/configure-gtk
|
||||
exec ${pkgs.systemd}/bin/systemctl --user import-environment
|
||||
exec ${start-extra-services}/bin/start-extra-services
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
@ -20,10 +20,6 @@ in {
|
|||
systemd.user.services.swayidle = {
|
||||
Unit = {
|
||||
Description = "swayidle";
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.swayidle}/bin/swayidle -w timeout 300 ${lock-script} timeout 305 ${screen-off-script} resume ${resume-script} before-sleep ${lock-script} timeout 900 ${suspend-script} lock ${lock-script} unlock ${unlock-script}";
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
systemd.user.services.wl-clipboard = {
|
||||
Unit = {
|
||||
Description = "wl-clipboard";
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.clipman}/bin/clipman store --no-persist";
|
||||
|
|
Loading…
Reference in a new issue