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

@ -32,7 +32,8 @@
;; There are two ways to load a theme. Both assume the theme is installed and ;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the ;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default: ;; `load-theme' function. This is the default:
(setq doom-theme 'doom-one) ;; (setq doom-theme 'doom-one)
(setq doom-theme 'doom-one-light)
;; This determines the style of line numbers in effect. If set to `nil', line ;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'. ;; numbers are disabled. For relative line numbers, set this to `relative'.
@ -117,3 +118,24 @@
("[-]" "") ("[-]" "")
("#+begin_src" "λ") ("#+begin_src" "λ")
("#+end_src" "λ")))) ("#+end_src" "λ"))))
(setq +mu4e-backend 'mbsync)
(after! mu4e
(setq sendmail-program (executable-find "msmtp")
send-mail-function #'smtpmail-send-it
message-sendmail-f-is-evil t
message-sendmail-extra-arguments '("--read-envelope-from")
message-send-mail-function #'message-send-mail-with-sendmail))
(set-email-account! "Autistici"
'((mu4e-sent-folder . "/autistici/Sent Mail")
(mu4e-drafts-folder . "/autistici/Drafts")
(mu4e-trash-folder . "/autistici/Trash")
(mu4e-refile-folder . "/autistici/All Mail")
(smtpmail-smtp-user . "andrea.ciceri@autistici.org"))
t)
(after! eglot
(add-to-list 'eglot-server-programs '(nix-mode . ("nil")))
)

View file

@ -178,7 +178,7 @@
;;zig ; C, but simpler ;;zig ; C, but simpler
:email :email
;;(mu4e +org +gmail) (mu4e +org)
;;notmuch ;;notmuch
;;(wanderlust +gmail) ;;(wanderlust +gmail)

View file

@ -2,17 +2,17 @@
description = "A complete, declarative, and reproducible configuration of my entire Nix fleet"; description = "A complete, declarative, and reproducible configuration of my entire Nix fleet";
inputs = { inputs = {
nixpkgsUnstable.url = github:NixOS/nixpkgs/nixos-unstable; nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgsStable.url = github:NixOS/nixpkgs/nixos-22.05; nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-22.05";
nixosHardware.url = github:NixOS/nixos-hardware; nixosHardware.url = "github:NixOS/nixos-hardware";
homeManager = { homeManager = {
url = github:nix-community/home-manager; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgsUnstable"; inputs.nixpkgs.follows = "nixpkgsUnstable";
}; };
preCommitHooks.url = github:cachix/pre-commit-hooks.nix; preCommitHooks.url = "github:cachix/pre-commit-hooks.nix";
agenix.url = github:ryantm/agenix; agenix.url = "github:ryantm/agenix";
doomEmacs.url = github:nix-community/nix-doom-emacs; doomEmacs.url = "github:nix-community/nix-doom-emacs";
comma.url = github:nix-community/comma; comma.url = "github:nix-community/comma";
}; };
outputs = {self, ...} @ inputs: let outputs = {self, ...} @ inputs: let

View file

@ -78,6 +78,7 @@ in {
path = ../../doom.d/modules; path = ../../doom.d/modules;
} }
]; ];
extraPackages = with pkgs; [mu];
}; };
services.emacs = { services.emacs = {
@ -104,16 +105,23 @@ in {
nixpkgs-fmt <<< /dev/stdin nixpkgs-fmt <<< /dev/stdin
fi fi
''; '';
in [ in
binutils [
(ripgrep.override {withPCRE2 = true;}) binutils
gnutls (ripgrep.override {withPCRE2 = true;})
fd gnutls
imagemagick fd
sqlite imagemagick
maim sqlite
nixFormat maim
jq nil
xclip 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 = { programs.firefox = {
enable = true; enable = true;
package = pkgs.wrapFirefox pkgs.firefox-unwrapped { package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
forceWayland = true;
extraPolicies = { extraPolicies = {
ExtensionSettings = {}; ExtensionSettings = {};
}; };

View file

@ -1,8 +1,4 @@
{ {
config,
lib,
...
}: {
programs.foot = { programs.foot = {
enable = true; enable = true;
server.enable = true; server.enable = true;
@ -11,7 +7,6 @@
term = "xterm-256color"; term = "xterm-256color";
login-shell = "yes"; login-shell = "yes";
font = "Fira Code,Symbols Nerd Font,JoyPixels"; font = "Fira Code,Symbols Nerd Font,JoyPixels";
dpi-aware = "yes";
}; };
mouse = { 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, pkgs,
... ...
}: { }: {
programs.nix-index = {
enable = true;
enableZshIntegration = true;
};
systemd.user.services.nix-index-update = { systemd.user.services.nix-index-update = {
Unit = {Description = "Update nix-index";}; Unit = {Description = "Update nix-index";};

View file

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

View file

@ -25,37 +25,44 @@
programs.vim.enable = true; 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 = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; enableAutosuggestions = true;
enableCompletion = true; enableCompletion = true;
enableSyntaxHighlighting = true;
enableVteIntegration = true;
autocd = 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 = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ plugins = [
"git" "ag"
"sudo" "cabal"
"colored-man-pages" "colored-man-pages"
"colorize" "colorize"
"thefuck" "command-not-found"
"fzf" "fzf"
"git"
"nomad"
"pass"
"python"
"sudo"
"terraform"
"thefuck"
]; ];
}; };
shellAliases = { 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"; "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) &)"; "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"; loginExtra = "[[ -z $DISPLAY && $TTY = /dev/tty1 ]] && exec sway";
envExtra = '' envExtra = ''
[ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' # for Emacs TRAMP mode [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' # for Emacs TRAMP mode
@ -84,5 +82,8 @@
thefuck thefuck
htop-vim htop-vim
dig.dnsutils 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; services.swayidle.enable = true;
wayland = { wayland = {
@ -62,7 +62,6 @@
"1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}]; "1" = [{title = ".*Mozilla Firefox$";} {title = ".*qutebrowser$";}];
"2" = [{title = "^((?!qutebrowser-editor).)*Emacs$";}]; "2" = [{title = "^((?!qutebrowser-editor).)*Emacs$";}];
"3" = [{title = "Slack.*";}]; "3" = [{title = "Slack.*";}];
"8" = [{title = "^Franz$";}];
"9" = [{title = "^Element.*";}]; "9" = [{title = "^Element.*";}];
}; };
floating.criteria = [ floating.criteria = [
@ -89,12 +88,16 @@
${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename" ${pkgs.wf-recorder}/bin/wf-recorder -g "$coords" -f "$filename"
wl-copy -t video/mp4 < $filename wl-copy -t video/mp4 < $filename
''; '';
emacsclientAsTerminal = pkgs.writeShellScript "emacsclientAsTerminal" ''
emacsclient -c -F '\\'(name . "VTerm"))' -q --eval '\\'(vterm "/bin/zsh")'
'';
in in
lib.mkOptionDefault { lib.mkOptionDefault {
"${modifier}+x" = "exec emacsclient -c"; "${modifier}+x" = "exec emacsclient -c";
"${modifier}+b" = "exec qutebrowser"; "${modifier}+b" = "exec qutebrowser";
"${modifier}+s" = "exec ${screenshotScript}"; "${modifier}+s" = "exec ${screenshotScript}";
"${modifier}+g" = "exec ${screenrecordingScript}"; "${modifier}+g" = "exec ${screenrecordingScript}";
# "${modifier}+Shift+Enter" = "exec ${emacsclientAsTerminal}"; # FIXME
"XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%"; "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s +5%";
"XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-"; "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl s 5%-";
}; };

View file

@ -1,67 +1,39 @@
* { * {
border: none; border: none;
font-family: "Fira Code, Symbols Nerd Font"; border-radius: 0;
font-weight: normal; min-height: 0;
font-size: 9pt;
min-height: 0;
} }
window#waybar { window#waybar {
background-color: rgba(43, 48, 59, 0.5); background: @theme_bg_color;
border-bottom: 3px solid rgba(100, 114, 125, 0.5); color: @theme_fg_color;
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;
} }
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 10px;
background-color: transparent; /* background: transparent; */
color: #ffffff; /* color: @theme_fg_color; */
}
#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;
} }
#workspaces button.focused { #workspaces button.focused {
background-color: #64727D; /* background: @theme_bg_color; */
} border-bottom: 3px solid @theme_fg_color;
/* color: @theme_fg_color; */
#workspaces button.focused.current_output {
border-bottom: 3px solid #ffffff;
} }
#workspaces button.urgent { #workspaces button.urgent {
background-color: #eb4d4b; /* background: @theme_fg_color; */
/* color: @theme_selected_bg_color; */
} }
#mode {
margin: 0 4px;
@keyframes blink { padding: 0 4px;
to { /* background: @theme_fg_color; */
background-color: #ffffff; /* color: @unfocused_borders; */
color: #000000;
}
} }
label:focus { #pulseaudio, #network, #cpu, #memory, #disk, #temperature, #battery, #language, #clock, #tray {
background-color: #000000; margin: 0 4px;
padding: 0 2px;
} }

View file

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

View file

@ -40,6 +40,7 @@
"discord" "discord"
"element" "element"
"emacs" "emacs"
"email"
"firefox" "firefox"
"git" "git"
"gpg" "gpg"
@ -53,7 +54,6 @@
"sway" "sway"
"udiskie" "udiskie"
"vscode" "vscode"
"franz"
"xdg" "xdg"
"zathura" "zathura"
]; ];

View file

@ -73,5 +73,7 @@
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.throttled.enable = true; services.throttled = {
enable = true;
};
} }

View file

@ -1,9 +1,4 @@
{ {
config,
lib,
pkgs,
...
}: {
programs.adb.enable = true; programs.adb.enable = true;
users.users.ccr.extraGroups = ["adbusers"]; users.users.ccr.extraGroups = ["adbusers"];
} }

View file

@ -64,7 +64,15 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.ccr = { home-manager.users.ccr = {
imports = fleetHmModules config.ccr.modules; imports =
fleetHmModules config.ccr.modules
++ [
{
_module.args = {
secrets = config.age.secrets;
};
}
];
home.packages = config.ccr.packages; home.packages = config.ccr.packages;
home.stateVersion = config.system.stateVersion; home.stateVersion = config.system.stateVersion;
}; };

View file

@ -0,0 +1,19 @@
age-encryption.org/v1
-> ssh-rsa QHr3/A
htmJ7Ita9rp1TshaeTq14G7Z8vUmsHG8cvcbiT+X7acGx/W79zUjM0r1KiBwyD75
SqLMhlLylaPCf7wjoL800UZ/nlQsXCCOgETKFbJH7jJIJhsYIzWOWwVScXjRNRqY
xp1Y+TTnyao0gzTv2uFJy2w2cg2VM+f+UXOeoQ6gUGxFHvwsuRDorXu2n/JHXh/R
kiNZGBi9tx93F3jAsHM6Sudq7j1HsJwQZO6vaHwuqxankHX5CpXXo8bHY1pE+smG
yO92qJ4cxSB/A9T2PXr20EDmj1Nr4pbk12Tn69GZasSKAlyUo0SDUW6BVFHwDf8E
L3K6XKyGuUcZsd5Hh26deT7kAYwUbD5Edlyhgc8Rp9/rX2qEG5i196/tLL0ngI4G
xoHwHhnVUC0IULOizzPbxtnat1cCIhcSbncKv6wnBnlXHDivJV8Vg0YGnzmYy0j8
TbVN76OsNrU8zXXTGjLO6Gp+AEPIk5Z72Snpoq5Io4H+IoNuX0hYGbMrPQg0Urnn
gM2/EN2ivCKfMMNWI6sq0FJy4IsGNsVLM98VmAh9pfWXGFjz3So9cYMwYCqG0vbP
HQQKqsmxbdJljxGix7Z5SpIl6bDuS66hJpEA6wlvGcUmXzy+kFnlTNmmFwovfotX
wIPYTJZGtXh0WNsIuVnPYSZ6MahBswKzHcI+az48PvM
-> u!n2o-grease
+fY6SvlSCYFsB0/7dxDJtw7zKufZ9LZUZ7tqVaJkdjSl9y/2fDGVQHFKFXBGhHKu
wcIB
--- hBiR9gBibjABVhE5I42l1zepYvWZq3qsqXk9Y8qlTno
ýò蹿\Ѓ-
(>2ðA…½™ä^­ l[CPW@•Ï›¹¸µdj

View file

@ -4,4 +4,5 @@ let
}; };
in { in {
"secrets/mlabs-cachix.age".publicKeys = [keys.agenix]; "secrets/mlabs-cachix.age".publicKeys = [keys.agenix];
"secrets/autistici-password.age".publicKeys = [keys.agenix];
} }

View file

@ -34,7 +34,13 @@
home-manager.users.ccr.imports = [ home-manager.users.ccr.imports = [
doomEmacs.hmModule doomEmacs.hmModule
]; ];
age.identityPaths = ["/home/ccr/.ssh/id_rsa"]; age = {
identityPaths = ["/home/ccr/.ssh/id_rsa"];
secrets = lib.mapAttrs' (name: _: {
name = lib.removeSuffix ".age" (builtins.baseNameOf name);
value.file = ./.. + "/${name}";
}) (import ../secrets);
};
nixpkgs.overlays = [agenix.overlay comma.overlays.default]; nixpkgs.overlays = [agenix.overlay comma.overlays.default];
} }
(../hosts + "/${name}") (../hosts + "/${name}")