This commit is contained in:
Andrea Ciceri 2022-11-25 14:12:27 +01:00
parent df63ea2968
commit a1d45d7303
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
21 changed files with 202 additions and 142 deletions

View file

@ -78,6 +78,7 @@ in {
path = ../../doom.d/modules;
}
];
extraPackages = with pkgs; [mu];
};
services.emacs = {
@ -104,16 +105,23 @@ in {
nixpkgs-fmt <<< /dev/stdin
fi
'';
in [
binutils
(ripgrep.override {withPCRE2 = true;})
gnutls
fd
imagemagick
sqlite
maim
nixFormat
jq
xclip
];
in
[
binutils
(ripgrep.override {withPCRE2 = true;})
gnutls
fd
imagemagick
sqlite
maim
nil
nixFormat
jq
xclip
hunspell
]
++ (with hunspellDicts; [
en_US-large
it_IT
]);
}

View file

@ -0,0 +1,53 @@
{
pkgs,
secrets,
...
}: {
home.packages = with pkgs; [mu];
programs.mbsync.enable = true;
programs.msmtp.enable = true;
programs.notmuch = {
enable = true;
hooks = {
preNew = "mbsync --all";
};
};
services = {
mbsync = {
enable = true;
frequency = "*:0/15";
preExec = "${pkgs.isync}/bin/mbsync -Ha";
# First time run: mu init --maildir ~/.mail --my-address andrea.ciceri@autistici.org
# TODO Nixify this
postExec = "${pkgs.mu}/bin/mu index";
};
};
accounts.email = {
maildirBasePath = ".mail";
accounts.autistici = {
address = "andrea.ciceri@autistici.org";
gpg = {
key = "7A66EEA1E6C598D07D361287A1FC89532D1C565";
signByDefault = true;
};
imap.host = "mail.autistici.org";
mbsync = {
enable = true;
create = "maildir";
};
msmtp.enable = true;
notmuch.enable = true;
primary = true;
realName = "Andrea Ciceri";
signature = {
# text = '''';
showSignature = "append";
};
passwordCommand = "${pkgs.pass}/bin/pass show autistici/password";
smtp = {
host = "smtp.autistici.org";
};
userName = "andrea.ciceri@autistici.org";
};
};
}

View file

@ -2,7 +2,6 @@
programs.firefox = {
enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
forceWayland = true;
extraPolicies = {
ExtensionSettings = {};
};

View file

@ -1,8 +1,4 @@
{
config,
lib,
...
}: {
programs.foot = {
enable = true;
server.enable = true;
@ -11,7 +7,6 @@
term = "xterm-256color";
login-shell = "yes";
font = "Fira Code,Symbols Nerd Font,JoyPixels";
dpi-aware = "yes";
};
mouse = {

View file

@ -1,18 +0,0 @@
{pkgs, ...}: {
home.packages = [pkgs.franz];
systemd.user.services.franz = {
Install.WantedBy = ["graphical-session.target"];
Unit = {
Description = "Franz";
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${pkgs.franz}/bin/franz";
Restart = "on-failure";
RestartSec = 3;
};
};
}

View file

@ -3,11 +3,6 @@
pkgs,
...
}: {
programs.nix-index = {
enable = true;
enableZshIntegration = true;
};
systemd.user.services.nix-index-update = {
Unit = {Description = "Update nix-index";};

View file

@ -9,6 +9,7 @@
settings = {
PASSWORD_STORE_DIR = "/home/ccr/.password-store";
};
package = pkgs.pass.withExtensions (e: with e; [pass-otp]);
};
services.password-store-sync.enable = true;
}

View file

@ -25,37 +25,44 @@
programs.vim.enable = true;
programs.command-not-found.enable = true;
programs.starship = {
enable = true;
settings = {
character = {
success_symbol = "[λ](bold green)";
error_symbol = "[λ](bold red)";
};
nix_shell = {
symbol = "";
};
};
};
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
enableVteIntegration = true;
autocd = true;
plugins = [
{
name = "nix-zsh-completions";
file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh";
src = pkgs.nix-zsh-completions;
}
{
name = "spaceship";
file = "share/zsh/themes/spaceship.zsh-theme";
src = pkgs.spaceship-prompt;
}
{
name = "fast-zsh-syntax-highlighting";
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
src = pkgs.zsh-fast-syntax-highlighting;
}
];
oh-my-zsh = {
enable = true;
plugins = [
"git"
"sudo"
"ag"
"cabal"
"colored-man-pages"
"colorize"
"thefuck"
"command-not-found"
"fzf"
"git"
"nomad"
"pass"
"python"
"sudo"
"terraform"
"thefuck"
];
};
shellAliases = {
@ -65,15 +72,6 @@
"pass-clone" = "[ -d .password-store ] && echo 'Password store archive already exists' || git clone git@git.sr.ht:~zrsk/pass ~/.password-store";
"getpass" = "pass show $(find .password-store/ -name \"*.gpg\" | sed \"s/\\.password-store\\/\\(.*\\)\\.gpg$/\\1/g\" | fzf) | wl-copy; ((sleep 60 && wl-copy --clear) &)";
};
localVariables = {
PASSWORD_STORE_DIR = "/home/ccr/.password-store";
SPACESHIP_CHAR_SYMBOL = "λ ";
SPACESHIP_TIME_SHOW = "true";
SPACESHIP_USER_SHOW = "always";
SPACESHIP_HOST_SHOW = "always";
NIX_BUILD_SHELL = "${pkgs.zsh-nix-shell}/scripts/buildShellShim.zsh";
PROMPT = "\\\${IN_NIX_SHELL:+[nix-shell] }$PROMPT";
};
loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec sway";
envExtra = ''
[ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' # for Emacs TRAMP mode
@ -84,5 +82,8 @@
thefuck
htop-vim
dig.dnsutils
zsh-completions
nix-zsh-completions
gnuapl
];
}

View file

@ -29,7 +29,7 @@
};
};
# TODO check if work (just wait?)
# TODO check if it works (just wait?)
services.swayidle.enable = true;
wayland = {
@ -62,7 +62,6 @@
"1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}];
"2" = [{title = "^((?!qutebrowser-editor).)*Emacs$";}];
"3" = [{title = "Slack.*";}];
"8" = [{title = "^Franz$";}];
"9" = [{title = "^Element.*";}];
};
floating.criteria = [
@ -89,12 +88,16 @@
${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename"
wl-copy -t video/mp4 < $filename
'';
emacsclientAsTerminal = pkgs.writeShellScript "emacsclientAsTerminal" ''
emacsclient -c -F '\\'(name . "VTerm"))' -q --eval '\\'(vterm "/bin/zsh")'
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c";
"${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}";
"${modifier}+g" = "exec ${screenrecordingScript}";
# "${modifier}+Shift+Enter" = "exec ${emacsclientAsTerminal}"; # FIXME
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
};

