Use libsecret for mbsync and git-credential-helper

Add gnome-keyring as libsecret backend, swap git-credential-helper and
mbsync to using libsecret/secret-tool. Add helper script to check for
and request mbsync passwords if missing. Add GNOME Seahorse for
viewing passwords graphically.

Remove email/work.nix and merge back into default.nix

Don't auto start protonmail-bridge, use the GUI instead so it doesn't
need to unlock all my keychains immediately

Move 3D modelling software to Vanguard only, instead of all personal
devices.

Move waybar back to top of screen and adjust all corner radii to 5px
from 10px

Re-enable swayfx blur_ignore_transparent now that it's added to
nixpkgs, re-enable shadows
This commit is contained in:
Evie Litherland-Smith 2024-07-08 08:58:32 +01:00
parent 9d80d3ab4c
commit 94c6d717b0
19 changed files with 221 additions and 205 deletions

View file

@ -22,38 +22,25 @@ NixOS system), run:
#+end_src #+end_src
** Clone password-store repository ** Clone password-store repository
#+begin_src bash #+begin_src bash
git -c credential.helper='' clone https://git.xenia.me.uk/pixelifytica/pass $PASSWORD_STORE_DIR git clone https://git.xenia.me.uk/pixelifytica/pass $PASSWORD_STORE_DIR
#+end_src #+end_src
* Email setup * Email setup
** Passwords for mbsync
Run src_bash{mbsync-ensure-pass} to check for passwords required by
~mbsync~, and query for missing passwords.
Static app-specific passwords are stored in ~password-store~, fetch from
there to add to secret service.
** Proton ** Proton
*** Bridge *** Bridge
Start Proton Mail Bridge application, if needed configure to store Start Proton Mail Bridge application, if needed configure to store
using =SecretService= and log in. Application will auto-start with using =SecretService= and log in. Application will auto-start with
plasma session. desktop session.
*** Password
Get password from ~protonmail-bridge~, save to ~password-store~: Use password from Bridge for ~mbsync~.
#+begin_src bash
pass insert mbsync/$(hostname)/proton
# Insert pass at prompt
#+end_src
** iCloud
*** Password
If not already done, save password to ~password-store~:
#+begin_src bash
pass insert mbsync/$(hostname)/icloud
# Insert pass at prompt
#+end_src
This will be synced across devices so only needs doing once
** Outlook ** Outlook
*** Password *** Davmail
If not already done, save password to ~password-store~:
#+begin_src bash
pass insert mbsync/$(hostname)/outlook
# Insert pass at prompt
#+end_src
This will be synced across devices so only needs doing once
*** Configuration
Run src_bash{davmail-setup} to automate this process. Run src_bash{davmail-setup} to automate this process.
On first run (or if token expires), stop systemd service and run manually to complete manual auth. Token will stay valid for a little while (no idea how long specifically). On first run (or if token expires), stop systemd service and run manually to complete manual auth. Token will stay valid for a little while (no idea how long specifically).

View file

