Things
This commit is contained in:
parent
df63ea2968
commit
a1d45d7303
21 changed files with 202 additions and 142 deletions
|
@ -32,7 +32,8 @@
|
|||
;; 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
|
||||
;; `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
|
||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
|
@ -117,3 +118,24 @@
|
|||
("[-]" "❍")
|
||||
("#+begin_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")))
|
||||
)
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
(mu4e +org)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
|
|
16
flake.nix
16
flake.nix
|
@ -2,17 +2,17 @@
|
|||
description = "A complete, declarative, and reproducible configuration of my entire Nix fleet";
|
||||
|
||||
inputs = {
|
||||
nixpkgsUnstable.url = github:NixOS/nixpkgs/nixos-unstable;
|
||||
nixpkgsStable.url = github:NixOS/nixpkgs/nixos-22.05;
|
||||
nixosHardware.url = github:NixOS/nixos-hardware;
|
||||
nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-22.05";
|
||||
nixosHardware.url = "github:NixOS/nixos-hardware";
|
||||
homeManager = {
|
||||
url = github:nix-community/home-manager;
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgsUnstable";
|
||||
};
|
||||
preCommitHooks.url = github:cachix/pre-commit-hooks.nix;
|
||||
agenix.url = github:ryantm/agenix;
|
||||
doomEmacs.url = github:nix-community/nix-doom-emacs;
|
||||
comma.url = github:nix-community/comma;
|
||||
preCommitHooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
doomEmacs.url = "github:nix-community/nix-doom-emacs";
|
||||
comma.url = "github:nix-community/comma";
|
||||
};
|
||||
|
||||
outputs = {self, ...} @ inputs: let
|
||||
|
|
|
@ -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
|
||||
]);
|
||||
}
|
||||
|
|
53
hmModules/email/default.nix
Normal file
53
hmModules/email/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
forceWayland = true;
|
||||
extraPolicies = {
|
||||
ExtensionSettings = {};
|
||||
};
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,11 +3,6 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
systemd.user.services.nix-index-update = {
|
||||
Unit = {Description = "Update nix-index";};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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%-";
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -34,10 +34,8 @@
|
|||
"1" = "";
|
||||
"2" = "";
|
||||
"3" = "";
|
||||
"8" = "甆";
|
||||
"9" = "ﬧ";
|
||||
urgent = "";
|
||||
default = "";
|
||||
};
|
||||
sort-by-number = true;
|
||||
};
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
"discord"
|
||||
"element"
|
||||
"emacs"
|
||||
"email"
|
||||
"firefox"
|
||||
"git"
|
||||
"gpg"
|
||||
|
@ -53,7 +54,6 @@
|
|||
"sway"
|
||||
"udiskie"
|
||||
"vscode"
|
||||
"franz"
|
||||
"xdg"
|
||||
"zathura"
|
||||
];
|
||||
|
|
|
@ -73,5 +73,7 @@
|
|||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
services.throttled.enable = true;
|
||||
services.throttled = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.adb.enable = true;
|
||||
users.users.ccr.extraGroups = ["adbusers"];
|
||||
}
|
||||
|
|
|
@ -64,7 +64,15 @@
|
|||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
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.stateVersion = config.system.stateVersion;
|
||||
};
|
||||
|
|
19
secrets/autistici-password.age
Normal file
19
secrets/autistici-password.age
Normal 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
|
|
@ -4,4 +4,5 @@ let
|
|||
};
|
||||
in {
|
||||
"secrets/mlabs-cachix.age".publicKeys = [keys.agenix];
|
||||
"secrets/autistici-password.age".publicKeys = [keys.agenix];
|
||||
}
|
||||
|
|
|
@ -34,7 +34,13 @@
|
|||
home-manager.users.ccr.imports = [
|
||||
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];
|
||||
}
|
||||
(../hosts + "/${name}")
|
||||
|
|
Loading…
Add table
Reference in a new issue