View file

@ -1,67 +1,39 @@
* {
border: none;
font-family: "Fira Code, Symbols Nerd Font";
font-weight: normal;
font-size: 9pt;
min-height: 0;
border: none;
border-radius: 0;
min-height: 0;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window .modules-right :not(image) { /* :not(image) excluded tray icon */
margin: 0 1rem;
}
window#waybar.hidden {
opacity: 0.2;
background: @theme_bg_color;
color: @theme_fg_color;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button label {
font-size: 25px;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.current_output {
border-bottom: 3px solid #64727D;
padding: 0 10px;
/* background: transparent; */
/* color: @theme_fg_color; */
}
#workspaces button.focused {
background-color: #64727D;
}
#workspaces button.focused.current_output {
border-bottom: 3px solid #ffffff;
/* background: @theme_bg_color; */
border-bottom: 3px solid @theme_fg_color;
/* color: @theme_fg_color; */
}
#workspaces button.urgent {
background-color: #eb4d4b;
/* background: @theme_fg_color; */
/* color: @theme_selected_bg_color; */
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
#mode {
margin: 0 4px;
padding: 0 4px;
/* background: @theme_fg_color; */
/* color: @unfocused_borders; */
}
label:focus {
background-color: #000000;
#pulseaudio, #network, #cpu, #memory, #disk, #temperature, #battery, #language, #clock, #tray {
margin: 0 4px;
padding: 0 2px;
}

View file

@ -34,10 +34,8 @@
"1" = "";
"2" = "";
"3" = "";
"8" = "";
"9" = "";
urgent = "";
default = "";
};
sort-by-number = true;
};