From d8a4d4eedfd217719e975ee9bb212287f9cdf7f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 10 Jun 2020 17:37:25 +0200 Subject: [PATCH] chore: nixfmt --- configs/alacritty.nix | 32 +- configs/bash.nix | 3 +- configs/bluetooth.nix | 10 +- configs/ccc.nix | 3 +- configs/chromium.nix | 3 +- configs/cloud.nix | 33 +- configs/default.nix | 100 ++--- configs/direnv.nix | 54 +-- configs/distrobump.nix | 7 +- configs/docker.nix | 3 +- configs/dunst.nix | 2 +- configs/flameshot-once.nix | 27 +- configs/fonts.nix | 3 +- configs/fzf.nix | 14 +- configs/git.nix | 22 +- configs/hledger.nix | 3 +- configs/htop.nix | 20 +- configs/hu-berlin.nix | 14 +- configs/i3.nix | 131 ++++--- configs/kdeconnect.nix | 10 +- configs/keybase.nix | 3 +- configs/keyboard.nix | 9 +- configs/mail.nix | 343 ++++++++++++++---- configs/mpv.nix | 7 +- configs/neovim.nix | 30 +- configs/newsboat.nix | 6 +- configs/nixpkgs-unstable.nix | 7 +- configs/packages/default.nix | 9 +- configs/packages/haskell/default.nix | 51 +-- configs/packages/krebs.nix | 33 +- configs/packages/python.nix | 33 +- configs/packages/writing.nix | 53 +-- configs/printing.nix | 39 +- configs/redshift.nix | 4 +- configs/retiolum.nix | 7 +- configs/rofi.nix | 15 +- configs/spotify.nix | 21 +- configs/ssh.nix | 26 +- configs/sxiv.nix | 79 ++-- configs/themes/antares.nix | 40 +- configs/themes/apprentice.nix | 40 +- configs/themes/connermcd.nix | 40 +- configs/themes/mac-os.nix | 40 +- configs/themes/owickstrom-dark.nix | 40 +- configs/themes/owickstrom.nix | 40 +- configs/themes/solarized-dark.nix | 40 +- configs/themes/solarized-light.nix | 40 +- configs/theming.nix | 15 +- configs/tmux.nix | 3 +- configs/traadfri.nix | 3 +- configs/version.nix | 6 +- configs/vscode.nix | 7 +- configs/wallpaper.nix | 36 +- configs/xautolock.nix | 9 +- configs/zsh.nix | 10 +- deploy.nix | 58 +-- dot/i3status-rust.nix | 24 +- dot/matterbridge.nix | 30 +- lib/default.nix | 10 +- modules/constants.nix | 55 ++- modules/dropbox.nix | 4 +- modules/google-drive.nix | 7 +- modules/hledger.nix | 35 +- modules/minecraft.nix | 16 +- modules/retiolum.nix | 6 +- modules/seafile.nix | 4 +- modules/telegram-bot.nix | 41 ++- modules/traadfri.nix | 37 +- overlays/rust.nix | 3 +- packages/gfs-fonts.nix | 54 +-- packages/gourmet.nix | 9 +- packages/iolanguage.nix | 5 +- packages/libcoap.nix | 16 +- packages/scripts/daybook.nix | 2 +- packages/scripts/default.nix | 23 +- packages/scripts/depp.nix | 9 +- packages/scripts/klem.nix | 18 +- systems/catullus/configuration.nix | 81 ++--- systems/catullus/hardware-configuration.nix | 8 +- .../telegram-bots/autorenkalender.nix | 6 +- systems/catullus/telegram-bots/default.nix | 33 +- .../telegram-bots/literature-quote.nix | 3 +- .../catullus/telegram-bots/nachtischsatan.nix | 38 +- systems/catullus/telegram-bots/proverb.nix | 10 +- systems/homeros/configuration.nix | 11 +- systems/homeros/hardware-configuration.nix | 37 +- systems/scardanelli/configuration.nix | 12 +- .../scardanelli/hardware-configuration.nix | 29 +- systems/wilde/configuration.nix | 5 +- systems/wilde/hardware-configuration.nix | 29 +- 90 files changed, 1461 insertions(+), 985 deletions(-) diff --git a/configs/alacritty.nix b/configs/alacritty.nix index 0f61a03..5397ee7 100644 --- a/configs/alacritty.nix +++ b/configs/alacritty.nix @@ -1,13 +1,12 @@ { pkgs, lib, config, ... }: let - colourNames = [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; + colourNames = + [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; colours = lib.getAttrs colourNames config.niveum.colours; alacrittyConfig = { background_opacity = 0.9; colors = { - primary = { - inherit (config.niveum.colours) background foreground; - }; + primary = { inherit (config.niveum.colours) background foreground; }; normal = lib.mapAttrs (_: colour: colour.dark) colours; bright = lib.mapAttrs (_: colour: colour.bright) colours; }; @@ -16,9 +15,21 @@ let size = config.niveum.fonts.size - 2; }; key_bindings = [ - { key = "Add"; mods = "Control"; action = "IncreaseFontSize"; } - { key = "Minus"; mods = "Control"; action = "DecreaseFontSize"; } - { key = "Key0"; mods = "Control"; action = "ResetFontSize"; } + { + key = "Add"; + mods = "Control"; + action = "IncreaseFontSize"; + } + { + key = "Minus"; + mods = "Control"; + action = "DecreaseFontSize"; + } + { + key = "Key0"; + mods = "Control"; + action = "ResetFontSize"; + } ]; }; flippedAlacrittyConfig = alacrittyConfig // { @@ -27,15 +38,16 @@ let foreground = config.niveum.colours.background; }; }; -in -{ +in { environment.variables.TERMINAL = "alacritty"; environment.systemPackages = with pkgs; [ alacritty alacritty.terminfo (pkgs.writers.writeDashBin "alacritty-flipped" '' - ${pkgs.alacritty}/bin/alacritty --config-file ${pkgs.writeText "alacritty.yml" (builtins.toJSON flippedAlacrittyConfig)} $@ + ${pkgs.alacritty}/bin/alacritty --config-file ${ + pkgs.writeText "alacritty.yml" (builtins.toJSON flippedAlacrittyConfig) + } $@ '') ]; diff --git a/configs/bash.nix b/configs/bash.nix index e9d6de0..56c7e42 100644 --- a/configs/bash.nix +++ b/configs/bash.nix @@ -1,6 +1,7 @@ { programs.bash = { - promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "''; + promptInit = '' + PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "''; interactiveShellInit = '' set -o vi ''; diff --git a/configs/bluetooth.nix b/configs/bluetooth.nix index a7a11ee..7ea90fe 100644 --- a/configs/bluetooth.nix +++ b/configs/bluetooth.nix @@ -1,13 +1,11 @@ -{ pkgs, lib, ... }: -{ +{ pkgs, lib, ... }: { hardware.bluetooth = { enable = true; - config.General.Enable = lib.concatStringsSep "," ["Source" "Sink" "Media" "Socket"]; + config.General.Enable = + lib.concatStringsSep "," [ "Source" "Sink" "Media" "Socket" ]; }; environment.systemPackages = [ pkgs.blueman ]; - home-manager.users.me = { - services.blueman-applet.enable = false; - }; + home-manager.users.me = { services.blueman-applet.enable = false; }; } diff --git a/configs/ccc.nix b/configs/ccc.nix index b01559f..5634c9c 100644 --- a/configs/ccc.nix +++ b/configs/ccc.nix @@ -13,8 +13,7 @@ let ${pkgs.gnused}/bin/sed -n -f $src ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt > $out ''; }; -in -{ +in { networking.wireless.networks."36C3" = { auth = '' key_mgmt=WPA-EAP diff --git a/configs/chromium.nix b/configs/chromium.nix index 69ac81e..fdc93b0 100644 --- a/configs/chromium.nix +++ b/configs/chromium.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { programs.chromium = { enable = true; extensions = [ diff --git a/configs/cloud.nix b/configs/cloud.nix index f53584d..17ff838 100644 --- a/configs/cloud.nix +++ b/configs/cloud.nix @@ -1,5 +1,4 @@ -{ config, lib, pkgs, ... }: -{ +{ config, lib, pkgs, ... }: { imports = [ @@ -32,18 +31,26 @@ cert = toString ; key = toString ; devices = { - homeros.id = "HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA"; - scardanelli.id = "7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU"; - rilke.id = "NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ"; - wilde.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF"; - heym.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM"; - }; - folders = let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing"; in { - "${syncthing-dir}/common".devices = [ "homeros" "scardanelli" "wilde" ]; - "${syncthing-dir}/library".devices = lib.attrNames devices; - "${syncthing-dir}/mundoiu".devices = lib.attrNames devices; - "${syncthing-dir}/music".devices = lib.attrNames devices; + homeros.id = + "HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA"; + scardanelli.id = + "7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU"; + rilke.id = + "NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ"; + wilde.id = + "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF"; + heym.id = + "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM"; }; + folders = + let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing"; + in { + "${syncthing-dir}/common".devices = + [ "homeros" "scardanelli" "wilde" ]; + "${syncthing-dir}/library".devices = lib.attrNames devices; + "${syncthing-dir}/mundoiu".devices = lib.attrNames devices; + "${syncthing-dir}/music".devices = lib.attrNames devices; + }; }; }; } diff --git a/configs/default.nix b/configs/default.nix index 5f7f3f9..b0aa677 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -1,8 +1,6 @@ { pkgs, lib, config, options, ... }: -let - inherit (lib.strings) makeBinPath; -in -{ +let inherit (lib.strings) makeBinPath; +in { imports = [ @@ -66,17 +64,22 @@ in }; niveum.theme = { - gtk = { name = "Adwaita-dark"; package = pkgs.gnome3.gnome-themes-extra; }; - icon = { name = "Adwaita"; package = pkgs.gnome3.adwaita-icon-theme; }; - cursor = { name = "capitaine-cursors-white"; package = pkgs.capitaine-cursors; }; + gtk = { + name = "Adwaita-dark"; + package = pkgs.gnome3.gnome-themes-extra; + }; + icon = { + name = "Adwaita"; + package = pkgs.gnome3.adwaita-icon-theme; + }; + cursor = { + name = "capitaine-cursors-white"; + package = pkgs.capitaine-cursors; + }; }; } - { - nix.nixPath = [ "/var/src" ]; - } - { - services.dbus.packages = [ pkgs.gnome3.dconf ]; - } + { nix.nixPath = [ "/var/src" ]; } + { services.dbus.packages = [ pkgs.gnome3.dconf ]; } { environment.systemPackages = [ (pkgs.writers.writeDashBin "x-www-browser" '' @@ -94,16 +97,17 @@ in config = { allowUnfree = true; packageOverrides = pkgs: { - nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { - inherit pkgs; - }; + 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 { scardanelli = config.networking.hostName == "scardanelli"; }; - iolanguage = pkgs.callPackage {}; - ix = pkgs.callPackage {}; + iolanguage = pkgs.callPackage { }; + ix = pkgs.callPackage { }; }; }; overlays = [ @@ -142,7 +146,8 @@ in users.users.me = { name = "kfm"; description = config.niveum.user.name; - hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; + hashedPassword = + "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; isNormalUser = true; }; } @@ -159,9 +164,9 @@ in environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ]; } { - environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum"; - environment.shellAliases = - let + environment.interactiveShellInit = + "export PATH=$PATH:$HOME/projects/niveum"; + environment.shellAliases = let wcd = pkgs.writers.writeDash "wcd" '' cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.." ''; @@ -174,7 +179,8 @@ in in { "ß" = "${pkgs.utillinux}/bin/setsid"; cat = "${pkgs.bat}/bin/bat --style=plain"; - chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito"; + chromium-incognito = + "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito"; cp = "cp -i"; dig = "dig +short"; ip = "${pkgs.iproute}/bin/ip -c"; @@ -197,8 +203,10 @@ in wcd = "source ${wcd}"; weechat = "${pkgs.openssh}/bin/ssh kmein@prism.r -t tmux attach"; where = "source ${where}"; - yt = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link - yta = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio + yt = + "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link + yta = + "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio }; } { @@ -207,29 +215,35 @@ in userControlled.enable = true; networks = { "Aether" = { - pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; + pskRaw = + "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; priority = 10; }; "Asoziales Netzwerk" = { - pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; + pskRaw = + "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; priority = 10; }; "Libertarian WiFi" = { - pskRaw = "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050"; + pskRaw = + "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050"; priority = 9; }; - "EasyBox-927376".pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22"; - "FlixBus Wi-Fi" = {}; - "FlixBus" = {}; - "FlixTrain" = {}; - "BVG Wi-Fi" = {}; - "Ni/Schukajlow".pskRaw = "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781"; - "WIFIonICE" = {}; + "EasyBox-927376".pskRaw = + "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22"; + "FlixBus Wi-Fi" = { }; + "FlixBus" = { }; + "FlixTrain" = { }; + "BVG Wi-Fi" = { }; + "Ni/Schukajlow".pskRaw = + "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781"; + "WIFIonICE" = { }; "WLAN-914742".psk = "67647139648174545446"; "KDG-CEAA4".psk = "PBkBSmejcvM4"; "KDG-4ECF7".psk = "Gdbwh7afw2Bx"; - "WLAN-XVMU6T".pskRaw = "46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc"; - "c-base-public" = {}; + "WLAN-XVMU6T".pskRaw = + "46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc"; + "c-base-public" = { }; "discord".psk = "baraustrinken"; "GoOnline".psk = "airbnbguest"; "security-by-obscurity".psk = "44629828256481964386"; @@ -247,12 +261,8 @@ in "192.168.178.24" = [ "catullus" ]; }; } - { - i18n.defaultLocale = "en_GB.UTF-8"; - } - { - services.illum.enable = true; - } + { i18n.defaultLocale = "en_GB.UTF-8"; } + { services.illum.enable = true; } { services.xserver = { enable = true; @@ -275,9 +285,7 @@ in pumount.source = "${pkgs.pmount}/bin/pumount"; }; } - { - programs.command-not-found.enable = true; - } + { programs.command-not-found.enable = true; } { programs.gnupg.agent.enable = true; diff --git a/configs/direnv.nix b/configs/direnv.nix index 3ad29ee..9798630 100644 --- a/configs/direnv.nix +++ b/configs/direnv.nix @@ -1,36 +1,36 @@ { pkgs, ... }: -let nixify = pkgs.writers.writeDashBin "nixify" '' - set -efuC +let + nixify = pkgs.writers.writeDashBin "nixify" '' + set -efuC - if [ ! -e ./.envrc ]; then - echo use_nix > .envrc - direnv allow - fi - if [ ! -e shell.nix ]; then - cat > shell.nix <<'EOF' - { pkgs ? import {} }: - pkgs.mkShell { - buildInputs = with pkgs; []; - shellHook = "export HISTFILE=''${toString ./.history}"; - } - EOF - ''${EDITOR:-vim} shell.nix - fi -''; + if [ ! -e ./.envrc ]; then + echo use_nix > .envrc + direnv allow + fi + if [ ! -e shell.nix ]; then + cat > shell.nix <<'EOF' + { pkgs ? import {} }: + pkgs.mkShell { + buildInputs = with pkgs; []; + shellHook = "export HISTFILE=''${toString ./.history}"; + } + EOF + ''${EDITOR:-vim} shell.nix + fi + ''; in { - environment.systemPackages = [ - pkgs.direnv - nixify - ]; + environment.systemPackages = [ pkgs.direnv nixify ]; home-manager.users.me.programs.direnv = { enable = true; - stdlib = builtins.readFile ("${pkgs.fetchFromGitHub { - owner = "Mic92"; - repo = "dotfiles"; - rev = "a0a9b7e358fa70a85cd468f8ca1fbb02ae0a91df"; - sha256 = "1y9h5s1lf59sczsm0ksq2x1yhl98ba9lwk5yil3q53rg7n4574pg"; - }}/home/.direnvrc"); + stdlib = builtins.readFile ("${ + pkgs.fetchFromGitHub { + owner = "Mic92"; + repo = "dotfiles"; + rev = "a0a9b7e358fa70a85cd468f8ca1fbb02ae0a91df"; + sha256 = "1y9h5s1lf59sczsm0ksq2x1yhl98ba9lwk5yil3q53rg7n4574pg"; + } + }/home/.direnvrc"); }; programs.zsh.interactiveShellInit = '' diff --git a/configs/distrobump.nix b/configs/distrobump.nix index bf7cac9..2cab5de 100644 --- a/configs/distrobump.nix +++ b/configs/distrobump.nix @@ -1,11 +1,8 @@ -{ lib, config, pkgs, ... }: -{ +{ lib, config, pkgs, ... }: { imports = [ (import { inherit lib config; - pkgs = pkgs // { - writeDash = pkgs.writers.writeDash; - }; + pkgs = pkgs // { writeDash = pkgs.writers.writeDash; }; }) ]; diff --git a/configs/docker.nix b/configs/docker.nix index 26e7dab..e6db890 100644 --- a/configs/docker.nix +++ b/configs/docker.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { virtualisation.docker.enable = true; users.users.me.extraGroups = [ "docker" ]; environment.systemPackages = [ pkgs.docker pkgs.docker_compose ]; diff --git a/configs/dunst.nix b/configs/dunst.nix index 3b3d8c8..0c39523 100644 --- a/configs/dunst.nix +++ b/configs/dunst.nix @@ -18,7 +18,7 @@ with config.niveum; { separator_color = "auto"; sort = true; markup = "full"; - format = ''%a\n%s\n%b''; + format = "%a\\n%s\\n%b"; alignment = "left"; show_age_threshold = 60; bounce_freq = 0; diff --git a/configs/flameshot-once.nix b/configs/flameshot-once.nix index 63c9242..83e4625 100644 --- a/configs/flameshot-once.nix +++ b/configs/flameshot-once.nix @@ -1,27 +1,28 @@ { lib, pkgs, ... }: let overrides = self: super: { - flameshot-once = self.callPackage {}; - blessings = self.callPackage {}; + flameshot-once = + self.callPackage { }; + blessings = + self.callPackage { }; }; - flameshot-once = pkgs.callPackage {}; -in -{ + flameshot-once = + pkgs.callPackage { }; +in { nixpkgs.overlays = [ (import ) (import ) (self: super: { haskell = super.haskell // { packages = lib.mapAttrs (name: value: - if lib.hasAttr "override" value - then value.override { inherit overrides; } - else value - ) super.haskell.packages; + if lib.hasAttr "override" value then + value.override { inherit overrides; } + else + value) super.haskell.packages; }; - haskellPackages = super.haskellPackages.override { - inherit overrides; - }; - xwaitforwindow = super.callPackage {}; + haskellPackages = super.haskellPackages.override { inherit overrides; }; + xwaitforwindow = + super.callPackage { }; }) ]; diff --git a/configs/fonts.nix b/configs/fonts.nix index 32e9bb6..3cfa552 100644 --- a/configs/fonts.nix +++ b/configs/fonts.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { niveum.fonts.size = 9; fonts = { diff --git a/configs/fzf.nix b/configs/fzf.nix index 59b3774..0e7f29e 100644 --- a/configs/fzf.nix +++ b/configs/fzf.nix @@ -1,12 +1,9 @@ -{ pkgs, lib, ... }: -{ +{ pkgs, lib, ... }: { environment = { systemPackages = [ pkgs.fzf ]; variables = { - FZF_DEFAULT_OPTS = lib.escapeShellArgs [ - "--height=40%" - "--layout=reverse" - ]; + FZF_DEFAULT_OPTS = + lib.escapeShellArgs [ "--height=40%" "--layout=reverse" ]; FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d"; FZF_ALT_C_OPTS = lib.escapeShellArgs [ "--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'" @@ -14,9 +11,8 @@ "--preview-window=hidden" ]; FZF_CTRL_T_COMMAND = "${pkgs.fd}/bin/fd --type f"; - FZF_CTRL_T_OPTS = lib.escapeShellArgs [ - "--preview='${pkgs.bat}/bin/bat \"{}\"'" - ]; + FZF_CTRL_T_OPTS = + lib.escapeShellArgs [ "--preview='${pkgs.bat}/bin/bat \"{}\"'" ]; }; }; diff --git a/configs/git.nix b/configs/git.nix index 3d7ebaf..be30a31 100644 --- a/configs/git.nix +++ b/configs/git.nix @@ -1,5 +1,4 @@ -{ pkgs, config, lib, ... }: -{ +{ pkgs, config, lib, ... }: { environment.systemPackages = [ pkgs.mr pkgs.git @@ -19,16 +18,15 @@ }; home-manager.users.me = { - home.file.".mrconfig".text = - let - prependPath = prefix: lib.attrsets.mapAttrs' (path: lib.attrsets.nameValuePair "${prefix}/${path}"); + home.file.".mrconfig".text = let + prependPath = prefix: + lib.attrsets.mapAttrs' + (path: lib.attrsets.nameValuePair "${prefix}/${path}"); git = url: { checkout = "git clone ${url}"; }; github = owner: repo: git "git@github.com:${owner}/${repo}"; keybase = owner: repo: git "keybase://private/${owner}/${repo}"; - in lib.generators.toINI {} ({ - DEFAULT = { - git_gc = "git gc \"$@\""; - }; + in lib.generators.toINI { } ({ + DEFAULT = { git_gc = ''git gc "$@"''; }; } // prependPath "projects" { "menstruation.rs" = github "kmein" "menstruation.rs"; brockman = github "kmein" "brockman"; @@ -67,11 +65,13 @@ diffs = "diff --staged"; last = "log -1 HEAD"; logs = "log --pretty=oneline"; - graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"; + graph = + "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"; }; ignores = config.niveum.ignore; extraConfig = { - core.pager = "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | ${pkgs.less}/bin/less --tabs=4 -RFX"; + core.pager = + "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | ${pkgs.less}/bin/less --tabs=4 -RFX"; color = { ui = true; diff = { diff --git a/configs/hledger.nix b/configs/hledger.nix index f9f0a34..6cd963f 100644 --- a/configs/hledger.nix +++ b/configs/hledger.nix @@ -1,5 +1,4 @@ -{ config, pkgs, ... }: -{ +{ config, pkgs, ... }: { imports = [ ]; niveum.hledger = { diff --git a/configs/htop.nix b/configs/htop.nix index 66df981..ff8c92d 100644 --- a/configs/htop.nix +++ b/configs/htop.nix @@ -23,10 +23,22 @@ updateProcessNames = false; meters = { left = [ - { kind = "LeftCPUs2"; mode = 1; } - { kind = "RightCPUs2"; mode = 1; } - { kind = "Memory"; mode = 1; } - { kind = "Swap"; mode = 1; } + { + kind = "LeftCPUs2"; + mode = 1; + } + { + kind = "RightCPUs2"; + mode = 1; + } + { + kind = "Memory"; + mode = 1; + } + { + kind = "Swap"; + mode = 1; + } ]; right = [ "Uptime" "Tasks" "LoadAverage" "Battery" ]; }; diff --git a/configs/hu-berlin.nix b/configs/hu-berlin.nix index 52ae8e0..d4895de 100644 --- a/configs/hu-berlin.nix +++ b/configs/hu-berlin.nix @@ -13,10 +13,13 @@ let anonymous_identity="anonymous@wlan.hu-berlin.de" altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de" password="${eduroam.password}" - ca_cert="${pkgs.fetchurl { - url = https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem; - sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk"; - }}" + ca_cert="${ + pkgs.fetchurl { + url = + "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem"; + sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk"; + } + }" phase2="auth=PAP" ''; in { @@ -32,7 +35,8 @@ in { password = eduroam.password; }; config = fileContents (pkgs.fetchurl { - url = https://www.cms.hu-berlin.de/de/dl/netze/vpn/openvpn/hu-berlin.ovpn; + url = + "https://www.cms.hu-berlin.de/de/dl/netze/vpn/openvpn/hu-berlin.ovpn"; sha256 = "15b55aibik5460svjq2gwxrcyh6ay4k8savd6cd5lncgndmd8p8h"; }); }; diff --git a/configs/i3.nix b/configs/i3.nix index 55833bf..2d01036 100644 --- a/configs/i3.nix +++ b/configs/i3.nix @@ -38,12 +38,14 @@ let ''; # 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" '' + 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/ .*//") @@ -102,31 +104,34 @@ in with config.niveum; { titlebar = false; border = 1; }; - colors = - let scheme = { background = colours.background; text = colours.foreground; }; - in rec { - focused = scheme // { - border = colours.foreground; - indicator = colours.foreground; - childBorder = colours.foreground; - }; - unfocused = scheme // { - border = colours.background; - indicator = colours.background; - childBorder = colours.background; - }; - focusedInactive = unfocused; - urgent = scheme // { - border = colours.red.bright; - indicator = colours.red.bright; - childBorder = colours.red.bright; - }; - placeholder = scheme // { - border = colours.green.bright; - indicator = colours.green.bright; - childBorder = colours.green.bright; - }; + colors = let + scheme = { + background = colours.background; + text = colours.foreground; }; + in rec { + focused = scheme // { + border = colours.foreground; + indicator = colours.foreground; + childBorder = colours.foreground; + }; + unfocused = scheme // { + border = colours.background; + indicator = colours.background; + childBorder = colours.background; + }; + focusedInactive = unfocused; + urgent = scheme // { + border = colours.red.bright; + indicator = colours.red.bright; + childBorder = colours.red.bright; + }; + placeholder = scheme // { + border = colours.green.bright; + indicator = colours.green.bright; + childBorder = colours.green.bright; + }; + }; bars = [{ workspaceButtons = false; fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ]; @@ -143,17 +148,17 @@ in with config.niveum; { }; }; statusCommand = "${pkgs.unstable.i3status-rust}/bin/i3status-rs ${ - writeTOML (import { - wifi-interface = networkInterfaces.wireless; - batteryBlock = batteryBlocks.default; - inherit (config.niveum) colours; - inherit pkgs; - }) - }"; + writeTOML (import { + wifi-interface = networkInterfaces.wireless; + batteryBlock = batteryBlocks.default; + inherit (config.niveum) colours; + inherit pkgs; + }) + }"; }]; modes.resize = { - "Escape" = "mode \"default\""; - "Return" = "mode \"default\""; + "Escape" = ''mode "default"''; + "Return" = ''mode "default"''; "h" = "resize shrink width 10 px or 5 ppt"; "j" = "resize grow height 10 px or 5 ppt"; "k" = "resize shrink height 10 px or 5 ppt"; @@ -199,19 +204,24 @@ in with config.niveum; { "${modifier}+y" = "exec x-www-browser"; "${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow"; - "${modifier}+a" = "exec --no-startup-id ${pkgs.rofi}/bin/rofi -display-window — -show window"; + "${modifier}+a" = + "exec --no-startup-id ${pkgs.rofi}/bin/rofi -display-window — -show window"; "${modifier}+d" = "exec --no-startup-id ${pkgs.dmenu}/bin/dmenu_run"; - "${modifier}+Shift+d" = "exec ${pkgs.writers.writeDash "notemenu" '' - set -efu - PATH=$PATH:${lib.makeBinPath [ pkgs.dmenu pkgs.findutils pkgs.coreutils ]} + "${modifier}+Shift+d" = "exec ${ + pkgs.writers.writeDash "notemenu" '' + set -efu + PATH=$PATH:${ + lib.makeBinPath [ pkgs.dmenu pkgs.findutils pkgs.coreutils ] + } - cd ~/notes - find . -type f -printf "%T@ %p\n" \ - | sort --reverse --numeric-sort \ - | cut --delimiter=" " --fields=2 \ - | dmenu -i \ - | xargs i3-sensible-terminal -e "$EDITOR" - ''}"; + cd ~/notes + find . -type f -printf "%T@ %p\n" \ + | sort --reverse --numeric-sort \ + | cut --delimiter=" " --fields=2 \ + | dmenu -i \ + | xargs i3-sensible-terminal -e "$EDITOR" + '' + }"; "${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5"; "${modifier}+u" = "exec ${emoji-menu}/bin/emoji-menu"; @@ -220,14 +230,21 @@ in with config.niveum; { "${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter"; "Print" = "exec flameshot-once"; - "XF86AudioLowerVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5"; + "XF86AudioLowerVolume" = + "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -d 5"; "XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t"; - "XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5"; - "XF86Calculator" = "exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc"; - "XF86AudioPause" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause"; - "XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause"; - "XF86AudioNext" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next"; - "XF86AudioPrev" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous"; + "XF86AudioRaiseVolume" = + "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5"; + "XF86Calculator" = + "exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc"; + "XF86AudioPause" = + "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause"; + "XF86AudioPlay" = + "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause"; + "XF86AudioNext" = + "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next"; + "XF86AudioPrev" = + "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous"; "XF86ScreenSaver" = "exec ${pkgs.xautolock}/bin/xautolock -locknow"; # key names detected with xorg.xev: diff --git a/configs/kdeconnect.nix b/configs/kdeconnect.nix index 67853fa..0166ce4 100644 --- a/configs/kdeconnect.nix +++ b/configs/kdeconnect.nix @@ -1,7 +1,13 @@ { networking.firewall = { - allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; - allowedUDPPortRanges = [ { from = 1714; to = 1764; } ]; + allowedTCPPortRanges = [{ + from = 1714; + to = 1764; + }]; + allowedUDPPortRanges = [{ + from = 1714; + to = 1764; + }]; }; home-manager.users.me = { diff --git a/configs/keybase.nix b/configs/keybase.nix index e595657..d730677 100644 --- a/configs/keybase.nix +++ b/configs/keybase.nix @@ -1,5 +1,4 @@ -{ config, ... }: -{ +{ config, ... }: { services.keybase.enable = true; services.kbfs = { diff --git a/configs/keyboard.nix b/configs/keyboard.nix index d2bc177..bd05ce6 100644 --- a/configs/keyboard.nix +++ b/configs/keyboard.nix @@ -1,16 +1,17 @@ { pkgs, lib, ... }: -let - commaSep = builtins.concatStringsSep ","; +let commaSep = builtins.concatStringsSep ","; in { services.xserver = { layout = commaSep [ "de" "gr" ]; xkbVariant = commaSep [ "T3" "polytonic" ]; - xkbOptions = commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ]; + xkbOptions = + commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ]; libinput.enable = true; }; console.keyMap = "de"; # improve held key rate - services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50"; + services.xserver.displayManager.sessionCommands = + "${pkgs.xorg.xset}/bin/xset r rate 300 50"; } diff --git a/configs/mail.nix b/configs/mail.nix index 7bf3168..bda7ec7 100644 --- a/configs/mail.nix +++ b/configs/mail.nix @@ -11,17 +11,18 @@ let neomutt.enable = true; notmuch.enable = false; }; - addArchiveCommand = folder: lib.recursiveUpdate { - neomutt.extraConfig = '' - # named-mailboxes " └Archive" "=${folder}" - macro pager,index \' "+${folder}" "Archive" - ''; - }; -in -{ + addArchiveCommand = folder: + lib.recursiveUpdate { + neomutt.extraConfig = '' + # named-mailboxes " └Archive" "=${folder}" + macro pager,index \' "+${folder}" "Archive" + ''; + }; +in { environment.systemPackages = [ pkgs.neomutt ]; - home-manager.users.me = let maildir = "${config.users.users.me.home}/mail"; in { + home-manager.users.me = let maildir = "${config.users.users.me.home}/mail"; + in { accounts.email.maildirBasePath = maildir; accounts.email.accounts = { cock = addArchiveCommand "Archive" (enableDefaults { @@ -41,19 +42,20 @@ in realName = "2210"; passwordCommand = pass "mail/2210@cock.li"; }); - kieran-gmail = addArchiveCommand "[Gmail]/Alle Nachrichten" (enableDefaults { - 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"; - folders = { - drafts = "[Gmail]/Entw&APw-rfe"; - sent = "[Gmail]/Gesendet"; - trash = "[Gmail]/Papierkorb"; - }; - }); + kieran-gmail = addArchiveCommand "[Gmail]/Alle Nachrichten" + (enableDefaults { + 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"; + folders = { + drafts = "[Gmail]/Entw&APw-rfe"; + sent = "[Gmail]/Gesendet"; + trash = "[Gmail]/Papierkorb"; + }; + }); hu-berlin = addArchiveCommand "Archives" (enableDefaults { primary = false; address = "meinhark@hu-berlin.de"; @@ -80,25 +82,29 @@ in vimKeys = true; checkStatsInterval = 60; settings = { - attribution = "\"%n (%a), %d:\""; - date_format = "\"%Y-%m-%d %H:%M\""; + attribution = ''"%n (%a), %d:"''; + date_format = ''"%Y-%m-%d %H:%M"''; # envelope_from = "yes"; # THIS BREAKS SENDING VIA MSMTP (the default setting already contains msmtpq --read-envelope) fast_reply = "yes"; # skip to compose when forwarding fcc_attach = "no"; # save attachments with the body - forward_format = "\"→ %s\""; # format of subject when forwarding + forward_format = ''"→ %s"''; # format of subject when forwarding forward_quote = "yes"; # include message in forwards include = "yes"; # include message in replies # index_format = "\"%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)\""; - index_format= "\"${pkgs.writeDash "mutt-index" '' - # http://www.mutt.org/doc/manual/#formatstrings - recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')" - # output to mutt - # V - echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%" - # args to mutt-index dash script - # V - ''} %r |\""; - mail_check = "60"; # to avoid lags using IMAP with some email providers (yahoo for example) + index_format = '' + "${ + pkgs.writeDash "mutt-index" '' + # http://www.mutt.org/doc/manual/#formatstrings + recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')" + # output to mutt + # V + echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%" + # args to mutt-index dash script + # V + '' + } %r |"''; + mail_check = + "60"; # to avoid lags using IMAP with some email providers (yahoo for example) mail_check_stats = "yes"; mark_old = "no"; # unread mail stay unread until read markers = "no"; # disables the `+` displayed at line wraps @@ -121,58 +127,235 @@ in ''); }; macros = [ - { action = ".."; map = "browser"; key = "h"; } # go to parent directory - { action = "T~UN." ; map = "index"; key = "\\Cr"; } # mark all messages read - { action = "mbsync -a"; map = "index"; key = "O"; } # run mbsync to sync all mail - { action = "all\\n"; map = "index"; key = "A"; } # show all messages (undo limit) + { + action = ".."; + map = "browser"; + key = "h"; + } # go to parent directory + { + action = "T~UN."; + map = "index"; + key = "\\Cr"; + } # mark all messages read + { + action = "mbsync -a"; + map = "index"; + key = "O"; + } # run mbsync to sync all mail + { + action = "all\\n"; + map = "index"; + key = "A"; + } # show all messages (undo limit) # { action = "=Archiveecho 'Saved to Archive'"; map = "index"; key = ",a"; } { - action = "unset wait_keyread -p 'Enter a search term to find with notmuch: ' x; echo \\$x >~/.cache/mutt_terms~i \\\"\\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/\^id:// for@a;$,=\"|\";print@a' | perl -le '@a=<>; chomp@a; s/\\+/\\\\+/ for@a;print@a' \\`\\\""; + action = '' + unset wait_keyread -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages $(cat ~/.cache/mutt_terms) | head -n 600 | perl -le '@a=<>;s/^id:// for@a;$,="|";print@a' | perl -le '@a=<>; chomp@a; s/\+/\\+/ for@a;print@a' \`\"''; map = "index"; key = "\\Cf"; } ]; binds = [ - { action = "complete-query"; key = ""; map = "editor"; } - { action = "display-message"; key = "l"; map = "index"; } - { action = "exit"; key = "h"; map = "attach"; } - { action = "exit"; key = "h"; map = "pager"; } - { action = "group-reply"; key = "R"; map = "index"; } - { action = "group-reply"; key = "R"; map = "pager"; } - { action = "limit"; key = "L"; map = "index"; } - { action = "next-entry"; key = "j"; map = "index"; } - { action = "next-line"; key = "\\005"; map = "pager"; } # mouse wheel - { action = "next-undeleted"; key = "\\005"; map = "index"; } # mouse wheel - { action = "noop"; key = ""; map = "editor"; } - { action = "noop"; key = "\\Cf"; map = "index"; } - { action = "noop"; key = "h"; map = "index"; } - { action = "noop"; key = "i"; map = "index"; } - { action = "noop"; key = "i"; map = "pager"; } - { action = "previous-entry"; key = "k"; map = "index"; } - { action = "previous-line"; key = "\\031"; map = "pager"; } # mouse wheel - { action = "previous-undeleted"; key = "\\031"; map = "index"; } # mouse wheel - { action = "select-entry"; key = "l"; map = "browser"; } - { action = "sidebar-next"; key = "\\Cj"; map = "index"; } - { action = "sidebar-next"; key = "\\Cj"; map = "pager"; } - { action = "sidebar-next-new"; key = "\\Cn"; map = "index"; } - { action = "sidebar-next-new"; key = "\\Cn"; map = "pager"; } - { action = "sidebar-open"; key = "\\Co"; map = "index"; } - { action = "sidebar-open"; key = "\\Co"; map = "pager"; } - { action = "sidebar-prev"; key = "\\Ck"; map = "index"; } - { action = "sidebar-prev"; key = "\\Ck"; map = "pager"; } - { action = "sidebar-prev-new"; key = "\\Cp"; map = "index"; } - { action = "sidebar-prev-new"; key = "\\Cp"; map = "pager"; } - { action = "sidebar-toggle-visible"; key = "B"; map = "index"; } - { action = "sidebar-toggle-visible"; key = "B"; map = "pager"; } - { action = "sync-mailbox"; key = "S"; map = "index"; } - { action = "sync-mailbox"; key = "S"; map = "pager"; } - { action = "tag-entry"; key = ""; map = "index"; } - { action = "undelete-message"; key = "U"; map = "index"; } - { action = "view-attachments"; key = "l"; map = "pager"; } - { action = "view-mailcap"; key = ""; map = "attach"; } - { action = "view-mailcap"; key = "l"; map = "attach"; } - { action = "view-raw-message"; key = "H"; map = "index"; } - { action = "view-raw-message"; key = "H"; map = "pager"; } + { + action = "complete-query"; + key = ""; + map = "editor"; + } + { + action = "display-message"; + key = "l"; + map = "index"; + } + { + action = "exit"; + key = "h"; + map = "attach"; + } + { + action = "exit"; + key = "h"; + map = "pager"; + } + { + action = "group-reply"; + key = "R"; + map = "index"; + } + { + action = "group-reply"; + key = "R"; + map = "pager"; + } + { + action = "limit"; + key = "L"; + map = "index"; + } + { + action = "next-entry"; + key = "j"; + map = "index"; + } + { + action = "next-line"; + key = "\\005"; + map = "pager"; + } # mouse wheel + { + action = "next-undeleted"; + key = "\\005"; + map = "index"; + } # mouse wheel + { + action = "noop"; + key = ""; + map = "editor"; + } + { + action = "noop"; + key = "\\Cf"; + map = "index"; + } + { + action = "noop"; + key = "h"; + map = "index"; + } + { + action = "noop"; + key = "i"; + map = "index"; + } + { + action = "noop"; + key = "i"; + map = "pager"; + } + { + action = "previous-entry"; + key = "k"; + map = "index"; + } + { + action = "previous-line"; + key = "\\031"; + map = "pager"; + } # mouse wheel + { + action = "previous-undeleted"; + key = "\\031"; + map = "index"; + } # mouse wheel + { + action = "select-entry"; + key = "l"; + map = "browser"; + } + { + action = "sidebar-next"; + key = "\\Cj"; + map = "index"; + } + { + action = "sidebar-next"; + key = "\\Cj"; + map = "pager"; + } + { + action = "sidebar-next-new"; + key = "\\Cn"; + map = "index"; + } + { + action = "sidebar-next-new"; + key = "\\Cn"; + map = "pager"; + } + { + action = "sidebar-open"; + key = "\\Co"; + map = "index"; + } + { + action = "sidebar-open"; + key = "\\Co"; + map = "pager"; + } + { + action = "sidebar-prev"; + key = "\\Ck"; + map = "index"; + } + { + action = "sidebar-prev"; + key = "\\Ck"; + map = "pager"; + } + { + action = "sidebar-prev-new"; + key = "\\Cp"; + map = "index"; + } + { + action = "sidebar-prev-new"; + key = "\\Cp"; + map = "pager"; + } + { + action = "sidebar-toggle-visible"; + key = "B"; + map = "index"; + } + { + action = "sidebar-toggle-visible"; + key = "B"; + map = "pager"; + } + { + action = "sync-mailbox"; + key = "S"; + map = "index"; + } + { + action = "sync-mailbox"; + key = "S"; + map = "pager"; + } + { + action = "tag-entry"; + key = ""; + map = "index"; + } + { + action = "undelete-message"; + key = "U"; + map = "index"; + } + { + action = "view-attachments"; + key = "l"; + map = "pager"; + } + { + action = "view-mailcap"; + key = ""; + map = "attach"; + } + { + action = "view-mailcap"; + key = "l"; + map = "attach"; + } + { + action = "view-raw-message"; + key = "H"; + map = "index"; + } + { + action = "view-raw-message"; + key = "H"; + map = "pager"; + } ]; extraConfig = '' auto_view text/html # automatically show html diff --git a/configs/mpv.nix b/configs/mpv.nix index 7892892..1adff5c 100644 --- a/configs/mpv.nix +++ b/configs/mpv.nix @@ -1,9 +1,6 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { environment.systemPackages = with pkgs; [ - (mpv-with-scripts.override { - scripts = [ mpvScripts.mpris ]; - }) + (mpv-with-scripts.override { scripts = [ mpvScripts.mpris ]; }) mpv-poll ]; diff --git a/configs/neovim.nix b/configs/neovim.nix index 747efa2..86c8bdb 100644 --- a/configs/neovim.nix +++ b/configs/neovim.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { environment.variables.EDITOR = pkgs.lib.mkForce "nvim"; environment.shellAliases.vi = "nvim"; environment.shellAliases.vim = "nvim"; @@ -7,14 +6,22 @@ nixpkgs.config.packageOverrides = pkgs: { vimPlugins = pkgs.vimPlugins // { - cheat-sh-vim = pkgs.callPackage {}; - vim-fetch = pkgs.callPackage {}; - vim-colors-paramount = pkgs.callPackage {}; - vim-256noir = pkgs.callPackage {}; - todo-txt-vim = pkgs.callPackage {}; - jq-vim = pkgs.callPackage {}; - vim-fsharp = pkgs.callPackage {}; - vim-reason-plus = pkgs.callPackage {}; + cheat-sh-vim = + pkgs.callPackage { }; + vim-fetch = + pkgs.callPackage { }; + vim-colors-paramount = + pkgs.callPackage + { }; + vim-256noir = + pkgs.callPackage { }; + todo-txt-vim = + pkgs.callPackage { }; + jq-vim = pkgs.callPackage { }; + vim-fsharp = + pkgs.callPackage { }; + vim-reason-plus = + pkgs.callPackage { }; }; }; @@ -42,7 +49,8 @@ vim-fetch vim-fugitive vim-gitgutter - vim-pandoc vim-pandoc-syntax # vim-pandoc-after + vim-pandoc + vim-pandoc-syntax # vim-pandoc-after vim-repeat vim-sensible # vim-startify diff --git a/configs/newsboat.nix b/configs/newsboat.nix index 78694d2..b098d87 100644 --- a/configs/newsboat.nix +++ b/configs/newsboat.nix @@ -1,6 +1,7 @@ { pkgs, config, lib, ... }: let - newsboat-home = "${config.users.users.me.home}/cloud/syncthing/common/newsboat"; + newsboat-home = + "${config.users.users.me.home}/cloud/syncthing/common/newsboat"; scripts = import { inherit pkgs lib; }; linkhandler-bin = "${scripts.linkhandler}/bin/linkhandler"; @@ -54,8 +55,7 @@ let color info red black bold color article white black ''; -in -{ +in { 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 "$@" diff --git a/configs/nixpkgs-unstable.nix b/configs/nixpkgs-unstable.nix index 9594e70..506a911 100644 --- a/configs/nixpkgs-unstable.nix +++ b/configs/nixpkgs-unstable.nix @@ -1,8 +1,5 @@ -{ config, ... }: -{ +{ config, ... }: { nixpkgs.config.packageOverrides = pkgs: { - unstable = import { - config = config.nixpkgs.config; - }; + unstable = import { config = config.nixpkgs.config; }; }; } diff --git a/configs/packages/default.nix b/configs/packages/default.nix index 1e6ea48..962ce81 100644 --- a/configs/packages/default.nix +++ b/configs/packages/default.nix @@ -1,16 +1,13 @@ { pkgs, lib, ... }: -let - scripts = import { inherit pkgs lib; }; -in -{ +let scripts = import { inherit pkgs lib; }; +in { imports = [ ./krebs.nix ./writing.nix ./python.nix ./haskell { - environment.systemPackages = - let + environment.systemPackages = let # nightly = pkgs.rustChannelOf { # date = "2019-12-27"; # channel = "nightly"; diff --git a/configs/packages/haskell/default.nix b/configs/packages/haskell/default.nix index 2defa41..9cce0f8 100644 --- a/configs/packages/haskell/default.nix +++ b/configs/packages/haskell/default.nix @@ -1,5 +1,4 @@ -{ config, pkgs, ... }: -{ +{ config, pkgs, ... }: { home-manager.users.me.home.file = { ".ghc/ghci.conf".text = '' :set editor vim @@ -10,15 +9,16 @@ :set -Wall :set -XOverloadedStrings ''; - # :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\"" - ".stack/config.yaml".text = let inherit (config.niveum) user; in builtins.toJSON { - templates.params = { - author-name = user.name; - author-email = user.email; - copyright = "Copyright: (c) 2019 ${user.name}"; - github-username = user.github; - }; + # :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\"" + ".stack/config.yaml".text = let inherit (config.niveum) user; + in builtins.toJSON { + templates.params = { + author-name = user.name; + author-email = user.email; + copyright = "Copyright: (c) 2019 ${user.name}"; + github-username = user.github; }; + }; }; services.hoogle = { @@ -27,19 +27,20 @@ port = 8091; }; - environment.systemPackages = with pkgs; [ - cabal2nix - cabal-install - hlint - haskellPackages.brittany - # haskellPackages.hfmt - (haskellPackages.ghcWithHoogle (import ./packages.nix)) - ] ++ map haskell.lib.justStaticExecutables [ - haskellPackages.ghcid - haskellPackages.hasktags - haskellPackages.hindent - haskellPackages.pointfree - # haskellPackages.pointful - haskellPackages.hpack - ]; + environment.systemPackages = with pkgs; + [ + cabal2nix + cabal-install + hlint + haskellPackages.brittany + # haskellPackages.hfmt + (haskellPackages.ghcWithHoogle (import ./packages.nix)) + ] ++ map haskell.lib.justStaticExecutables [ + haskellPackages.ghcid + haskellPackages.hasktags + haskellPackages.hindent + haskellPackages.pointfree + # haskellPackages.pointful + haskellPackages.hpack + ]; } diff --git a/configs/packages/krebs.nix b/configs/packages/krebs.nix index f93e4f7..cb78d8b 100644 --- a/configs/packages/krebs.nix +++ b/configs/packages/krebs.nix @@ -1,19 +1,24 @@ { lib, pkgs, ... }: -let krebs-packages = pkgs: { - dic = pkgs.callPackage {}; - yt-next = pkgs.callPackage {}; - acronym = pkgs.callPackage {}; - urban = pkgs.callPackage {}; - mpv-poll = pkgs.callPackage {}; - untilport = pkgs.callPackage {}; - kpaste = pkgs.callPackage {}; - krebspaste = pkgs.callPackage {}; - bepasty-client-cli = pkgs.callPackage {}; - irc-announce = pkgs.callPackage {}; - git-preview = pkgs.callPackage {}; -}; +let + krebs-packages = pkgs: { + dic = pkgs.callPackage { }; + yt-next = pkgs.callPackage { }; + acronym = pkgs.callPackage { }; + urban = pkgs.callPackage { }; + mpv-poll = pkgs.callPackage { }; + untilport = pkgs.callPackage { }; + kpaste = pkgs.callPackage { }; + krebspaste = pkgs.callPackage { }; + bepasty-client-cli = + pkgs.callPackage { }; + irc-announce = + pkgs.callPackage { }; + git-preview = + pkgs.callPackage { }; + }; in { nixpkgs.config.packageOverrides = krebs-packages; - environment.systemPackages = map (name: pkgs.${name}) (lib.attrNames (krebs-packages pkgs)); + environment.systemPackages = + map (name: pkgs.${name}) (lib.attrNames (krebs-packages pkgs)); } diff --git a/configs/packages/python.nix b/configs/packages/python.nix index 7ba2a21..4d9dc70 100644 --- a/configs/packages/python.nix +++ b/configs/packages/python.nix @@ -1,22 +1,19 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { environment.systemPackages = [ - (pkgs.python3.withPackages - (py: [ - py.black - py.python-language-server - py.pyls-mypy - py.pyls-black - py.pyls-isort - py.flake8 - py.flask - py.pygments - py.docopt - py.schema - py.ansicolors - py.virtualenv - ]) - ) + (pkgs.python3.withPackages (py: [ + py.black + py.python-language-server + py.pyls-mypy + py.pyls-black + py.pyls-isort + py.flake8 + py.flask + py.pygments + py.docopt + py.schema + py.ansicolors + py.virtualenv + ])) ]; home-manager.users.me.xdg.configFile."pycodestyle".text = '' diff --git a/configs/packages/writing.nix b/configs/packages/writing.nix index bd56f83..8250a1e 100644 --- a/configs/packages/writing.nix +++ b/configs/packages/writing.nix @@ -7,10 +7,13 @@ let inherit sha256; }; }; - makeStardictDataDir = dicts: pkgs.linkFarm "dictionaries" (map ({name, path}: { name = "dic/${name}"; inherit path; }) dicts); + makeStardictDataDir = dicts: + pkgs.linkFarm "dictionaries" (map ({ name, path }: { + name = "dic/${name}"; + inherit path; + }) dicts); scardanelli = config.networking.hostName == "scardanelli"; -in -{ +in { environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [ { name = "gr-de"; @@ -35,31 +38,31 @@ in } ]); - - environment.variables.CITATIONSTYLES = toString (pkgs.linkFarm "citation-styles" [ - (zoteroStyle { - name = "chicago-author-date-de"; - sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s"; - }) - (zoteroStyle { - name = "din-1505-2"; - sha256 = - if scardanelli - then "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq" - else "150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi"; - }) - (zoteroStyle { - name = "apa"; - sha256 = - if scardanelli - then "0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk" - else "1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8"; - }) - ]); + environment.variables.CITATIONSTYLES = toString + (pkgs.linkFarm "citation-styles" [ + (zoteroStyle { + name = "chicago-author-date-de"; + sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s"; + }) + (zoteroStyle { + name = "din-1505-2"; + sha256 = if scardanelli then + "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq" + else + "150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi"; + }) + (zoteroStyle { + name = "apa"; + sha256 = if scardanelli then + "0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk" + else + "1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8"; + }) + ]); environment.systemPackages = with pkgs; [ texlive.combined.scheme-full - (aspellWithDicts (dict: [dict.de dict.en dict.en-computers])) + (aspellWithDicts (dict: [ dict.de dict.en dict.en-computers ])) haskellPackages.pandoc-citeproc # nur.repos.kmein.text2pdf libreoffice diff --git a/configs/printing.nix b/configs/printing.nix index 1a5ca90..9cb7e81 100644 --- a/configs/printing.nix +++ b/configs/printing.nix @@ -1,8 +1,6 @@ { pkgs, ... }: -let - hp-driver = pkgs.hplipWithPlugin; -in -{ +let hp-driver = pkgs.hplipWithPlugin; +in { services.printing = { enable = true; drivers = [ hp-driver ]; @@ -15,24 +13,21 @@ in users.users.me.extraGroups = [ "scanner" ]; - hardware.printers.ensurePrinters = [ - { - name = "OfficeJet"; - location = "Zimmer"; - deviceUri = "https://192.168.178.27"; - model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd"; - ppdOptions = { - Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None - PageSize = "A4"; # A4 A4.FB A4.Duplex - MediaType = "Plain"; - OutputMode = "Normal"; - ColorModel = "KGray"; # RGB CMYGray KGray - }; - } - ]; + hardware.printers.ensurePrinters = [{ + name = "OfficeJet"; + location = "Zimmer"; + deviceUri = "https://192.168.178.27"; + model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd"; + ppdOptions = { + Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None + PageSize = "A4"; # A4 A4.FB A4.Duplex + MediaType = "Plain"; + OutputMode = "Normal"; + ColorModel = "KGray"; # RGB CMYGray KGray + }; + }]; } -/* -HP/hp-officejet_4650_series.ppd.gz -drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd +/* HP/hp-officejet_4650_series.ppd.gz + drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd */ diff --git a/configs/redshift.nix b/configs/redshift.nix index ff58464..e44a947 100644 --- a/configs/redshift.nix +++ b/configs/redshift.nix @@ -1,3 +1 @@ -{ - services.redshift.enable = false; -} +{ services.redshift.enable = false; } diff --git a/configs/retiolum.nix b/configs/retiolum.nix index 3f7a302..ed52226 100644 --- a/configs/retiolum.nix +++ b/configs/retiolum.nix @@ -1,10 +1,7 @@ -{ config, pkgs, ... }: -{ +{ config, pkgs, ... }: { imports = [ ]; - networking.hosts = { - "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; - }; + networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; }; environment.etc."tinc/retiolum/rsa_key.priv" = { text = builtins.readFile ; diff --git a/configs/rofi.nix b/configs/rofi.nix index faa88da..af556f4 100644 --- a/configs/rofi.nix +++ b/configs/rofi.nix @@ -18,19 +18,28 @@ with config.niveum; { background = window.background; backgroundAlt = window.background; foreground = colours.background; - highlight = { foreground = colours.cyan.dark; inherit (window) background; }; + highlight = { + foreground = colours.cyan.dark; + inherit (window) background; + }; }; active = { background = window.background; backgroundAlt = window.background; foreground = colours.yellow.dark; - highlight = { foreground = colours.green.dark; inherit (window) background; }; + highlight = { + foreground = colours.green.dark; + inherit (window) background; + }; }; urgent = { background = window.background; backgroundAlt = window.background; foreground = colours.red.dark; - highlight = { foreground = colours.magenta.dark; inherit (window) background; }; + highlight = { + foreground = colours.magenta.dark; + inherit (window) background; + }; }; }; }; diff --git a/configs/spotify.nix b/configs/spotify.nix index e50f89b..e570329 100644 --- a/configs/spotify.nix +++ b/configs/spotify.nix @@ -2,29 +2,25 @@ let inherit (import { inherit pkgs; }) toTOML; inherit (lib.strings) fileContents; -in -{ - environment.systemPackages = with pkgs; [ - spotify - spotify-tui - playerctl - ]; +in { + environment.systemPackages = with pkgs; [ spotify spotify-tui playerctl ]; # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix - systemd.user.services.spotifyd = - let + systemd.user.services.spotifyd = let spotifyd = pkgs.unstable.spotifyd.override { withMpris = true; withPulseAudio = true; inherit (pkgs) libpulseaudio dbus; }; - spotifydConf = pkgs.writeText "spotifyd.conf" (lib.generators.toINI {} { + spotifydConf = pkgs.writeText "spotifyd.conf" (lib.generators.toINI { } { global = { username = fileContents ; password = fileContents ; backend = "pulseaudio"; on_song_change_hook = toString (pkgs.writers.writeDash "songinfo" '' - PATH=$PATH:${lib.makeBinPath [pkgs.playerctl pkgs.gawk pkgs.libnotify]} + PATH=$PATH:${ + lib.makeBinPath [ pkgs.playerctl pkgs.gawk pkgs.libnotify ] + } metadata=$(playerctl metadata --player spotifyd) title=$(echo "$metadata" | awk '/^xesam:title\s/ { print substr($0, index($0, $3)) }') artist=$(echo "$metadata" | awk '/^xesam:artist\s/ { print substr($0, index($0, $3)) }' | paste --serial --delimiters "/") @@ -38,7 +34,8 @@ in after = [ "network-online.target" "sound.target" ]; description = "spotifyd, a Spotify playing daemon"; serviceConfig = { - ExecStart = "${spotifyd}/bin/spotifyd --no-daemon --config-path ${spotifydConf}"; + ExecStart = + "${spotifyd}/bin/spotifyd --no-daemon --config-path ${spotifydConf}"; Restart = "always"; RestartSec = 12; }; diff --git a/configs/ssh.nix b/configs/ssh.nix index dcf9ad2..06d736a 100644 --- a/configs/ssh.nix +++ b/configs/ssh.nix @@ -2,12 +2,16 @@ let sshPort = 22022; 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"; - wilde = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde"; + 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"; + wilde = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde"; }; in { - services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add"; + services.xserver.displayManager.sessionCommands = + "${pkgs.openssh}/bin/ssh-add"; programs.ssh.startAgent = true; @@ -19,17 +23,11 @@ in { users.motd = "Welcome to ${config.networking.hostName}!"; - users.users.root.openssh.authorizedKeys.keys = [ - sshKey.homeros - sshKey.scardanelli - sshKey.wilde - ]; + users.users.root.openssh.authorizedKeys.keys = + [ sshKey.homeros sshKey.scardanelli sshKey.wilde ]; - users.users.me.openssh.authorizedKeys.keys = [ - sshKey.homeros - sshKey.scardanelli - sshKey.wilde - ]; + users.users.me.openssh.authorizedKeys.keys = + [ sshKey.homeros sshKey.scardanelli sshKey.wilde ]; home-manager.users.me.programs.ssh = { enable = true; diff --git a/configs/sxiv.nix b/configs/sxiv.nix index 6095100..0b75f68 100644 --- a/configs/sxiv.nix +++ b/configs/sxiv.nix @@ -15,39 +15,50 @@ in { environment.systemPackages = [ pkgs.sxiv ]; # TODO fix - home-manager.users.me.xdg.configFile."sxiv/exec/key-handler".source = pkgs.writers.writeDash "key-handler" '' - PATH=$PATH:${lib.makeBinPath [ pkgs.gnused pkgs.gawk pkgs.dmenu pkgs.coreutils pkgs.libnotify pkgs.imagemagick pkgs.xclip ]} + home-manager.users.me.xdg.configFile."sxiv/exec/key-handler".source = + pkgs.writers.writeDash "key-handler" '' + PATH=$PATH:${ + lib.makeBinPath [ + pkgs.gnused + pkgs.gawk + pkgs.dmenu + pkgs.coreutils + pkgs.libnotify + pkgs.imagemagick + pkgs.xclip + ] + } - echo >&2 key "$1" pressed - while read file; do - case "$1" in - "c") - [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${important-directories} | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" - [ -z "$destdir" ] && exit - [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit - cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & - ;; - "m") - [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${important-directories} | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" - [ -z "$destdir" ] && exit - [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit - mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & - ;; - "r") - convert -rotate 90 "$file" "$file" ;; - "R") - convert -rotate -90 "$file" "$file" ;; - "f") - convert -flop "$file" "$file" ;; - "y") - echo -n "$file" | xclip -selection clipboard && - notify-send "$file copied to clipboard" & ;; - "Y") - readlink -f "$file" | xclip -selection clipboard && - notify-send "$(readlink -f "$file") copied to clipboard" & ;; - "d") - [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; - esac - done - ''; + echo >&2 key "$1" pressed + while read file; do + case "$1" in + "c") + [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${important-directories} | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" + [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & + ;; + "m") + [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${important-directories} | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" + [ -z "$destdir" ] && exit + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & + ;; + "r") + convert -rotate 90 "$file" "$file" ;; + "R") + convert -rotate -90 "$file" "$file" ;; + "f") + convert -flop "$file" "$file" ;; + "y") + echo -n "$file" | xclip -selection clipboard && + notify-send "$file copied to clipboard" & ;; + "Y") + readlink -f "$file" | xclip -selection clipboard && + notify-send "$(readlink -f "$file") copied to clipboard" & ;; + "d") + [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; + esac + done + ''; } diff --git a/configs/themes/antares.nix b/configs/themes/antares.nix index acc8b8e..7602793 100644 --- a/configs/themes/antares.nix +++ b/configs/themes/antares.nix @@ -1,13 +1,37 @@ { niveum.colours = rec { - black = { bright = "#151515"; dark = "#000000"; }; - red = { bright = "#de575c"; dark = "#de575c"; }; - yellow = { bright = "#ebe971"; dark = "#ebe971"; }; - green = { bright = "#00b853"; dark = "#00b853"; }; - blue = { bright = "#90d0f0"; dark = "#7fc6f0"; }; - magenta = { bright = "#cf9ffa"; dark = "#cf9ffa"; }; - cyan = { bright = "#4ae5e8"; dark = "#4ae5e8"; }; - white = { bright = "#ffffff"; dark = "#bbbbbb"; }; + black = { + bright = "#151515"; + dark = "#000000"; + }; + red = { + bright = "#de575c"; + dark = "#de575c"; + }; + yellow = { + bright = "#ebe971"; + dark = "#ebe971"; + }; + green = { + bright = "#00b853"; + dark = "#00b853"; + }; + blue = { + bright = "#90d0f0"; + dark = "#7fc6f0"; + }; + magenta = { + bright = "#cf9ffa"; + dark = "#cf9ffa"; + }; + cyan = { + bright = "#4ae5e8"; + dark = "#4ae5e8"; + }; + white = { + bright = "#ffffff"; + dark = "#bbbbbb"; + }; background = black.dark; foreground = white.dark; cursor = green.bright; diff --git a/configs/themes/apprentice.nix b/configs/themes/apprentice.nix index 638bd9d..de1a416 100644 --- a/configs/themes/apprentice.nix +++ b/configs/themes/apprentice.nix @@ -1,13 +1,37 @@ { niveum.colours = { - black = { bright = "#444444"; dark = "#1c1c1c"; }; - red = { bright = "#ff8700"; dark = "#af5f5f"; }; - green = { bright = "#87af87"; dark = "#5f875f"; }; - yellow = { bright = "#ffffaf"; dark = "#87875f"; }; - blue = { bright = "#8fafd7"; dark = "#5f87af"; }; - magenta = { bright = "#8787af"; dark = "#5f5f87"; }; - cyan = { bright = "#5fafaf"; dark = "#5f8787"; }; - white = { bright = "#999999"; dark = "#6c6c6c"; }; + black = { + bright = "#444444"; + dark = "#1c1c1c"; + }; + red = { + bright = "#ff8700"; + dark = "#af5f5f"; + }; + green = { + bright = "#87af87"; + dark = "#5f875f"; + }; + yellow = { + bright = "#ffffaf"; + dark = "#87875f"; + }; + blue = { + bright = "#8fafd7"; + dark = "#5f87af"; + }; + magenta = { + bright = "#8787af"; + dark = "#5f5f87"; + }; + cyan = { + bright = "#5fafaf"; + dark = "#5f8787"; + }; + white = { + bright = "#999999"; + dark = "#6c6c6c"; + }; background = "#262626"; foreground = "#bcbcbc"; cursor = "#bcbcbc"; diff --git a/configs/themes/connermcd.nix b/configs/themes/connermcd.nix index 7b20c89..2984ca6 100644 --- a/configs/themes/connermcd.nix +++ b/configs/themes/connermcd.nix @@ -1,13 +1,37 @@ { niveum.colours = rec { - black = { bright = "#454545"; dark = "#222222"; }; - red = { bright = "#FA8072"; dark = "#B22222"; }; - green = { bright = "#779A3E"; dark = "#556B2F"; }; - yellow = { bright = "#DAA520"; dark = "#B8860B"; }; - blue = { bright = "#6495ED"; dark = "#4682B4"; }; - magenta = { bright = "#DA70D6"; dark = "#9932CC"; }; - cyan = { bright = "#B0E0E6"; dark = "#87CEEB"; }; - white = { bright = "#FFFFFF"; dark = "#C0C0C0"; }; + black = { + bright = "#454545"; + dark = "#222222"; + }; + red = { + bright = "#FA8072"; + dark = "#B22222"; + }; + green = { + bright = "#779A3E"; + dark = "#556B2F"; + }; + yellow = { + bright = "#DAA520"; + dark = "#B8860B"; + }; + blue = { + bright = "#6495ED"; + dark = "#4682B4"; + }; + magenta = { + bright = "#DA70D6"; + dark = "#9932CC"; + }; + cyan = { + bright = "#B0E0E6"; + dark = "#87CEEB"; + }; + white = { + bright = "#FFFFFF"; + dark = "#C0C0C0"; + }; background = "#000000"; foreground = "#AAAAAA"; cursor = green.bright; diff --git a/configs/themes/mac-os.nix b/configs/themes/mac-os.nix index 1db7391..d6d418a 100644 --- a/configs/themes/mac-os.nix +++ b/configs/themes/mac-os.nix @@ -1,13 +1,37 @@ { niveum.colours = rec { - black = { bright = "#818383"; dark = "#000000"; }; - red = { bright = "#fc391f"; dark = "#c23621"; }; - yellow = { bright = "#eaec23"; dark = "#adad27"; }; - green = { bright = "#31e722"; dark = "#25bc24"; }; - blue = { bright = "#5833ff"; dark = "#492ee1"; }; - magenta = { bright = "#f935f8"; dark = "#d338d3"; }; - cyan = { bright = "#14f0f0"; dark = "#33bbc8"; }; - white = { bright = "#e9ebeb"; dark = "#cbcccd"; }; + black = { + bright = "#818383"; + dark = "#000000"; + }; + red = { + bright = "#fc391f"; + dark = "#c23621"; + }; + yellow = { + bright = "#eaec23"; + dark = "#adad27"; + }; + green = { + bright = "#31e722"; + dark = "#25bc24"; + }; + blue = { + bright = "#5833ff"; + dark = "#492ee1"; + }; + magenta = { + bright = "#f935f8"; + dark = "#d338d3"; + }; + cyan = { + bright = "#14f0f0"; + dark = "#33bbc8"; + }; + white = { + bright = "#e9ebeb"; + dark = "#cbcccd"; + }; background = black.dark; foreground = white.dark; cursor = green.bright; diff --git a/configs/themes/owickstrom-dark.nix b/configs/themes/owickstrom-dark.nix index 1fbc8de..4e7cd8e 100644 --- a/configs/themes/owickstrom-dark.nix +++ b/configs/themes/owickstrom-dark.nix @@ -1,13 +1,37 @@ { niveum.colours = rec { - black = { bright = "#4b4b4b"; dark = "#242424"; }; - red = { bright = "#fc1c18"; dark = "#d71c15"; }; - green = { bright = "#6bc219"; dark = "#5aa513"; }; - yellow = { bright = "#fec80e"; dark = "#fdb40c"; }; - blue = { bright = "#0955ff"; dark = "#063b8c"; }; - magenta = { bright = "#fb0050"; dark = "#e40038"; }; - cyan = { bright = "#3ea8fc"; dark = "#2595e1"; }; - white = { bright = "#8c00ec"; dark = "#efefef"; }; + black = { + bright = "#4b4b4b"; + dark = "#242424"; + }; + red = { + bright = "#fc1c18"; + dark = "#d71c15"; + }; + green = { + bright = "#6bc219"; + dark = "#5aa513"; + }; + yellow = { + bright = "#fec80e"; + dark = "#fdb40c"; + }; + blue = { + bright = "#0955ff"; + dark = "#063b8c"; + }; + magenta = { + bright = "#fb0050"; + dark = "#e40038"; + }; + cyan = { + bright = "#3ea8fc"; + dark = "#2595e1"; + }; + white = { + bright = "#8c00ec"; + dark = "#efefef"; + }; background = "#181818"; foreground = white.dark; cursor = "#bbbbbb"; diff --git a/configs/themes/owickstrom.nix b/configs/themes/owickstrom.nix index d349bb8..b525d2c 100644 --- a/configs/themes/owickstrom.nix +++ b/configs/themes/owickstrom.nix @@ -1,13 +1,37 @@ { niveum.colours = rec { - black = { bright = "#282c34"; dark = "#282c34"; }; - red = { bright = "#e06c75"; dark = "#e06c75"; }; - green = { bright = "#98c379"; dark = "#98c379"; }; - yellow = { bright = "#e5c07b"; dark = "#e5c07b"; }; - blue = { bright = "#61afef"; dark = "#61afef"; }; - magenta = { bright = "#c678dd"; dark = "#c678dd"; }; - cyan = { bright = "#56b6c2"; dark = "#56b6c2"; }; - white = { bright = "#dcdfe4"; dark = "#dcdfe4"; }; + black = { + bright = "#282c34"; + dark = "#282c34"; + }; + red = { + bright = "#e06c75"; + dark = "#e06c75"; + }; + green = { + bright = "#98c379"; + dark = "#98c379"; + }; + yellow = { + bright = "#e5c07b"; + dark = "#e5c07b"; + }; + blue = { + bright = "#61afef"; + dark = "#61afef"; + }; + magenta = { + bright = "#c678dd"; + dark = "#c678dd"; + }; + cyan = { + bright = "#56b6c2"; + dark = "#56b6c2"; + }; + white = { + bright = "#dcdfe4"; + dark = "#dcdfe4"; + }; background = black.dark; foreground = white.bright; cursor = "#a3b3cc"; diff --git a/configs/themes/solarized-dark.nix b/configs/themes/solarized-dark.nix index 62b0962..413a35e 100644 --- a/configs/themes/solarized-dark.nix +++ b/configs/themes/solarized-dark.nix @@ -1,13 +1,37 @@ { niveum.colours = rec { - black = { dark = "#073642"; bright = "#002b36"; }; - red = { dark = "#dc322f"; bright = "#cb4b16"; }; - yellow = { dark = "#b58900"; bright = "#657b83"; }; - green = { dark = "#859900"; bright = "#586e75"; }; - blue = { dark = "#268bd2"; bright = "#839496"; }; - magenta = { dark = "#d33682"; bright = "#6c71c4"; }; - cyan = { dark = "#2aa198"; bright = "#93a1a1"; }; - white = { dark = "#eee8d5"; bright = "#fdf6e3"; }; + black = { + dark = "#073642"; + bright = "#002b36"; + }; + red = { + dark = "#dc322f"; + bright = "#cb4b16"; + }; + yellow = { + dark = "#b58900"; + bright = "#657b83"; + }; + green = { + dark = "#859900"; + bright = "#586e75"; + }; + blue = { + dark = "#268bd2"; + bright = "#839496"; + }; + magenta = { + dark = "#d33682"; + bright = "#6c71c4"; + }; + cyan = { + dark = "#2aa198"; + bright = "#93a1a1"; + }; + white = { + dark = "#eee8d5"; + bright = "#fdf6e3"; + }; background = black.bright; foreground = blue.bright; cursor = cyan.bright; diff --git a/configs/themes/solarized-light.nix b/configs/themes/solarized-light.nix index 04c0a08..cdd595c 100644 --- a/configs/themes/solarized-light.nix +++ b/configs/themes/solarized-light.nix @@ -1,13 +1,37 @@ { niveum.colours = rec { - black = { dark = "#073642"; bright = "#002b36"; }; - red = { dark = "#dc322f"; bright = "#cb4b16"; }; - yellow = { dark = "#b58900"; bright = "#657b83"; }; - green = { dark = "#859900"; bright = "#586e75"; }; - blue = { dark = "#268bd2"; bright = "#839496"; }; - magenta = { dark = "#d33682"; bright = "#6c71c4"; }; - cyan = { dark = "#2aa198"; bright = "#93a1a1"; }; - white = { dark = "#eee8d5"; bright = "#fdf6e3"; }; + black = { + dark = "#073642"; + bright = "#002b36"; + }; + red = { + dark = "#dc322f"; + bright = "#cb4b16"; + }; + yellow = { + dark = "#b58900"; + bright = "#657b83"; + }; + green = { + dark = "#859900"; + bright = "#586e75"; + }; + blue = { + dark = "#268bd2"; + bright = "#839496"; + }; + magenta = { + dark = "#d33682"; + bright = "#6c71c4"; + }; + cyan = { + dark = "#2aa198"; + bright = "#93a1a1"; + }; + white = { + dark = "#eee8d5"; + bright = "#fdf6e3"; + }; background = white.bright; foreground = yellow.bright; cursor = green.bright; diff --git a/configs/theming.nix b/configs/theming.nix index 04bc5d8..6c2ea33 100644 --- a/configs/theming.nix +++ b/configs/theming.nix @@ -3,19 +3,12 @@ let inherit (config.niveum) theme colourPalette; in { console.colors = map (c: lib.strings.removePrefix "#" c) colourPalette; - environment.systemPackages = [ - theme.gtk.package - theme.icon.package - theme.cursor.package - ]; + environment.systemPackages = + [ theme.gtk.package theme.icon.package theme.cursor.package ]; services.xserver.displayManager.lightdm.greeters.gtk = { - theme = { - inherit (theme.gtk) name package; - }; - iconTheme = { - inherit (theme.icon) name package; - }; + theme = { inherit (theme.gtk) name package; }; + iconTheme = { inherit (theme.icon) name package; }; }; home-manager.users.me = { diff --git a/configs/tmux.nix b/configs/tmux.nix index 06649f2..df866d9 100644 --- a/configs/tmux.nix +++ b/configs/tmux.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { environment.systemPackages = [ pkgs.tmuxp pkgs.reptyr # move programs over to a tmux session diff --git a/configs/traadfri.nix b/configs/traadfri.nix index b391eef..303781f 100644 --- a/configs/traadfri.nix +++ b/configs/traadfri.nix @@ -1,5 +1,4 @@ -{ pkgs, lib, ... }: -{ +{ pkgs, lib, ... }: { imports = [ ]; niveum.traadfri = { diff --git a/configs/version.nix b/configs/version.nix index f5a21c0..00112fd 100644 --- a/configs/version.nix +++ b/configs/version.nix @@ -1,7 +1,5 @@ { lib, config, ... }: -let - inherit (lib.sources) commitIdFromGitRepo; -in -{ +let inherit (lib.sources) commitIdFromGitRepo; +in { environment.etc."niveum/version".text = commitIdFromGitRepo ; } diff --git a/configs/vscode.nix b/configs/vscode.nix index b34f5fa..6b683eb 100644 --- a/configs/vscode.nix +++ b/configs/vscode.nix @@ -1,6 +1 @@ -{ pkgs, ... }: -{ - environment.systemPackages = [ - pkgs.vscode - ]; -} +{ pkgs, ... }: { environment.systemPackages = [ pkgs.vscode ]; } diff --git a/configs/wallpaper.nix b/configs/wallpaper.nix index a0c948b..429215c 100644 --- a/configs/wallpaper.nix +++ b/configs/wallpaper.nix @@ -1,22 +1,21 @@ { pkgs, lib, ... }: let - /* - elementary-wallpapers = pkgs.fetchFromGitHub { - owner = "elementary"; - repo = "wallpapers"; - rev = "6c81141e33ef69702a3f48e7181cb979a680190d"; # tag: 5.4 - sha256 = "1ihvv9v8m5f2n2v3bgg769l52wbg241zgp3d45q6phk7p8s1gz3s"; - }; - elementary-wallpapers-jpg = pkgs.runCommand "wallpapers" {} '' - mkdir $out - cp ${elementary-wallpapers}/*.jpg $out/ - ''; - luke-smith-wallpapers = pkgs.fetchFromGitHub { - owner = "LukeSmithxyz"; - repo = "wallpapers"; - rev = "33cad3099919366cea2627f930da9b47609e8554"; - sha256 = "1li6rrn016fpgvmnijqhvkp07kj83cjwcjx2l2b3asb99d51814i"; - }; + /* elementary-wallpapers = pkgs.fetchFromGitHub { + owner = "elementary"; + repo = "wallpapers"; + rev = "6c81141e33ef69702a3f48e7181cb979a680190d"; # tag: 5.4 + sha256 = "1ihvv9v8m5f2n2v3bgg769l52wbg241zgp3d45q6phk7p8s1gz3s"; + }; + elementary-wallpapers-jpg = pkgs.runCommand "wallpapers" {} '' + mkdir $out + cp ${elementary-wallpapers}/*.jpg $out/ + ''; + luke-smith-wallpapers = pkgs.fetchFromGitHub { + owner = "LukeSmithxyz"; + repo = "wallpapers"; + rev = "33cad3099919366cea2627f930da9b47609e8554"; + sha256 = "1li6rrn016fpgvmnijqhvkp07kj83cjwcjx2l2b3asb99d51814i"; + }; */ kmein-wallpapers = pkgs.fetchFromGitHub { owner = "kmein"; @@ -24,8 +23,7 @@ let rev = "7c553bc6bd78afa6dbf2824691466bbad0d8e6e9"; sha256 = "1zik5z1cq1084j1hdwm204afz89f5hpg21z0vvcbppzkmldfxnnq"; }; -in -{ +in { home-manager.users.me = { services.random-background = { enable = true; diff --git a/configs/xautolock.nix b/configs/xautolock.nix index 6a80fe5..d8b3df4 100644 --- a/configs/xautolock.nix +++ b/configs/xautolock.nix @@ -25,14 +25,15 @@ let -invalid "Computer says no." \ -mode "$MODE" ''; -in -{ +in { services.xserver.xautolock = rec { enable = true; - killer = if suspendIfBored then "${pkgs.systemd}/bin/systemctl suspend" else null; + killer = + if suspendIfBored then "${pkgs.systemd}/bin/systemctl suspend" else null; locker = "${my-xlock}/bin/xlock"; nowlocker = locker; enableNotifier = true; - notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking" "in 10 seconds."''; + notifier = '' + ${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking" "in 10 seconds."''; }; } diff --git a/configs/zsh.nix b/configs/zsh.nix index 9fa40f3..93499df 100644 --- a/configs/zsh.nix +++ b/configs/zsh.nix @@ -1,9 +1,9 @@ -{ config, pkgs, ... }: -{ - home-manager.users.me.home.file.".zshrc".text = "# nothing to see here\n"; +{ config, pkgs, ... }: { + home-manager.users.me.home.file.".zshrc".text = '' + # nothing to see here + ''; - programs.zsh = - let + programs.zsh = let zsh-completions = pkgs.fetchFromGitHub { owner = "zsh-users"; repo = "zsh-completions"; diff --git a/deploy.nix b/deploy.nix index d882b0d..7e06cff 100644 --- a/deploy.nix +++ b/deploy.nix @@ -1,42 +1,44 @@ let gitFromJson = path: - let object = importJson path; in { - inherit (object) url; - ref = object.rev; - }; + let object = importJson path; + in { + inherit (object) url; + ref = object.rev; + }; krops = builtins.fetchGit (gitFromJson .versions/krops.json); lib = import "${krops}/lib"; - pkgs = import "${krops}/pkgs" {}; - importJson = (import {}).lib.importJSON; + pkgs = import "${krops}/pkgs" { }; + importJson = (import { }).lib.importJSON; regularSystem = path: name: { - source = lib.evalSource [ - { - niveum.file = toString ./.; - system.file = toString path; - nixos-config.symlink = "system/configuration.nix"; + source = lib.evalSource [{ + niveum.file = toString ./.; + system.file = toString path; + nixos-config.symlink = "system/configuration.nix"; - nixpkgs.git = gitFromJson .versions/nixpkgs.json; - nixos-unstable.git = gitFromJson .versions/nixpkgs-unstable.json; - home-manager.git = gitFromJson .versions/home-manager.json; - stockholm.git = gitFromJson .versions/stockholm.json; - secrets.pass = { - dir = toString ~/.password-store/systems; - inherit name; - }; - shared-secrets.pass = { - dir = toString ~/.password-store; - name = "shared"; - }; - } - ]; + nixpkgs.git = gitFromJson .versions/nixpkgs.json; + nixos-unstable.git = gitFromJson .versions/nixpkgs-unstable.json; + home-manager.git = gitFromJson .versions/home-manager.json; + stockholm.git = gitFromJson .versions/stockholm.json; + secrets.pass = { + dir = toString ~/.password-store/systems; + inherit name; + }; + shared-secrets.pass = { + dir = toString ~/.password-store; + name = "shared"; + }; + }]; target = "root@${name}:22022"; }; inherit (pkgs.krops) writeDeploy; in { - scardanelli = writeDeploy "deploy-scardanelli" (regularSystem systems/scardanelli "scardanelli"); - homeros = writeDeploy "deploy-homeros" (regularSystem systems/homeros "homeros"); + scardanelli = writeDeploy "deploy-scardanelli" + (regularSystem systems/scardanelli "scardanelli"); + homeros = + writeDeploy "deploy-homeros" (regularSystem systems/homeros "homeros"); wilde = writeDeploy "deploy-wilde" (regularSystem systems/wilde "wilde"); - catullus = writeDeploy "deploy-catullus" (regularSystem systems/catullus "catullus"); + catullus = + writeDeploy "deploy-catullus" (regularSystem systems/catullus "catullus"); } diff --git a/dot/i3status-rust.nix b/dot/i3status-rust.nix index 295d24a..003acf6 100644 --- a/dot/i3status-rust.nix +++ b/dot/i3status-rust.nix @@ -1,10 +1,10 @@ { pkgs, wifi-interface, colours, batteryBlock }: let - setsid = script: pkgs.writers.writeDash "setsid-command" '' - ${pkgs.utillinux}/bin/setsid ${script} - ''; -in -{ + setsid = script: + pkgs.writers.writeDash "setsid-command" '' + ${pkgs.utillinux}/bin/setsid ${script} + ''; +in { theme = { name = "plain"; overrides = { @@ -22,7 +22,7 @@ in info_bg = colours.background; separator = ""; separator_bg = "auto"; - separator_fg = "auto" ; + separator_fg = "auto"; }; }; icons = { @@ -78,11 +78,11 @@ in | tail -n 1 \ | ${pkgs.gawk}/bin/awk '{ print "⏳ " $2 "/" $4 }' ''; - on_click = - let - sleepSeconds = 2.5; + on_click = let sleepSeconds = 2.5; in pkgs.writers.writeDash "show-tasks" '' - ${pkgs.st}/bin/st -c floating -e ${pkgs.dash}/bin/dash -c "${pkgs.todo-txt-cli}/bin/todo.sh list && sleep ${toString sleepSeconds}" + ${pkgs.st}/bin/st -c floating -e ${pkgs.dash}/bin/dash -c "${pkgs.todo-txt-cli}/bin/todo.sh list && sleep ${ + toString sleepSeconds + }" ''; } { @@ -141,9 +141,7 @@ in format_mem = "{Mug}G"; clickable = false; } - { - block = "load"; - } + { block = "load"; } { block = "time"; interval = 5; diff --git a/dot/matterbridge.nix b/dot/matterbridge.nix index ac2ea95..7996b75 100644 --- a/dot/matterbridge.nix +++ b/dot/matterbridge.nix @@ -8,20 +8,18 @@ Server = "irc.freenode.net:6667"; Nick = "tg_bridge"; }; - gateway = [ - { - name = "krebs-bridge"; - enable = true; - inout = [ - { - account = "irc.freenode"; - channel = "#krebs"; - } - { - account = "telegram.kmein"; - channel = "-330372458"; - } - ]; - } - ]; + gateway = [{ + name = "krebs-bridge"; + enable = true; + inout = [ + { + account = "irc.freenode"; + channel = "#krebs"; + } + { + account = "telegram.kmein"; + channel = "-330372458"; + } + ]; + }]; } diff --git a/lib/default.nix b/lib/default.nix index 1ad2d60..fb3435b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,7 +1,7 @@ -{ pkgs, ... }: -rec { - writeTOML = object: pkgs.runCommand "generated.toml" {} '' - echo '${builtins.toJSON object}' | ${pkgs.remarshal}/bin/json2toml > $out - ''; +{ pkgs, ... }: rec { + writeTOML = object: + pkgs.runCommand "generated.toml" { } '' + echo '${builtins.toJSON object}' | ${pkgs.remarshal}/bin/json2toml > $out + ''; toTOML = object: builtins.readFile (writeTOML object); } diff --git a/modules/constants.nix b/modules/constants.nix index 081d568..546d52d 100644 --- a/modules/constants.nix +++ b/modules/constants.nix @@ -34,9 +34,7 @@ let }; in { options.niveum = { - applications = { - fileManager = mkOption { type = types.str; }; - }; + applications = { fileManager = mkOption { type = types.str; }; }; colours = mkOption { type = my-types.colourTheme; }; @@ -66,16 +64,29 @@ in { batteryBlocks.default = mkOption { type = types.str; }; - promptColours = - let colours16 = types.enum [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; + promptColours = let + colours16 = types.enum [ + "black" + "red" + "green" + "yellow" + "blue" + "magenta" + "cyan" + "white" + ]; in { - success = mkOption { type = colours16; default = "green"; }; - failure = mkOption { type = colours16; default = "red"; }; + success = mkOption { + type = colours16; + default = "green"; + }; + failure = mkOption { + type = colours16; + default = "red"; + }; }; - fonts = { - size = mkOption { type = types.int; }; - }; + fonts = { size = mkOption { type = types.int; }; }; user = { github = mkOption { type = types.str; }; @@ -85,7 +96,29 @@ in { ignore = mkOption { type = types.listOf types.str; - default = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.py[co]" "*.o" "*.hi" "*.aux" "*.bbl" "*.bcf" "*.blg" "*.fdb_latexmk" "*.fls" "*.out" "*.run.xml" "*.toc" "*.bbl" "*.class" "*.dyn_hi" "*.dyn_o" "dist/" ]; + default = [ + "*~" + ".stack-work/" + "__pycache__/" + ".mypy_cache/" + "*.py[co]" + "*.o" + "*.hi" + "*.aux" + "*.bbl" + "*.bcf" + "*.blg" + "*.fdb_latexmk" + "*.fls" + "*.out" + "*.run.xml" + "*.toc" + "*.bbl" + "*.class" + "*.dyn_hi" + "*.dyn_o" + "dist/" + ]; }; theme = { diff --git a/modules/dropbox.nix b/modules/dropbox.nix index baa5452..1efa36b 100644 --- a/modules/dropbox.nix +++ b/modules/dropbox.nix @@ -2,9 +2,7 @@ with lib; let cfg = config.niveum.dropbox; in { - options.niveum.dropbox = { - enable = mkEnableOption "Dropbox"; - }; + options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; }; config = mkIf cfg.enable { systemd.user.services.dropbox = { diff --git a/modules/google-drive.nix b/modules/google-drive.nix index d3f6d21..c0176f8 100644 --- a/modules/google-drive.nix +++ b/modules/google-drive.nix @@ -1,17 +1,14 @@ { pkgs, config, lib, ... }: with lib; let cfg = config.niveum.google-drive; -in -{ +in { options.niveum.google-drive = { enable = mkEnableOption "Google Drive"; directory = mkOption { type = types.path; }; }; config = mkIf cfg.enable { - environment.systemPackages = [ - pkgs.grive2 - ]; + environment.systemPackages = [ pkgs.grive2 ]; systemd.user.services.google-drive = { description = "Google Drive synchronisation service"; diff --git a/modules/hledger.nix b/modules/hledger.nix index c977527..367b797 100644 --- a/modules/hledger.nix +++ b/modules/hledger.nix @@ -20,26 +20,45 @@ let in { options.niveum.hledger = { enable = mkEnableOption "hledger"; - package = mkOption { type = types.package; default = pkgs.hledger; }; - ledgerFile = mkOption { type = types.str; default = null; }; + package = mkOption { + type = types.package; + default = pkgs.hledger; + }; + ledgerFile = mkOption { + type = types.str; + default = null; + }; server = { enable = mkEnableOption "hledger server"; - port = mkOption { type = pkgs.unstable.lib.types.port; default = 5000; }; - host = mkOption { type = types.str; default = "127.0.0.1"; }; + port = mkOption { + type = pkgs.unstable.lib.types.port; + default = 5000; + }; + host = mkOption { + type = types.str; + default = "127.0.0.1"; + }; capabilities = mkOption { - type = types.listOf (types.enum ["view" "add" "manage"]); + type = types.listOf (types.enum [ "view" "add" "manage" ]); default = [ "view" "add" ]; }; - flags = mkOption { type = types.listOf types.str; default = []; }; + flags = mkOption { + type = types.listOf types.str; + default = [ ]; + }; user = mkOption { type = types.attrs; }; - package = mkOption { type = types.package; default = pkgs.hledger-web; }; + package = mkOption { + type = types.package; + default = pkgs.hledger-web; + }; }; }; config = mkIf cfg.enable { environment.systemPackages = [ cfg.package hledger-git hledger-edit ]; - environment.variables.LEDGER_FILE = mkIf (cfg.ledgerFile != null) cfg.ledgerFile; + environment.variables.LEDGER_FILE = + mkIf (cfg.ledgerFile != null) cfg.ledgerFile; systemd.services.hledger-web = mkIf cfg.server.enable { description = "hledger server"; diff --git a/modules/minecraft.nix b/modules/minecraft.nix index 5411da7..37c89e1 100644 --- a/modules/minecraft.nix +++ b/modules/minecraft.nix @@ -1,16 +1,8 @@ { pkgs, lib, config, ... }: with lib; -let - cfg = config.niveum.minecraft; -in -{ - options.niveum.minecraft = { - enable = mkEnableOption "Minecraft"; - }; +let cfg = config.niveum.minecraft; +in { + options.niveum.minecraft = { enable = mkEnableOption "Minecraft"; }; - config = mkIf cfg.enable { - environment.systemPackages = [ - pkgs.minecraft - ]; - }; + config = mkIf cfg.enable { environment.systemPackages = [ pkgs.minecraft ]; }; } diff --git a/modules/retiolum.nix b/modules/retiolum.nix index 32e2f13..e1c1f05 100644 --- a/modules/retiolum.nix +++ b/modules/retiolum.nix @@ -52,9 +52,11 @@ in { ''; }; - networking.extraHosts = builtins.readFile (toString "${retiolum}/etc.hosts"); + networking.extraHosts = + builtins.readFile (toString "${retiolum}/etc.hosts"); - environment.systemPackages = [ config.services.tinc.networks.${netname}.package ]; + environment.systemPackages = + [ config.services.tinc.networks.${netname}.package ]; networking.firewall = { allowedTCPPorts = [ 655 ]; diff --git a/modules/seafile.nix b/modules/seafile.nix index 0552b84..b14c115 100644 --- a/modules/seafile.nix +++ b/modules/seafile.nix @@ -2,9 +2,7 @@ with lib; let cfg = config.niveum.seafile; in { - options.niveum.seafile = { - enable = mkEnableOption "Seafile"; - }; + options.niveum.seafile = { enable = mkEnableOption "Seafile"; }; config = mkIf cfg.enable { systemd.user.services.seafile = { diff --git a/modules/telegram-bot.nix b/modules/telegram-bot.nix index 6a64ccf..3c137ee 100644 --- a/modules/telegram-bot.nix +++ b/modules/telegram-bot.nix @@ -3,19 +3,22 @@ with lib; let cfg = config.niveum.telegramBots; - botService = name: bot: nameValuePair "telegram-bot-${name}" { - enable = bot.enable; - startAt = bot.time; - serviceConfig.Type = "oneshot"; - wants = [ "network-online.target" ]; - script = strings.concatStringsSep "\n" (["QUOTE=$(${bot.command})"] ++ map (chatId: '' - ${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \ - -d chat_id="${chatId}" \ - -d text="$QUOTE" ${ - lib.strings.optionalString (bot.parseMode != null) "-d parse_mode=${bot.parseMode}" - } - '') bot.chatIds); - }; + botService = name: bot: + nameValuePair "telegram-bot-${name}" { + enable = bot.enable; + startAt = bot.time; + serviceConfig.Type = "oneshot"; + wants = [ "network-online.target" ]; + script = strings.concatStringsSep "\n" ([ "QUOTE=$(${bot.command})" ] + ++ map (chatId: '' + ${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \ + -d chat_id="${chatId}" \ + -d text="$QUOTE" ${ + lib.strings.optionalString (bot.parseMode != null) + "-d parse_mode=${bot.parseMode}" + } + '') bot.chatIds); + }; in { options.niveum.telegramBots = mkOption { type = types.attrsOf (types.submodule { @@ -23,18 +26,18 @@ in { enable = mkEnableOption "Telegram bot"; time = mkOption { type = types.str; }; token = mkOption { type = types.strMatching "[0-9A-Za-z:-]+"; }; - chatIds = mkOption { type = types.listOf (types.strMatching "[0-9]+|@[A-Za-z0-9]+"); }; + chatIds = mkOption { + type = types.listOf (types.strMatching "[0-9]+|@[A-Za-z0-9]+"); + }; command = mkOption { type = types.str; }; parseMode = mkOption { - type = types.nullOr (types.enum ["HTML" "Markdown"]); + type = types.nullOr (types.enum [ "HTML" "Markdown" ]); default = null; }; }; }); - default = {}; + default = { }; }; - config = { - systemd.services = attrsets.mapAttrs' botService cfg; - }; + config = { systemd.services = attrsets.mapAttrs' botService cfg; }; } diff --git a/modules/traadfri.nix b/modules/traadfri.nix index 9ecfb70..09c4956 100644 --- a/modules/traadfri.nix +++ b/modules/traadfri.nix @@ -2,37 +2,38 @@ with lib; let cfg = config.niveum.traadfri; - traadfri = - let traadfri-package = pkgs.fetchFromGitHub { + traadfri = let + traadfri-package = pkgs.fetchFromGitHub { owner = "kmein"; repo = "traadfri"; rev = "7b30d404ecd2d9ff06c60ed33967448e8c2f42f5"; sha256 = "1ff37k86vi7bnng3vna8myfkyqbkg25w6ds7gl94m4hax8wikz26"; }; - in pkgs.python3Packages.callPackage traadfri-package { - libcoap = pkgs.callPackage { tls = true; }; - }; -in -{ + in pkgs.python3Packages.callPackage traadfri-package { + libcoap = pkgs.callPackage { tls = true; }; + }; +in { options.niveum.traadfri = { enable = mkEnableOption "Trådfri CLI"; user = mkOption { type = types.str; }; host = mkOption { type = types.str; }; key = mkOption { type = types.str; }; - rooms = mkOption { type = types.attrsOf types.int; default = {}; }; - bulbs = mkOption { type = types.attrsOf types.int; default = {}; }; + rooms = mkOption { + type = types.attrsOf types.int; + default = { }; + }; + bulbs = mkOption { + type = types.attrsOf types.int; + default = { }; + }; }; config = mkIf cfg.enable { - environment.shellAliases = - lib.attrsets.mapAttrs' - (name: value: - lib.nameValuePair "traadfri-${name}" "traadfri bulb ${toString value}") - cfg.bulbs - // lib.attrsets.mapAttrs' - (name: value: - lib.nameValuePair "traadfri-${name}" "traadfri group ${toString value}") - cfg.rooms; + environment.shellAliases = lib.attrsets.mapAttrs' (name: value: + lib.nameValuePair "traadfri-${name}" "traadfri bulb ${toString value}") + cfg.bulbs // lib.attrsets.mapAttrs' (name: value: + lib.nameValuePair "traadfri-${name}" "traadfri group ${toString value}") + cfg.rooms; environment.systemPackages = [ (pkgs.writers.writeDashBin "traadfri" '' diff --git a/overlays/rust.nix b/overlays/rust.nix index ff0dbb9..db35a63 100644 --- a/overlays/rust.nix +++ b/overlays/rust.nix @@ -1 +1,2 @@ -import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz) +import (builtins.fetchTarball + "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz") diff --git a/packages/gfs-fonts.nix b/packages/gfs-fonts.nix index 0ae991c..3fb7c94 100644 --- a/packages/gfs-fonts.nix +++ b/packages/gfs-fonts.nix @@ -1,14 +1,15 @@ { fetchzip, symlinkJoin, lib, scardanelli ? false }: let - gfs-font = name: sha256: fetchzip { - inherit name sha256; - url = "http://www.greekfontsociety-gfs.gr/_assets/fonts/${name}.zip"; - postFetch = '' - mkdir -p $out/share/fonts - unzip -j -o $downloadedFile "*.otf" -d $out/share/fonts/opentype - unzip -j -o $downloadedFile "**/*.otf" -d $out/share/fonts/opentype - ''; - }; + gfs-font = name: sha256: + fetchzip { + inherit name sha256; + url = "http://www.greekfontsociety-gfs.gr/_assets/fonts/${name}.zip"; + postFetch = '' + mkdir -p $out/share/fonts + unzip -j -o $downloadedFile "*.otf" -d $out/share/fonts/opentype + unzip -j -o $downloadedFile "**/*.otf" -d $out/share/fonts/opentype + ''; + }; in symlinkJoin { name = "gfs-fonts"; paths = lib.mapAttrsToList gfs-font { @@ -16,31 +17,32 @@ in symlinkJoin { GFS_Baskerville = "07gx5b9b43zv74d2lay37sajd4ba2wqn3b7xzvyhn265ds9x7cxk"; GFS_Bodoni = "0jhl0728ikzha1krm01sk52nz3jzibidwmyvgidg61d87l8nbf2p"; GFS_Bodoni_Classic = "06jw2irskn75s50mgwkx08rzwqi82gpc6lgjsimsi8p81566gfrh"; - GFS_Complutum = "1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf + GFS_Complutum = + "1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf GFS_Decker = "016v1j5n9ph4i2cpmlk26pcxhp3q2fjwlaryppd5akl84dfkpncl"; GFS_Didot = "0ysvrp527wm0wxfp6wmlgmxfx7ysr5mwpmjmqp1h605cy44jblfm"; GFS_Didot_Classic = "0n5awqksvday3l3d85yhwmbmfj9bcpxivy4wpd4zrkgl7b85af2c"; - GFS_Didot_Display = - if scardanelli - then "0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7" - else "0gg5xb8jic646gz9p05ry62nk7w0k546fxp5p4vvnawmckql2dj1"; + GFS_Didot_Display = if scardanelli then + "0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7" + else + "0gg5xb8jic646gz9p05ry62nk7w0k546fxp5p4vvnawmckql2dj1"; GFS_Elpis = "02l7wd3nbn1kpv7ghxh19k4dbvd49ijyxd6gq83gcr9vlmxcq2s2"; GFS_Gazis = "0x9iwj6pinaykrds0iw6552hf256d0dr41sipdb1jnnlr2d3bf9w"; GFS_Goschen = "1jvbn33wzq2yj0aygwy9pd2msg3wkmdp0npjzazadrmfjpnpkcy9"; GFS_NeoHellenic = "1ixm2frdc6i5lbn9h0h4gdsvsw2k4hny75q8ig4kgs28ac3dbzq3"; GFS_Olga = "0f05ng02na84x9x6yhskxqwxwyabjisyl8a0k3fiah60i620p39d"; - GFS_Orpheus = - if scardanelli - then "18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz" - else "1rvjpvk1fx55vyp3dyxcbww1a24rm7xv5faqs735yf6lqzpkqnax"; - GFS_Orpheus_Classic = - if scardanelli - then "1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps" - else "0d2yzwg6albmgl1d0xhsfrmxj79r42wp712rpry567nv1ry42k0a"; - GFS_Orpheus_Sans = - if scardanelli - then "02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg" - else "1rdlm2kmkvi4y3ii68ik8k3w3183vvb3q2pnk04lbb0ggg9w5jdb"; + GFS_Orpheus = if scardanelli then + "18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz" + else + "1rvjpvk1fx55vyp3dyxcbww1a24rm7xv5faqs735yf6lqzpkqnax"; + GFS_Orpheus_Classic = if scardanelli then + "1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps" + else + "0d2yzwg6albmgl1d0xhsfrmxj79r42wp712rpry567nv1ry42k0a"; + GFS_Orpheus_Sans = if scardanelli then + "02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg" + else + "1rdlm2kmkvi4y3ii68ik8k3w3183vvb3q2pnk04lbb0ggg9w5jdb"; GFS_Philostratos = "0zh3d0cn6b2fjbwnvmg379z20zh7w626w2bnj19xcazjvqkwhzx1"; GFS_Porson = "0r3snwgxkdx7h34sg3s0hr8fac3rnpllq62bk44m266hj6a80a5k"; GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j"; diff --git a/packages/gourmet.nix b/packages/gourmet.nix index af2b38c..00ef254 100644 --- a/packages/gourmet.nix +++ b/packages/gourmet.nix @@ -1,6 +1,7 @@ # { stdenv, python }: -{ pkgs ? import {} }: -with pkgs; with pkgs.python2Packages; +{ pkgs ? import { } }: +with pkgs; +with pkgs.python2Packages; buildPythonApplication rec { pname = "gourmet"; @@ -10,7 +11,5 @@ buildPythonApplication rec { }; buildInputs = [ distutils_extra intltool ]; propagatedBuildInputs = [ sqlalchemy reportlab lxml ]; - meta = with stenv.lib; { - maintainers = with maintainers; [ kmein ]; - }; + meta = with stenv.lib; { maintainers = with maintainers; [ kmein ]; }; } diff --git a/packages/iolanguage.nix b/packages/iolanguage.nix index 9a768f2..ba2bf6e 100644 --- a/packages/iolanguage.nix +++ b/packages/iolanguage.nix @@ -16,8 +16,9 @@ stdenv.mkDerivation rec { make all ''; meta = with stdenv.lib; { - homepage = https://iolanguage.org/; - description = "Io programming language. Inspired by Self, Smalltalk and LISP."; + homepage = "https://iolanguage.org/"; + description = + "Io programming language. Inspired by Self, Smalltalk and LISP."; license = licenses.bsd3; }; } diff --git a/packages/libcoap.nix b/packages/libcoap.nix index 138b601..c82eb93 100644 --- a/packages/libcoap.nix +++ b/packages/libcoap.nix @@ -1,4 +1,5 @@ -{ lib, fetchFromGitHub, automake, autoconf, which, libtool, stdenv, gnutls, tls ? false }: +{ lib, fetchFromGitHub, automake, autoconf, which, libtool, stdenv, gnutls +, tls ? false }: stdenv.mkDerivation { name = "libcoap"; src = fetchFromGitHub { @@ -8,17 +9,10 @@ stdenv.mkDerivation { sha256 = "1nic584jwkndg0w831h0fnxk0zx0apf2lw5md079m3di7zcxs6bw"; fetchSubmodules = true; }; - buildInputs = [ - automake - autoconf - which - libtool - ] ++ lib.optional tls gnutls; + buildInputs = [ automake autoconf which libtool ] ++ lib.optional tls gnutls; preConfigure = "./autogen.sh"; - configureFlags = [ - "--disable-documentation" - "--disable-shared" - ] ++ lib.optional tls "--enable-dtls"; + configureFlags = [ "--disable-documentation" "--disable-shared" ] + ++ lib.optional tls "--enable-dtls"; meta = with stdenv.lib; { homepage = "https://github.com/obgm/libcoap"; description = "A CoAP (RFC 7252) implementation in C"; diff --git a/packages/scripts/daybook.nix b/packages/scripts/daybook.nix index 276ad0d..0ec16e0 100644 --- a/packages/scripts/daybook.nix +++ b/packages/scripts/daybook.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation { wrapProgram $out/bin/daybook --prefix PATH ":" ${pandoc}/bin ; ''; meta = with stdenv.lib; { - homepage = https://github.com/kmein/daybook; + homepage = "https://github.com/kmein/daybook"; description = "A diary writing utility in sh"; license = licenses.mit; platforms = platforms.linux; diff --git a/packages/scripts/default.nix b/packages/scripts/default.nix index 09d6d96..9415236 100644 --- a/packages/scripts/default.nix +++ b/packages/scripts/default.nix @@ -1,18 +1,20 @@ { pkgs, lib, ... }: let - kpaste = pkgs.callPackage {}; - wrapScript = { packages ? [], name, script }: pkgs.writers.writeDashBin name '' - PATH=$PATH:${lib.makeBinPath (packages ++ [pkgs.coreutils pkgs.findutils])} - ${script} "$@" - ''; + kpaste = pkgs.callPackage { }; + wrapScript = { packages ? [ ], name, script }: + pkgs.writers.writeDashBin name '' + PATH=$PATH:${ + lib.makeBinPath (packages ++ [ pkgs.coreutils pkgs.findutils ]) + } + ${script} "$@" + ''; voidrice = pkgs.fetchFromGitHub { owner = "LukeSmithxyz"; repo = "voidrice"; rev = "dff66cd1efb36afd54dd6dcf2fdaa9475d5646c1"; sha256 = "19f33ins2kzgiw72d62j8zz9ai3j8m4qqfqmagxkg9yhxqkdqry7"; }; -in -{ +in { instaget = wrapScript { packages = [ pkgs.jq pkgs.curl pkgs.gnugrep ]; script = ./instaget.sh; @@ -90,7 +92,8 @@ in }; linkhandler = wrapScript { - packages = [ pkgs.utillinux pkgs.mpv pkgs.curl pkgs.gnused pkgs.sxiv pkgs.ts ]; + packages = + [ pkgs.utillinux pkgs.mpv pkgs.curl pkgs.gnused pkgs.sxiv pkgs.ts ]; script = "${voidrice}/.local/bin/linkhandler"; name = "linkhandler"; }; @@ -124,6 +127,6 @@ in packages = [ pkgs.xclip pkgs.scrot kpaste pkgs.libnotify pkgs.dmenu ]; }; - bvg = pkgs.callPackage ./bvg.nix {}; - nav = pkgs.callPackage ./nav.nix {}; + bvg = pkgs.callPackage ./bvg.nix { }; + nav = pkgs.callPackage ./nav.nix { }; } diff --git a/packages/scripts/depp.nix b/packages/scripts/depp.nix index 00130e4..ec5feaa 100644 --- a/packages/scripts/depp.nix +++ b/packages/scripts/depp.nix @@ -22,8 +22,13 @@ let }; in writeShellScriptBin "depp" '' if [ $# -gt 0 ]; then - git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@" + git ${ + lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases) + } "$@" else - printf "${lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)}\n" + printf "${ + lib.concatStringsSep "\n" + (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases) + }\n" fi '' diff --git a/packages/scripts/klem.nix b/packages/scripts/klem.nix index 91b01fa..6eb8b1d 100644 --- a/packages/scripts/klem.nix +++ b/packages/scripts/klem.nix @@ -4,33 +4,35 @@ let cfg = eval.config; eval = lib.evalModules { - modules = [ { + modules = [{ _file = toString ./klem.nix; - imports = [ (args.config or {}) ]; + imports = [ (args.config or { }) ]; options = { clipboardSelection = lib.mkOption { default = "clipboard"; - type = lib.types.enum ["primary" "secondary" "clipboard"]; + type = lib.types.enum [ "primary" "secondary" "clipboard" ]; }; scripts = lib.mkOption { default = { pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io"; - shorten = ''${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st''; + shorten = '' + ${pkgs.curl}/bin/curl -fSs -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://0x0.st''; "replace p.r" = "${pkgs.gnused}/bin/sed 's/\\/krebsco.de/'"; }; type = lib.types.attrs; }; }; - } ]; + }]; }; scriptCase = option: script: '' '${option}') ${toString script} ;; ''; -in -pkgs.writers.writeDashBin "klem" '' +in pkgs.writers.writeDashBin "klem" '' ${pkgs.xclip}/bin/xclip -selection ${cfg.clipboardSelection} -out \ - | case $(echo "${lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)}" | ${pkgs.dmenu}/bin/dmenu -i -p klem) in + | case $(echo "${ + lib.concatStringsSep "\n" (lib.attrNames cfg.scripts) + }" | ${pkgs.dmenu}/bin/dmenu -i -p klem) in ${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)} *) ${pkgs.coreutils}/bin/cat ;; esac \ diff --git a/systems/catullus/configuration.nix b/systems/catullus/configuration.nix index d548a79..7139f91 100644 --- a/systems/catullus/configuration.nix +++ b/systems/catullus/configuration.nix @@ -2,11 +2,14 @@ let inherit (import { 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"; - wilde = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde"; + 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"; + wilde = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde"; }; - unstable = import {}; + unstable = import { }; wtf-config = pkgs.writeText "config.yml" (builtins.toJSON { wtf = { colors = { @@ -18,8 +21,8 @@ let }; }; grid = { - columns = [40 54]; - rows = [10 20]; + columns = [ 40 54 ]; + rows = [ 10 20 ]; }; refreshInterval = 1; mods = { @@ -107,34 +110,32 @@ in { })); }; } - { - services.keybase.enable = true; - } + { services.keybase.enable = true; } { environment.systemPackages = [ pkgs.wtf ]; systemd.services.wtf = { wantedBy = [ "multi-user.target" ]; - script = "${pkgs.tmux}/bin/tmux new-session -d '${pkgs.wtf}/bin/wtf --config=${wtf-config}'"; + script = + "${pkgs.tmux}/bin/tmux new-session -d '${pkgs.wtf}/bin/wtf --config=${wtf-config}'"; serviceConfig.Type = "oneshot"; }; } - /* - { - imports = [ ]; + /* { + imports = [ ]; - krebs.urlwatch = { - enable = true; - onCalendar = "*-*-* 05:00:00"; - sendmail.enable = false; - telegram = { - enable = true; - chatId = [ "18980945" ]; - botToken = lib.strings.fileContents ; - }; - urls = []; - }; - } + krebs.urlwatch = { + enable = true; + onCalendar = "*-*-* 05:00:00"; + sendmail.enable = false; + telegram = { + enable = true; + chatId = [ "18980945" ]; + botToken = lib.strings.fileContents ; + }; + urls = []; + }; + } */ ]; @@ -147,19 +148,16 @@ in { networking.wireless = { enable = false; - networks.Aether = { pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; }; + networks.Aether = { + pskRaw = + "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; + }; }; environment.variables.TERM = "linux"; environment.variables.HTOPRC = toString ; - environment.systemPackages = with pkgs; [ - git - vim - htop - wget - reptyr - ]; + environment.systemPackages = with pkgs; [ git vim htop wget reptyr ]; users.mutableUsers = false; users.users.me = { @@ -168,7 +166,8 @@ in { createHome = true; group = "users"; extraGroups = [ "wheel" ]; - hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; + hashedPassword = + "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; shell = pkgs.bash; }; @@ -180,17 +179,11 @@ in { passwordAuthentication = false; }; - users.users.root.openssh.authorizedKeys.keys = [ - sshKey.homeros - sshKey.scardanelli - sshKey.wilde - ]; + users.users.root.openssh.authorizedKeys.keys = + [ sshKey.homeros sshKey.scardanelli sshKey.wilde ]; - users.users.me.openssh.authorizedKeys.keys = [ - sshKey.homeros - sshKey.scardanelli - sshKey.wilde - ]; + users.users.me.openssh.authorizedKeys.keys = + [ sshKey.homeros sshKey.scardanelli sshKey.wilde ]; networking.retiolum = { ipv4 = "10.243.2.3"; diff --git a/systems/catullus/hardware-configuration.nix b/systems/catullus/hardware-configuration.nix index adbcb16..cc0eadf 100644 --- a/systems/catullus/hardware-configuration.nix +++ b/systems/catullus/hardware-configuration.nix @@ -1,5 +1,4 @@ -{ config, pkgs, ... }: -{ +{ config, pkgs, ... }: { boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelParams = [ "cma=32M" ]; @@ -10,5 +9,8 @@ }; }; - swapDevices = [ { device = "/swapfile"; size = 1024; } ]; + swapDevices = [{ + device = "/swapfile"; + size = 1024; + }]; } diff --git a/systems/catullus/telegram-bots/autorenkalender.nix b/systems/catullus/telegram-bots/autorenkalender.nix index 95e448f..a69ca79 100644 --- a/systems/catullus/telegram-bots/autorenkalender.nix +++ b/systems/catullus/telegram-bots/autorenkalender.nix @@ -6,9 +6,9 @@ let rev = "1971f082ec6e14d392a0dc3ac62e0b1e4187409b"; sha256 = "0hipj616vcsa3f62s83jvlx8zx4bmbgl5h2n4w8ba5ngp40lkmb3"; }; - autorenkalender = pkgs.python3Packages.callPackage autorenkalender-package {}; -in -{ + autorenkalender = + pkgs.python3Packages.callPackage autorenkalender-package { }; +in { niveum.telegramBots.autorenkalender = { enable = true; time = "07:00"; diff --git a/systems/catullus/telegram-bots/default.nix b/systems/catullus/telegram-bots/default.nix index d1a2edd..1ca35a5 100644 --- a/systems/catullus/telegram-bots/default.nix +++ b/systems/catullus/telegram-bots/default.nix @@ -1,7 +1,6 @@ { config, pkgs, lib, ... }: let - telebots = - let + telebots = let telebots-package = pkgs.fetchFromGitHub { owner = "kmein"; repo = "telebots"; @@ -9,9 +8,15 @@ let sha256 = "08rp1pcisk4zzhxdlgrlhxa0sbza5qhxa70rjycg4r7fmixkkbz2"; }; in { - reverse = pkgs.python3Packages.callPackage "${telebots-package}/telegram-reverse" {}; - odyssey = pkgs.python3Packages.callPackage "${telebots-package}/telegram-odyssey" {}; - betacode = pkgs.python3Packages.callPackage "${telebots-package}/telegram-betacode" {}; + reverse = + pkgs.python3Packages.callPackage "${telebots-package}/telegram-reverse" + { }; + odyssey = + pkgs.python3Packages.callPackage "${telebots-package}/telegram-odyssey" + { }; + betacode = + pkgs.python3Packages.callPackage "${telebots-package}/telegram-betacode" + { }; }; in { imports = [ @@ -24,27 +29,31 @@ in { systemd.services.telegram-odyssey = { wantedBy = [ "multi-user.target" ]; description = "Telegram bot reciting the Odyssey to you"; - environment.TELEGRAM_ODYSSEY_TOKEN = lib.strings.fileContents ; + environment.TELEGRAM_ODYSSEY_TOKEN = + lib.strings.fileContents ; enable = true; - script = ''${telebots.odyssey}/bin/telegram-odyssey''; + script = "${telebots.odyssey}/bin/telegram-odyssey"; serviceConfig.Restart = "always"; }; systemd.services.telegram-reverse = { wantedBy = [ "multi-user.target" ]; description = "Telegram bot for reversing things"; - environment.TELEGRAM_REVERSE_TOKEN = lib.strings.fileContents ; + environment.TELEGRAM_REVERSE_TOKEN = + lib.strings.fileContents ; enable = true; - script = ''${telebots.reverse}/bin/telegram-reverse''; + script = "${telebots.reverse}/bin/telegram-reverse"; serviceConfig.Restart = "always"; }; systemd.services.telegram-betacode = { wantedBy = [ "multi-user.target" ]; - description = "Telegram bot for converting Ancient Greek betacode into unicode"; - environment.TELEGRAM_BETACODE_TOKEN = lib.strings.fileContents ; + description = + "Telegram bot for converting Ancient Greek betacode into unicode"; + environment.TELEGRAM_BETACODE_TOKEN = + lib.strings.fileContents ; enable = true; - script = ''${telebots.betacode}/bin/telegram-betacode''; + script = "${telebots.betacode}/bin/telegram-betacode"; serviceConfig.Restart = "always"; }; } diff --git a/systems/catullus/telegram-bots/literature-quote.nix b/systems/catullus/telegram-bots/literature-quote.nix index 6c60bac..b924e9f 100644 --- a/systems/catullus/telegram-bots/literature-quote.nix +++ b/systems/catullus/telegram-bots/literature-quote.nix @@ -2,8 +2,7 @@ let scripts = import { inherit pkgs lib; }; inherit (scripts) literature-quote; -in -{ +in { niveum.telegramBots.quotebot = { enable = true; time = "08/6:00"; diff --git a/systems/catullus/telegram-bots/nachtischsatan.nix b/systems/catullus/telegram-bots/nachtischsatan.nix index a95162c..228ad43 100644 --- a/systems/catullus/telegram-bots/nachtischsatan.nix +++ b/systems/catullus/telegram-bots/nachtischsatan.nix @@ -1,31 +1,31 @@ { pkgs, lib, ... }: let - nachtischsatan-bot = { token }: pkgs.writers.writePython3 "nachtischsatan-bot" { - libraries = [ pkgs.python3Packages.python-telegram-bot ]; - } '' - import random - import time + nachtischsatan-bot = { token }: + pkgs.writers.writePython3 "nachtischsatan-bot" { + libraries = [ pkgs.python3Packages.python-telegram-bot ]; + } '' + import random + import time - from telegram.ext import Updater, MessageHandler - from telegram.ext.filters import Filters + from telegram.ext import Updater, MessageHandler + from telegram.ext.filters import Filters - def flubber(bot, update): - time.sleep(random.randrange(4000) / 1000) - update.message.reply_text("*flubberflubber*") + def flubber(bot, update): + time.sleep(random.randrange(4000) / 1000) + update.message.reply_text("*flubberflubber*") - updater = Updater( - '${token}' - ) + updater = Updater( + '${token}' + ) - updater.dispatcher.add_handler(MessageHandler(Filters.all, flubber)) + updater.dispatcher.add_handler(MessageHandler(Filters.all, flubber)) - updater.start_polling() - updater.idle() - ''; -in -{ + updater.start_polling() + updater.idle() + ''; +in { systemd.services.telegram-nachtischsatan = { wantedBy = [ "multi-user.target" ]; description = "*flubberflubber*"; diff --git a/systems/catullus/telegram-bots/proverb.nix b/systems/catullus/telegram-bots/proverb.nix index 4593686..36901e8 100644 --- a/systems/catullus/telegram-bots/proverb.nix +++ b/systems/catullus/telegram-bots/proverb.nix @@ -6,15 +6,15 @@ let rev = "f4201c5419354377a26b7f7873368683efbea417"; sha256 = "1ixffmxy3sxy2if7fd44ps451rds14hnz4d0x9nkh8lzshqk6v4y"; }; - telegram-proverb = pkgs.python3Packages.callPackage proverb-bot-package {}; -in -{ + telegram-proverb = pkgs.python3Packages.callPackage proverb-bot-package { }; +in { systemd.services.telegram-proverb = { wantedBy = [ "multi-user.target" ]; description = "Telegram bot for generating inspiring but useless proverbs"; - environment.TELEGRAM_PROVERB_TOKEN = lib.strings.fileContents ; + environment.TELEGRAM_PROVERB_TOKEN = + lib.strings.fileContents ; enable = true; - script = ''${telegram-proverb}/bin/proverb_bot.py''; + script = "${telegram-proverb}/bin/proverb_bot.py"; serviceConfig.Restart = "always"; }; } diff --git a/systems/homeros/configuration.nix b/systems/homeros/configuration.nix index 7577a1f..00a3ed6 100644 --- a/systems/homeros/configuration.nix +++ b/systems/homeros/configuration.nix @@ -1,12 +1,17 @@ -{ config, pkgs, lib, ... }: -{ +{ config, pkgs, lib, ... }: { imports = [ ./hardware-configuration.nix ]; - services.xserver.xrandrHeads = [ { output = "HDMI1"; primary = true; } "LVDS1" ]; + services.xserver.xrandrHeads = [ + { + output = "HDMI1"; + primary = true; + } + "LVDS1" + ]; environment.systemPackages = [ pkgs.zeroad pkgs.minecraft ]; diff --git a/systems/homeros/hardware-configuration.nix b/systems/homeros/hardware-configuration.nix index f554c84..a63f3e1 100644 --- a/systems/homeros/hardware-configuration.nix +++ b/systems/homeros/hardware-configuration.nix @@ -1,26 +1,31 @@ -{ config, lib, pkgs, ... }: -{ - imports = - [ - ]; +{ config, lib, pkgs, ... }: { + imports = [ ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "rtsx_usb_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ehci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + "sr_mod" + "rtsx_usb_sdmmc" + ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/83544ad3-1d23-4c2d-82bc-fafef13a996f"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/83544ad3-1d23-4c2d-82bc-fafef13a996f"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/8F9E-7556"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/8F9E-7556"; + fsType = "vfat"; + }; swapDevices = - [ { device = "/dev/disk/by-uuid/5ea3a65e-8fdb-45fb-ad32-3759d991a83a"; } - ]; + [{ device = "/dev/disk/by-uuid/5ea3a65e-8fdb-45fb-ad32-3759d991a83a"; }]; # services.xserver.videoDrivers = [ "nvidia" ]; diff --git a/systems/scardanelli/configuration.nix b/systems/scardanelli/configuration.nix index 5417976..68e45a2 100644 --- a/systems/scardanelli/configuration.nix +++ b/systems/scardanelli/configuration.nix @@ -1,17 +1,13 @@ { config, pkgs, ... }: let - sshKey.rilke = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWRcTILWzSzOAWqwBjJC97K9wKm+pfxk15L5AiTUlUMyBzVQsU+d2jUEe1rmp+kjVXL0qgNMI+eBzEAzaafUMdCPeIkMyeiOlXaYxq8NHApcZUSYV9CmzWqePj8Dlu8uexoF3TJi6tj3mmGM8BY50qkwk4mlT/5xLPPnh/HHyFmoZlj6183Z4vJRnK8UZ6x2gevVaE36lP27MikZ/MQ6/PaHJ5TNZy63rQwzKXw6ZQMx4JU22CwyZqPn1wjlGEkpJFOBKtnypURdVBsPydaZd/I7b/13FMwso2hSUoXqeV6iaeno2FWOrB3cAaFogNWKPRkEacKEE5mQOvLGGdG1Xp u0_a138@localhost"; + sshKey.rilke = + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWRcTILWzSzOAWqwBjJC97K9wKm+pfxk15L5AiTUlUMyBzVQsU+d2jUEe1rmp+kjVXL0qgNMI+eBzEAzaafUMdCPeIkMyeiOlXaYxq8NHApcZUSYV9CmzWqePj8Dlu8uexoF3TJi6tj3mmGM8BY50qkwk4mlT/5xLPPnh/HHyFmoZlj6183Z4vJRnK8UZ6x2gevVaE36lP27MikZ/MQ6/PaHJ5TNZy63rQwzKXw6ZQMx4JU22CwyZqPn1wjlGEkpJFOBKtnypURdVBsPydaZd/I7b/13FMwso2hSUoXqeV6iaeno2FWOrB3cAaFogNWKPRkEacKEE5mQOvLGGdG1Xp u0_a138@localhost"; in { - imports = [ - - ./hardware-configuration.nix - ]; + imports = [ ./hardware-configuration.nix ]; services.xserver.xrandrHeads = [ "eDP1" ]; - users.users.me.openssh.authorizedKeys.keys = [ - sshKey.rilke - ]; + users.users.me.openssh.authorizedKeys.keys = [ sshKey.rilke ]; niveum = { batteryBlocks.default = "BAT1"; diff --git a/systems/scardanelli/hardware-configuration.nix b/systems/scardanelli/hardware-configuration.nix index 4b01548..1820a93 100644 --- a/systems/scardanelli/hardware-configuration.nix +++ b/systems/scardanelli/hardware-configuration.nix @@ -1,26 +1,23 @@ -{ config, lib, pkgs, ... }: -{ - imports = - [ - ]; +{ config, lib, pkgs, ... }: { + imports = [ ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" "rtsx_usb_sdmmc" ]; + boot.initrd.availableKernelModules = + [ "ahci" "xhci_pci" "usb_storage" "sd_mod" "sdhci_acpi" "rtsx_usb_sdmmc" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/8bc52e48-58e0-463d-8268-941a5a54cd4a"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/8bc52e48-58e0-463d-8268-941a5a54cd4a"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/6E76-4ED9"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/6E76-4ED9"; + fsType = "vfat"; + }; swapDevices = - [ { device = "/dev/disk/by-uuid/b7728657-9dbd-4377-bbc9-17252b8b88d0"; } - ]; + [{ device = "/dev/disk/by-uuid/b7728657-9dbd-4377-bbc9-17252b8b88d0"; }]; nix.maxJobs = lib.mkDefault 4; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; diff --git a/systems/wilde/configuration.nix b/systems/wilde/configuration.nix index 3693285..6c7183e 100644 --- a/systems/wilde/configuration.nix +++ b/systems/wilde/configuration.nix @@ -6,7 +6,10 @@ ./hardware-configuration.nix { - boot.extraModulePackages = with config.boot.kernelPackages; [ tp_smapi acpi_call ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ + tp_smapi + acpi_call + ]; boot.kernelModules = [ "tp_smapi" "acpi_call" ]; environment.systemPackages = [ pkgs.tpacpi-bat ]; } diff --git a/systems/wilde/hardware-configuration.nix b/systems/wilde/hardware-configuration.nix index a948251..276598f 100644 --- a/systems/wilde/hardware-configuration.nix +++ b/systems/wilde/hardware-configuration.nix @@ -1,26 +1,23 @@ -{ config, lib, pkgs, ... }: -{ - imports = - [ - ]; +{ config, lib, pkgs, ... }: { + imports = [ ]; - boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = + [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/b700a1f4-127e-40d3-a1cf-d194785e915b"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/b700a1f4-127e-40d3-a1cf-d194785e915b"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/4474-04C0"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/4474-04C0"; + fsType = "vfat"; + }; swapDevices = - [ { device = "/dev/disk/by-uuid/d1d62358-dce2-4081-849c-b4a9852c1c1b"; } - ]; + [{ device = "/dev/disk/by-uuid/d1d62358-dce2-4081-849c-b4a9852c1c1b"; }]; nix.maxJobs = lib.mkDefault 4; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";