diff --git a/default.nix b/default.nix index 8285e38f..97635512 100644 --- a/default.nix +++ b/default.nix @@ -2,7 +2,10 @@ rec { sources = import ./nix/sources.nix; pkgs = import ./pkgs { inherit sources; }; witch = import ./lib/witch.nix { lib = pkgs.lib; }; - profiles = witch.modList { modulesDir = ./profiles; defaultFile = "nixos.nix"; }; + profiles = witch.modList { + modulesDir = ./profiles; + defaultFile = "nixos.nix"; + }; hosts = import ./lib/hosts.nix { inherit pkgs sources witch profiles; }; diff --git a/hosts/samhain/home/default.nix b/hosts/samhain/home/default.nix index 4c6b5ee7..a2b3c329 100644 --- a/hosts/samhain/home/default.nix +++ b/hosts/samhain/home/default.nix @@ -1,5 +1 @@ -{ ... }: { - imports = [ - ./sway.nix - ]; -} +{ ... }: { imports = [ ./sway.nix ]; } diff --git a/hosts/samhain/home/sway.nix b/hosts/samhain/home/sway.nix index c157af78..c915eb0a 100644 --- a/hosts/samhain/home/sway.nix +++ b/hosts/samhain/home/sway.nix @@ -1 +1 @@ -{ ... }: {} +{ ... }: { } diff --git a/hosts/yule/home/default.nix b/hosts/yule/home/default.nix index 4c6b5ee7..a2b3c329 100644 --- a/hosts/yule/home/default.nix +++ b/hosts/yule/home/default.nix @@ -1,5 +1 @@ -{ ... }: { - imports = [ - ./sway.nix - ]; -} +{ ... }: { imports = [ ./sway.nix ]; } diff --git a/hosts/yule/home/sway.nix b/hosts/yule/home/sway.nix index c157af78..c915eb0a 100644 --- a/hosts/yule/home/sway.nix +++ b/hosts/yule/home/sway.nix @@ -1 +1 @@ -{ ... }: {} +{ ... }: { } diff --git a/hosts/yule/nixos/default.nix b/hosts/yule/nixos/default.nix index 45929f9c..a3847021 100644 --- a/hosts/yule/nixos/default.nix +++ b/hosts/yule/nixos/default.nix @@ -1,13 +1,13 @@ { config, pkgs, profiles, ... }: { - imports = [ - ./hw.nix - ../../../services/zfs.nix - profiles.gui - profiles.sway - profiles.kat - profiles.laptop + imports = [ + ./hw.nix + ../../../services/zfs.nix + profiles.gui + profiles.sway + profiles.kat + profiles.laptop ]; deploy.groups = [ "gui" ]; diff --git a/lib/hosts.nix b/lib/hosts.nix index e45a73ea..56608d7c 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -1,5 +1,5 @@ -{ pkgs, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs -, sources ? { }, witch ? { } }: +{ pkgs, hostsDir ? ../hosts, profiles, pkgsPath ? ../pkgs, sources ? { } +, witch ? { } }: with pkgs.lib; @@ -10,11 +10,7 @@ rec { hostConfig = hostName: { config, ... }: { _module.args = { inherit hosts groups; }; - imports = [ - ../nixos.nix - ../modules/nixos - ../modules/nixos/deploy - ]; + imports = [ ../nixos.nix ../modules/nixos ../modules/nixos/deploy ]; networking = { inherit hostName; }; nixpkgs.pkgs = import pkgsPath { inherit (config.nixpkgs) config; diff --git a/nixos.nix b/nixos.nix index e5fb9ff6..85fd5e5f 100644 --- a/nixos.nix +++ b/nixos.nix @@ -6,7 +6,7 @@ (import (./hosts + "/${hostName}/nixos")) (import (./private/hosts + "/${hostName}/nixos")) ./profiles/common/nixos.nix - ./private/profile/nixos + ./private/profile/nixos ]; options.home-manager.users = lib.mkOption { diff --git a/pkgs/nekofetch/default.nix b/pkgs/nekofetch/default.nix index b2630d60..7e44fe1a 100644 --- a/pkgs/nekofetch/default.nix +++ b/pkgs/nekofetch/default.nix @@ -1,4 +1,5 @@ -{ fetchFromGitHub, makeWrapper, lib, stdenv, jp2a, imagemagick, curl, neofetch }: +{ fetchFromGitHub, makeWrapper, lib, stdenv, jp2a, imagemagick, curl, neofetch +}: stdenv.mkDerivation rec { pname = "nekofetch"; @@ -11,10 +12,9 @@ stdenv.mkDerivation rec { sha256 = "03p1br1pn9j9nsdjg29rdznm5qh34p8dx0834rgmlc3pxlr910ng"; }; - nativeBuildInputs = [ makeWrapper ]; - buildPhase = ''true''; + buildPhase = "true"; installPhase = '' mkdir -p $out/bin diff --git a/profiles/gui/home.nix b/profiles/gui/home.nix index aca44b65..442d5a07 100644 --- a/profiles/gui/home.nix +++ b/profiles/gui/home.nix @@ -3,5 +3,9 @@ { imports = [ ./home ]; - options = { deploy.profile.gui = lib.mkEnableOption "graphical system" // { default = true; }; }; + options = { + deploy.profile.gui = lib.mkEnableOption "graphical system" // { + default = true; + }; + }; } diff --git a/profiles/gui/home/email.nix b/profiles/gui/home/email.nix index a3c1c463..99395937 100644 --- a/profiles/gui/home/email.nix +++ b/profiles/gui/home/email.nix @@ -1,34 +1,34 @@ { config, lib, pkgs, ... }: { - programs.notmuch = { - enable = true; - hooks = { preNew = "mbsync --all"; }; - }; - programs.mbsync.enable = true; - programs.msmtp.enable = true; - accounts.email = { - maildirBasePath = "${config.home.homeDirectory}/mail"; - accounts.kat = { - address = "kat@kittywit.ch"; - primary = true; - realName = "kat witch"; - userName = "kat@kittywit.ch"; - passwordCommand = '' - ${pkgs.arc.pkgs.rbw-bitw}/bin/bitw -p gpg://${ - ../../../private/files/bitw/master.gpg - } get "email/kittywitch"''; - msmtp.enable = true; - mbsync.enable = true; - mbsync.create = "maildir"; - notmuch.enable = true; - imap.host = "athame.kittywit.ch"; - smtp.host = "athame.kittywit.ch"; - gpg = { - signByDefault = true; - key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE"; - }; + programs.notmuch = { + enable = true; + hooks = { preNew = "mbsync --all"; }; + }; + programs.mbsync.enable = true; + programs.msmtp.enable = true; + accounts.email = { + maildirBasePath = "${config.home.homeDirectory}/mail"; + accounts.kat = { + address = "kat@kittywit.ch"; + primary = true; + realName = "kat witch"; + userName = "kat@kittywit.ch"; + passwordCommand = '' + ${pkgs.arc.pkgs.rbw-bitw}/bin/bitw -p gpg://${ + ../../../private/files/bitw/master.gpg + } get "email/kittywitch"''; + msmtp.enable = true; + mbsync.enable = true; + mbsync.create = "maildir"; + notmuch.enable = true; + imap.host = "athame.kittywit.ch"; + smtp.host = "athame.kittywit.ch"; + gpg = { + signByDefault = true; + key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE"; }; }; - programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ]; + }; + programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ]; } diff --git a/profiles/gui/home/firefox/default.nix b/profiles/gui/home/firefox/default.nix index e71d7475..aa2005ef 100644 --- a/profiles/gui/home/firefox/default.nix +++ b/profiles/gui/home/firefox/default.nix @@ -12,59 +12,59 @@ let "https://sync.kittywit.ch/token/1.0/sync/1.5"; }; in { - programs.zsh.shellAliases = { - ff-pm = "firefox --ProfileManager"; - ff-main = "firefox -P main"; - ff-work = "firefox -P work"; - ff-lewd = "firefox -P lewd"; - }; + programs.zsh.shellAliases = { + ff-pm = "firefox --ProfileManager"; + ff-main = "firefox -P main"; + ff-work = "firefox -P work"; + ff-lewd = "firefox -P lewd"; + }; - programs.firefox = { - enable = true; - extensions = with pkgs.nur.repos.rycee.firefox-addons; [ - auto-tab-discard - bitwarden - darkreader - decentraleyes - foxyproxy-standard - google-search-link-fix - https-everywhere - #old-reddit-redirect # made unnecessary due to tridactylrc - privacy-badger - reddit-enhancement-suite - refined-github - stylus - terms-of-service-didnt-read - tabcenter-reborn - tridactyl - ublock-origin - violentmonkey - ]; - profiles = { - main = { - id = 0; - isDefault = true; - settings = commonSettings // { + programs.firefox = { + enable = true; + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + auto-tab-discard + bitwarden + darkreader + decentraleyes + foxyproxy-standard + google-search-link-fix + https-everywhere + #old-reddit-redirect # made unnecessary due to tridactylrc + privacy-badger + reddit-enhancement-suite + refined-github + stylus + terms-of-service-didnt-read + tabcenter-reborn + tridactyl + ublock-origin + violentmonkey + ]; + profiles = { + main = { + id = 0; + isDefault = true; + settings = commonSettings // { - }; - userChrome = import ./userChrome.css.nix { profile = "main"; }; }; - work = { - id = 1; - settings = commonSettings // { + userChrome = import ./userChrome.css.nix { profile = "main"; }; + }; + work = { + id = 1; + settings = commonSettings // { - }; - userChrome = import ./userChrome.css.nix { profile = "work"; }; }; - lewd = { - id = 2; - settings = commonSettings // { + userChrome = import ./userChrome.css.nix { profile = "work"; }; + }; + lewd = { + id = 2; + settings = commonSettings // { - }; - userChrome = import ./userChrome.css.nix { profile = "lewd"; }; }; + userChrome = import ./userChrome.css.nix { profile = "lewd"; }; }; }; + }; - home.file.".config/tridactyl/tridactylrc".source = ./tridactylrc; + home.file.".config/tridactyl/tridactylrc".source = ./tridactylrc; } diff --git a/profiles/gui/home/gpg.nix b/profiles/gui/home/gpg.nix index 915eebe9..19dd1477 100644 --- a/profiles/gui/home/gpg.nix +++ b/profiles/gui/home/gpg.nix @@ -1,21 +1,21 @@ { config, lib, pkgs, sources, ... }: { - home.sessionVariables = { - SSH_AUTH_SOCK = - "\${SSH_AUTH_SOCK:-$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)}"; - }; - services.gpg-agent = { - enable = true; - enableExtraSocket = true; - enableSshSupport = false; - pinentryFlavor = "gtk2"; - extraConfig = lib.mkMerge [ - "auto-expand-secmem 0x30000" # otherwise "gpg: public key decryption failed: Cannot allocate memory" - "pinentry-timeout 30" - "allow-loopback-pinentry" - "enable-ssh-support" - "no-allow-external-cache" - ]; - }; + home.sessionVariables = { + SSH_AUTH_SOCK = + "\${SSH_AUTH_SOCK:-$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)}"; + }; + services.gpg-agent = { + enable = true; + enableExtraSocket = true; + enableSshSupport = false; + pinentryFlavor = "gtk2"; + extraConfig = lib.mkMerge [ + "auto-expand-secmem 0x30000" # otherwise "gpg: public key decryption failed: Cannot allocate memory" + "pinentry-timeout 30" + "allow-loopback-pinentry" + "enable-ssh-support" + "no-allow-external-cache" + ]; + }; } diff --git a/profiles/gui/home/gtk.nix b/profiles/gui/home/gtk.nix index d74076da..04cf8423 100644 --- a/profiles/gui/home/gtk.nix +++ b/profiles/gui/home/gtk.nix @@ -1,15 +1,15 @@ { config, lib, pkgs, ... }: { - gtk = { - enable = true; - iconTheme = { - name = "Numix-Square"; - package = pkgs.numix-icon-theme-square; - }; - theme = { - name = "Arc-Dark"; - package = pkgs.arc-theme; - }; + gtk = { + enable = true; + iconTheme = { + name = "Numix-Square"; + package = pkgs.numix-icon-theme-square; }; + theme = { + name = "Arc-Dark"; + package = pkgs.arc-theme; + }; + }; } diff --git a/profiles/gui/home/kitty.nix b/profiles/gui/home/kitty.nix index 5e7bd6d1..93a9fd03 100644 --- a/profiles/gui/home/kitty.nix +++ b/profiles/gui/home/kitty.nix @@ -1,23 +1,23 @@ { config, lib, pkgs, witch, ... }: { - programs.kitty = { - enable = true; - font.name = witch.style.font.name; - settings = { - font_size = witch.style.font.size; - # background = witch.style.base16.color0; - background_opacity = "0.95"; - # foreground = witch.style.base16.color7; - # selection_background = witch.style.base16.color7; - # selection_foreground = witch.style.base16.color0; - # url_color = witch.style.base16.color3; - # cursor = witch.style.base16.color7; - # active_border_color = "#75715e"; - # active_tab_background = "#9900ff"; - # active_tab_foreground = witch.style.base16.color7; - # inactive_tab_background = "#3a3a3a"; - # inactive_tab_foreground = "#665577"; - }; # // witch.style.base16; - }; + programs.kitty = { + enable = true; + font.name = witch.style.font.name; + settings = { + font_size = witch.style.font.size; + # background = witch.style.base16.color0; + background_opacity = "0.95"; + # foreground = witch.style.base16.color7; + # selection_background = witch.style.base16.color7; + # selection_foreground = witch.style.base16.color0; + # url_color = witch.style.base16.color3; + # cursor = witch.style.base16.color7; + # active_border_color = "#75715e"; + # active_tab_background = "#9900ff"; + # active_tab_foreground = witch.style.base16.color7; + # inactive_tab_background = "#3a3a3a"; + # inactive_tab_foreground = "#665577"; + }; # // witch.style.base16; + }; } diff --git a/profiles/gui/home/mpv.nix b/profiles/gui/home/mpv.nix index 5d55c027..224088a1 100644 --- a/profiles/gui/home/mpv.nix +++ b/profiles/gui/home/mpv.nix @@ -1,13 +1,13 @@ { config, lib, ... }: { - programs.mpv = { - enable = true; - config = { - profile = "gpu-hq"; - gpu-context = "wayland"; - vo = "gpu"; - hwdec = "auto"; - }; + programs.mpv = { + enable = true; + config = { + profile = "gpu-hq"; + gpu-context = "wayland"; + vo = "gpu"; + hwdec = "auto"; }; + }; } diff --git a/profiles/gui/home/music.nix b/profiles/gui/home/music.nix index ebfb242d..6435cdad 100644 --- a/profiles/gui/home/music.nix +++ b/profiles/gui/home/music.nix @@ -1,100 +1,100 @@ { config, lib, pkgs, witch, ... }: { - programs.ncmpcpp = { - enable = true; - mpdMusicDir = "/home/kat/media-share/music"; - settings = { - visualizer_data_source = "/tmp/mpd.fifo"; - visualizer_output_name = "my_fifo"; - visualizer_in_stereo = "yes"; - visualizer_type = "spectrum"; - visualizer_look = "+|"; - user_interface = "alternative"; - colors_enabled = "yes"; - discard_colors_if_item_is_selected = "no"; - header_window_color = "250"; - volume_color = "250"; - state_line_color = "cyan"; - state_flags_color = "cyan"; - alternative_ui_separator_color = "yellow"; - statusbar_color = "yellow"; - progressbar_color = "black"; - progressbar_elapsed_color = "blue"; - window_border_color = "yellow"; - playlist_display_mode = "classic"; - song_columns_list_format = - "(3f)[cyan]{n} (40)[default]{t|f} (25)[red]{a} (30)[blue]{b} (4f)[cyan]{l}"; - now_playing_prefix = "$b"; - song_list_format = - " $7%n$9 $8-$9 $6%a$9 $8-$9 $5%b$9 $R $8%t$9 ($4%l$9) "; - song_library_format = "{%n > }{%t}|{%f}"; - song_status_format = "{%a - }{%t - }{%b}"; - titles_visibility = "no"; - header_visibility = "no"; - statusbar_visibility = "no"; - now_playing_suffix = "$/b"; - progressbar_look = "▄▄ "; - media_library_primary_tag = "album_artist"; - search_engine_display_mode = "columns"; - }; - bindings = [ - { - key = "+"; - command = "add"; - } - { - key = "-"; - command = "load"; - } + programs.ncmpcpp = { + enable = true; + mpdMusicDir = "/home/kat/media-share/music"; + settings = { + visualizer_data_source = "/tmp/mpd.fifo"; + visualizer_output_name = "my_fifo"; + visualizer_in_stereo = "yes"; + visualizer_type = "spectrum"; + visualizer_look = "+|"; + user_interface = "alternative"; + colors_enabled = "yes"; + discard_colors_if_item_is_selected = "no"; + header_window_color = "250"; + volume_color = "250"; + state_line_color = "cyan"; + state_flags_color = "cyan"; + alternative_ui_separator_color = "yellow"; + statusbar_color = "yellow"; + progressbar_color = "black"; + progressbar_elapsed_color = "blue"; + window_border_color = "yellow"; + playlist_display_mode = "classic"; + song_columns_list_format = + "(3f)[cyan]{n} (40)[default]{t|f} (25)[red]{a} (30)[blue]{b} (4f)[cyan]{l}"; + now_playing_prefix = "$b"; + song_list_format = + " $7%n$9 $8-$9 $6%a$9 $8-$9 $5%b$9 $R $8%t$9 ($4%l$9) "; + song_library_format = "{%n > }{%t}|{%f}"; + song_status_format = "{%a - }{%t - }{%b}"; + titles_visibility = "no"; + header_visibility = "no"; + statusbar_visibility = "no"; + now_playing_suffix = "$/b"; + progressbar_look = "▄▄ "; + media_library_primary_tag = "album_artist"; + search_engine_display_mode = "columns"; + }; + bindings = [ + { + key = "+"; + command = "add"; + } + { + key = "-"; + command = "load"; + } + ]; + }; + programs.beets = { + enable = true; + package = pkgs.unstable.beets; + settings = { + directory = "~/media-share/music"; + library = "~/.local/share/beets.db"; + plugins = lib.concatStringsSep " " [ + "mpdstats" + "mpdupdate" + "duplicates" + "chroma" ]; }; - programs.beets = { - enable = true; - package = pkgs.unstable.beets; - settings = { - directory = "~/media-share/music"; - library = "~/.local/share/beets.db"; - plugins = lib.concatStringsSep " " [ - "mpdstats" - "mpdupdate" - "duplicates" - "chroma" - ]; - }; - }; - services.mpd = { - enable = true; - package = pkgs.mpd-youtube-dl; - network.startWhenNeeded = true; - musicDirectory = "/home/kat/media-share/music"; - extraConfig = '' - max_output_buffer_size "32768" + }; + services.mpd = { + enable = true; + package = pkgs.mpd-youtube-dl; + network.startWhenNeeded = true; + musicDirectory = "/home/kat/media-share/music"; + extraConfig = '' + max_output_buffer_size "32768" + + audio_output { + type "fifo" + name "my_fifo" + path "/tmp/mpd.fifo" + format "44100:16:2" + } audio_output { - type "fifo" - name "my_fifo" - path "/tmp/mpd.fifo" - format "44100:16:2" - } - - audio_output { - type "pulse" - name "speaker" - } + type "pulse" + name "speaker" + } - audio_output { - type "httpd" - name "httpd-high" - encoder "opus" - bitrate "96000" - port "32101" - max_clients "4" - format "48000:16:2" - always_on "yes" - tags "yes" - } - ''; - }; + audio_output { + type "httpd" + name "httpd-high" + encoder "opus" + bitrate "96000" + port "32101" + max_clients "4" + format "48000:16:2" + always_on "yes" + tags "yes" + } + ''; + }; } diff --git a/profiles/gui/home/packages.nix b/profiles/gui/home/packages.nix index 29de6f69..ec19852b 100644 --- a/profiles/gui/home/packages.nix +++ b/profiles/gui/home/packages.nix @@ -6,59 +6,59 @@ let ../../../private/files/bitw/master.gpg } "$@"''; in { - home.packages = with pkgs; [ - _1password - bitwarden - bitw - mpv - element-desktop - mumble - obs-studio - niv - feh - kat-scrot - duc - exiftool - nekofetch - audacity - avidemux - gst_all_1.gstreamer.dev - gst_all_1.gstreamer - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-ugly - vlc - ffmpeg-full - thunderbird - unstable.syncplay - unstable.youtube-dl - unstable.mkchromecast - unstable.google-chrome - v4l-utils - transmission-gtk - lm_sensors - p7zip - baresip - psmisc - discord - tdesktop - yubikey-manager - pinentry.gtk2 - dino - libnotify - nextcloud-client - vegur - nitrogen - terminator - pavucontrol - gparted - scrot - gimp-with-plugins - vscode - cryptsetup - vifm - neofetch - htop - ]; + home.packages = with pkgs; [ + _1password + bitwarden + bitw + mpv + element-desktop + mumble + obs-studio + niv + feh + kat-scrot + duc + exiftool + nekofetch + audacity + avidemux + gst_all_1.gstreamer.dev + gst_all_1.gstreamer + gst_all_1.gst-plugins-base + gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad + gst_all_1.gst-plugins-ugly + vlc + ffmpeg-full + thunderbird + unstable.syncplay + unstable.youtube-dl + unstable.mkchromecast + unstable.google-chrome + v4l-utils + transmission-gtk + lm_sensors + p7zip + baresip + psmisc + discord + tdesktop + yubikey-manager + pinentry.gtk2 + dino + libnotify + nextcloud-client + vegur + nitrogen + terminator + pavucontrol + gparted + scrot + gimp-with-plugins + vscode + cryptsetup + vifm + neofetch + htop + ]; } diff --git a/profiles/gui/home/weechat.nix b/profiles/gui/home/weechat.nix index 674eacd1..3b7d7b25 100644 --- a/profiles/gui/home/weechat.nix +++ b/profiles/gui/home/weechat.nix @@ -1,106 +1,106 @@ { config, pkgs, lib, superConfig, ... }: { - home.file = { - ".local/share/weechat/sec.conf" = lib.mkIf config.deploy.profile.private { - source = "${../../../private/files/weechat/sec.conf}"; - }; + home.file = { + ".local/share/weechat/sec.conf" = lib.mkIf config.deploy.profile.private { + source = "${../../../private/files/weechat/sec.conf}"; }; - programs.weechat = { + }; + programs.weechat = { + enable = true; + init = lib.mkMerge [ + (lib.mkBefore '' + /server add freenode athame.kittywit.ch/5001 -ssl -autoconnect + /server add espernet athame.kittywit.ch/5001 -ssl -autoconnect + /matrix server add kat kittywit.ch + /key bind meta-g /go + /key bind meta-c /buffer close + /key bind meta-n /bar toggle nicklist + /key bind meta-b /bar toggle buflist + '') + (lib.mkAfter "/matrix connect kat") + ]; + packageUnwrapped = pkgs.unstable.weechat-unwrapped; + homeDirectory = "${config.xdg.dataHome}/weechat"; + plugins.python = { enable = true; - init = lib.mkMerge [ - (lib.mkBefore '' - /server add freenode athame.kittywit.ch/5001 -ssl -autoconnect - /server add espernet athame.kittywit.ch/5001 -ssl -autoconnect - /matrix server add kat kittywit.ch - /key bind meta-g /go - /key bind meta-c /buffer close - /key bind meta-n /bar toggle nicklist - /key bind meta-b /bar toggle buflist - '') - (lib.mkAfter "/matrix connect kat") - ]; - packageUnwrapped = pkgs.unstable.weechat-unwrapped; - homeDirectory = "${config.xdg.dataHome}/weechat"; - plugins.python = { - enable = true; - packages = [ "weechat-matrix" ]; + packages = [ "weechat-matrix" ]; + }; + scripts = with pkgs.weechatScripts; [ + go + auto_away + autosort + colorize_nicks + unread_buffer + urlgrab + vimode-git + weechat-matrix + weechat-notify-send + weechat-title + ]; + config = { + weechat = { + look = { mouse = true; }; + bar = { + buflist = { size_max = 24; }; + nicklist = { size_max = 18; }; + }; }; - scripts = with pkgs.weechatScripts; [ - go - auto_away - autosort - colorize_nicks - unread_buffer - urlgrab - vimode-git - weechat-matrix - weechat-notify-send - weechat-title - ]; - config = { - weechat = { - look = { mouse = true; }; - bar = { - buflist = { size_max = 24; }; - nicklist = { size_max = 18; }; - }; + urlgrab.default.copycmd = "${pkgs.wl-clipboard}/bin/wl-copy"; + plugins.var.python.vimode.copy_clipboard_cmd = "wl-copy"; + plugins.var.python.vimode.paste_clipboard_cmd = "wl-paste --no-newline"; + plugins.var.python.title.title_prefix = "weechat - "; + plugins.var.python.title.show_hotlist = true; + plugins.var.python.title.current_buffer_suffix = " ["; + plugins.var.python.title.title_suffix = " ]"; + plugins.var.python.notify_send.icon = ""; + sec = { + crypt = { + passphrase_command = '' + ${pkgs.rbw-bitw}/bin/bitw -p gpg://${ + ../../../private/files/bitw/master.gpg + } get "comms/weechat"''; + hash_algo = "sha512"; }; - urlgrab.default.copycmd = "${pkgs.wl-clipboard}/bin/wl-copy"; - plugins.var.python.vimode.copy_clipboard_cmd = "wl-copy"; - plugins.var.python.vimode.paste_clipboard_cmd = "wl-paste --no-newline"; - plugins.var.python.title.title_prefix = "weechat - "; - plugins.var.python.title.show_hotlist = true; - plugins.var.python.title.current_buffer_suffix = " ["; - plugins.var.python.title.title_suffix = " ]"; - plugins.var.python.notify_send.icon = ""; - sec = { - crypt = { - passphrase_command = '' - ${pkgs.rbw-bitw}/bin/bitw -p gpg://${ - ../../../private/files/bitw/master.gpg - } get "comms/weechat"''; - hash_algo = "sha512"; + }; + irc = { + look = { server_buffer = "independent"; }; + server = { + freenode = { + address = "athame.kittywit.ch/5001"; + password = "kat/freenode:\${sec.data.znc}"; + ssl = true; + ssl_verify = false; + autoconnect = true; }; - }; - irc = { - look = { server_buffer = "independent"; }; - server = { - freenode = { - address = "athame.kittywit.ch/5001"; - password = "kat/freenode:\${sec.data.znc}"; - ssl = true; - ssl_verify = false; - autoconnect = true; - }; - espernet = { - address = "athame.kittywit.ch/5001"; - password = "kat/espernet:\${sec.data.znc}"; - ssl = true; - ssl_verify = false; - autoconnect = true; - }; - }; - }; - matrix = { - network = { - max_backlog_sync_events = 30; - lazy_load_room_users = true; - autoreconnect_delay_max = 5; - lag_min-show = 1000; - }; - look = { - server_buffer = "independent"; - redactions = "notice"; - }; - server.kat = { - address = "kittywit.ch"; - device_name = "${superConfig.networking.hostName}/weechat"; - username = "kat"; - password = "\${sec.data.matrix}"; + espernet = { + address = "athame.kittywit.ch/5001"; + password = "kat/espernet:\${sec.data.znc}"; + ssl = true; + ssl_verify = false; autoconnect = true; }; }; }; + matrix = { + network = { + max_backlog_sync_events = 30; + lazy_load_room_users = true; + autoreconnect_delay_max = 5; + lag_min-show = 1000; + }; + look = { + server_buffer = "independent"; + redactions = "notice"; + }; + server.kat = { + address = "kittywit.ch"; + device_name = "${superConfig.networking.hostName}/weechat"; + username = "kat"; + password = "\${sec.data.matrix}"; + autoconnect = true; + }; + }; }; + }; } diff --git a/profiles/gui/nixos.nix b/profiles/gui/nixos.nix index ee5c6a99..5c36ca3c 100644 --- a/profiles/gui/nixos.nix +++ b/profiles/gui/nixos.nix @@ -3,7 +3,11 @@ { imports = [ ./nixos ]; - options = { deploy.profile.gui = lib.mkEnableOption "graphical system" // { default = true; }; }; + options = { + deploy.profile.gui = lib.mkEnableOption "graphical system" // { + default = true; + }; + }; config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; }; } diff --git a/profiles/gui/nixos/dns.nix b/profiles/gui/nixos/dns.nix index c0cba654..2eabcd35 100644 --- a/profiles/gui/nixos/dns.nix +++ b/profiles/gui/nixos/dns.nix @@ -1,41 +1,41 @@ { config, lib, pkgs, ... }: { - networking = { - # networkmanager.enable = true; - resolvconf.useLocalResolver = true; - networkmanager.dns = "none"; - }; + networking = { + # networkmanager.enable = true; + resolvconf.useLocalResolver = true; + networkmanager.dns = "none"; + }; - services.dnscrypt-proxy2 = { - enable = true; - settings = { - ipv6_servers = true; - require_dnssec = true; + services.dnscrypt-proxy2 = { + enable = true; + settings = { + ipv6_servers = true; + require_dnssec = true; - sources.public-resolvers = { - urls = [ - "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md" - "https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md" - ]; - cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - minisign_key = - "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; - }; - - # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md - server_names = [ - "acsacsar-ams-ipv4" - "acsacsar-ams-ipv6" - "dnscrypt.eu-dk" - "dnscrypt.eu-dk-ipv6" - "dnscrypt.eu-nl" - "dnscrypt.eu-nl-ipv6" - "meganerd" - "meganerd-ipv6" + sources.public-resolvers = { + urls = [ + "https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v2/public-resolvers.md" + "https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md" ]; + cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; + minisign_key = + "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; }; - }; - systemd.services.dnscrypt-proxy2.serviceConfig = { - StateDirectory = "dnscrypt-proxy2"; + # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md + server_names = [ + "acsacsar-ams-ipv4" + "acsacsar-ams-ipv6" + "dnscrypt.eu-dk" + "dnscrypt.eu-dk-ipv6" + "dnscrypt.eu-nl" + "dnscrypt.eu-nl-ipv6" + "meganerd" + "meganerd-ipv6" + ]; }; + }; + + systemd.services.dnscrypt-proxy2.serviceConfig = { + StateDirectory = "dnscrypt-proxy2"; + }; } diff --git a/profiles/gui/nixos/firefox.nix b/profiles/gui/nixos/firefox.nix index bd0207f9..36b94f4f 100644 --- a/profiles/gui/nixos/firefox.nix +++ b/profiles/gui/nixos/firefox.nix @@ -1,14 +1,14 @@ { config, pkgs, lib, witch, ... }: { - xdg = { - portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-gtk - ]; - gtkUsePortal = true; - }; + xdg = { + portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]; + gtkUsePortal = true; }; + }; } diff --git a/profiles/gui/nixos/fonts.nix b/profiles/gui/nixos/fonts.nix index 768fbc88..428e1b31 100644 --- a/profiles/gui/nixos/fonts.nix +++ b/profiles/gui/nixos/fonts.nix @@ -1,11 +1,11 @@ { config, pkgs, lib, ... }: { - fonts.fontconfig.enable = true; - fonts.fonts = with pkgs; [ - font-awesome - nerdfonts - iosevka - emacs-all-the-icons-fonts - ]; + fonts.fontconfig.enable = true; + fonts.fonts = with pkgs; [ + font-awesome + nerdfonts + iosevka + emacs-all-the-icons-fonts + ]; } diff --git a/profiles/gui/nixos/gpg.nix b/profiles/gui/nixos/gpg.nix index be0c5914..20509c35 100644 --- a/profiles/gui/nixos/gpg.nix +++ b/profiles/gui/nixos/gpg.nix @@ -1,12 +1,12 @@ { config, pkgs, lib, ... }: { - services.pcscd.enable = true; - services.udev.packages = [ pkgs.yubikey-personalization ]; + services.pcscd.enable = true; + services.udev.packages = [ pkgs.yubikey-personalization ]; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - pinentryFlavor = "gtk2"; - }; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + pinentryFlavor = "gtk2"; + }; } diff --git a/profiles/gui/nixos/mingetty.nix b/profiles/gui/nixos/mingetty.nix index 7ca35f79..b249d61d 100644 --- a/profiles/gui/nixos/mingetty.nix +++ b/profiles/gui/nixos/mingetty.nix @@ -25,11 +25,11 @@ let " ${c1} .:::: :::: ${c2}'::::. " ]; in { - services.mingetty = { - greetingLine = '' - \e[H\e[2J - \e[9;10]'' + lib.concatStringsSep "\n" nixos_logo + "\n\n" - + "\\e[1;32m>>> NixOS ${config.system.nixos.label} (Linux \\r) - \\l\\e[0m"; - helpLine = lib.mkForce ""; - }; + services.mingetty = { + greetingLine = '' + \e[H\e[2J + \e[9;10]'' + lib.concatStringsSep "\n" nixos_logo + "\n\n" + + "\\e[1;32m>>> NixOS ${config.system.nixos.label} (Linux \\r) - \\l\\e[0m"; + helpLine = lib.mkForce ""; + }; } diff --git a/profiles/gui/nixos/sound.nix b/profiles/gui/nixos/sound.nix index 2bc90326..cc7991cf 100644 --- a/profiles/gui/nixos/sound.nix +++ b/profiles/gui/nixos/sound.nix @@ -1,23 +1,23 @@ { config, lib, pkgs, ... }: { - sound = { - enable = true; - extraConfig = '' - defaults.pcm.rate_converter "speexrate_best" - ''; - }; - hardware.pulseaudio = { - enable = true; - daemon.config = { - exit-idle-time = 5; - resample-method = "speex-float-5"; - avoid-resampling = "true"; - flat-volumes = "no"; - default-sample-format = "s32le"; - default-sample-rate = 48000; - alternate-sample-rate = 44100; - default-sample-channels = 2; - }; + sound = { + enable = true; + extraConfig = '' + defaults.pcm.rate_converter "speexrate_best" + ''; + }; + hardware.pulseaudio = { + enable = true; + daemon.config = { + exit-idle-time = 5; + resample-method = "speex-float-5"; + avoid-resampling = "true"; + flat-volumes = "no"; + default-sample-format = "s32le"; + default-sample-rate = 48000; + alternate-sample-rate = 44100; + default-sample-channels = 2; }; + }; } diff --git a/profiles/kat/home.nix b/profiles/kat/home.nix index ffd7ea10..dd8b62e4 100644 --- a/profiles/kat/home.nix +++ b/profiles/kat/home.nix @@ -8,5 +8,7 @@ # imports = [ ../../../modules/home ]; #}; - options = { deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; };}; + options = { + deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; }; + }; } diff --git a/profiles/kat/home/base16.nix b/profiles/kat/home/base16.nix index 317c5561..1f77b680 100644 --- a/profiles/kat/home/base16.nix +++ b/profiles/kat/home/base16.nix @@ -1,12 +1,12 @@ { config, ... }: { - base16 = { - shell.enable = true; - schemes = [ "rebecca.rebecca" ]; - }; - # home.base16-shell = { - # enable = true; - # defaultTheme = "rebecca.rebecca"; - # }; + base16 = { + shell.enable = true; + schemes = [ "rebecca.rebecca" ]; + }; + # home.base16-shell = { + # enable = true; + # defaultTheme = "rebecca.rebecca"; + # }; } diff --git a/profiles/kat/home/git.nix b/profiles/kat/home/git.nix index 5528b17b..19806e0e 100644 --- a/profiles/kat/home/git.nix +++ b/profiles/kat/home/git.nix @@ -1,30 +1,30 @@ { config, pkgs, lib, ... }: { - home.packages = with pkgs; [ - git-crypt - gitAndTools.gitRemoteGcrypt - unstable.gitAndTools.gitAnnex - git-revise - arc.pkgs.gitAndTools.git-annex-remote-b2 - ]; + home.packages = with pkgs; [ + git-crypt + gitAndTools.gitRemoteGcrypt + unstable.gitAndTools.gitAnnex + git-revise + arc.pkgs.gitAndTools.git-annex-remote-b2 + ]; - programs.git = { - enable = true; - package = pkgs.gitAndTools.gitFull; - userName = "kat witch"; - userEmail = "kat@kittywit.ch"; - extraConfig = { - protocol.gcrypt.allow = "always"; - annex = { - autocommit = false; - backend = "BLAKE2B512"; - synccontent = true; - }; - }; - signing = { - key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE"; - signByDefault = true; + programs.git = { + enable = true; + package = pkgs.gitAndTools.gitFull; + userName = "kat witch"; + userEmail = "kat@kittywit.ch"; + extraConfig = { + protocol.gcrypt.allow = "always"; + annex = { + autocommit = false; + backend = "BLAKE2B512"; + synccontent = true; }; }; + signing = { + key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE"; + signByDefault = true; + }; + }; } diff --git a/profiles/kat/home/packages.nix b/profiles/kat/home/packages.nix index 00b30862..c07aea61 100644 --- a/profiles/kat/home/packages.nix +++ b/profiles/kat/home/packages.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: { - home.packages = with pkgs; [ kitty.terminfo hyperfine hexyl tokei ]; + home.packages = with pkgs; [ kitty.terminfo hyperfine hexyl tokei ]; } diff --git a/profiles/kat/home/ssh.nix b/profiles/kat/home/ssh.nix index 5519b550..deeb9ab1 100644 --- a/profiles/kat/home/ssh.nix +++ b/profiles/kat/home/ssh.nix @@ -1,25 +1,25 @@ { config, pkgs, lib, ... }: { - programs.ssh = { - enable = true; - controlMaster = "auto"; - controlPersist = "10m"; - hashKnownHosts = true; - matchBlocks = let - common = { - forwardAgent = true; - extraOptions = { - RemoteForward = - "/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra"; - }; - port = 62954; + programs.ssh = { + enable = true; + controlMaster = "auto"; + controlPersist = "10m"; + hashKnownHosts = true; + matchBlocks = let + common = { + forwardAgent = true; + extraOptions = { + RemoteForward = + "/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra"; }; - in { - "athame" = { hostname = "athame.kittywit.ch"; } // common; - "samhain" = { hostname = "192.168.1.135"; } // common; - "yule" = { hostname = "192.168.1.92"; } // common; - "boline" = { hostname = "boline.kittywit.ch"; } // common; + port = 62954; }; + in { + "athame" = { hostname = "athame.kittywit.ch"; } // common; + "samhain" = { hostname = "192.168.1.135"; } // common; + "yule" = { hostname = "192.168.1.92"; } // common; + "boline" = { hostname = "boline.kittywit.ch"; } // common; }; + }; } diff --git a/profiles/kat/home/tmux.nix b/profiles/kat/home/tmux.nix index 2609123d..59e1a4e2 100644 --- a/profiles/kat/home/tmux.nix +++ b/profiles/kat/home/tmux.nix @@ -1,55 +1,55 @@ { config, lib, pkgs, ... }: { - programs.zsh.shellAliases = { - tne = "tmux new -s"; - tat = "tmux attach -t"; - tren = "tmux new -AD -s"; - }; - programs.tmux = { - enable = true; - extraConfig = '' - # start from 1 - set -g base-index 1 - setw -g pane-base-index 1 + programs.zsh.shellAliases = { + tne = "tmux new -s"; + tat = "tmux attach -t"; + tren = "tmux new -AD -s"; + }; + programs.tmux = { + enable = true; + extraConfig = '' + # start from 1 + set -g base-index 1 + setw -g pane-base-index 1 - # proper title handling - set -g set-titles on - set -g set-titles-string "#T" + # proper title handling + set -g set-titles on + set -g set-titles-string "#T" - # 256 color - set -g default-terminal "screen-256color" + # 256 color + set -g default-terminal "screen-256color" - # modes - setw -g clock-mode-colour colour5 - setw -g mode-style 'fg=colour1 bg=colour18 bold' + # modes + setw -g clock-mode-colour colour5 + setw -g mode-style 'fg=colour1 bg=colour18 bold' - # panes - set -g pane-border-style 'fg=colour19 bg=colour0' - set -g pane-active-border-style 'bg=colour0 fg=colour9' + # panes + set -g pane-border-style 'fg=colour19 bg=colour0' + set -g pane-active-border-style 'bg=colour0 fg=colour9' - # statusbar - set -g status-position bottom - set -g status-justify left - set -g status-style 'bg=colour18 fg=colour137 dim' - set -g status-left ''' - set -g status-right '#[fg=colour233,bg=colour19] %F #[fg=colour233,bg=colour8] %H:%M:%S %Z' - set -g status-right-length 50 - set -g status-left-length 20 + # statusbar + set -g status-position bottom + set -g status-justify left + set -g status-style 'bg=colour18 fg=colour137 dim' + set -g status-left ''' + set -g status-right '#[fg=colour233,bg=colour19] %F #[fg=colour233,bg=colour8] %H:%M:%S %Z' + set -g status-right-length 50 + set -g status-left-length 20 - setw -g window-status-current-style 'fg=colour1 bg=colour19 bold' - setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' + setw -g window-status-current-style 'fg=colour1 bg=colour19 bold' + setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F ' - setw -g window-status-style 'fg=colour9 bg=colour18' - setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' + setw -g window-status-style 'fg=colour9 bg=colour18' + setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' - setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' + setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' - # messages - set -g message-style 'fg=colour232 bg=colour16 bold' + # messages + set -g message-style 'fg=colour232 bg=colour16 bold' - # mouse - set -g mouse on - ''; - }; + # mouse + set -g mouse on + ''; + }; } diff --git a/profiles/kat/home/vim/default.nix b/profiles/kat/home/vim/default.nix index 6d2f06ac..0db40c08 100644 --- a/profiles/kat/home/vim/default.nix +++ b/profiles/kat/home/vim/default.nix @@ -1,37 +1,37 @@ { config, lib, pkgs, witch, ... }: { - home.sessionVariables.EDITOR = "vim"; - programs.vim = { - enable = true; - package = pkgs.arc.pkgs.vim_configurable-pynvim; - #withPython3 = true; - plugins = with pkgs.vimPlugins; [ - nerdtree - vim-nix - coc-nvim - coc-yank - coc-python - coc-json - coc-yaml - coc-git - vim-fugitive - vim-startify - vim-airline - vim-airline-themes - base16-vim - ]; - #extraPackages = with pkgs; - # [ (python3.withPackages (ps: with ps; [ black flake8 ])) ]; - #extraPython3Packages = (ps: with ps; [ jedi pylint ]); - extraConfig = import ./vimrc.nix { inherit pkgs config; }; - }; - xdg.dataFile = { - "vim/undo/.keep".text = ""; - "vim/swap/.keep".text = ""; - "vim/backup/.keep".text = ""; - }; - xdg.configFile = { - "vim/coc-settings.json".text = builtins.readFile ./coc-settings.json; - }; + home.sessionVariables.EDITOR = "vim"; + programs.vim = { + enable = true; + package = pkgs.arc.pkgs.vim_configurable-pynvim; + #withPython3 = true; + plugins = with pkgs.vimPlugins; [ + nerdtree + vim-nix + coc-nvim + coc-yank + coc-python + coc-json + coc-yaml + coc-git + vim-fugitive + vim-startify + vim-airline + vim-airline-themes + base16-vim + ]; + #extraPackages = with pkgs; + # [ (python3.withPackages (ps: with ps; [ black flake8 ])) ]; + #extraPython3Packages = (ps: with ps; [ jedi pylint ]); + extraConfig = import ./vimrc.nix { inherit pkgs config; }; + }; + xdg.dataFile = { + "vim/undo/.keep".text = ""; + "vim/swap/.keep".text = ""; + "vim/backup/.keep".text = ""; + }; + xdg.configFile = { + "vim/coc-settings.json".text = builtins.readFile ./coc-settings.json; + }; } diff --git a/profiles/kat/home/xdg.nix b/profiles/kat/home/xdg.nix index 7c83a269..690c0b15 100644 --- a/profiles/kat/home/xdg.nix +++ b/profiles/kat/home/xdg.nix @@ -1,18 +1,18 @@ { config, lib, ... }: { - xdg = { + xdg = { + enable = true; + userDirs = { enable = true; - userDirs = { - enable = true; - pictures = "$HOME/media"; - videos = "$HOME/media/videos"; - documents = "$HOME/docs"; - download = "$HOME/downloads"; - desktop = "$HOME/tmp"; - templates = "$HOME/tmp"; - publicShare = "$HOME/shared"; - music = "$HOME/media-share/music"; - }; + pictures = "$HOME/media"; + videos = "$HOME/media/videos"; + documents = "$HOME/docs"; + download = "$HOME/downloads"; + desktop = "$HOME/tmp"; + templates = "$HOME/tmp"; + publicShare = "$HOME/shared"; + music = "$HOME/media-share/music"; }; + }; } diff --git a/profiles/kat/home/zsh/default.nix b/profiles/kat/home/zsh/default.nix index 5e5237f6..06d04ba7 100644 --- a/profiles/kat/home/zsh/default.nix +++ b/profiles/kat/home/zsh/default.nix @@ -1,61 +1,61 @@ { config, lib, pkgs, ... }: { - xdg.dataFile = { "z/.keep".text = ""; }; - home.packages = with pkgs; [ fzf fd ]; - programs.zsh = { - enable = true; - enableAutosuggestions = true; - shellAliases = { - nixdirfmt = "fd --color=never .nix | xargs nixfmt"; - exa = "exa --time-style long-iso"; - ls = "exa -G"; - la = "exa -Ga"; - ll = "exa -l"; - lla = "exa -lga"; - }; - localVariables = { - _Z_DATA = "${config.xdg.dataHome}/z/data"; - ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold"; - ZSH_AUTOSUGGEST_USE_ASYNC = 1; - }; - plugins = [ - (with pkgs.zsh-syntax-highlighting; { - name = "zsh-syntax-highlighting"; - inherit src; - }) - { - name = "z"; - file = "z.sh"; - src = pkgs.fetchFromGitHub { - owner = "rupa"; - repo = "z"; - rev = "9d5a3fe0407101e2443499e4b95bca33f7a9a9ca"; - sha256 = "0aghw6zmd3851xpzgy0jkh25wzs9a255gxlbdr3zw81948qd9wb1"; - }; - } - { - name = "fzf-z"; - src = pkgs.fetchFromGitHub { - owner = "andrewferrier"; - repo = "fzf-z"; - rev = "089ba6cacd3876c349cfb6b65dc2c3e68b478fd0"; - sha256 = "1lvvkz0v4xibq6z3y8lgfkl9ibcx0spr4qzni0n925ar38s20q81"; - }; - } - ]; - oh-my-zsh = { - enable = true; - plugins = [ "git" "sudo" "adb" "cargo" "emoji" ]; - }; + xdg.dataFile = { "z/.keep".text = ""; }; + home.packages = with pkgs; [ fzf fd ]; + programs.zsh = { + enable = true; + enableAutosuggestions = true; + shellAliases = { + nixdirfmt = "fd --color=never .nix | xargs nixfmt"; + exa = "exa --time-style long-iso"; + ls = "exa -G"; + la = "exa -Ga"; + ll = "exa -l"; + lla = "exa -lga"; }; - programs.starship = { - enable = true; - enableZshIntegration = true; + localVariables = { + _Z_DATA = "${config.xdg.dataHome}/z/data"; + ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=3,bold"; + ZSH_AUTOSUGGEST_USE_ASYNC = 1; }; - programs.direnv = { + plugins = [ + (with pkgs.zsh-syntax-highlighting; { + name = "zsh-syntax-highlighting"; + inherit src; + }) + { + name = "z"; + file = "z.sh"; + src = pkgs.fetchFromGitHub { + owner = "rupa"; + repo = "z"; + rev = "9d5a3fe0407101e2443499e4b95bca33f7a9a9ca"; + sha256 = "0aghw6zmd3851xpzgy0jkh25wzs9a255gxlbdr3zw81948qd9wb1"; + }; + } + { + name = "fzf-z"; + src = pkgs.fetchFromGitHub { + owner = "andrewferrier"; + repo = "fzf-z"; + rev = "089ba6cacd3876c349cfb6b65dc2c3e68b478fd0"; + sha256 = "1lvvkz0v4xibq6z3y8lgfkl9ibcx0spr4qzni0n925ar38s20q81"; + }; + } + ]; + oh-my-zsh = { enable = true; - enableZshIntegration = true; - enableNixDirenvIntegration = true; + plugins = [ "git" "sudo" "adb" "cargo" "emoji" ]; }; + }; + programs.starship = { + enable = true; + enableZshIntegration = true; + }; + programs.direnv = { + enable = true; + enableZshIntegration = true; + enableNixDirenvIntegration = true; + }; } diff --git a/profiles/kat/nixos.nix b/profiles/kat/nixos.nix index 0aa2594c..5e3f914b 100644 --- a/profiles/kat/nixos.nix +++ b/profiles/kat/nixos.nix @@ -17,6 +17,8 @@ }; }; - options = { deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; }; }; + options = { + deploy.profile.kat = lib.mkEnableOption "uhh meow" // { default = true; }; + }; } diff --git a/profiles/laptop/home.nix b/profiles/laptop/home.nix index 47442371..821d98aa 100644 --- a/profiles/laptop/home.nix +++ b/profiles/laptop/home.nix @@ -1,5 +1,9 @@ { lib, ... }: { - options = { deploy.profile.laptop = lib.mkEnableOption "lappytop" // { default = true; }; }; + options = { + deploy.profile.laptop = lib.mkEnableOption "lappytop" // { + default = true; + }; + }; } diff --git a/profiles/laptop/nixos.nix b/profiles/laptop/nixos.nix index accc11b7..ae430a9e 100644 --- a/profiles/laptop/nixos.nix +++ b/profiles/laptop/nixos.nix @@ -3,7 +3,11 @@ { imports = [ ./nixos ]; - options = { deploy.profile.laptop = lib.mkEnableOption "lappytop" // { default = true; }; }; + options = { + deploy.profile.laptop = lib.mkEnableOption "lappytop" // { + default = true; + }; + }; config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; }; } diff --git a/profiles/laptop/nixos/wifi.nix b/profiles/laptop/nixos/wifi.nix index a8a721d7..88d8a3b6 100644 --- a/profiles/laptop/nixos/wifi.nix +++ b/profiles/laptop/nixos/wifi.nix @@ -1,4 +1,3 @@ { config, lib, pkgs, ... }: -{ -} +{ } diff --git a/profiles/sway/home.nix b/profiles/sway/home.nix index 1fe62fb0..e9fb7086 100644 --- a/profiles/sway/home.nix +++ b/profiles/sway/home.nix @@ -3,5 +3,7 @@ { imports = [ ./home ]; - options = { deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; }; + options = { + deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; + }; } diff --git a/profiles/sway/home/gammastep.nix b/profiles/sway/home/gammastep.nix index f4856cc0..ce3ba1c1 100644 --- a/profiles/sway/home/gammastep.nix +++ b/profiles/sway/home/gammastep.nix @@ -1,9 +1,9 @@ { config, lib, ... }: { - services.gammastep = { - enable = true; - latitude = "51.5074"; - longitude = "0.1278"; - }; + services.gammastep = { + enable = true; + latitude = "51.5074"; + longitude = "0.1278"; + }; } diff --git a/profiles/sway/home/mako.nix b/profiles/sway/home/mako.nix index 06347109..0ced127b 100644 --- a/profiles/sway/home/mako.nix +++ b/profiles/sway/home/mako.nix @@ -1,26 +1,26 @@ { config, pkgs, lib, witch, ... }: { - systemd.user.services = { - mako = { - Unit = { - Description = "mako"; - X-Restart-Triggers = - [ (toString config.xdg.configFile."mako/config".source) ]; - }; - Service = { - ExecStart = "${pkgs.mako}/bin/mako"; - Restart = "always"; - }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + systemd.user.services = { + mako = { + Unit = { + Description = "mako"; + X-Restart-Triggers = + [ (toString config.xdg.configFile."mako/config".source) ]; }; + Service = { + ExecStart = "${pkgs.mako}/bin/mako"; + Restart = "always"; + }; + Install = { WantedBy = [ "graphical-session.target" ]; }; }; + }; - programs.mako = { - enable = true; - defaultTimeout = 3000; - borderColor = witch.style.base16.color7; - backgroundColor = "${witch.style.base16.color0}70"; - textColor = witch.style.base16.color7; - }; + programs.mako = { + enable = true; + defaultTimeout = 3000; + borderColor = witch.style.base16.color7; + backgroundColor = "${witch.style.base16.color0}70"; + textColor = witch.style.base16.color7; + }; } diff --git a/profiles/sway/home/sway.nix b/profiles/sway/home/sway.nix index 11473d4f..03088d3d 100644 --- a/profiles/sway/home/sway.nix +++ b/profiles/sway/home/sway.nix @@ -1,268 +1,268 @@ { config, pkgs, lib, witch, ... }: { - home.sessionVariables = { - MOZ_ENABLE_WAYLAND = 1; - XDG_CURRENT_DESKTOP = "sway"; - XDG_SESSION_TYPE = "wayland"; + home.sessionVariables = { + MOZ_ENABLE_WAYLAND = 1; + XDG_CURRENT_DESKTOP = "sway"; + XDG_SESSION_TYPE = "wayland"; + }; + + home.packages = with pkgs; [ grim slurp wl-clipboard jq ]; + + programs.zsh.profileExtra = '' + # If running from tty1 start sway + if [ "$(tty)" = "/dev/tty1" ]; then + systemctl --user unset-environment \ + SWAYSOCK \ + I3SOCK \ + WAYLAND_DISPLAY \ + DISPLAY \ + IN_NIX_SHELL \ + __HM_SESS_VARS_SOURCED \ + GPG_TTY \ + NIX_PATH \ + SHLVL + exec env --unset=SHLVL systemd-cat -t sway -- sway + fi + ''; + + wayland.windowManager.sway = let + cfg = config.wayland.windowManager.sway.config; + bindsym = k: v: "bindsym ${k} ${v}"; + bindWorkspace = key: workspace: { + "${cfg.modifier}+${key}" = "workspace number ${workspace}"; + "${cfg.modifier}+shift+${key}" = + "move container to workspace number ${workspace}"; }; + workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [ + "1" + "2" + "3" + "4" + "5" + "6" + "7" + "8" + "9" + ] ++ [ (bindWorkspace "0" "10:10") ] + ++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [ + "F1" + "F2" + "F3" + "F4" + "F5" + "F6" + "F7" + "F8" + "F9" + "F10" + "F11" + "F12" + ]; + workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings; + workspaceBindingsStr = + lib.concatStringsSep "\n" (lib.flatten workspaceBindings'); + in { + enable = true; + config = let + dmenu = + "${pkgs.bemenu}/bin/bemenu --fn '${witch.style.font.name} ${witch.style.font.size}' --nb '${witch.style.base16.color0}' --nf '${witch.style.base16.color7}' --sb '${witch.style.base16.color1}' --sf '${witch.style.base16.color7}' -l 5 -m -1 -i"; + lockCommand = "swaylock -i eDP-1:${ + ../../../private/files/wallpapers/main.png + } -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${ + ../../../private/files/wallpapers/left.jpg + } -i DVI-D-1:${../../../private/files/wallpapers/right.jpg} -s fill"; - home.packages = with pkgs; [ grim slurp wl-clipboard jq ]; - - programs.zsh.profileExtra = '' - # If running from tty1 start sway - if [ "$(tty)" = "/dev/tty1" ]; then - systemctl --user unset-environment \ - SWAYSOCK \ - I3SOCK \ - WAYLAND_DISPLAY \ - DISPLAY \ - IN_NIX_SHELL \ - __HM_SESS_VARS_SOURCED \ - GPG_TTY \ - NIX_PATH \ - SHLVL - exec env --unset=SHLVL systemd-cat -t sway -- sway - fi - ''; - - wayland.windowManager.sway = let - cfg = config.wayland.windowManager.sway.config; - bindsym = k: v: "bindsym ${k} ${v}"; - bindWorkspace = key: workspace: { - "${cfg.modifier}+${key}" = "workspace number ${workspace}"; - "${cfg.modifier}+shift+${key}" = - "move container to workspace number ${workspace}"; - }; - workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [ - "1" - "2" - "3" - "4" - "5" - "6" - "7" - "8" - "9" - ] ++ [ (bindWorkspace "0" "10:10") ] - ++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [ - "F1" - "F2" - "F3" - "F4" - "F5" - "F6" - "F7" - "F8" - "F9" - "F10" - "F11" - "F12" - ]; - workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings; - workspaceBindingsStr = - lib.concatStringsSep "\n" (lib.flatten workspaceBindings'); in { - enable = true; - config = let - dmenu = - "${pkgs.bemenu}/bin/bemenu --fn '${witch.style.font.name} ${witch.style.font.size}' --nb '${witch.style.base16.color0}' --nf '${witch.style.base16.color7}' --sb '${witch.style.base16.color1}' --sf '${witch.style.base16.color7}' -l 5 -m -1 -i"; - lockCommand = "swaylock -i eDP-1:${ - ../../../private/files/wallpapers/main.png - } -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${ - ../../../private/files/wallpapers/left.jpg - } -i DVI-D-1:${../../../private/files/wallpapers/right.jpg} -s fill"; + bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; + output = let + left = { + res = "1920x1080"; + pos = "0 0"; + bg = "${../../../private/files/wallpapers/left.jpg} fill"; + }; + middle = { + res = "1920x1080"; + pos = "1920 0"; + bg = "${../../../private/files/wallpapers/main.png} fill"; + }; + right = { + res = "1920x1080"; + pos = "3840 0"; + bg = "${../../../private/files/wallpapers/right.jpg} fill"; + }; + laptop = { + res = "1920x1080"; + pos = "0 0"; + bg = "${../../../private/files/wallpapers/main.png} fill"; + }; in { - bars = [{ command = "${pkgs.waybar}/bin/waybar"; }]; + "DP-1" = left; + "DVI-D-1" = right; + "HDMI-A-1" = middle; + "eDP-1" = laptop; + }; - output = let - left = { - res = "1920x1080"; - pos = "0 0"; - bg = "${../../../private/files/wallpapers/left.jpg} fill"; - }; - middle = { - res = "1920x1080"; - pos = "1920 0"; - bg = "${../../../private/files/wallpapers/main.png} fill"; - }; - right = { - res = "1920x1080"; - pos = "3840 0"; - bg = "${../../../private/files/wallpapers/right.jpg} fill"; - }; - laptop = { - res = "1920x1080"; - pos = "0 0"; - bg = "${../../../private/files/wallpapers/main.png} fill"; - }; - in { - "DP-1" = left; - "DVI-D-1" = right; - "HDMI-A-1" = middle; - "eDP-1" = laptop; + input = { + "1739:33362:Synaptics_TM3336-002" = { + dwt = "enabled"; + tap = "enabled"; + natural_scroll = "enabled"; + middle_emulation = "enabled"; + click_method = "clickfinger"; }; - - input = { - "1739:33362:Synaptics_TM3336-002" = { - dwt = "enabled"; - tap = "enabled"; - natural_scroll = "enabled"; - middle_emulation = "enabled"; - click_method = "clickfinger"; - }; - "5824:1503:screenstub-tablet" = { events = "disabled"; }; - "5824:1503:screenstub-mouse" = { events = "disabled"; }; - "5824:1503:screenstub-kbd" = { events = "disabled"; }; - "*" = { - xkb_layout = "gb"; - # xkb_variant = "nodeadkeys"; - # xkb_options = "ctrl:nocaps"; - }; - }; - - fonts = [ "${witch.style.font.name} ${witch.style.font.size}" ]; - terminal = "${pkgs.kitty}/bin/kitty"; - # TODO: replace with wofi - menu = - "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'"; - modifier = "Mod4"; - - assigns = { "F1" = [{ class = "screenstub"; }]; }; - startup = [ - { - command = "systemctl --user restart mako"; - always = true; - } - { command = "${pkgs.i3gopher}/bin/i3gopher"; } - { command = "mkchromecast -t"; } - ]; - - window = { - border = 1; - titlebar = true; - }; - - keybindings = { - "${cfg.modifier}+Return" = "exec ${cfg.terminal}"; - - "${cfg.modifier}+Left" = "focus left"; - "${cfg.modifier}+Down" = "focus down"; - "${cfg.modifier}+Up" = "focus up"; - "${cfg.modifier}+Right" = "focus right"; - - "${cfg.modifier}+Shift+Left" = "move left"; - "${cfg.modifier}+Shift+Down" = "move down"; - "${cfg.modifier}+Shift+Up" = "move up"; - "${cfg.modifier}+Shift+Right" = "move right"; - - "${cfg.modifier}+Shift+space" = "floating toggle"; - "${cfg.modifier}+space" = "focus mode_toggle"; - - "${cfg.modifier}+Tab" = "workspace back_and_forth"; - "${cfg.modifier}+Shift+Tab" = - "${pkgs.i3gopher}/bin/i3gopher --focus-last"; - "${cfg.modifier}+Ctrl+Left" = "workspace prev_on_output"; - "${cfg.modifier}+Ctrl+Right" = "workspace next_on_output"; - - "XF86AudioRaiseVolume" = - "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%"; - "XF86AudioLowerVolume" = - "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%"; - "XF86AudioMute" = - "exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle"; - "XF86AudioMicMute" = - "exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle"; - "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5"; - "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5"; - - "${cfg.modifier}+d" = "exec ${cfg.menu}"; - "${cfg.modifier}+x" = "exec ${lockCommand}"; - - "${cfg.modifier}+Print" = - "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload screen"; - "${cfg.modifier}+Shift+Print" = - "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload area"; - "${cfg.modifier}+Mod1+Print" = - "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload window"; - "Print" = "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save screen"; - "Shift+Print" = - "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save area"; - "Mod1+Print" = - "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save window"; - - "${cfg.modifier}+i" = "move workspace to output left"; - "${cfg.modifier}+o" = "move workspace to output right"; - "${cfg.modifier}+b" = "splith"; - "${cfg.modifier}+v" = "splitv"; - "${cfg.modifier}+s" = "layout stacking"; - "${cfg.modifier}+w" = "layout tabbed"; - "${cfg.modifier}+e" = "layout toggle split"; - "${cfg.modifier}+f" = "fullscreen"; - - "${cfg.modifier}+Shift+q" = "kill"; - "${cfg.modifier}+Shift+c" = "reload"; - - "${cfg.modifier}+r" = "mode resize"; - "${cfg.modifier}+Delete" = '' - mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"''; - }; - - modes = { - "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" = - { - "l" = "exec ${lockCommand}, mode default"; - "e" = "exec swaymsg exit, mode default"; - "s" = "exec systemctl suspend, mode default"; - "h" = "exec systemctl hibernate, mode default"; - "r" = "exec systemctl reboot, mode default"; - "Shift+s" = "exec systemctl shutdown, mode default"; - "Return" = "mode default"; - "Escape" = "mode default"; - }; - }; - - colors = { - focused = { - border = witch.style.base16.color8; - background = witch.style.base16.color3; - text = witch.style.base16.color0; - indicator = witch.style.base16.color2; - childBorder = witch.style.base16.color8; - }; - focusedInactive = { - border = witch.style.base16.color0; - background = witch.style.base16.color15; - text = witch.style.base16.color13; - indicator = witch.style.base16.color2; - childBorder = witch.style.base16.color8; - }; - unfocused = { - border = witch.style.base16.color0; - background = witch.style.base16.color8; - text = witch.style.base16.color7; - indicator = witch.style.base16.color8; - childBorder = witch.style.base16.color8; - }; - urgent = { - border = witch.style.base16.color0; - background = witch.style.base16.color9; - text = witch.style.base16.color0; - indicator = witch.style.base16.color1; - childBorder = witch.style.base16.color8; - }; + "5824:1503:screenstub-tablet" = { events = "disabled"; }; + "5824:1503:screenstub-mouse" = { events = "disabled"; }; + "5824:1503:screenstub-kbd" = { events = "disabled"; }; + "*" = { + xkb_layout = "gb"; + # xkb_variant = "nodeadkeys"; + # xkb_options = "ctrl:nocaps"; + }; + }; + + fonts = [ "${witch.style.font.name} ${witch.style.font.size}" ]; + terminal = "${pkgs.kitty}/bin/kitty"; + # TODO: replace with wofi + menu = + "${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'"; + modifier = "Mod4"; + + assigns = { "F1" = [{ class = "screenstub"; }]; }; + startup = [ + { + command = "systemctl --user restart mako"; + always = true; + } + { command = "${pkgs.i3gopher}/bin/i3gopher"; } + { command = "mkchromecast -t"; } + ]; + + window = { + border = 1; + titlebar = true; + }; + + keybindings = { + "${cfg.modifier}+Return" = "exec ${cfg.terminal}"; + + "${cfg.modifier}+Left" = "focus left"; + "${cfg.modifier}+Down" = "focus down"; + "${cfg.modifier}+Up" = "focus up"; + "${cfg.modifier}+Right" = "focus right"; + + "${cfg.modifier}+Shift+Left" = "move left"; + "${cfg.modifier}+Shift+Down" = "move down"; + "${cfg.modifier}+Shift+Up" = "move up"; + "${cfg.modifier}+Shift+Right" = "move right"; + + "${cfg.modifier}+Shift+space" = "floating toggle"; + "${cfg.modifier}+space" = "focus mode_toggle"; + + "${cfg.modifier}+Tab" = "workspace back_and_forth"; + "${cfg.modifier}+Shift+Tab" = + "${pkgs.i3gopher}/bin/i3gopher --focus-last"; + "${cfg.modifier}+Ctrl+Left" = "workspace prev_on_output"; + "${cfg.modifier}+Ctrl+Right" = "workspace next_on_output"; + + "XF86AudioRaiseVolume" = + "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%"; + "XF86AudioLowerVolume" = + "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%"; + "XF86AudioMute" = + "exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle"; + "XF86AudioMicMute" = + "exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle"; + "XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5"; + "XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5"; + + "${cfg.modifier}+d" = "exec ${cfg.menu}"; + "${cfg.modifier}+x" = "exec ${lockCommand}"; + + "${cfg.modifier}+Print" = + "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload screen"; + "${cfg.modifier}+Shift+Print" = + "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload area"; + "${cfg.modifier}+Mod1+Print" = + "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload window"; + "Print" = "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save screen"; + "Shift+Print" = + "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save area"; + "Mod1+Print" = + "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify save window"; + + "${cfg.modifier}+i" = "move workspace to output left"; + "${cfg.modifier}+o" = "move workspace to output right"; + "${cfg.modifier}+b" = "splith"; + "${cfg.modifier}+v" = "splitv"; + "${cfg.modifier}+s" = "layout stacking"; + "${cfg.modifier}+w" = "layout tabbed"; + "${cfg.modifier}+e" = "layout toggle split"; + "${cfg.modifier}+f" = "fullscreen"; + + "${cfg.modifier}+Shift+q" = "kill"; + "${cfg.modifier}+Shift+c" = "reload"; + + "${cfg.modifier}+r" = "mode resize"; + "${cfg.modifier}+Delete" = '' + mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"''; + }; + + modes = { + "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown" = + { + "l" = "exec ${lockCommand}, mode default"; + "e" = "exec swaymsg exit, mode default"; + "s" = "exec systemctl suspend, mode default"; + "h" = "exec systemctl hibernate, mode default"; + "r" = "exec systemctl reboot, mode default"; + "Shift+s" = "exec systemctl shutdown, mode default"; + "Return" = "mode default"; + "Escape" = "mode default"; + }; + }; + + colors = { + focused = { + border = witch.style.base16.color8; + background = witch.style.base16.color3; + text = witch.style.base16.color0; + indicator = witch.style.base16.color2; + childBorder = witch.style.base16.color8; + }; + focusedInactive = { + border = witch.style.base16.color0; + background = witch.style.base16.color15; + text = witch.style.base16.color13; + indicator = witch.style.base16.color2; + childBorder = witch.style.base16.color8; + }; + unfocused = { + border = witch.style.base16.color0; + background = witch.style.base16.color8; + text = witch.style.base16.color7; + indicator = witch.style.base16.color8; + childBorder = witch.style.base16.color8; + }; + urgent = { + border = witch.style.base16.color0; + background = witch.style.base16.color9; + text = witch.style.base16.color0; + indicator = witch.style.base16.color1; + childBorder = witch.style.base16.color8; }; }; - wrapperFeatures.gtk = true; - extraConfig = '' - seat seat0 xcursor_theme breeze_cursors 20 - workspace "1" output "DP-1" - workspace "F2" output "DVI-D-1" - workspace "F1" output "HDMI-A-1" - workspace_auto_back_and_forth yes - ${workspaceBindingsStr} - ''; }; + wrapperFeatures.gtk = true; + extraConfig = '' + seat seat0 xcursor_theme breeze_cursors 20 + workspace "1" output "DP-1" + workspace "F2" output "DVI-D-1" + workspace "F1" output "HDMI-A-1" + workspace_auto_back_and_forth yes + ${workspaceBindingsStr} + ''; + }; } diff --git a/profiles/sway/home/swayidle.nix b/profiles/sway/home/swayidle.nix index 803f9590..d9c29564 100644 --- a/profiles/sway/home/swayidle.nix +++ b/profiles/sway/home/swayidle.nix @@ -1,36 +1,32 @@ { config, pkgs, lib, ... }: { - systemd.user.services.swayidle = { - Unit = { - Description = "swayidle"; - Documentation = [ "man:swayidle(1)" ]; - PartOf = [ "graphical-session.target" ]; - }; - Service = { - Type = "simple"; - ExecStart = '' - ${pkgs.swayidle}/bin/swayidle -w \ - timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${ - ../../../private/files/wallpapers/main.png - } -i HDMI-A-1:${ - ../../../private/files/wallpapers/main.png - } -i DP-1:${ - ../../../private/files/wallpapers/left.jpg - } -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}' \ - #timeout 600 'swaymsg "output * dpms off"' \ - # resume 'swaymsg "output * dpms on"' \ - before-sleep '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${ - ../../../private/files/wallpapers/main.png - } -i HDMI-A-1:${ - ../../../private/files/wallpapers/main.png - } -i DP-1:${ - ../../../private/files/wallpapers/left.jpg - } -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}' - ''; - RestartSec = 3; - Restart = "always"; - }; - Install = { WantedBy = [ "sway-session.target" ]; }; + systemd.user.services.swayidle = { + Unit = { + Description = "swayidle"; + Documentation = [ "man:swayidle(1)" ]; + PartOf = [ "graphical-session.target" ]; }; + Service = { + Type = "simple"; + ExecStart = '' + ${pkgs.swayidle}/bin/swayidle -w \ + timeout 300 '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${ + ../../../private/files/wallpapers/main.png + } -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${ + ../../../private/files/wallpapers/left.jpg + } -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}' \ + #timeout 600 'swaymsg "output * dpms off"' \ + # resume 'swaymsg "output * dpms on"' \ + before-sleep '${pkgs.swaylock}/bin/swaylock -f -i eDP-1:${ + ../../../private/files/wallpapers/main.png + } -i HDMI-A-1:${../../../private/files/wallpapers/main.png} -i DP-1:${ + ../../../private/files/wallpapers/left.jpg + } -i DVI-D-1:${../../../private/files/wallpapers/right.jpg}' + ''; + RestartSec = 3; + Restart = "always"; + }; + Install = { WantedBy = [ "sway-session.target" ]; }; + }; } diff --git a/profiles/sway/nixos.nix b/profiles/sway/nixos.nix index 7d983590..bac2279d 100644 --- a/profiles/sway/nixos.nix +++ b/profiles/sway/nixos.nix @@ -3,7 +3,9 @@ { imports = [ ./nixos ]; - options = { deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; }; + options = { + deploy.profile.sway = lib.mkEnableOption "sway wm" // { default = true; }; + }; config = { home-manager.users.kat = { imports = [ ./home.nix ]; }; }; } diff --git a/profiles/sway/nixos/sway.nix b/profiles/sway/nixos/sway.nix index ea348188..fbca3f70 100644 --- a/profiles/sway/nixos/sway.nix +++ b/profiles/sway/nixos/sway.nix @@ -1,8 +1,8 @@ { config, pkgs, lib, sources, ... }: { - programs.sway = { - enable = true; - extraPackages = with pkgs; lib.mkForce [ xwayland swaylock swayidle ]; - }; + programs.sway = { + enable = true; + extraPackages = with pkgs; lib.mkForce [ xwayland swaylock swayidle ]; + }; }