diff --git a/common/home-manager/desktop.nix b/common/home-manager/desktop.nix
index 4f74133..68b7db3 100644
--- a/common/home-manager/desktop.nix
+++ b/common/home-manager/desktop.nix
@@ -8,18 +8,10 @@
imports = [
./features/bottom.nix
./features/cava.nix
- ./features/cursor.nix
- ./features/darkman.nix
./features/direnv.nix
./features/fish.nix
- ./features/fnott.nix
- ./features/foot.nix
- ./features/fuzzel.nix
- ./features/gammastep.nix
./features/git.nix
./features/helix.nix
- ./features/i3status-rust.nix
- ./features/imv.nix
./features/joshuto.nix
./features/mmtc.nix
./features/mpd.nix
@@ -28,10 +20,6 @@
./features/qutebrowser
./features/readline.nix
./features/ssh.nix
- ./features/swayidle.nix
- ./features/swaylock.nix
- ./features/sway.nix
- ./features/zathura.nix
];
home.packages = with pkgs; [
@@ -53,147 +41,19 @@
progress
pv
rage
- ripdrag
rsync
sops
systeroid
tokei
- tutanota-desktop
vscodium
- wf-recorder
];
xdg = {
enable = true;
mime.enable = true;
- mimeApps = {
- enable = true;
- defaultApplications = let
- mkDefaultApplication = mimeTypes: desktopFile: (lib.genAttrs mimeTypes (_: desktopFile));
- in
- lib.attrsets.mergeAttrsList [
- (
- mkDefaultApplication [
- "x-scheme-handler/http"
- "x-scheme-handler/https"
- "text/html"
- ] "qutebrowser.desktop"
- )
- (
- mkDefaultApplication [
- "x-scheme-handler/mailto"
- ] "tutanota-desktop.desktop"
- )
- # TODO
- # (
- # mkDefaultApplication [
- # "inode/directory"
- # ] ""
- # )
- # (
- # mkDefaultApplication [
- # "x-scheme-handler/geo"
- # ] ""
- # )
- (
- mkDefaultApplication [
- "image/png"
- "image/jpeg"
- "image/webp"
- "image/avif"
- "image/heif"
- "image/bmp"
- "image/x-icns"
- ] "imv.desktop"
- )
- (
- mkDefaultApplication [
- "audio/aac"
- "audio/mp4"
- "audio/mpeg"
- "audio/mpegurl"
- "audio/ogg"
- "audio/vnd.rn-realaudio"
- "audio/vorbis"
- "audio/x-flac"
- "audio/x-mp3"
- "audio/x-mpegurl"
- "audio/x-ms-wma"
- "audio/x-musepack"
- "audio/x-oggflac"
- "audio/x-pn-realaudio"
- "audio/x-scpls"
- "audio/x-speex"
- "audio/x-vorbis"
- "audio/x-vorbis+ogg"
- "audio/x-wav"
- ] "mpv.desktop"
- )
- (
- mkDefaultApplication [
- "application/pdf"
- ] "zathura.desktop"
- )
- (
- mkDefaultApplication [
- # TODO: Add more text filetypes
- "text/plain"
- "text/x-cmake"
- "text/markdown"
- "application/x-docbook+xml"
- "application/json"
- "application/x-yaml"
- ] "helix.desktop"
- )
- (
- mkDefaultApplication [
- "video/3gp"
- "video/3gpp2"
- "video/divx"
- "video/fli"
- "video/mp2t"
- "video/mp4v-es"
- "video/msvideo"
- "video/quicktime"
- "video/vnd.mpegurl"
- "video/x-avi"
- "video/x-m4v"
- "video/x-mpeg2"
- "video/x-msvideo"
- "video/x-ms-wmx"
- "video/x-ogm+ogg"
- "video/x-theora+ogg"
- "video/3gpp"
- "video/avi"
- "video/dv"
- "video/flv"
- "video/mp4"
- "video/mpeg"
- "video/ogg"
- "video/vnd.divx"
- "video/vnd.rn-realvideo"
- "video/x-flv"
- "video/x-matroska"
- "video/x-ms-asf"
- "video/x-ms-wmv"
- "video/x-ogm"
- "video/x-theora"
- "application/x-matroska"
- ] "mpv.desktop"
- )
- ];
- };
userDirs = {
enable = true;
createDirectories = true;
- desktop = "${config.home.homeDirectory}/desk";
- documents = "${config.home.homeDirectory}/doc";
- download = "${config.home.homeDirectory}/dl";
- music = "${config.home.homeDirectory}/music";
- pictures = "${config.home.homeDirectory}/pic";
- publicShare = "${config.home.homeDirectory}/pub";
- templates = "${config.home.homeDirectory}/tpl";
- videos = "${config.home.homeDirectory}/vid";
};
};
diff --git a/common/home-manager/features/cursor.nix b/common/home-manager/features/cursor.nix
deleted file mode 100644
index 8f1f1d7..0000000
--- a/common/home-manager/features/cursor.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{pkgs, ...}: {
- home.pointerCursor = {
- name = "Bibata-Modern-Classic";
- size = 16;
- package = pkgs.bibata-cursors;
- gtk.enable = true;
- x11.enable = true;
- };
-}
diff --git a/common/home-manager/features/darkman.nix b/common/home-manager/features/darkman.nix
deleted file mode 100644
index da4e542..0000000
--- a/common/home-manager/features/darkman.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{pkgs, ...}: {
- systemd.user.services.darkman = {
- Unit = {
- Description = "Framework for dark-mode and light-mode transitions";
- Documentation = ["man:darkman(1)"];
- };
-
- Service = {
- Type = "dbus";
- BusName = "nl.whynothugo.darkman";
- ExecStart = "${pkgs.darkman}/bin/darkman run";
- Restart = "on-failure";
- TimeoutStopSec = 15;
- Slice = "background.slice";
- LockPersonality = true;
- RestrictNamespaces = true;
- SystemCallArchitectures = "native";
- SystemCallFilter = [
- "@system-service"
- "@timer"
- "mincore"
- ];
- MemoryDenyWriteExecute = true;
- };
-
- Install = {
- WantedBy = ["default.target"];
- };
- };
-}
diff --git a/common/home-manager/features/dunst.nix b/common/home-manager/features/dunst.nix
deleted file mode 100644
index c2a52e3..0000000
--- a/common/home-manager/features/dunst.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- services.dunst = {
- enable = true;
- settings = {
- global = {
- width = 500;
- height = 200;
- offset = "20x50";
- origin = "top-right";
- transparency = 10;
- frame_color = "#eceff1";
- font = "monospace 12";
- };
-
- urgency_normal = {
- background = "#37474f";
- foreground = "#eceff1";
- timeout = 10;
- };
- };
- };
-}
diff --git a/common/home-manager/features/fnott.nix b/common/home-manager/features/fnott.nix
deleted file mode 100644
index 76a173a..0000000
--- a/common/home-manager/features/fnott.nix
+++ /dev/null
@@ -1,66 +0,0 @@
-{pkgs, ...}: {
- services.fnott = {
- enable = true;
- settings = {
- main = {
- min-width = 400;
- max-icon-size = 96;
-
- stacking-order = "bottom-up";
- anchor = "top-right";
- notification-margin = 5;
-
- selection-helper = "${pkgs.bemenu}/bin/bemenu";
-
- background = "263238ff";
-
- border-color = "546e7acf";
- border-size = 2;
-
- padding-vertical = 20;
- padding-horizontal = 20;
-
- title-font = "sans-serif";
- title-color = "ffffffff";
- title-format = "%a%A";
-
- summary-font = "sans-serif";
- summary-color = "ffffffff";
- summary-format = "%s\n";
-
- body-font = "sans-serif";
- body-color = "ffffffff";
- body-format = "%b";
-
- progress-bar-height = 20;
- progress-bar-color = "ffffffff";
-
- max-timeout = 0;
- default-timeout = 10;
- idle-timeout = 0;
- };
-
- # TODO
- low = {
- background = "2632388f";
- title-color = "888888ff";
- summary-color = "888888ff";
- body-color = "888888ff";
- };
-
- normal = {
- background = "263238ff";
- title-color = "ffffffff";
- summary-color = "ffffffff";
- body-color = "ffffffff";
- };
-
- critical = {
- background = "546e7aaf";
- title-color = "888888ff";
- summary-color = "888888ff";
- body-color = "888888ff";
- };
- };
- };
-}
diff --git a/common/home-manager/features/foot.nix b/common/home-manager/features/foot.nix
deleted file mode 100644
index d886426..0000000
--- a/common/home-manager/features/foot.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-{pkgs, ...}: {
- programs.foot = {
- enable = true;
-
- settings = {
- main = {
- app-id = "foot";
- font = "monospace:size=12";
- initial-window-size-chars = "80x24";
- notify = "notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
- };
-
- scrollback = {
- lines = 10000;
- };
-
- url = {
- launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
- };
-
- cursor = {
- style = "block";
- blink = "yes";
- };
-
- mouse = {
- hide-when-typing = "yes";
- };
-
- colors = {
- alpha = "0.9";
- foreground = "a9b1d6";
- background = "09090a";
- regular0 = "212121";
- regular1 = "f07178";
- regular2 = "c3e88d";
- regular3 = "ffcb6b";
- regular4 = "82aaff";
- regular5 = "c792ea";
- regular6 = "89ddff";
- regular7 = "eeffff";
- bright0 = "4a4a4a";
- bright1 = "f07178";
- bright2 = "c3e88d";
- bright3 = "ffcb6b";
- bright4 = "82aaff";
- bright5 = "c792ea";
- bright6 = "89ddff";
- bright7 = "ffffff";
- };
- };
- };
-}
diff --git a/common/home-manager/features/fuzzel.nix b/common/home-manager/features/fuzzel.nix
deleted file mode 100644
index e061486..0000000
--- a/common/home-manager/features/fuzzel.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{config, ...}: {
- programs.fuzzel = {
- enable = true;
-
- settings = {
- main = {
- font = "Iosevka Nerd Font";
- terminal = "${config.programs.foot.package}/bin/foot";
- layer = "overlay";
- };
- colors = {
- background = "263238c0";
- text = "ffffffff";
- match = "eeffffff";
- selection = "82aaffdd";
- selection-text = "eeffffff";
- border = "314549fa";
- };
- border = {
- width = 2;
- radius = 5;
- };
- };
- };
-}
diff --git a/common/home-manager/features/gammastep.nix b/common/home-manager/features/gammastep.nix
deleted file mode 100644
index c5704ce..0000000
--- a/common/home-manager/features/gammastep.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- services.gammastep = {
- enable = true;
- provider = "geoclue2";
- tray = true;
- };
-}
diff --git a/common/home-manager/features/i3status-rust.nix b/common/home-manager/features/i3status-rust.nix
deleted file mode 100644
index 659fa3e..0000000
--- a/common/home-manager/features/i3status-rust.nix
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- programs.i3status-rust = {
- enable = true;
-
- bars = {
- default = {
- icons = "material-nf";
-
- settings = {
- theme.overrides = {
- idle_bg = "#000000";
- idle_fg = "#c5c8c6";
- info_bg = "#3971ed";
- info_fg = "#0e0e0ef0";
- good_bg = "#198844";
- good_fg = "#0e0e0ef0";
- warning_bg = "#fba922";
- warning_fg = "#0e0e0ef0";
- critical_bg = "#cc342b";
- critical_fg = "#0e0e0ef0";
- separator = "";
- separator_bg = "auto";
- separator_fg = "auto";
- };
- };
-
- blocks = [
- {
- block = "focused_window";
- format = "{ $title $visible_marks |}";
- }
- {
- block = "net";
- format = " $icon ^icon_net_up $speed_up ^icon_net_down $speed_down ";
- interval = 1;
- }
- {
- block = "memory";
- format = " $icon $mem_used ";
- interval = 5;
- }
- {
- block = "cpu";
- format = " $icon $barchart ";
- interval = 5;
- }
- {
- block = "disk_space";
- path = "/home";
- info_type = "available";
- alert_unit = "GB";
- alert = 10;
- warning = 15;
- format = " $icon $used/$total ";
- }
- {
- block = "battery";
- interval = 10;
- format = " $icon $percentage ";
- missing_format = "";
- device = "BAT0";
- }
- {
- block = "battery";
- interval = 10;
- format = " $icon $percentage {$time |}";
- missing_format = "";
- device = "BAT1";
- }
- {
- block = "sound";
- format = " $icon {$volume |}";
- device_kind = "sink";
- }
- {
- block = "sound";
- format = " $icon {$volume |}";
- device_kind = "source";
- }
- {
- block = "music";
- format = "{ $icon $combo $prev $play $next |}";
- }
- {
- block = "time";
- interval = 1;
- format = " $icon $timestamp.datetime(f:'%H:%M:%S, %b %d.') ";
- }
- ];
- };
- };
- };
-}
diff --git a/common/home-manager/features/imv.nix b/common/home-manager/features/imv.nix
deleted file mode 100644
index 814c74b..0000000
--- a/common/home-manager/features/imv.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- programs.imv = {
- enable = true;
- settings = {
- options = {
- background = "checks";
- loop_input = false;
- overlay = true;
- };
- };
- };
-}
diff --git a/common/home-manager/features/qutebrowser/default.nix b/common/home-manager/features/qutebrowser/default.nix
index 7a3b4a5..cd4b280 100644
--- a/common/home-manager/features/qutebrowser/default.nix
+++ b/common/home-manager/features/qutebrowser/default.nix
@@ -37,12 +37,10 @@
config.bind("td", "config-cycle colors.webpage.darkmode.enabled;; restart")
- c.tabs.show = "multiple"
-
- c.tabs.tabs_are_windows = True
-
c.content.local_content_can_access_remote_urls = True
+ c.tabs.show = "multiple"
+
c.url.default_page = Path("${./start.html}").as_uri()
c.url.start_pages = [c.url.default_page]
diff --git a/common/home-manager/features/sway.nix b/common/home-manager/features/sway.nix
deleted file mode 100644
index 8f88282..0000000
--- a/common/home-manager/features/sway.nix
+++ /dev/null
@@ -1,537 +0,0 @@
-{
- pkgs,
- config,
- lib,
- ...
-}: {
- imports = [
- ./cursor.nix
- ];
-
- # TODO: darkman
-
- wayland.windowManager.sway = let
- wpctl = "${pkgs.wireplumber}/bin/wpctl";
- xdg-user-dir = "${pkgs.xdg-user-dirs}/bin/xdg-user-dir";
- notify-send = "${pkgs.libnotify}/bin/notify-send";
- slurp = "${pkgs.slurp}/bin/slurp";
- grim = "${pkgs.grim}/bin/grim";
- wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
- swaynag = "${config.wayland.windowManager.sway.package}/bin/swaynag";
- swaymsg = "${config.wayland.windowManager.sway.package}/bin/swaymsg";
- brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
- mpc = "${pkgs.mpc-cli}/bin/mpc";
- fnottctl = "${config.services.fnott.package}/bin/fnottctl";
- modifier = "Mod4";
- terminal = "${config.programs.foot.package}/bin/foot";
- in {
- enable = true;
-
- systemd = {
- enable = true;
- xdgAutostart = true;
- };
-
- wrapperFeatures = {
- base = true;
- gtk = true;
- };
-
- # TODO: Remove GTK_THEME
- extraSessionCommands = ''
- export MOZ_ENABLE_WAYLAND=1
- export MOZ_DBUS_REMOTE=1
- export QT_QPA_PLATFORM=wayland-egl
- export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
- export _JAVA_AWT_WM_NONREPARENTING=1
- export SDL_VIDEODRIVER=wayland
- export BEMENU_OPTS='--tb #3971ed --tf #1d1f21 --fb #1d1f21 --ff #c5c8c6 --nb #1d1f21 --nf #c5c8c6 --hb #282a2e --hf #ffffff --sb #1d1f21 --sf #c5c8c6 --scb #373b41 --scf #3971ed --scrollbar autohide --fn monospace --bottom'
- export GTK_THEME=Adwaita:dark
- export XDG_SESSION_DESKTOP="''${XDG_SESSION_DESKTOP:-sway}"
- export SUDO_ASKPASS=${
- pkgs.writeShellScript "askpass" ''
- echo -n | ${pkgs.bemenu}/bin/bemenu --password --prompt askpass
- ''
- }
- export GDK_SCALE=1
- '';
-
- config = {
- inherit modifier terminal;
-
- startup = [
- {command = "${pkgs.dex}/bin/dex --autostart";}
- ];
-
- # FIXME: Currently done by extraConfig
- # defaultWorkspace = "workspace number 1";
-
- gaps = {
- smartBorders = "on";
- smartGaps = true;
- };
-
- window = {
- titlebar = false;
-
- commands = [
- {
- command = "inhibit_idle fullscreen";
- criteria.app_id = "mpv";
- }
- ];
- };
-
- workspaceAutoBackAndForth = true;
-
- input = {
- "type:keyboard" = {
- xkb_layout = lib.mkDefault "us";
- repeat_rate = "45";
- repeat_delay = "250";
- };
-
- "type:pointer" = {
- accel_profile = "flat";
- };
-
- "type:touchpad" = {
- tap = "enabled";
- natural_scroll = "enabled";
- dwt = "enabled";
- };
- };
-
- bars = [
- {
- statusCommand = "${config.programs.i3status-rust.package}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
- command = "${config.wayland.windowManager.sway.package}/bin/swaybar";
- position = "top";
- trayOutput = "*";
- fonts = {
- names = ["Iosevka Nerd Font" "monospace"];
- style = "Regular";
- size = 13.0;
- };
- colors = {
- background = "#000000";
- separator = "#121616f4";
- statusline = "#121616f4";
- focusedWorkspace = {
- border = "#3971ed";
- background = "#3971ed";
- text = "#0e0e0ef0";
- };
- activeWorkspace = {
- border = "#c5c8c6";
- background = "#969896";
- text = "#0e0e0ef0";
- };
- inactiveWorkspace = {
- border = "#000000";
- background = "#000000";
- text = "#c5c8c6";
- };
- urgentWorkspace = {
- border = "#cc342b";
- background = "#cc342b";
- text = "#0e0e0ef0";
- };
- bindingMode = {
- border = "#fba922";
- background = "#fba922";
- text = "#0e0e0ef0";
- };
- };
- }
- ];
-
- colors = {
- focused = {
- border = "#c5c8c6";
- background = "#3971ed";
- text = "#0e0e0ef0";
- indicator = "#3971ed";
- childBorder = "#3971ed";
- };
- focusedInactive = {
- border = "#121616f4";
- background = "#121616f4";
- text = "#c5c8c6";
- indicator = "#969896";
- childBorder = "#121616f4";
- };
- unfocused = {
- border = "#121616f4";
- background = "#0e0e0ef0";
- text = "#c5c8c6";
- indicator = "#121616f4";
- childBorder = "#121616f4";
- };
- urgent = {
- border = "#cc342b";
- background = "#cc342b";
- text = "#0e0e0ef0";
- indicator = "#cc342b";
- childBorder = "#cc342b";
- };
- placeholder = {
- border = "#0e0e0ef0";
- background = "#0e0e0ef0";
- text = "#c5c8c6";
- indicator = "#0e0e0ef0";
- childBorder = "#0e0e0ef0";
- };
- background = "#ffffff";
- };
-
- floating.criteria = [
- {app_id = "neovidefloat";}
- {app_id = "mpvfloat";}
- {app_id = "footfloat";}
- ];
-
- keybindings = {
- "${modifier}+Shift+q" = "kill";
-
- "${modifier}+d" = "exec ${config.programs.fuzzel.package}/bin/fuzzel";
- "${modifier}+Shift+d" = "exec ${pkgs.bemenu}/bin/bemenu-run --no-exec | xargs ${swaymsg} exec --";
-
- "${modifier}+Return" = "exec ${terminal}";
- "${modifier}+Shift+Return" = "exec ${terminal} --class footfloat";
-
- "${modifier}+Left" = "focus left";
- "${modifier}+Down" = "focus down";
- "${modifier}+Up" = "focus up";
- "${modifier}+Right" = "focus right";
-
- "${modifier}+h" = "focus left";
- "${modifier}+j" = "focus down";
- "${modifier}+k" = "focus up";
- "${modifier}+l" = "focus right";
-
- "${modifier}+Shift+Left" = "move left";
- "${modifier}+Shift+Down" = "move down";
- "${modifier}+Shift+Up" = "move up";
- "${modifier}+Shift+Right" = "move right";
-
- "${modifier}+Shift+h" = "move left";
- "${modifier}+Shift+j" = "move down";
- "${modifier}+Shift+k" = "move up";
- "${modifier}+Shift+l" = "move right";
-
- "${modifier}+s" = "layout stacking";
- "${modifier}+w" = "layout tabbed";
- "${modifier}+e" = "layout toggle split";
-
- "${modifier}+Space" = "focus mode_toggle";
- "${modifier}+Shift+Space" = "floating toggle";
-
- "${modifier}+1" = "workspace number 1";
- "${modifier}+2" = "workspace number 2";
- "${modifier}+3" = "workspace number 3";
- "${modifier}+4" = "workspace number 4";
- "${modifier}+5" = "workspace number 5";
- "${modifier}+6" = "workspace number 6";
- "${modifier}+7" = "workspace number 7";
- "${modifier}+8" = "workspace number 8";
- "${modifier}+9" = "workspace number 9";
- "${modifier}+0" = "workspace number 10";
- "${modifier}+F1" = "workspace number 11";
- "${modifier}+F2" = "workspace number 12";
- "${modifier}+F3" = "workspace number 13";
- "${modifier}+F4" = "workspace number 14";
- "${modifier}+F5" = "workspace number 15";
- "${modifier}+F6" = "workspace number 16";
- "${modifier}+F7" = "workspace number 17";
- "${modifier}+F8" = "workspace number 18";
- "${modifier}+F9" = "workspace number 19";
- "${modifier}+F10" = "workspace number 20";
- "${modifier}+F11" = "workspace number 21";
- "${modifier}+F12" = "workspace number 22";
-
- "${modifier}+Shift+1" = "move container to workspace number 1";
- "${modifier}+Shift+2" = "move container to workspace number 2";
- "${modifier}+Shift+3" = "move container to workspace number 3";
- "${modifier}+Shift+4" = "move container to workspace number 4";
- "${modifier}+Shift+5" = "move container to workspace number 5";
- "${modifier}+Shift+6" = "move container to workspace number 6";
- "${modifier}+Shift+7" = "move container to workspace number 7";
- "${modifier}+Shift+8" = "move container to workspace number 8";
- "${modifier}+Shift+9" = "move container to workspace number 9";
- "${modifier}+Shift+0" = "move container to workspace number 10";
- "${modifier}+Shift+F1" = "move container to workspace number 11";
- "${modifier}+Shift+F2" = "move container to workspace number 12";
- "${modifier}+Shift+F3" = "move container to workspace number 13";
- "${modifier}+Shift+F4" = "move container to workspace number 14";
- "${modifier}+Shift+F5" = "move container to workspace number 15";
- "${modifier}+Shift+F6" = "move container to workspace number 16";
- "${modifier}+Shift+F7" = "move container to workspace number 17";
- "${modifier}+Shift+F8" = "move container to workspace number 18";
- "${modifier}+Shift+F9" = "move container to workspace number 19";
- "${modifier}+Shift+F10" = "move container to workspace number 20";
- "${modifier}+Shift+F11" = "move container to workspace number 21";
- "${modifier}+Shift+F12" = "move container to workspace number 22";
-
- Print =
- "exec "
- + pkgs.writeShellScript "grabraw" ''
- set -e
- set -o pipefail
- f=$(${xdg-user-dir} PICTURES)/$(date +'screenshot-%Y%m%d-%H%M%S').png
- ${grim} -t png - | tee -- "$f" | ${wl-copy} --type image/png
- ${notify-send} --icon "$f" -- "$f copied to clipboard."
- '';
- "Shift+Print" =
- "exec "
- + pkgs.writeShellScript "grabregion" ''
- set -e
- set -o pipefail
- f=$(${xdg-user-dir} PICTURES)/$(date +'screenshot-%Y%m%d-%H%M%S').png
- ${slurp} | ${grim} -t png -g - - | tee -- "$f" | ${wl-copy} --type image/png
- ${notify-send} --icon "$f" -- "$f copied to clipboard."
- '';
- "Control+Shift+Print" =
- "exec "
- + pkgs.writeShellScript "grabcolor" ''
- set -e
- set -o pipefail
- c=$(${slurp} -b 00000000 -p | ${grim} -g - - | ${pkgs.imagemagick}/bin/convert - -format '%[pixel:p{0,0}]' txt:- | tail --lines 1 | cut -d ' ' -f 4)
- ${wl-copy} --type text/plain --trim-newline <<< "$c"
- ${notify-send} -- "$c copied to clipboard."
- '';
-
- "${modifier}+x" = "split h";
- "${modifier}+y" = "split v";
-
- "${modifier}+f" = "fullscreen toggle";
- "${modifier}+a" = "focus parent";
- "${modifier}+c" = "focus child";
-
- "${modifier}+Shift+c" = "reload";
- "${modifier}+Shift+r" = "restart";
-
- "${modifier}+Shift+z" = ''
- exec ${swaynag} \
- -t warning \
- -m 'What do you want to do?' \
- -b 'Exit sway' 'systemctl --user stop sway-session.target && ${swaymsg} exit' \
- -b 'Shutdown' 'systemctl --user stop sway-session.target && shutdown now' \
- -b 'Reboot' 'systemctl --user stop sway-session.target && reboot' \
- -b 'Suspend' 'loginctl lock-session && systemctl suspend' \
- -b 'Hibernate' 'loginctl lock-session && systemctl hibernate'
- '';
-
- "${modifier}+b" = "exec ${fnottctl} dismiss";
- "${modifier}+Shift+b" = "exec ${fnottctl} actions";
-
- XF86AudioRaiseVolume = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+";
- XF86AudioLowerVolume = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-";
- "Shift+XF86AudioRaiseVolume" = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+";
- "Shift+XF86AudioLowerVolume" = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-";
- XF86AudioMute = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 1";
- "Shift+XF86AudioMute" = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 0";
- XF86AudioMicMute = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ 1";
- "Shift+XF86AudioMicMute" = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ 0";
- "${modifier}+n" = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 1";
- "${modifier}+Shift+n" = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 0";
- "${modifier}+m" = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ 1";
- "${modifier}+Shift+m" = "exec ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ 0";
-
- XF86AudioPause = "exec ${mpc} pause";
- XF86AudioPlay = "exec ${mpc} play";
- XF86AudioPrev = "exec ${mpc} prev";
- XF86AudioNext = "exec ${mpc} next";
-
- XF86MonBrightnessUp = "exec ${brightnessctl} set +1%";
- XF86MonBrightnessDown = "exec ${brightnessctl} set 1%-";
- "Shift+XF86MonBrightnessUp" = "exec ${brightnessctl} set +10%";
- "Shift+XF86MonBrightnessDown" = "exec ${brightnessctl} set 10%-";
-
- "${modifier}+Apostrophe" = "move workspace to output right";
-
- "${modifier}+Minus" = "scratchpad show";
- "${modifier}+Shift+Minus" = "move scratchpad";
- "${modifier}+Underscore" = "move container to scratchpad";
-
- "${modifier}+Shift+s" = "exec loginctl lock-session";
-
- XF86PowerOff = "exec loginctl lock-session";
- "Shift+XF86PowerOff" = "exec systemctl suspend-then-hibernate";
-
- XF86Eject = "exec loginctl lock-session";
- "Shift+XF86Eject" = "exec systemctl suspend-then-hibernate";
-
- Pause = "exec loginctl lock-session";
- "Shift+Pause" = "exec systemctl suspend-then-hibernate";
-
- "${modifier}+r" = "mode resize";
- "${modifier}+g" = "mode gaps";
- "${modifier}+p" = "mode mpc";
- "${modifier}+i" = "mode microphone";
- "${modifier}+t" = "mode clipboard";
- "${modifier}+v" = "mode volume";
- "${modifier}+u" = "mode brightness";
- };
-
- modes = {
- resize = {
- h = "resize shrink width 1 px or 1 ppt";
- j = "resize grow height 1 px or 1 ppt";
- k = "resize shrink height 1 px or 1 ppt";
- l = "resize grow width 1 px or 1 ppt";
- "Shift+h" = "resize shrink width 10 px or 10 ppt";
- "Shift+j" = "resize grow height 10 px or 10 ppt";
- "Shift+k" = "resize shrink height 10 px or 10 ppt";
- "Shift+l" = "resize grow width 10 px or 10 ppt";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- volume = {
- k = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+";
- j = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-";
- "Shift+k" = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+";
- "Shift+j" = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- microphone = {
- XF86AudioRaiseVolume = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 1%+";
- XF86AudioLowerVolume = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 1%-";
- "Shift+XF86AudioRaiseVolume" = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 10%+";
- "Shift+XF86AudioLowerVolume" = "exec ${wpctl} set-volume @DEFAULT_AUDIO_SOURCE@ 10%-";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- brightness = {
- j = "exec ${brightnessctl} set 1%-";
- k = "exec ${brightnessctl} set +1%";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- clipboard = {
- c = "exec ${wl-copy} --clear";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- "gaps inner" = {
- plus = "gaps inner current plus 1";
- minus = "gaps inner current minus 1";
- "0" = "gaps inner current set 0";
-
- "Shift+plus" = "gaps inner all plus 1";
- "Shift+minus" = "gaps inner all minus 1";
- "Shift+0" = "gaps inner all set 0";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- "gaps outer" = {
- plus = "gaps outer current plus 1";
- minus = "gaps outer current minus 1";
- "0" = "gaps outer current set 0";
-
- "Shift+plus" = "gaps outer all plus 1";
- "Shift+minus" = "gaps outer all minus 1";
- "Shift+0" = "gaps outer all set 0";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- gaps = {
- o = ''mode "gaps outer"'';
- i = ''mode "gaps inner"'';
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- "mpc volume" = {
- j = "exec ${mpc} volume -1";
- k = "exec ${mpc} volume +1";
- "Shift+j" = "exec exec ${mpc} volume -10";
- "Shift+k" = "exec exec ${mpc} volume +10";
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- mpc = {
- XF86AudioRaiseVolume = "exec ${mpc} volume +1";
- XF86AudioLowerVolume = "exec ${mpc} volume -1";
- "Shift+XF86AudioRaiseVolume" = "exec ${mpc} volume +10";
- "Shift+XF86AudioLowerVolume" = "exec ${mpc} volume -10";
-
- j = "exec ${mpc} next";
- k = "exec ${mpc} prev";
-
- c = "exec ${mpc} toggle";
-
- o = "exec ${mpc} consume on";
- "Shift+o" = "exec ${mpc} consume off";
-
- "1" = "exec ${mpc} single on";
- "Shift+1" = "exec ${mpc} single off";
-
- r = "exec ${mpc} random on";
- "Shift+r" = "exec ${mpc} random off";
-
- p = "exec ${mpc} stop";
-
- s = "exec ${mpc} shuffle";
-
- h = "exec ${mpc} seek -00:00:01";
- l = "exec ${mpc} seek +00:00:01";
- "Shift+h" = "exec ${mpc} seek -00:00:10";
- "Shift+l" = "exec ${mpc} seek +00:00:10";
-
- v = ''mode "mpc volume"'';
-
- Return = "mode default";
- Escape = "mode default";
- };
-
- # TODO: bind
- # wall = {
- # s = pkgs.writeShellScript "setwall" ''
- # set -euo pipefail
- # shopt -s nullglob
- # shopt -s globstar
-
- # # select the output first...
-
- # file=$(
- # for file in *
- # do
- # echo "''${file@Q}"
- # done | ${pkgs.bemenu}/bin/bemenu --lines 10 --prompt askpass
- # )
-
- # if [[ $? != 0 ]]; then
- # exit 1
- # fi
- # '';
- # };
- };
-
- seat."*".xcursor_theme = "${config.home.pointerCursor.name} ${builtins.toString config.home.pointerCursor.size}";
- };
-
- # FIXME: Should be done by defaultWorkspace
- extraConfig = ''
- workspace number 1
- '';
- };
-}
diff --git a/common/home-manager/features/swayidle.nix b/common/home-manager/features/swayidle.nix
deleted file mode 100644
index 684dbd8..0000000
--- a/common/home-manager/features/swayidle.nix
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- pkgs,
- config,
- ...
-}: {
- services.swayidle = {
- enable = true;
-
- events = [
- {
- event = "lock";
- command = "${config.programs.swaylock.package}/bin/swaylock --daemonize";
- }
- {
- event = "before-sleep";
- command = "${pkgs.systemd}/bin/loginctl lock-session";
- }
- ];
-
- timeouts = [
- {
- timeout = 600;
- command = "${pkgs.chayang}/bin/chayang && ${pkgs.systemd}/bin/loginctl lock-session && ${config.wayland.windowManager.sway.package}/bin/swaymsg output \\\\* power off";
- resumeCommand = "${config.wayland.windowManager.sway.package}/bin/swaymsg output \\\\* power on";
- }
- ];
- };
-}
diff --git a/common/home-manager/features/swaylock.nix b/common/home-manager/features/swaylock.nix
deleted file mode 100644
index 2ea8444..0000000
--- a/common/home-manager/features/swaylock.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- programs.swaylock = {
- enable = true;
- settings = {
- ignore-empty-password = true;
- show-failed-attempts = true;
- indicator-caps-lock = true;
- color = "000000";
- ring-color = "111111";
- line-color = "00000000";
- inside-color = "00000088";
- separator-color = "00000000";
- key-hl-color = "000033";
- indicator-radius = 100;
- indicator-thickness = 12;
- };
- };
-}
diff --git a/common/home-manager/features/zathura.nix b/common/home-manager/features/zathura.nix
deleted file mode 100644
index 4de14ad..0000000
--- a/common/home-manager/features/zathura.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- programs.zathura.enable = true;
-}
diff --git a/common/nixos/desktop.nix b/common/nixos/desktop.nix
index b715892..155b420 100644
--- a/common/nixos/desktop.nix
+++ b/common/nixos/desktop.nix
@@ -14,15 +14,13 @@
./features/fonts.nix
./features/fwupd.nix
./features/geoclue.nix
- ./features/greetd.nix
./features/opengl.nix
./features/openssh.nix
./features/pipewire.nix
+ ./features/plasma.nix
./features/sops.nix
./features/sudo.nix
- ./features/swaylock.nix
./features/users.nix
- ./features/xdpw.nix
];
fileSystems = {
@@ -115,10 +113,7 @@
programs.dconf.enable = true;
- # TODO
- # xdg.portal.xdgOpenUsePortal = true;
+ xdg.portal.xdgOpenUsePortal = true;
- environment.systemPackages = with pkgs; [
- bibata-cursors
- ];
+ programs.kdeconnect.enable = true;
}
diff --git a/common/nixos/features/greetd.nix b/common/nixos/features/greetd.nix
deleted file mode 100644
index 3d635fa..0000000
--- a/common/nixos/features/greetd.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{pkgs, ...}: {
- services.greetd = {
- enable = true;
- settings = {
- default_session = {
- command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
- };
- };
- };
-}
diff --git a/common/nixos/features/plasma.nix b/common/nixos/features/plasma.nix
new file mode 100644
index 0000000..9cd7fd9
--- /dev/null
+++ b/common/nixos/features/plasma.nix
@@ -0,0 +1,41 @@
+{pkgs, ...}: {
+ services = {
+ xserver = {
+ enable = true;
+ desktopManager.plasma5.enable = true;
+ displayManager = {
+ defaultSession = "plasmawayland";
+ sddm = {
+ enable = true;
+ autoNumlock = true;
+ settings = {
+ Theme = {
+ CursorTheme = "breeze_cursors";
+ };
+ };
+ };
+ };
+ excludePackages = with pkgs; [
+ xterm
+ ];
+ };
+ };
+
+ programs.dconf.enable = true;
+
+ xdg.portal.extraPortals = with pkgs; [
+ xdg-desktop-portal-gtk
+ ];
+
+ environment.sessionVariables = {
+ "SUDO_ASKPASS" = pkgs.writeShellScript "kdialogaskpass" ''
+ exec ${pkgs.kdialog} --password Askpass
+ '';
+ "MOZ_USE_XINPUT2" = "1";
+ "GDK_SCALE" = "1";
+ };
+
+ environment.systemPackages = with pkgs; [
+ discover
+ ];
+}
diff --git a/common/nixos/features/swaylock.nix b/common/nixos/features/swaylock.nix
deleted file mode 100644
index 93f484d..0000000
--- a/common/nixos/features/swaylock.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- security.pam.services.swaylock = {};
-}
diff --git a/common/nixos/features/xdpw.nix b/common/nixos/features/xdpw.nix
deleted file mode 100644
index 416c910..0000000
--- a/common/nixos/features/xdpw.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{pkgs, ...}: {
- xdg.portal = {
- enable = true;
- extraPortals = [
- pkgs.xdg-desktop-portal-wlr
- pkgs.xdg-desktop-portal-gtk
- ];
- };
-}
diff --git a/home-manager/flamingo/lukas.nix b/home-manager/flamingo/lukas.nix
index 72321cd..86c8b0b 100644
--- a/home-manager/flamingo/lukas.nix
+++ b/home-manager/flamingo/lukas.nix
@@ -1,66 +1,6 @@
-{pkgs, ...}: {
+{
home = {
username = "lukas";
stateVersion = "23.11";
};
-
- wayland.windowManager.sway = {
- config = {
- input."type:keyboard".xkb_layout = "de";
-
- output.eDP-1 = {
- mode = "1920x1080";
- position = "0,0";
- background = ''"$(${pkgs.xdg-user-dirs}/bin/xdg-user-dir PICTURES)/sway/primary" fill'';
- };
-
- workspaceOutputAssign = [
- {
- output = "e-DP1";
- workspace = "number 1";
- }
- {
- output = "e-DP1";
- workspace = "number 2";
- }
- {
- output = "e-DP1";
- workspace = "number 3";
- }
- {
- output = "e-DP1";
- workspace = "number 4";
- }
- {
- output = "e-DP1";
- workspace = "number 5";
- }
- {
- output = "e-DP1";
- workspace = "number 6";
- }
- {
- output = "e-DP1";
- workspace = "number 7";
- }
- {
- output = "e-DP1";
- workspace = "number 8";
- }
- {
- output = "e-DP1";
- workspace = "number 9";
- }
- {
- output = "e-DP1";
- workspace = "number 10";
- }
- ];
-
- gaps = {
- inner = 4;
- outer = 6;
- };
- };
- };
}
diff --git a/home-manager/glacier/lukas.nix b/home-manager/glacier/lukas.nix
index e2fea36..7b738a8 100644
--- a/home-manager/glacier/lukas.nix
+++ b/home-manager/glacier/lukas.nix
@@ -7,92 +7,4 @@
];
stateVersion = "23.11";
};
-
- wayland.windowManager.sway = let
- primary = "Acer Technologies XB283K KV 120918F984200";
- secondary = "LG Electronics LG HDR 4K 0x00008FEE";
- in {
- config = {
- output.${primary} = {
- mode = "3840x2160@144.004Hz";
- position = "0,0";
- background = ''"$(${pkgs.xdg-user-dirs}/bin/xdg-user-dir PICTURES)/sway/primary" fill'';
- };
-
- output.${secondary} = {
- mode = "3840x2160@59.997Hz";
- position = "3840,-1680";
- transform = "90";
- background = ''"$(${pkgs.xdg-user-dirs}/bin/xdg-user-dir PICTURES)/sway/secondary" fill'';
- };
-
- workspaceOutputAssign = [
- {
- output = primary;
- workspace = "1";
- }
- {
- output = primary;
- workspace = "2";
- }
- {
- output = primary;
- workspace = "3";
- }
- {
- output = primary;
- workspace = "4";
- }
- {
- output = primary;
- workspace = "5";
- }
- {
- output = primary;
- workspace = "6";
- }
- {
- output = primary;
- workspace = "7";
- }
- {
- output = primary;
- workspace = "8";
- }
- {
- output = primary;
- workspace = "9";
- }
- {
- output = primary;
- workspace = "10";
- }
- {
- output = secondary;
- workspace = "11";
- }
- {
- output = secondary;
- workspace = "12";
- }
- {
- output = secondary;
- workspace = "13";
- }
- {
- output = secondary;
- workspace = "14";
- }
- ];
-
- gaps = {
- inner = 12;
- outer = 14;
- };
-
- input."Razer Razer DeathAdder V3" = {
- pointer_accel = "0.0";
- };
- };
- };
}
diff --git a/home-manager/scenery/lukas.nix b/home-manager/scenery/lukas.nix
index 72321cd..86c8b0b 100644
--- a/home-manager/scenery/lukas.nix
+++ b/home-manager/scenery/lukas.nix
@@ -1,66 +1,6 @@
-{pkgs, ...}: {
+{
home = {
username = "lukas";
stateVersion = "23.11";
};
-
- wayland.windowManager.sway = {
- config = {
- input."type:keyboard".xkb_layout = "de";
-
- output.eDP-1 = {
- mode = "1920x1080";
- position = "0,0";
- background = ''"$(${pkgs.xdg-user-dirs}/bin/xdg-user-dir PICTURES)/sway/primary" fill'';
- };
-
- workspaceOutputAssign = [
- {
- output = "e-DP1";
- workspace = "number 1";
- }
- {
- output = "e-DP1";
- workspace = "number 2";
- }
- {
- output = "e-DP1";
- workspace = "number 3";
- }
- {
- output = "e-DP1";
- workspace = "number 4";
- }
- {
- output = "e-DP1";
- workspace = "number 5";
- }
- {
- output = "e-DP1";
- workspace = "number 6";
- }
- {
- output = "e-DP1";
- workspace = "number 7";
- }
- {
- output = "e-DP1";
- workspace = "number 8";
- }
- {
- output = "e-DP1";
- workspace = "number 9";
- }
- {
- output = "e-DP1";
- workspace = "number 10";
- }
- ];
-
- gaps = {
- inner = 4;
- outer = 6;
- };
- };
- };
}
diff --git a/nixos/glacier/default.nix b/nixos/glacier/default.nix
index 3362617..91dc180 100644
--- a/nixos/glacier/default.nix
+++ b/nixos/glacier/default.nix
@@ -42,12 +42,4 @@
];
services.mullvad-vpn.enable = true;
-
- services.xserver = {
- enable = true;
- layout = "us";
- libinput.enable = true;
- windowManager.i3.enable = true;
- displayManager.startx.enable = true;
- };
}