diff --git a/config/desktop.nix b/config/desktop.nix
index c3c4cdea..52b3e273 100644
--- a/config/desktop.nix
+++ b/config/desktop.nix
@@ -115,4 +115,5 @@ in {
enabled = "ibus";
ibus.engines = with pkgs.ibus-engines; [anthy];
};
+ services.polkit.enable = true;
}
diff --git a/config/programs/foot.nix b/config/programs/foot.nix
new file mode 100644
index 00000000..4d62c65c
--- /dev/null
+++ b/config/programs/foot.nix
@@ -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";
+ };
+ };
+ };
+}
diff --git a/config/programs/keepass.nix b/config/programs/keepass.nix
index 5c12611a..910955e4 100644
--- a/config/programs/keepass.nix
+++ b/config/programs/keepass.nix
@@ -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="\n\n \n\n"
- Foreign="\n\n \n\n"
- Own="\n\n \n \n\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
- '';
}
diff --git a/config/programs/mako.nix b/config/programs/mako.nix
index 9b228491..a5a6eb5c 100644
--- a/config/programs/mako.nix
+++ b/config/programs/mako.nix
@@ -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";
diff --git a/config/programs/plover.nix b/config/programs/plover.nix
index be2d9f22..bc45cf23 100644
--- a/config/programs/plover.nix
+++ b/config/programs/plover.nix
@@ -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";
diff --git a/config/programs/sway.nix b/config/programs/sway.nix
index 47a42948..6aa0ad12 100644
--- a/config/programs/sway.nix
+++ b/config/programs/sway.nix
@@ -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
'';
};
diff --git a/config/programs/swayidle.nix b/config/programs/swayidle.nix
index 0814a463..6c9f31bf 100644
--- a/config/programs/swayidle.nix
+++ b/config/programs/swayidle.nix
@@ -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}";
diff --git a/config/programs/wl-clipboard.nix b/config/programs/wl-clipboard.nix
index dbac3071..ca92bb0d 100644
--- a/config/programs/wl-clipboard.nix
+++ b/config/programs/wl-clipboard.nix
@@ -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";