Email, nvim->vim, torrenting fixes, musical rice

This commit is contained in:
kat witch 2021-03-12 16:20:27 +00:00
parent 7d899adde6
commit f16cf48dd6
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
18 changed files with 328 additions and 47 deletions

View file

@ -3,6 +3,7 @@
{
imports = [
./hardware.nix
../../services/nginx.nix
#./wireguard.nix
];
@ -25,6 +26,7 @@
defaultGateway = "104.244.73.1";
nameservers = [ "1.1.1.1" ];
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
system.stateVersion = "20.09";
}

View file

@ -25,7 +25,7 @@
networking.useDHCP = false;
networking.interfaces.enp34s0.useDHCP = true;
networking.firewall.allowPing = true;
networking.firewall.allowedTCPPorts = [ 445 139 9091 ]; # smb transmission
networking.firewall.allowedTCPPorts = [ 80 445 139 9091 ]; # smb transmission
networking.firewall.allowedUDPPorts = [ 137 138 4010 ]; # smb scream
system.stateVersion = "20.09";

View file

@ -17,8 +17,8 @@
home = "/disks/pool-raw/transmission";
downloadDirPermissions = "777";
settings = {
download-dir = "/disks/pool-raw/Public/Media/";
incomplete-dir = "/disks/pool-raw/Public/Media/.incomplete";
download-dir = "/disks/pool-raw/media/";
incomplete-dir = "/disks/pool-raw/media/.incomplete";
incomplete-dir-enabled = true;
rpc-bind-address = "0.0.0.0";
rpc-whitelist = "127.0.0.1,192.168.1.*,192.168.122.*";
@ -47,7 +47,7 @@
'';
shares = {
media = {
path = "/disks/pool-raw/Public/Media";
path = "/disks/pool-raw/media";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
@ -62,7 +62,13 @@
services.nginx.virtualHosts = {
"192.168.1.135" = {
locations."/share/" = {
alias = "/disks/pool-raw/Public/Media/";
alias = "/disks/pool-raw/media/";
extraConfig = "autoindex on;";
};
};
"100.103.111.44" = {
locations."/share/" = {
alias = "/disks/pool-raw/media/";
extraConfig = "autoindex on;";
};
};

View file

@ -15,6 +15,7 @@ in {
specialArgs = {
inherit sources witch;
superConfig = config;
modulesPath = sources.home-manager + "/modules";
};
});
};

View file

@ -5,6 +5,7 @@
./firefox
./kitty.nix
./packages.nix
./email.nix
./nextcloud.nix
./gpg.nix
./gtk.nix

View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
{
programs.notmuch = {
enable = true;
hooks = {
preNew = "mbsync --all";
};
};
programs.mbsync.enable = true;
programs.msmtp.enable = true;
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
passwordCommand = ''bitw -p gpg://${../../../private/files/master.gpg} get "kittywitch email"'';
msmtp.enable = true;
mbsync.enable = true;
mbsync.create = "maildir";
notmuch.enable = true;
imap.host = "kittywit.ch";
smtp.host = "kittywit.ch";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
};
};
programs.vim.plugins = [ pkgs.arc.pkgs.vimPlugins.notmuch-vim ];
}

View file

