1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat: big upgrade to 20.03

use emojis for i3status-rust
remove overlays
configure mail via home-manager
adapt to 20.03 config options
automatically symlink cloud directories into home
This commit is contained in:
Kierán Meinhardt
2020-04-22 17:42:45 +02:00
parent 49c3ab78d1
commit e21eb7887c
27 changed files with 212 additions and 375 deletions

View File

@@ -1,7 +1,7 @@
{
"url": "https://github.com/rycee/home-manager.git",
"rev": "0d1ca254d0f213a118459c5be8ae465018132f74",
"date": "2020-02-16T18:10:00+01:00",
"sha256": "0sw8lw825gg04h6js42bvackgydi5m0xsjvnb5gxlqv45qw8rxjq",
"rev": "3461ceebc01169f99362ab5cc62d26224e7886d9",
"date": "2020-04-18T11:24:11+02:00",
"sha256": "0242ibqrr8wn8wipl41dmchmr76lh6zrv046hp374wx4dpkdl7r1",
"fetchSubmodules": false
}

View File

@@ -1,7 +1,7 @@
{
"url": "https://cgit.krebsco.de/krops",
"rev": "89a83135e7ac5e1452c04f5581c00ff293bd01f5",
"date": "2019-06-29T13:39:10+02:00",
"sha256": "0fxm471rpkijijhvbfgpw6y1k5qdrww2v351v2lyswkvrrqgmidk",
"rev": "55aa2c77ce8183f3d2b24f54efa33ab6a42e1e02",
"date": "2020-04-19T01:06:20+02:00",
"sha256": "00rvx9h596ync8wgic6xc9srzajzm28wlp9q7mv4z0jsb27l5bj8",
"fetchSubmodules": false
}

View File

@@ -1,7 +1,7 @@
{
"url": "https://github.com/NixOS/nixpkgs-channels.git",
"rev": "b61999e4ad60c351b4da63ae3ff43aae3c0bbdfb",
"date": "2020-04-16T08:43:36-04:00",
"sha256": "0cggpdks4qscyirqwfprgdl91mlhjlw24wkg0riapk5f2g2llbpq",
"rev": "22a3bf9fb9edad917fb6cd1066d58b5e426ee975",
"date": "2020-04-21T08:56:52+02:00",
"sha256": "089hqg2r2ar5piw9q5z3iv0qbmfjc4rl5wkx9z16aqnlras72zsa",
"fetchSubmodules": false
}

View File

@@ -1,7 +1,7 @@
{
"url": "https://github.com/NixOS/nixpkgs-channels.git",
"rev": "b67bc34d4e3de1e89b8bb7cd6e375ba44f1ae8ca",
"date": "2020-04-15T22:11:06+01:00",
"sha256": "1q9a64bl5afflgpa2iaw1q7z7s08c8xq9w6lndlnc5c3siajrp8v",
"rev": "1e90c46c2d98f9391df79954a74d14f263cad729",
"date": "2020-04-20T23:47:17-04:00",
"sha256": "1xs0lgh3q1hbrj0lbpy3czw41cv6vxx9kdf2npwc58z8xq3sdqmh",
"fetchSubmodules": false
}

View File

