From 78ea55f0295cf981faf9f29769bb26e0b4626f5a Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sun, 15 May 2022 15:24:16 -0400 Subject: [PATCH] change email pass file --- modules/graphical/default.nix | 4 + modules/graphical/i3.nix | 2 + modules/graphical/rofi.nix | 241 ++++++++++++++++++---------------- modules/mail/himalaya.nix | 2 +- modules/mail/mailpass.age | 13 +- 5 files changed, 137 insertions(+), 125 deletions(-) diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index 9070190..4fe70a1 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -25,6 +25,10 @@ type = types.str; description = "Command to use for launching"; }; + systemdSearch = mkOption { + type = types.str; + description = "Command to use for interacting with systemd"; + }; toggleBarCommand = lib.mkOption { type = lib.types.str; description = "Command to hide and show the status bar."; diff --git a/modules/graphical/i3.nix b/modules/graphical/i3.nix index 79f0c3d..b577185 100644 --- a/modules/graphical/i3.nix +++ b/modules/graphical/i3.nix @@ -118,6 +118,8 @@ in { "exec alacritty; workspace ${ws2}; layout tabbed"; "${modifier}+space" = "exec --no-startup-id ${config.gui.launcherCommand}"; + "${modifier}+Shift+s" = + "exec --no-startup-id ${config.gui.systemdSearch}"; "${modifier}+Shift+c" = "reload"; "${modifier}+Shift+r" = "restart"; "${modifier}+Shift+q" = '' diff --git a/modules/graphical/rofi.nix b/modules/graphical/rofi.nix index 3df8143..73cd6a9 100644 --- a/modules/graphical/rofi.nix +++ b/modules/graphical/rofi.nix @@ -4,137 +4,148 @@ config = lib.mkIf config.services.xserver.enable { - home-manager.users.${config.user}.programs.rofi = { - enable = true; - cycle = true; - location = "center"; - pass = { }; - plugins = [ pkgs.rofi-calc pkgs.rofi-emoji ]; - theme = let - inherit (config.home-manager.users.${config.user}.lib.formats.rasi) - mkLiteral; - in { + home-manager.users.${config.user} = { - # Inspired by https://github.com/sherubthakur/dotfiles/blob/master/users/modules/desktop-environment/rofi/launcher.rasi + home.packages = with pkgs; + [ + jq # Required for rofi-systemd + ]; - "*" = { - background-color = mkLiteral config.gui.colorscheme.base00; - foreground-color = mkLiteral config.gui.colorscheme.base07; - text-color = mkLiteral config.gui.colorscheme.base07; - border-color = mkLiteral config.gui.colorscheme.base04; - }; + programs.rofi = { + enable = true; + cycle = true; + location = "center"; + pass = { }; + plugins = [ pkgs.rofi-calc pkgs.rofi-emoji pkgs.rofi-systemd ]; + theme = let + inherit (config.home-manager.users.${config.user}.lib.formats.rasi) + mkLiteral; + in { - # Holds the entire window - "#window" = { - transparency = "real"; - background-color = mkLiteral config.gui.colorscheme.base00; - text-color = mkLiteral config.gui.colorscheme.base07; - border = mkLiteral "4px"; - border-color = mkLiteral config.gui.colorscheme.base04; - border-radius = mkLiteral "4px"; - width = mkLiteral "850px"; - padding = mkLiteral "15px"; - }; + # Inspired by https://github.com/sherubthakur/dotfiles/blob/master/users/modules/desktop-environment/rofi/launcher.rasi - # Wrapper around bar and results - "#mainbox" = { - background-color = mkLiteral config.gui.colorscheme.base00; - border = mkLiteral "0px"; - border-radius = mkLiteral "0px"; - border-color = mkLiteral config.gui.colorscheme.base04; - children = map mkLiteral [ "inputbar" "listview" ]; - spacing = mkLiteral "10px"; - padding = mkLiteral "10px"; - }; + "*" = { + background-color = mkLiteral config.gui.colorscheme.base00; + foreground-color = mkLiteral config.gui.colorscheme.base07; + text-color = mkLiteral config.gui.colorscheme.base07; + border-color = mkLiteral config.gui.colorscheme.base04; + }; - # Unknown - "#textbox-prompt-colon" = { - expand = false; - str = ":"; - margin = mkLiteral "0px 0.3em 0em 0em"; - text-color = mkLiteral config.gui.colorscheme.base07; - }; + # Holds the entire window + "#window" = { + transparency = "real"; + background-color = mkLiteral config.gui.colorscheme.base00; + text-color = mkLiteral config.gui.colorscheme.base07; + border = mkLiteral "4px"; + border-color = mkLiteral config.gui.colorscheme.base04; + border-radius = mkLiteral "4px"; + width = mkLiteral "850px"; + padding = mkLiteral "15px"; + }; - # Command prompt left of the input - "#prompt" = { enabled = false; }; + # Wrapper around bar and results + "#mainbox" = { + background-color = mkLiteral config.gui.colorscheme.base00; + border = mkLiteral "0px"; + border-radius = mkLiteral "0px"; + border-color = mkLiteral config.gui.colorscheme.base04; + children = map mkLiteral [ "inputbar" "listview" ]; + spacing = mkLiteral "10px"; + padding = mkLiteral "10px"; + }; - # Actual text box - "#entry" = { - placeholder-color = mkLiteral config.gui.colorscheme.base03; - expand = true; - horizontal-align = "0"; - placeholder = "Launch Program"; - padding = mkLiteral "0px 0px 0px 5px"; - blink = true; - }; + # Unknown + "#textbox-prompt-colon" = { + expand = false; + str = ":"; + margin = mkLiteral "0px 0.3em 0em 0em"; + text-color = mkLiteral config.gui.colorscheme.base07; + }; - # Top bar - "#inputbar" = { - children = map mkLiteral [ "prompt" "entry" ]; - border = mkLiteral "1px"; - border-radius = mkLiteral "4px"; - padding = mkLiteral "6px"; - }; + # Command prompt left of the input + "#prompt" = { enabled = false; }; - # Results - "#listview" = { - background-color = mkLiteral config.gui.colorscheme.base00; - padding = mkLiteral "0px"; - columns = 1; - lines = 12; - spacing = "5px"; - cycle = true; - dynamic = true; - layout = "vertical"; - }; + # Actual text box + "#entry" = { + placeholder-color = mkLiteral config.gui.colorscheme.base03; + expand = true; + horizontal-align = "0"; + placeholder = "Launch Program"; + padding = mkLiteral "0px 0px 0px 5px"; + blink = true; + }; - # Each result - "#element" = { - orientation = "vertical"; - border-radius = mkLiteral "0px"; - padding = mkLiteral "5px 0px 5px 5px"; - }; - "#element.selected" = { - border = mkLiteral "1px"; - border-radius = mkLiteral "4px"; - border-color = mkLiteral config.gui.colorscheme.base07; - background-color = mkLiteral config.gui.colorscheme.base04; - text-color = mkLiteral config.gui.colorscheme.base00; - }; + # Top bar + "#inputbar" = { + children = map mkLiteral [ "prompt" "entry" ]; + border = mkLiteral "1px"; + border-radius = mkLiteral "4px"; + padding = mkLiteral "6px"; + }; - "#element-text" = { - expand = true; - # horizontal-align = mkLiteral "0.5"; - vertical-align = mkLiteral "0.5"; - margin = mkLiteral "0px 2.5px 0px 2.5px"; - }; - "#element-text.selected" = { - background-color = mkLiteral config.gui.colorscheme.base04; - text-color = mkLiteral config.gui.colorscheme.base00; - }; + # Results + "#listview" = { + background-color = mkLiteral config.gui.colorscheme.base00; + padding = mkLiteral "0px"; + columns = 1; + lines = 12; + spacing = "5px"; + cycle = true; + dynamic = true; + layout = "vertical"; + }; - # Not sure how to get icons - "#element-icon" = { - size = mkLiteral "18px"; - border = mkLiteral "0px"; - padding = mkLiteral "2px 5px 2px 2px"; - background-color = mkLiteral config.gui.colorscheme.base00; - }; - "#element-icon.selected" = { - background-color = mkLiteral config.gui.colorscheme.base04; - text-color = mkLiteral config.gui.colorscheme.base00; - }; + # Each result + "#element" = { + orientation = "vertical"; + border-radius = mkLiteral "0px"; + padding = mkLiteral "5px 0px 5px 5px"; + }; + "#element.selected" = { + border = mkLiteral "1px"; + border-radius = mkLiteral "4px"; + border-color = mkLiteral config.gui.colorscheme.base07; + background-color = mkLiteral config.gui.colorscheme.base04; + text-color = mkLiteral config.gui.colorscheme.base00; + }; + "#element-text" = { + expand = true; + # horizontal-align = mkLiteral "0.5"; + vertical-align = mkLiteral "0.5"; + margin = mkLiteral "0px 2.5px 0px 2.5px"; + }; + "#element-text.selected" = { + background-color = mkLiteral config.gui.colorscheme.base04; + text-color = mkLiteral config.gui.colorscheme.base00; + }; + + # Not sure how to get icons + "#element-icon" = { + size = mkLiteral "18px"; + border = mkLiteral "0px"; + padding = mkLiteral "2px 5px 2px 2px"; + background-color = mkLiteral config.gui.colorscheme.base00; + }; + "#element-icon.selected" = { + background-color = mkLiteral config.gui.colorscheme.base04; + text-color = mkLiteral config.gui.colorscheme.base00; + }; + + }; + xoffset = 0; + yoffset = -20; + extraConfig = { + show-icons = true; + kb-cancel = "Escape,Super+space"; + modi = "window,run,ssh,emoji,calc,systemd"; + }; }; - xoffset = 0; - yoffset = -20; - extraConfig = { - show-icons = true; - kb-cancel = "Escape,Super+space"; - modi = "window,run,ssh,emoji,calc"; - }; + }; + gui.launcherCommand = "${pkgs.rofi}/bin/rofi -show run -modi run"; + gui.systemdSearch = "${pkgs.rofi-systemd}/bin/rofi-systemd"; }; diff --git a/modules/mail/himalaya.nix b/modules/mail/himalaya.nix index fc822cf..6269270 100644 --- a/modules/mail/himalaya.nix +++ b/modules/mail/himalaya.nix @@ -64,7 +64,7 @@ mu.enable = false; notmuch.enable = false; passwordCommand = - "${pkgs.age}/bin/age --decrypt --identity /home/${config.user}/.ssh/id_rsa ${ + "${pkgs.age}/bin/age --decrypt --identity /home/${config.user}/.ssh/id_ed25519 ${ builtins.toString ./mailpass.age }"; smtp = { diff --git a/modules/mail/mailpass.age b/modules/mail/mailpass.age index ed7a5de..d422efa 100644 --- a/modules/mail/mailpass.age +++ b/modules/mail/mailpass.age @@ -1,10 +1,5 @@ age-encryption.org/v1 --> ssh-rsa 6vVbxg -X7xJSc42VFglgjPxz45J3uoGtyZZdI6qyIEL+ZKxzhgYTa66/LVhJT/sLJlg7lnp -DoZCGEvVIrTzlysHeWvNKUIkK/iiRLdsqJybPWs/hai9J2q3OcXehbvU+adHhhxn -7y3Ycle+XeQ2QnFtMZBL0niQNAo3CMNKO6SNQeFwzwGgHmPmAF2JVnwxB5l09Y+e -12T6aQCuh1pZ7oRjFQHg3T1aqXcslyBLLNuT4CXkIQ4hXSPAJGHUcy+rj8+3NsXW -BwI7w3CtBLGDaZue6FBucD3ii4lIcBtUzx9BsgHfsrHPvgx8jAt6cLyWmMFwQO0Y -43zNsHUHok2GEzKE1zLcAA ---- HyCGtqqnrN0ukBo11RTE7l3HUvT2o+qxvlghoY0cY80 -:Eln<2029I70J/Za\{{X3!BqD:gÇG~WIvWjm \ No newline at end of file +-> ssh-ed25519 MgHaOw 8h/ESNjn0gknNXoHM34UobHzPgmRunoP97H+KHOuGQM +qowH+6TlCRECGCscRgKx6kswY+PZezYUD6E+x9e+5pM +--- kFj1JzRdh/D13Uq9aNTzMJIFysEE+kzzthjewOIR2+o +Ȳ6}rCz >&=jW ^Wl!"}MS8=xm =ЇL \ No newline at end of file