@ -4,7 +4,7 @@
config = lib.mkIf config.deploy.profile.gui {
programs.ncmpcpp = {
enable = true;
mpdMusicDir = "/home/kat/music";
mpdMusicDir = "/home/kat/media/music";
settings = {
visualizer_data_source = "/tmp/mpd.fifo";
visualizer_output_name = "my_fifo";
@ -16,23 +16,25 @@
discard_colors_if_item_is_selected = "no";
header_window_color = "250";
volume_color = "250";
state_line_color = "cyan";
state_line_color = "cyan";
state_flags_color = "cyan";
alternative_ui_separator_color = "yellow";
statusbar_color = "yellow";
progressbar_color = "black";
progressbar_elapsed_color = "blue";
window_border_color = "yellow";
playlist_display_mode = "classic";
song_columns_list_format =
"(3f)[cyan]{n} (40)[default]{t|f} (25)[red]{a} (30)[blue]{b} (4f)[cyan]{l}";
now_playing_prefix = "$b";
song_list_format =
"$1$9%l$1$9 $8¦$9 $6%a$9 $8¦$9 $5%b$9 $R$1$9%t$1$9 $8¦$9 $7%n$9";
" $7%n$9 $8-$9 $1$9%l$1$9 $8-$9 $6%a$9 $8-$9 $5%b$9 $R$8%t$9 ";
song_library_format = "{%n > }{%t}|{%f}";
song_status_format = "{%a - }{%t - }{%b}";
titles_visibility = "no";
header_visibility = "no";
statusbar_visibility = "no";
now_playing_suffix = "$8$/b";
now_playing_suffix = "$/b";
progressbar_look = " ";
};
};
@ -40,7 +42,7 @@
enable = true;
package = pkgs.unstable.beets;
settings = {
directory = "~/music";
directory = "~/media/music";
library = "~/.local/share/beets.db";
plugins = lib.concatStringsSep " " [
"mpdstats"
@ -53,7 +55,7 @@
services.mpd = {
enable = true;
network.startWhenNeeded = true;
musicDirectory = "/home/kat/music";
musicDirectory = "/home/kat/media/music";
extraConfig = ''
audio_output {
type "fifo"

View file

@ -5,12 +5,14 @@
home.packages = with pkgs; [
_1password
bitwarden
arc.pkgs.rbw-bitw
mpv
element-desktop
mumble
obs-studio
niv
xfce.ristretto
feh
duc
audacity
avidemux
vlc

View file

@ -3,7 +3,7 @@
{
imports = [
./shell.nix
./neovim
./vim
./git.nix
./tmux.nix
./ssh.nix

View file

@ -1,32 +0,0 @@
{ config, lib, pkgs, witch, ... }:
{
config = lib.mkIf config.deploy.profile.kat {
home.sessionVariables.EDITOR = "nvim";
programs.neovim = {
enable = true;
withPython3 = true;
plugins = with pkgs.vimPlugins; [
nerdtree
vim-nix
coc-nvim
coc-yank
coc-python
coc-json
coc-yaml
coc-git
vim-fugitive
{
plugin = vim-startify;
config = "let g:startify_change_to_vcs_root = 0";
}
];
extraPackages = with pkgs;
[ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs; };
};
xdg.configFile."nvim/coc-settings.json".text =
builtins.readFile ./coc-settings.json;
};
}

View file

@ -0,0 +1,34 @@
{ config, lib, pkgs, witch, ... }:
{
config = lib.mkIf config.deploy.profile.kat {
home.sessionVariables.EDITOR = "vim";
programs.vim = {
enable = true;
package = pkgs.arc.pkgs.vim_configurable-pynvim;
#withPython3 = true;
plugins = with pkgs.vimPlugins; [
nerdtree
vim-nix
coc-nvim
coc-yank
coc-python
coc-json
coc-yaml
coc-git
vim-fugitive
vim-startify
];
#extraPackages = with pkgs;
# [ (python3.withPackages (ps: with ps; [ black flake8 ])) ];
#extraPython3Packages = (ps: with ps; [ jedi pylint ]);
extraConfig = import ./vimrc.nix { inherit pkgs config; };
};
xdg.configFile = {
"vim/undo/.keep".text = "";
"vim/swap/.keep".text = "";
"vim/backup/.keep".text = "";
"nvim/coc-settings.json".text = builtins.readFile ./coc-settings.json;
};
};
}

View file

@ -1,4 +1,4 @@
{ pkgs }:
{ config, pkgs }:
''
" Set internal encoding of vim, not needed on neovim, since coc.nvim using some
@ -8,11 +8,28 @@
" Enable mouse
set mouse=a
" notmuch!
let g:notmuch_config_file='${config.xdg.configHome}/notmuch/notmuchrc'
let g:notmuch_folders_count_threads=0
let g:notmuch_date_format='%y-%m-%d %H:%M'
let g:notmuch_datetime_format='%y-%m-%d %H:%M'
let g:notmuch_show_date_format='%Y/%m/%d %H:%M'
let g:notmuch_search_date_format='%Y/%m/%d %H:%M'
let g:notmuch_html_converter='${pkgs.elinks}/bin/elinks --dump'
" Line numbers!
set number
" Open NERDTree at start
autocmd VimEnter * NERDTree | wincmd p
let g:coc_node_path='${pkgs.nodejs}/bin/node'
" idk but this means .swp isn't everywhere
set undodir=$XDG_DATA_HOME/vim/undo
set directory=$XDG_DATA_HOME/vim/swap//
set backupdir=$XDG_DATA_HOME/vim/backup
" TextEdit might fail if hidden is not set.
set hidden