@@ -2,10 +2,9 @@
{
environment.variables.TERMINAL = "alacritty";
environment.systemPackages = [
pkgs.unstable.alacritty
pkgs.st
pkgs.unstable.alacritty.terminfo
environment.systemPackages = with pkgs; [
alacritty
alacritty.terminfo
];
home-manager.users.me.xdg.configFile."alacritty/alacritty.yml".text =

View File

@@ -2,9 +2,7 @@
{
hardware.bluetooth = {
enable = true;
extraConfig = lib.generators.toINI {} {
General.Enable = lib.concatStringsSep "," ["Source" "Sink" "Media" "Socket"];
};
config.General.Enable = lib.concatStringsSep "," ["Source" "Sink" "Media" "Socket"];
};
environment.systemPackages = [ pkgs.blueman ];

View File

@@ -15,6 +15,13 @@
};
};
system.activationScripts.home-symlinks = ''
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/daybook ${config.users.users.me.home}/daybook
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/memo ${config.users.users.me.home}/memo
ln -sfn ${config.users.users.me.home}/cloud/Dropbox/notes ${config.users.users.me.home}/notes
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
'';
services.syncthing = rec {
enable = true;
user = "kfm";

View File

@@ -13,7 +13,6 @@ in
./chromium.nix
./cloud.nix
./compton.nix
./default.nix
./direnv.nix
./distrobump.nix
./docker.nix
@@ -29,7 +28,7 @@ in
./kdeconnect.nix
./keybase.nix
./keyboard.nix
# ./mail.nix
./mail.nix
./mpv.nix
./nano.nix
./neovim.nix
@@ -48,13 +47,11 @@ in
./theming.nix
./tmux.nix
./todo-txt.nix
./traadfri.nix
# ./traadfri.nix
./unclutter.nix
# ./urxvt.nix
./version.nix
./vscode.nix
./xautolock.nix
# ./xresources.nix
./zsh.nix
{
niveum.user = {
@@ -74,10 +71,7 @@ in
};
}
{
nix.nixPath = [
"/var/src"
"nixpkgs-overlays=${toString ../overlays}"
];
nix.nixPath = [ "/var/src" ];
}
{
services.dbus.packages = [ pkgs.gnome3.dconf ];
@@ -102,24 +96,17 @@ in
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
writeDashBin = pkgs.writers.writeDashBin;
writeDash = pkgs.writers.writeDash;
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {
scardanelli = config.networking.hostName == "scardanelli";
};
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
};
};
overlays = [
# (import <stockholm/submodules/nix-writers>)
(import <niveum/overlays/toml.nix>)
(import <niveum/overlays/scripts.nix>)
(import <niveum/overlays/rust.nix>)
(self: super: {
writeDashBin = super.writers.writeDashBin;
writeDash = super.writers.writeDash;
ix = super.callPackage <niveum/packages/ix.nix> {};
iolanguage = super.callPackage <niveum/packages/iolanguage.nix> {};
gfs-fonts = super.callPackage <niveum/packages/gfs-fonts.nix> {
scardanelli = config.networking.hostName == "scardanelli";
};
})
# (import <niveum/overlays/rust.nix>)
];
};
}
@@ -277,7 +264,6 @@ in
indicators = [ "~spacer" "~host" "~spacer" "~session" "~power" ];
};
};
desktopManager.default = "none";
};
}
{
@@ -305,178 +291,5 @@ in
'';
};
}
{
environment.systemPackages = [ pkgs.neomutt ];
home-manager.users.me.xdg.configFile."neomutt/neomuttrc".text = ''
set mailcap_path = ${pkgs.writeText "mailcap" ''
text/plain; $EDITOR %s ;
text/html; ${pkgs.lynx} -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
image/*; ${pkgs.sxiv}/bin/sxiv %s ;
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
application/*; ${pkgs.xdg_utils}/bin/xdg-open %s ;
''}
set sort = reverse-threads
set sleep_time = 0 # Pause 0 seconds for informational messages
set markers = no # Disables the `+` displayed at line wraps
set mark_old = no # Unread mail stay unread until read
set mime_forward = yes # attachments are forwarded with mail
set wait_key = no # mutt won't ask "press key to continue"
set fast_reply # skip to compose when replying
set fcc_attach # save attachments with the body
set forward_format = "Fwd: %s" # format of subject when forwarding
set forward_quote # include message in forwards
set reverse_name # reply as whomever it was to
set include = no # dont include message in replies
set mail_check=60 # to avoid lags using IMAP with some email providers (yahoo for example)
auto_view text/html # automatically show html (mailcap uses w3m)
alternative_order text/plain text/enriched text/html
source ${pkgs.neomutt}/share/doc/neomutt/vim-keys/vim-keys.rc
source ${pkgs.writeText "vim-keys.rc" ''
bind index j next-entry
bind index k previous-entry
bind attach <return> view-mailcap
bind attach l view-mailcap
bind editor <space> noop
bind index G last-entry
bind index gg first-entry
bind pager,attach h exit
bind pager j next-line
bind pager k previous-line
bind pager l view-attachments
bind index D delete-message
bind index U undelete-message
bind index L limit
bind index h noop
bind index l display-message
bind index <space> tag-entry
bind index,pager H view-raw-message
bind browser l select-entry
bind pager,browser gg top-page
bind pager,browser G bottom-page
# bind index,pager,browser d half-down
# bind index,pager,browser u half-up
bind index,pager S sync-mailbox
bind index,pager R group-reply
bind index \031 previous-undeleted # Mouse wheel
bind index \005 next-undeleted # Mouse wheel
bind pager \031 previous-line # Mouse wheel
bind pager \005 next-line # Mouse wheel
bind editor <Tab> complete-query
set sidebar_visible = yes
set sidebar_width = 20
set sidebar_short_path = yes
set sidebar_next_new_wrap = yes
set mail_check_stats
set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
bind index,pager \Ck sidebar-prev
bind index,pager \Cj sidebar-next
bind index,pager \Co sidebar-open
bind index,pager \Cp sidebar-prev-new
bind index,pager \Cn sidebar-next-new
bind index,pager B sidebar-toggle-visible
''}
source ${pkgs.writeText "colours.rc" ''
# Default index colors:
# color index yellow default '.*'
color index_author red default '.*'
color index_number blue default
color index_subject cyan default '.*'
# New mail is boldened
color index brightyellow black "~N"
color index_author brightred black "~N"
color index_subject brightcyan black "~N"
# Tagged mail is highlighted
color index brightyellow blue "~T"
color index_author brightred blue "~T"
color index_subject brightcyan blue "~T"
# Other colors and aesthetic settings:
mono bold bold
mono underline underline
mono indicator reverse
mono error bold
color normal default default
color indicator brightblack white
color sidebar_highlight red default
color sidebar_divider brightblack black
color sidebar_flagged red black
color sidebar_new green black
color normal brightyellow default
color error red default
color tilde black default
color message cyan default
color markers red white
color attachment white default
color search brightmagenta default
color status brightyellow black
color hdrdefault brightgreen default
color quoted green default
color quoted1 blue default
color quoted2 cyan default
color quoted3 yellow default
color quoted4 red default
color quoted5 brightred default
color signature brightgreen default
color bold black default
color underline black default
color normal default default
# Regex highlighting:
color header blue default ".*"
color header brightmagenta default "^(From)"
color header brightcyan default "^(Subject)"
color header brightwhite default "^(CC|BCC)"
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
color body green default "\`[^\`]*\`" # Green text between ` and `
color body brightblue default "^# \.*" # Headings as bold blue
color body brightcyan default "^## \.*" # Subheadings as bold cyan
color body brightgreen default "^### \.*" # Subsubheadings as bold green
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
color body brightcyan default "[;:][-o][)/(|]" # emoticons
color body brightcyan default "[;:][)(|]" # emoticons
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
color body red default "(BAD signature)"
color body cyan default "(Good signature)"
color body brightblack default "^gpg: Good signature .*"
color body brightyellow default "^gpg: "
color body brightyellow red "^gpg: BAD signature from.*"
mono body bold "^gpg: Good signature"
mono body bold "^gpg: BAD signature from.*"
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
''}
set index_format="%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)"
set smtp_authenticators = 'gssapi:login'
source ${
let emailUser = "kieran.meinhardt";
in pkgs.writeText "gmail.rc" ''
set from="${emailUser}@gmail.com"
set realname="${config.niveum.user.name}"
set imap_login="${emailUser}@gmail.com"
set imap_pass="`${pkgs.pass}/bin/pass mail/${emailUser}@gmail.com`"
set smtp_url="smtps://${emailUser}@gmail.com@smtp.gmail.com:465/"
set smtp_pass="$imap_pass"
set folder=imaps://${emailUser}@imap.gmail.com/
set spoolfile="+INBOX"
set record="+[Gmail]/Gesendet"
set postponed="+[Gmail]/Entwürfe"
set mbox="+[Gmail]/Archiv"
mailboxes =INBOX, =[Gmail]/Gesendet, =[Gmail]/Entwürfe, =[Gmail]/Archiv
''}
'';
}
];
}

View File

@@ -27,17 +27,11 @@
twemoji-color-font
joypixels
];
fontconfig = {
defaultFonts = {
monospace = [ "JetBrains Mono" ];
serif = [ "IBM Plex Serif" ];
sansSerif = [ "IBM Plex Sans" ];
emoji = [ "JoyPixels" ];
};
ultimate = {
enable = true;
substitutions = "combi";
};
fontconfig.defaultFonts = {
monospace = [ "JetBrains Mono" ];
serif = [ "IBM Plex Serif" ];
sansSerif = [ "IBM Plex Sans" ];
emoji = [ "JoyPixels" ];
};
};
}

View File

@@ -1,14 +1,39 @@
{ config, pkgs, lib, ... }:
let
myLib = import <niveum/lib> { inherit pkgs; };
inherit (myLib) writeTOML;
new-workspace = pkgs.unstable.writers.writeDash "new-workspace" ''
i3-msg workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
'';
move-to-new-workspace = pkgs.unstable.writers.writeDash "new-workspace" ''
i3-msg move container to workspace $(($(i3-msg -t get_workspaces | tr , '\n' | grep '"num":' | cut -d : -f 2 | sort -rn | head -1) + 1))
'';
# https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
emoji-menu =
let emoji-file = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji";
sha256 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk";
};
in with pkgs; writers.writeDashBin "emoji-menu" ''
PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
chosen=$(cut -d ';' -f1 ${emoji-file} | dmenu -i -l 10 | sed "s/ .*//")
[ "$chosen" != "" ] || exit
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
if [ -n "$1" ]; then
xdotool key Shift+Insert
else
notify-send "'$chosen' copied to clipboard." &
fi
'';
in with config.niveum; {
services.xserver = {
windowManager.default = "i3";
displayManager.defaultSession = "none+i3";
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
@@ -90,7 +115,7 @@ in with config.niveum; {
};
};
statusCommand = "${pkgs.unstable.i3status-rust}/bin/i3status-rs ${
pkgs.writeTOML (import <niveum/dot/i3status-rust.nix> {
writeTOML (import <niveum/dot/i3status-rust.nix> {
wifi-interface = networkInterfaces.wireless;
batteryBlock = batteryBlocks.default;
inherit (config.niveum) colours;
@@ -130,7 +155,7 @@ in with config.niveum; {
"${modifier}+w" = "layout tabbed";
"${modifier}+Return" = "exec i3-sensible-terminal";
"${modifier}+Shift+y" = "exec ${pkgs.qutebrowser}/bin/qutebrowser";
# "${modifier}+Shift+y" = "exec ${pkgs.qutebrowser}/bin/qutebrowser";
"${modifier}+t" = "exec ${applications.fileManager}";
"${modifier}+y" = "exec x-www-browser";
@@ -145,7 +170,7 @@ in with config.niveum; {
find . -maxdepth 1 -type f | dmenu -i -l 20 | xargs i3-sensible-terminal -e "$EDITOR"
''}";
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
"${modifier}+u" = "exec ${pkgs.scripts.emoji-menu}/bin/emoji-menu";
"${modifier}+u" = "exec ${emoji-menu}/bin/emoji-menu";
"XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5";
"XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";

View File

@@ -9,5 +9,5 @@ in {
libinput.enable = true;
};
i18n.consoleKeyMap = "de";
console.keyMap = "de";
}

View File

@@ -7,27 +7,46 @@ in
home-manager.users.me = {
accounts.email.maildirBasePath = "${config.users.users.me.home}/mail";
accounts.email.accounts.hu-berlin = {
primary = true;
address = "meinhark@hu-berlin.de";
realName = config.niveum.user.name;
userName = "meinhark";
passwordCommand = pass "shared/eduroam/password";
smtp = {
host = "mailhost.cms.hu-berlin.de";
port = 25;
tls.enable = true;
accounts.email.accounts = {
kieran-gmail = {
primary = true;
flavor = "gmail.com";
address = "kieran.meinhardt@gmail.com";
realName = config.niveum.user.name;
userName = "kieran.meinhardt";
passwordCommand = pass "mail/kieran.meinhardt@gmail.com";
neomutt.enable = true;
mbsync = {
enable = true;
create = "both";
};
msmtp.enable = true;
};
imap = {
host = "mailbox.cms.hu-berlin.de";
port = 993;
tls.enable = true;
};
neomutt.enable = true;
hu-berlin = {
primary = false;
address = "meinhark@hu-berlin.de";
realName = config.niveum.user.name;
userName = "meinhark";
passwordCommand = pass "shared/eduroam/password";
smtp = {
host = "mailhost.cms.hu-berlin.de";
port = 25;
tls.enable = true;
};
imap = {
host = "mailbox.cms.hu-berlin.de";
port = 993;
tls.enable = true;
};
neomutt.enable = true;
mbsync = {
enable = true;
create = "both";
};
msmtp.enable = true;
# notmuch.enable = true;
# msmtp.enable = true;
# mbsync.enable = true;
# notmuch.enable = true;
};
};
programs.neomutt = {
@@ -37,16 +56,16 @@ in
vimKeys = true;
checkStatsInterval = 60;
settings = {
date_format = "%Y-%m-%d %H:%M";
date_format = "\"%Y-%m-%d %H:%M\"";
mime_forward = "yes"; # forward attachments with mail
fast_reply = "yes"; # skip to compose when forwarding
forward_format = "Fwd: %s"; # format of subject when forwarding
forward_format = "\"Fwd: %s\""; # format of subject when forwarding
forward_quote = "yes"; # include message in forwards
reverse_name = "yes"; # reply as whomever it was to
include = "no"; # dont include message in replies
mailcap_path = pkgs.writeText "mailcap" ''
mailcap_path = toString (pkgs.writeText "mailcap" ''
text/html; ${pkgs.elinks}/bin/elinks -dump; copiousoutput;
'';
'');
};
# binds = [ {map = null; key = null; action = null; }];
extraConfig = ''
@@ -123,9 +142,12 @@ in
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
'';
};
programs.msmtp.enable = true;
programs.mbsync.enable = true;
/*
programs.notmuch.enable = true;
programs.msmtp.enable = true;
home.file = {
".muttrc".text = ''

View File

@@ -1,54 +1,49 @@
{ pkgs, config, ... }:
{ pkgs, config, lib, ... }:
let
newsboat-home = "${config.users.users.me.home}/cloud/syncthing/common/newsboat";
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
scripts = import <niveum/packages/scripts> { inherit pkgs lib; };
linkhandler-bin = "${scripts.linkhandler}/bin/linkhandler";
newsboat-config = pkgs.writeText "config" ''
auto-reload yes
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler-bin} {}'"
browser ${linkhandler-bin}
bind-key j down
bind-key k up
bind-key j next articlelist
bind-key k prev articlelist
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key G end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key x pb-delete
save-path ${newsboat-home}/saved/
color listnormal cyan default
color listfocus black yellow standout bold
color listnormal_unread blue default
color listfocus_unread yellow default bold
color info red black bold
'';
in
{
environment = {
variables.NEWSBOAT_HOME = newsboat-home;
shellAliases.newsboat = "${pkgs.newsboat}/bin/newsboat -u \"$NEWSBOAT_HOME/urls\"";
nixpkgs.config.packageOverrides = pkgs: {
newsboat = pkgs.writers.writeDashBin "newsboat" ''
${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -c ${newsboat-home}/cache.db -u ${newsboat-home}/urls "$@"
'';
};
home-manager.users.me = {
programs.newsboat = {
enable = true;
extraConfig = ''
auto-reload yes
external-url-viewer "${pkgs.urlscan}/bin/urlscan -dc -r '${linkhandler-bin} {}'"
bind-key j down
bind-key k up
bind-key j next articlelist
bind-key k prev articlelist
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key G end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key x pb-delete
save-path ${newsboat-home}/saved/
color listnormal cyan default
color listfocus black yellow standout bold
color listnormal_unread blue default
color listfocus_unread yellow default bold
color info red black bold
browser ${linkhandler-bin}
macro , open-in-browser
macro v set browser "${pkgs.utillinux}/bin/setsid ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv"; open-in-browser ; set browser ${linkhandler-bin}
macro w set browser "${pkgs.w3m}/bin/w3m"; open-in-browser ; set browser ${linkhandler-bin}
'';
};
};
environment.systemPackages = [ pkgs.newsboat ];
}

View File

@@ -1,4 +1,7 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
let
scripts = import <niveum/packages/scripts> { inherit pkgs lib; };
in
{
imports = [
./krebs.nix
@@ -8,10 +11,10 @@
{
environment.systemPackages =
let
nightly = pkgs.rustChannelOf {
date = "2019-12-27";
channel = "nightly";
};
# nightly = pkgs.rustChannelOf {
# date = "2019-12-27";
# channel = "nightly";
# };
in with pkgs; [
htmlTidy
nodePackages.csslint
@@ -25,7 +28,7 @@
tokei # count lines of code
gnumake
binutils # for strip, ld, ...
nightly.rust
# nightly.rust
shellcheck
];
}
@@ -36,7 +39,7 @@
aria2
firefox
# tor-browser-bundle-bin
qutebrowser
# qutebrowser
tdesktop
w3m
wget
@@ -113,7 +116,6 @@
scripts.notetags
scripts.mansplain
scripts.vg
scripts.emoji-menu
scripts.fkill
scripts.wttr
# kmein.slide

View File

@@ -1,6 +1,7 @@
{ lib, config, ... }:
with config.niveum; {
i18n.consoleColors = map (c: lib.strings.removePrefix "#" c) colourPalette;
let inherit (config.niveum) theme colourPalette;
in {
console.colors = map (c: lib.strings.removePrefix "#" c) colourPalette;
environment.systemPackages = [
theme.gtk.package
@@ -10,12 +11,10 @@ with config.niveum; {
services.xserver.displayManager.lightdm.greeters.gtk = {
theme = {
name = theme.gtk.name;
package = theme.gtk.package;
inherit (theme.gtk) name package;
};
iconTheme = {
name = theme.icon.name;
package = theme.icon.package;
inherit (theme.icon) name package;
};
};

View File

@@ -10,7 +10,7 @@
keyMode = "vi";
clock24 = true;
terminal = "screen-256color";
extraTmuxConf = ''
extraConfig = ''
set -g status-interval 2
set -g status-left-length 32
set -g status-right-length 150

View File

@@ -19,24 +19,34 @@
};
icons = {
name = "none";
/*
overrides = {
time = "📅";
music = "🎵";
time = "📅 ";
music = "🎵 ";
music_play = "";
music_pause = "";
music_next = "";
music_prev = "";
cogs = "🎛";
memory_mem = "📈";
memory_swap = "📉";
cpu = "🚦";
cpu = "🖥 ";
memory_mem = "🧠 ";
cogs = "🚦 ";
bat = "🔋";
bat_full = "";
bat_charging = "🔌";
bat_discharging = "🔋";
bat_quarter = "🔋";
bat_three_quarters = "🔋";
net_up = "🌐 ";
net_down = " ";
net_wireless = "📶 ";
net_wired = "🌐 ";
net_vpn = "🛡 ";
toggle_off = " ";
toggle_on = " ";
volume_full = "🔊 ";
volume_half = "🔉 ";
volume_muted = "";
volume_empty = "🔈 ";
};
*/
};
block = [
{
@@ -55,17 +65,17 @@
| ${pkgs.gnugrep}/bin/grep Germany \
| ${pkgs.gnused}/bin/sed 's/\s*//g' \
| ${pkgs.ansifilter}/bin/ansifilter \
| ${pkgs.gawk}/bin/awk -F'' '{print "CORONA " $3 " " $5}'
| ${pkgs.gawk}/bin/awk -F'' '{print "🤒 " $3 " 💀 " $5}'
'';
}
{
block = "custom";
interval = 2 * 60;
command = pkgs.writers.writeDash "rss" ''
${pkgs.newsboat}/bin/newsboat -u "$NEWSBOAT_HOME/urls" -x print-unread | ${pkgs.gawk}/bin/awk '{ print "RSS " $1 }'
${pkgs.newsboat}/bin/newsboat -x print-unread | ${pkgs.gawk}/bin/awk '{ print "📰 " $1 }'
'';
on_click = pkgs.writers.writeDash "updateNewsboat" ''
${pkgs.newsboat}/bin/newsboat -u "$NEWSBOAT_HOME/urls" -x reload && ${pkgs.libnotify}/bin/notify-send newsboat "Feeds updated."
${pkgs.newsboat}/bin/newsboat -x reload && ${pkgs.libnotify}/bin/notify-send newsboat "Feeds updated."
'';
}
{
@@ -87,6 +97,7 @@
}
{
block = "disk_space";
alias = "💽";
}
{
block = "memory";

View File

@@ -133,6 +133,8 @@ if has("autocmd")
" autocmd bufwritepre * :call <SID>StripTrailingWhitespaces()
autocmd bufwinenter * if &fdm == 'indent' | setlocal foldmethod=manual | endif
autocmd bufwrite *.elm set nofoldenable
autocmd VimEnter * UpdateRemotePlugins
endif

7
lib/default.nix Normal file
View File

@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
writeTOML = object: pkgs.runCommand "generated.toml" {} ''
echo '${builtins.toJSON object}' | ${pkgs.remarshal}/bin/json2toml > $out
'';
toTOML = object: builtins.readFile (pkgs.writeTOML object);
}

View File

@@ -1,5 +1,5 @@
#!/bin/sh
NIXOS_VERSION=19.09
NIXOS_VERSION=20.03
fetch() {
rev=$1
@@ -26,7 +26,7 @@ home_manager() {
}
krops() {
fetch "refs/tags/v1.15.0" .versions/krops.json "https://cgit.krebsco.de/krops"
fetch "refs/tags/v1.21.0" .versions/krops.json "https://cgit.krebsco.de/krops"
}
stockholm() {

View File

@@ -1,6 +0,0 @@
self: super:
with super.lib;
let
eval = import <nixpkgs/nixos/lib/eval-config.nix>;
paths = (eval {modules = [(import <nixos-config>)];}).config.nixpkgs.overlays;
in foldl' (flip extends) (_: super) paths self

View File

@@ -1,3 +0,0 @@
(self: super: {
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
})

View File

@@ -1,6 +0,0 @@
(self: super: {
writeTOML = object: super.runCommand "generated.toml" {} ''
echo '${builtins.toJSON object}' | ${super.remarshal}/bin/json2toml > $out
'';
toTOML = object: builtins.readFile (self.writeTOML object);
})

View File

@@ -12,27 +12,6 @@ let
};
in
{
# https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
emoji-menu =
let emoji-file = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji";
sha256 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk";
};
in with pkgs; writers.writeDashBin "emoji-menu" ''
PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
chosen=$(cut -d ';' -f1 ${emoji-file} | dmenu -i -l 10 | sed "s/ .*//")
[ "$chosen" != "" ] || exit
echo "$chosen" | tr -d '\n' | xclip -selection clipboard
if [ -n "$1" ]; then
xdotool key Shift+Insert
else
notify-send "'$chosen' copied to clipboard." &
fi
'';
instaget = wrapScript {
packages = [ pkgs.jq pkgs.curl pkgs.gnugrep ];
script = ./instaget.sh;

View File

@@ -1,5 +1,6 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib> { inherit pkgs; }) writeTOML;
sshKey = {
homeros = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com";
scardanelli = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com";
@@ -88,7 +89,7 @@ in {
<niveum/configs/save-space.nix>
<niveum/configs/tmux.nix>
<niveum/configs/version.nix>
<niveum/configs/traadfri.nix>
# <niveum/configs/traadfri.nix>
<niveum/modules/retiolum.nix>
<niveum/modules/telegram-bot.nix>
{
@@ -97,14 +98,11 @@ in {
writeDash = pkgs.writers.writeDash;
writeDashBin = pkgs.writers.writeDashBin;
};
overlays = [
(import <niveum/overlays/toml.nix>)
];
};
services.matterbridge = {
enable = true;
configPath = toString (pkgs.writeTOML (import <niveum/dot/matterbridge.nix> {
configPath = toString (writeTOML (import <niveum/dot/matterbridge.nix> {
token = lib.strings.fileContents <secrets/telegram/kmein.token>;
}));
};

View File

@@ -1,6 +1,7 @@
{ pkgs, lib, ... }:
let
literature-quote = pkgs.callPackage <niveum/packages/scripts/literature-quote.nix> {};
scripts = import <niveum/packages/scripts> { inherit pkgs lib; };
inherit (scripts) literature-quote;
in
{
niveum.telegramBots.quotebot = {

View File

@@ -8,7 +8,7 @@
services.xserver.xrandrHeads = [ { output = "HDMI1"; primary = true; } "LVDS1" ];
environment.systemPackages = [ pkgs.unstable.zeroad pkgs.minecraft ];
environment.systemPackages = [ pkgs.zeroad pkgs.minecraft ];
niveum = {
batteryBlocks.default = "BAT1";