@ -4,6 +4,11 @@
./games/default.nix ./games/default.nix
./streaming/default.nix ./streaming/default.nix
]; ];
home.packages = with pkgs; [
blender
freecad
prusa-slicer
];
wayland.windowManager.sway.config = { wayland.windowManager.sway.config = {
output = { output = {
"Microstep MSI G27CQ4 E2 Unknown" = { "Microstep MSI G27CQ4 E2 Unknown" = {

View file

@ -1,8 +1,4 @@
{ {...}: {
config,
lib,
...
}: {
imports = [ imports = [
# Programs # Programs
./desktop/default.nix ./desktop/default.nix
@ -10,7 +6,7 @@
./emacs/default.nix ./emacs/default.nix
./browser/default.nix ./browser/default.nix
# Services # Services
./services/email/work.nix # TODO combine again at some point ./services/email/default.nix
./services/password-store/default.nix ./services/password-store/default.nix
# Additional Scripts # Additional Scripts
./scripts/default.nix ./scripts/default.nix

View file

@ -6,7 +6,6 @@
}: { }: {
imports = [ imports = [
./sway/default.nix ./sway/default.nix
./foot/default.nix
./alacritty/default.nix ./alacritty/default.nix
./avizo/default.nix ./avizo/default.nix
./fuzzel/default.nix ./fuzzel/default.nix
@ -16,34 +15,51 @@
./waybar/default.nix ./waybar/default.nix
./wlogout/default.nix ./wlogout/default.nix
]; ];
home.packages = with pkgs; [ home = {
pinentry pointerCursor = let
ffmpeg name =
evince if config.scheme.variant == "light"
libreoffice-fresh then "volantes_cursors"
inkscape else "volantes_light_cursors";
webcord in {
teams-for-linux inherit name;
swayimg package = pkgs.volantes-cursors;
swaybg size = 32;
(writeShellScriptBin "set-background" '' gtk.enable = true;
${swaybg}/bin/swaybg -m fill -i ${./wallpapers/landscapes/tropic_island_day.jpg} x11 = {
'') enable = true;
(writeShellScriptBin "protonmail-setup-bridge" '' defaultCursor = name;
pkill -9 -f protonmail-bridge };
${protonmail-bridge}/bin/protonmail-bridge -c };
swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n" packages = with pkgs; [
'') pinentry-gnome3
(writeShellScriptBin "davmail-setup" '' gnome.seahorse
systemctl --user restart davmail # Ensure config file is present ffmpeg
systemctl --user stop davmail evince
${davmail}/bin/davmail -n ~/.davmail.properties libreoffice-fresh
systemctl --user restart davmail inkscape
'') webcord
]; teams-for-linux
grim
slurp
swayimg
swaybg
(writeShellScriptBin "protonmail-setup-bridge" ''
pkill -9 -f protonmail-bridge
${protonmail-bridge}/bin/protonmail-bridge -c
swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n"
'')
(writeShellScriptBin "davmail-setup" ''
systemctl --user restart davmail # Ensure config file is present
systemctl --user stop davmail
${davmail}/bin/davmail -n ~/.davmail.properties
systemctl --user restart davmail
'')
];
};
services = { services = {
avizo.enable = true; avizo.enable = true;
gpg-agent.pinentryPackage = pkgs.pinentry-gtk2; gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
syncthing.enable = true; syncthing.enable = true;
kdeconnect = { kdeconnect = {
enable = true; enable = true;
@ -66,14 +82,6 @@
then "Papirus-Light" then "Papirus-Light"
else "Papirus-Dark"; else "Papirus-Dark";
}; };
cursorTheme = {
package = pkgs.volantes-cursors;
name =
if config.scheme.variant == "light"
then "volantes_cursors"
else "volantes_light_cursors";
size = 32;
};
theme = { theme = {
package = pkgs.gnome.gnome-themes-extra; package = pkgs.gnome.gnome-themes-extra;
name = name =

View file

@ -39,7 +39,7 @@
}; };
border = { border = {
width = 1; width = 1;
radius = 10; radius = 5;
}; };
}; };
}; };

View file

@ -19,7 +19,7 @@
progressColor = "over ${sc.red}ff"; progressColor = "over ${sc.red}ff";
backgroundColor = "${sc.base00}cc"; backgroundColor = "${sc.base00}cc";
borderColor = "${sc.${accentColourName}}ff"; borderColor = "${sc.${accentColourName}}ff";
borderRadius = 10; borderRadius = 5;
borderSize = 1; borderSize = 1;
defaultTimeout = 0; defaultTimeout = 0;
}; };

View file

@ -72,6 +72,6 @@ in {
"x-scheme-handler/ms-powerpoint" = ["impress.desktop"]; "x-scheme-handler/ms-powerpoint" = ["impress.desktop"];
"x-scheme-handler/ms-excel" = ["calc.desktop"]; "x-scheme-handler/ms-excel" = ["calc.desktop"];
"x-scheme-handler/msteams" = ["teams-for-linux.desktop"] ++ browser; "x-scheme-handler/msteams" = ["teams-for-linux.desktop"] ++ browser;
"x-scheme-handler/zoomus" = ["Zoom.desktop"] ++ browser; "x-scheme-handler/zoomus" = browser;
"x-scheme-handler/zoommtg" = ["Zoom.desktop"] ++ browser; "x-scheme-handler/zoommtg" = browser;
} }

View file

@ -57,7 +57,7 @@
width = mkLiteral "75%"; width = mkLiteral "75%";
border = mkLiteral "1px"; border = mkLiteral "1px";
border-color = border; border-color = border;
border-radius = mkLiteral "10px"; border-radius = mkLiteral "5px";
background-color = bg; background-color = bg;
}; };
@ -70,7 +70,7 @@
background-color = bg2; background-color = bg2;
padding = mkLiteral "6px"; padding = mkLiteral "6px";
text-color = blue; text-color = blue;
border-radius = mkLiteral "10px"; border-radius = mkLiteral "5px";
margin = mkLiteral "20px 0px 0px 20px"; margin = mkLiteral "20px 0px 0px 20px";
}; };
@ -103,7 +103,7 @@
"element selected" = { "element selected" = {
background-color = bg2; background-color = bg2;
text-color = blue; text-color = blue;
border-radius = mkLiteral "10px"; border-radius = mkLiteral "5px";
}; };
mode-switcher = { mode-switcher = {
@ -113,7 +113,7 @@
button = { button = {
padding = mkLiteral "10px"; padding = mkLiteral "10px";
text-color = fg2; text-color = fg2;
border-radius = mkLiteral "10px"; border-radius = mkLiteral "5px";
vertical-align = mkLiteral "0.5"; vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.5"; horizontal-align = mkLiteral "0.5";
}; };

View file

@ -5,7 +5,12 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: { }: let
set-background = pkgs.writeShellScriptBin "set-background" ''
${pkgs.swaybg}/bin/swaybg -m fill -i ${./wallpapers/landscapes/tropic_island_day.jpg}
'';
in {
home.packages = [set-background];
programs.waybar.systemd.target = "sway-session.target"; programs.waybar.systemd.target = "sway-session.target";
services.kanshi.systemdTarget = "sway-session.target"; services.kanshi.systemdTarget = "sway-session.target";
wayland.windowManager.sway = { wayland.windowManager.sway = {
@ -81,8 +86,7 @@
}; };
startup = [ startup = [
{command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";} {command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";}
{command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n";} {command = "${set-background}/bin/set-background";}
{command = "set-background";}
]; ];
window = { window = {
border = 1; border = 1;
@ -159,23 +163,22 @@
extraConfig = '' extraConfig = ''
bindgesture swipe:right workspace prev bindgesture swipe:right workspace prev
bindgesture swipe:left workspace next bindgesture swipe:left workspace next
corner_radius 10 corner_radius 5
blur enable blur enable
blur_xray disable blur_xray disable
blur_passes 3 blur_passes 3
blur_radius 5 blur_radius 5
corner_radius 10 shadows enable
shadows disable shadow_blur_radius 5
shadow_blur_radius 0 layer_effects "system-menu" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "system-menu" blur enable; shadows disable layer_effects "gtk-layer-shell" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "gtk-layer-shell" blur enable; shadows disable layer_effects "notifications" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "notifications" blur enable; shadows disable layer_effects "launcher" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "launcher" blur enable; shadows disable layer_effects "logout_dialog" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "logout_dialog" blur enable; shadows disable layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "waybar" blur enable; shadows disable layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "avizo" blur enable; shadows disable layer_effects "swaync-notification-window" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "swaync-notification-window" blur enable; shadows disable layer_effects "swaync-control-center" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "swaync-control-center" blur enable; shadows disable
titlebar_separator enable titlebar_separator enable
''; '';
}; };

View file

@ -20,7 +20,7 @@
} }
.floating-notifications.background .notification-row .notification-background { .floating-notifications.background .notification-row .notification-background {
border-radius: 10px; border-radius: 5px;
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${sc.${accentColourName}};
margin: 18px; margin: 18px;
background-color: ${alpha-background}; background-color: ${alpha-background};
@ -33,7 +33,7 @@
.notification-background .notification-background
.notification { .notification {
padding: 7px; padding: 7px;
border-radius: 10px; border-radius: 5px;
} }
.floating-notifications.background .floating-notifications.background
@ -87,7 +87,7 @@
> *:last-child > *:last-child
> * > *
.notification-action { .notification-action {
border-radius: 10px; border-radius: 5px;
background-color: ${sc.base01}; background-color: ${sc.base01};
color: ${sc.base05}; color: ${sc.base05};
margin: 7px; margin: 7px;
@ -121,7 +121,7 @@
.close-button { .close-button {
margin: 7px; margin: 7px;
padding: 2px; padding: 2px;
border-radius: 10px; border-radius: 5px;
background-color: ${sc.red}; background-color: ${sc.red};
color: ${sc.base00}; color: ${sc.base00};
} }
@ -143,7 +143,7 @@
} }
.control-center { .control-center {
border-radius: 10px; border-radius: 5px;
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${sc.${accentColourName}};
margin: 18px; margin: 18px;
background-color: ${alpha-background}; background-color: ${alpha-background};
@ -174,7 +174,7 @@
} }
.control-center .notification-row .notification-background { .control-center .notification-row .notification-background {
border-radius: 10px; border-radius: 5px;
background-color: ${sc.base01}; background-color: ${sc.base01};
color: ${sc.base05}; color: ${sc.base05};
margin-top: 14px; margin-top: 14px;

View file

@ -15,7 +15,7 @@
settings.main = { settings.main = {
name = "main"; name = "main";
layer = "top"; layer = "top";
position = "bottom"; position = "top";
# Layout # Layout
"modules-left" = [ "modules-left" = [
"sway/workspaces" "sway/workspaces"
@ -64,7 +64,6 @@
"rewrite" = { "rewrite" = {
"(.*) - GNU Emacs at (.*)" = " $1 [$2]"; "(.*) - GNU Emacs at (.*)" = " $1 [$2]";
"(alacritty.*)" = " $1"; "(alacritty.*)" = " $1";
"(foot.*)" = " $1";
"(.*) - mpv" = "󰦟 $1"; "(.*) - mpv" = "󰦟 $1";
"swayimg: (.*)" = "󰋩 $1"; "swayimg: (.*)" = "󰋩 $1";
"(btm)" = " Resource Usage [$1]"; "(btm)" = " Resource Usage [$1]";
@ -260,16 +259,16 @@
window > box { window > box {
color: ${sc.base05}; color: ${sc.base05};
background: alpha(${sc.base00}, ${alpha}); background: alpha(${sc.base00}, ${alpha});
margin: 0px 5px 5px; margin: 5px 5px 0px;
padding: 0px; padding: 0px;
border-top: 1px solid ${sc.base04}; border-top: 1px solid ${sc.base04};
border-radius: 10px; border-radius: 5px;
} }
tooltip { tooltip {
background: ${sc.base00}; background: ${sc.base00};
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${sc.${accentColourName}};
border-radius: 10px; border-radius: 5px;
box-shadow: none; box-shadow: none;
} }

View file

@ -1,10 +1 @@
{pkgs, ...}: { {...}: {}
home.packages = with pkgs;
with kdePackages; [
blender
freecad
prusa-slicer
ktorrent
noson
];
}

View file

@ -1,6 +1,6 @@
HOSTS=("$@") HOSTS=("$@")
# Config files # Config files
for TARGET in bat bottom git starship.toml; do for TARGET in bat starship.toml; do
SOURCE="$HOME/.config/$TARGET" SOURCE="$HOME/.config/$TARGET"
echo "--- $SOURCE ---" echo "--- $SOURCE ---"
TMP_TARGET=/tmp/rsync-local-config TMP_TARGET=/tmp/rsync-local-config

View file

@ -1,19 +1,30 @@
{ {
config,
pkgs, pkgs,
hostname,
... ...
}: { }: {
home.packages = with pkgs; [protonmail-bridge-gui]; home.packages = with pkgs; [
protonmail-bridge-gui
(writeShellScriptBin "mbsync-ensure-pass"
(builtins.readFile ./mbsync-ensure-pass.sh))
(writeShellScriptBin "davmail-setup" ''
systemctl --user restart davmail # Ensure config file is present
systemctl --user stop davmail
${davmail}/bin/davmail -n ~/.davmail.properties
systemctl --user restart davmail
'')
];
accounts.email = { accounts.email = {
maildirBasePath = "Mail"; maildirBasePath = "Mail";
accounts = let accounts = let
realName = "Evie Litherland-Smith"; realName = "Evie Litherland-Smith";
in { in {
proton = let proton = let
address = "e.litherlandsmith@proton.me";
host = "127.0.0.1"; host = "127.0.0.1";
tls.enable = false; tls.enable = false;
in rec { in {
inherit realName; inherit realName address;
primary = true; primary = true;
maildir.path = "Proton"; maildir.path = "Proton";
imap = { imap = {
@ -24,10 +35,9 @@
inherit host tls; inherit host tls;
port = 1025; port = 1025;
}; };
address = "e.litherlandsmith@proton.me";
aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"]; aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"];
userName = address; userName = address;
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostname}/proton | head -n1"; passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
mu.enable = true; mu.enable = true;
msmtp = { msmtp = {
enable = true; enable = true;
@ -46,15 +56,16 @@
extraConfig.account.AuthMechs = "LOGIN"; extraConfig.account.AuthMechs = "LOGIN";
}; };
}; };
icloud = rec { icloud = let
inherit realName; address = "e.litherlandsmith@icloud.com";
in {
inherit realName address;
primary = false; primary = false;
maildir.path = "iCloud"; maildir.path = "iCloud";
imap.host = "imap.mail.me.com"; imap.host = "imap.mail.me.com";
smtp.host = "smtp.mail.me.com"; smtp.host = "smtp.mail.me.com";
address = "e.litherlandsmith@icloud.com";
userName = address; userName = address;
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostname}/icloud | head -n1"; passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
mu.enable = true; mu.enable = true;
msmtp.enable = true; msmtp.enable = true;
mbsync = { mbsync = {
@ -66,6 +77,50 @@
subFolders = "Verbatim"; subFolders = "Verbatim";
}; };
}; };
outlook = let
address = "evie.litherland-smith@ukaea.uk";
host = "127.0.0.1";
tls.enable = false;
in {
inherit realName address;
primary = false;
maildir.path = "Outlook";
imap = {
inherit host tls;
port = 1144;
};
smtp = {
inherit host tls;
port = 1026;
};
aliases = ["elitherl@jet.uk"];
userName = address;
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
mu.enable = true;
msmtp = {
enable = true;
extraConfig = {
tls = "off";
auth = "login";
};
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns = [
"*"
"!Conversation History"
"!Snoozed"
"!Social Activity Notifications"
"!Sync Issues*"
"!Unsent Messages"
];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
};
}; };
}; };
programs = { programs = {
@ -76,7 +131,24 @@
groups.inboxes = { groups.inboxes = {
proton = ["INBOX"]; proton = ["INBOX"];
icloud = ["INBOX"]; icloud = ["INBOX"];
outlook = ["INBOX"];
}; };
}; };
}; };
systemd.user.services.davmail = {
Unit = {
Description = "Davmail server";
Wants = ["network-online.target"];
After = ["network-online.target"];
};
Service = {
Environment = ["PATH=/run/current-system/sw/bin/:$PATH"];
Restart = "always";
ExecStartPre = with config.home; ''
/bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${./davmail.properties} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties"
'';
ExecStart = "${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties";
};
Install.WantedBy = ["default.target"];
};
} }

View file

@ -0,0 +1,15 @@
EMAIL_ADDRESSES=(
e.litherlandsmith@proton.me
e.litherlandsmith@icloud.com
evie.litherland-smith@ukaea.uk
)
LABELS=("Proton" "iCloud" "Outlook")
for i in "${!EMAIL_ADDRESSES[@]}"; do
ADDRESS="${EMAIL_ADDRESSES[$i]}"
LABEL="${LABELS[$i]}"
secret-tool lookup email "$ADDRESS" >/dev/null || (
echo "Setup $LABEL"
secret-tool store --label="$LABEL mail mbsync" email "$ADDRESS"
)
done

View file

@ -1,77 +0,0 @@
{
config,
pkgs,
hostname,
...
}: {
imports = [./default.nix];
home.packages = with pkgs; [
(writeShellScriptBin "davmail-setup" ''
systemctl --user restart davmail # Ensure config file is present
systemctl --user stop davmail
${davmail}/bin/davmail -n ~/.davmail.properties
systemctl --user restart davmail
'')
];
accounts.email.accounts.outlook = let
host = "127.0.0.1";
tls.enable = false;
in rec {
inherit (config.accounts.email.accounts.proton) realName;
primary = false;
maildir.path = "Outlook";
imap = {
inherit host tls;
port = 1144;
};
smtp = {
inherit host tls;
port = 1026;
};
address = "evie.litherland-smith@ukaea.uk";
aliases = ["elitherl@jet.uk"];
userName = address;
passwordCommand = "${pkgs.pass}/bin/pass show mbsync/${hostname}/outlook | head -n1";
mu.enable = true;
msmtp = {
enable = true;
extraConfig = {
tls = "off";
auth = "login";
};
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns = [
"*"
"!Conversation History"
"!Snoozed"
"!Social Activity Notifications"
"!Sync Issues*"
"!Unsent Messages"
];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
};
programs.mbsync.groups.inboxes.outlook = ["INBOX"];
systemd.user.services.davmail = {
Unit = {
Description = "Davmail server";
Wants = ["network-online.target"];
After = ["network-online.target"];
};
Service = {
Environment = ["PATH=/run/current-system/sw/bin/:$PATH"];
Restart = "always";
ExecStartPre = with config.home; ''
/bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${./davmail.properties} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties"
'';
ExecStart = "${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties";
};
Install.WantedBy = ["default.target"];
};
}

View file

@ -18,9 +18,6 @@
PASSWORD_STORE_ENABLE_EXTENSIONS = "true"; PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
}; };
}; };
git.extraConfig.credential = {
helper = "${pkgs.pass-git-helper}/bin/pass-git-helper";
};
}; };
services = { services = {
gpg-agent = rec { gpg-agent = rec {

View file

@ -1,10 +1,14 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: { }: {
services.git-sync.enable = false; # Can't find pass for some reason... services.git-sync.enable = false; # Can't find pass for some reason...
programs.git = { programs.git = let
package = pkgs.gitFull;
in {
inherit package;
enable = true; enable = true;
userName = "Evie Litherland-Smith"; userName = "Evie Litherland-Smith";
userEmail = lib.mkDefault "evie@xenia.me.uk"; userEmail = lib.mkDefault "evie@xenia.me.uk";
@ -30,6 +34,7 @@
pull.rebase = false; pull.rebase = false;
init.defaultBranch = "main"; init.defaultBranch = "main";
merge.conflictstyle = "diff3"; merge.conflictstyle = "diff3";
credential.helper = "${package}/bin/git-credential-libsecret";
diff = { diff = {
colorMoved = "default"; colorMoved = "default";
gpg.textconv = "gpg --no-tty --decrypt"; gpg.textconv = "gpg --no-tty --decrypt";

View file

@ -1,4 +1,5 @@
{ {
config,
lib, lib,
pkgs, pkgs,
... ...
@ -11,6 +12,7 @@
sessionVariables = { sessionVariables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim"; GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim";
QT_QPA_PLATFORM = lib.mkIf config.programs.sway.enable "wayland";
}; };
systemPackages = with pkgs; [ systemPackages = with pkgs; [
xdg-utils xdg-utils
@ -31,7 +33,17 @@
}; };
security = { security = {
polkit.enable = true; polkit.enable = true;
pam.services.swaylock = {}; pam = {
services.swaylock = {};
loginLimits = [
{
domain = "@users";
item = "rtprio";
type = "-";
value = 1;
}
];
};
}; };
programs = { programs = {
dconf.enable = true; dconf.enable = true;
@ -41,7 +53,10 @@
file-roller.enable = true; file-roller.enable = true;
thunar = { thunar = {
enable = true; enable = true;
plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman]; plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
}; };
sway = { sway = {
enable = true; enable = true;
@ -59,8 +74,8 @@
gtk.iconCache.enable = true; gtk.iconCache.enable = true;
qt = { qt = {
enable = true; enable = true;
platformTheme = "gnome";
style = "adwaita"; style = "adwaita";
platformTheme = "gnome";
}; };
services = { services = {
dbus.packages = with pkgs; [gcr]; dbus.packages = with pkgs; [gcr];