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

chore: nixfmt

This commit is contained in:
Kierán Meinhardt
2020-06-10 17:37:25 +02:00
parent 2c3957735b
commit d8a4d4eedf
90 changed files with 1461 additions and 985 deletions

View File

@@ -1,13 +1,12 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let 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; colours = lib.getAttrs colourNames config.niveum.colours;
alacrittyConfig = { alacrittyConfig = {
background_opacity = 0.9; background_opacity = 0.9;
colors = { colors = {
primary = { primary = { inherit (config.niveum.colours) background foreground; };
inherit (config.niveum.colours) background foreground;
};
normal = lib.mapAttrs (_: colour: colour.dark) colours; normal = lib.mapAttrs (_: colour: colour.dark) colours;
bright = lib.mapAttrs (_: colour: colour.bright) colours; bright = lib.mapAttrs (_: colour: colour.bright) colours;
}; };
@@ -16,9 +15,21 @@ let
size = config.niveum.fonts.size - 2; size = config.niveum.fonts.size - 2;
}; };
key_bindings = [ key_bindings = [
{ key = "Add"; mods = "Control"; action = "IncreaseFontSize"; } {
{ key = "Minus"; mods = "Control"; action = "DecreaseFontSize"; } key = "Add";
{ key = "Key0"; mods = "Control"; action = "ResetFontSize"; } mods = "Control";
action = "IncreaseFontSize";
}
{
key = "Minus";
mods = "Control";
action = "DecreaseFontSize";
}
{
key = "Key0";
mods = "Control";
action = "ResetFontSize";
}
]; ];
}; };
flippedAlacrittyConfig = alacrittyConfig // { flippedAlacrittyConfig = alacrittyConfig // {
@@ -27,15 +38,16 @@ let
foreground = config.niveum.colours.background; foreground = config.niveum.colours.background;
}; };
}; };
in in {
{
environment.variables.TERMINAL = "alacritty"; environment.variables.TERMINAL = "alacritty";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
alacritty alacritty
alacritty.terminfo alacritty.terminfo
(pkgs.writers.writeDashBin "alacritty-flipped" '' (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)
} $@
'') '')
]; ];

View File

@@ -1,6 +1,7 @@
{ {
programs.bash = { 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 = '' interactiveShellInit = ''
set -o vi set -o vi
''; '';

View File

@@ -1,13 +1,11 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }: {
{
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;
config.General.Enable = lib.concatStringsSep "," ["Source" "Sink" "Media" "Socket"]; config.General.Enable =
lib.concatStringsSep "," [ "Source" "Sink" "Media" "Socket" ];
}; };
environment.systemPackages = [ pkgs.blueman ]; environment.systemPackages = [ pkgs.blueman ];
home-manager.users.me = { home-manager.users.me = { services.blueman-applet.enable = false; };
services.blueman-applet.enable = false;
};
} }

View File

@@ -13,8 +13,7 @@ let
${pkgs.gnused}/bin/sed -n -f $src ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt > $out ${pkgs.gnused}/bin/sed -n -f $src ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt > $out
''; '';
}; };
in in {
{
networking.wireless.networks."36C3" = { networking.wireless.networks."36C3" = {
auth = '' auth = ''
key_mgmt=WPA-EAP key_mgmt=WPA-EAP

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
programs.chromium = { programs.chromium = {
enable = true; enable = true;
extensions = [ extensions = [

View File

@@ -1,5 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: {
{
imports = [ imports = [
<niveum/modules/seafile.nix> <niveum/modules/seafile.nix>
<niveum/modules/google-drive.nix> <niveum/modules/google-drive.nix>
@@ -32,18 +31,26 @@
cert = toString <secrets/syncthing/cert.pem>; cert = toString <secrets/syncthing/cert.pem>;
key = toString <secrets/syncthing/key.pem>; key = toString <secrets/syncthing/key.pem>;
devices = { devices = {
homeros.id = "HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA"; homeros.id =
scardanelli.id = "7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU"; "HSOL72W-MMN346W-C3WCWCH-OTRKJYG-MY2WWV6-P7JUHN7-5WYYYRV-ZMH4KAA";
rilke.id = "NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ"; scardanelli.id =
wilde.id = "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF"; "7CZYHEX-3CSFDQU-PEEMYHG-6XGQ2ZD-KGVUWH5-GFRB2XK-FP57ERX-7APZUQU";
heym.id = "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM"; rilke.id =
}; "NYNNHXP-7JMSTXG-SVNOPWD-RWXCCCL-CBOVBEI-X4QPLF4-NJA5G2P-RSGYRQQ";
folders = let syncthing-dir = "${config.users.users.me.home}/cloud/syncthing"; in { wilde.id =
"${syncthing-dir}/common".devices = [ "homeros" "scardanelli" "wilde" ]; "R6DEBD7-G5RYDKN-VFA3HPO-WX4DNVI-373F7OQ-AW5MZTT-3L4BDVW-Y6ROEAF";
"${syncthing-dir}/library".devices = lib.attrNames devices; heym.id =
"${syncthing-dir}/mundoiu".devices = lib.attrNames devices; "HLQSG3D-WSKLA6S-MEYQ3EU-GDBGABE-PY53RQ6-SWQAP2I-Z5MVBVX-MYPJXAM";
"${syncthing-dir}/music".devices = lib.attrNames devices;
}; };
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;
};
}; };
}; };
} }

View File

@@ -1,8 +1,6 @@
{ pkgs, lib, config, options, ... }: { pkgs, lib, config, options, ... }:
let let inherit (lib.strings) makeBinPath;
inherit (lib.strings) makeBinPath; in {
in
{
imports = [ imports = [
<niveum/modules/constants.nix> <niveum/modules/constants.nix>
<home-manager/nixos> <home-manager/nixos>
@@ -66,17 +64,22 @@ in
}; };
niveum.theme = { niveum.theme = {
gtk = { name = "Adwaita-dark"; package = pkgs.gnome3.gnome-themes-extra; }; gtk = {
icon = { name = "Adwaita"; package = pkgs.gnome3.adwaita-icon-theme; }; name = "Adwaita-dark";
cursor = { name = "capitaine-cursors-white"; package = pkgs.capitaine-cursors; }; 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" ]; }
nix.nixPath = [ "/var/src" ]; { services.dbus.packages = [ pkgs.gnome3.dconf ]; }
}
{
services.dbus.packages = [ pkgs.gnome3.dconf ];
}
{ {
environment.systemPackages = [ environment.systemPackages = [
(pkgs.writers.writeDashBin "x-www-browser" '' (pkgs.writers.writeDashBin "x-www-browser" ''
@@ -94,16 +97,17 @@ in
config = { config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { nur = import (builtins.fetchTarball
inherit pkgs; "https://github.com/nix-community/NUR/archive/master.tar.gz") {
}; inherit pkgs;
};
writeDashBin = pkgs.writers.writeDashBin; writeDashBin = pkgs.writers.writeDashBin;
writeDash = pkgs.writers.writeDash; writeDash = pkgs.writers.writeDash;
gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> { gfs-fonts = pkgs.callPackage <niveum/packages/gfs-fonts.nix> {
scardanelli = config.networking.hostName == "scardanelli"; scardanelli = config.networking.hostName == "scardanelli";
}; };
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {}; iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> { };
ix = pkgs.callPackage <niveum/packages/ix.nix> {}; ix = pkgs.callPackage <niveum/packages/ix.nix> { };
}; };
}; };
overlays = [ overlays = [
@@ -142,7 +146,8 @@ in
users.users.me = { users.users.me = {
name = "kfm"; name = "kfm";
description = config.niveum.user.name; description = config.niveum.user.name;
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
isNormalUser = true; isNormalUser = true;
}; };
} }
@@ -159,9 +164,9 @@ in
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ]; environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ];
} }
{ {
environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum"; environment.interactiveShellInit =
environment.shellAliases = "export PATH=$PATH:$HOME/projects/niveum";
let environment.shellAliases = let
wcd = pkgs.writers.writeDash "wcd" '' wcd = pkgs.writers.writeDash "wcd" ''
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.." cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
''; '';
@@ -174,7 +179,8 @@ in
in { in {
"ß" = "${pkgs.utillinux}/bin/setsid"; "ß" = "${pkgs.utillinux}/bin/setsid";
cat = "${pkgs.bat}/bin/bat --style=plain"; 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"; cp = "cp -i";
dig = "dig +short"; dig = "dig +short";
ip = "${pkgs.iproute}/bin/ip -c"; ip = "${pkgs.iproute}/bin/ip -c";
@@ -197,8 +203,10 @@ in
wcd = "source ${wcd}"; wcd = "source ${wcd}";
weechat = "${pkgs.openssh}/bin/ssh kmein@prism.r -t tmux attach"; weechat = "${pkgs.openssh}/bin/ssh kmein@prism.r -t tmux attach";
where = "source ${where}"; where = "source ${where}";
yt = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link yt =
yta = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio "${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; userControlled.enable = true;
networks = { networks = {
"Aether" = { "Aether" = {
pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; pskRaw =
"e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
priority = 10; priority = 10;
}; };
"Asoziales Netzwerk" = { "Asoziales Netzwerk" = {
pskRaw = "8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6"; pskRaw =
"8e234041ec5f0cd1b6a14e9adeee9840ed51b2f18856a52137485523e46b0cb6";
priority = 10; priority = 10;
}; };
"Libertarian WiFi" = { "Libertarian WiFi" = {
pskRaw = "e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050"; pskRaw =
"e9beaae6ffa55d10e80b8a2e7d997411d676a3cc6f1f29d0b080391f04555050";
priority = 9; priority = 9;
}; };
"EasyBox-927376".pskRaw = "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22"; "EasyBox-927376".pskRaw =
"FlixBus Wi-Fi" = {}; "dbd490ab69b39bd67cfa06daf70fc3ef3ee90f482972a668ed758f90f5577c22";
"FlixBus" = {}; "FlixBus Wi-Fi" = { };
"FlixTrain" = {}; "FlixBus" = { };
"BVG Wi-Fi" = {}; "FlixTrain" = { };
"Ni/Schukajlow".pskRaw = "ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781"; "BVG Wi-Fi" = { };
"WIFIonICE" = {}; "Ni/Schukajlow".pskRaw =
"ffc47f6829da59c48aea878a32252223303f5c47a3859edc90971ffc63346781";
"WIFIonICE" = { };
"WLAN-914742".psk = "67647139648174545446"; "WLAN-914742".psk = "67647139648174545446";
"KDG-CEAA4".psk = "PBkBSmejcvM4"; "KDG-CEAA4".psk = "PBkBSmejcvM4";
"KDG-4ECF7".psk = "Gdbwh7afw2Bx"; "KDG-4ECF7".psk = "Gdbwh7afw2Bx";
"WLAN-XVMU6T".pskRaw = "46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc"; "WLAN-XVMU6T".pskRaw =
"c-base-public" = {}; "46ea807283255a3d7029233bd79c18837df582666c007c86a8d591f65fae17cc";
"c-base-public" = { };
"discord".psk = "baraustrinken"; "discord".psk = "baraustrinken";
"GoOnline".psk = "airbnbguest"; "GoOnline".psk = "airbnbguest";
"security-by-obscurity".psk = "44629828256481964386"; "security-by-obscurity".psk = "44629828256481964386";
@@ -247,12 +261,8 @@ in
"192.168.178.24" = [ "catullus" ]; "192.168.178.24" = [ "catullus" ];
}; };
} }
{ { i18n.defaultLocale = "en_GB.UTF-8"; }
i18n.defaultLocale = "en_GB.UTF-8"; { services.illum.enable = true; }
}
{
services.illum.enable = true;
}
{ {
services.xserver = { services.xserver = {
enable = true; enable = true;
@@ -275,9 +285,7 @@ in
pumount.source = "${pkgs.pmount}/bin/pumount"; pumount.source = "${pkgs.pmount}/bin/pumount";
}; };
} }
{ { programs.command-not-found.enable = true; }
programs.command-not-found.enable = true;
}
{ {
programs.gnupg.agent.enable = true; programs.gnupg.agent.enable = true;

View File

@@ -1,36 +1,36 @@
{ pkgs, ... }: { pkgs, ... }:
let nixify = pkgs.writers.writeDashBin "nixify" '' let
set -efuC nixify = pkgs.writers.writeDashBin "nixify" ''
set -efuC
if [ ! -e ./.envrc ]; then if [ ! -e ./.envrc ]; then
echo use_nix > .envrc echo use_nix > .envrc
direnv allow direnv allow
fi fi
if [ ! -e shell.nix ]; then if [ ! -e shell.nix ]; then
cat > shell.nix <<'EOF' cat > shell.nix <<'EOF'
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> {} }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; []; buildInputs = with pkgs; [];
shellHook = "export HISTFILE=''${toString ./.history}"; shellHook = "export HISTFILE=''${toString ./.history}";
} }
EOF EOF
''${EDITOR:-vim} shell.nix ''${EDITOR:-vim} shell.nix
fi fi
''; '';
in { in {
environment.systemPackages = [ environment.systemPackages = [ pkgs.direnv nixify ];
pkgs.direnv
nixify
];
home-manager.users.me.programs.direnv = { home-manager.users.me.programs.direnv = {
enable = true; enable = true;
stdlib = builtins.readFile ("${pkgs.fetchFromGitHub { stdlib = builtins.readFile ("${
owner = "Mic92"; pkgs.fetchFromGitHub {
repo = "dotfiles"; owner = "Mic92";
rev = "a0a9b7e358fa70a85cd468f8ca1fbb02ae0a91df"; repo = "dotfiles";
sha256 = "1y9h5s1lf59sczsm0ksq2x1yhl98ba9lwk5yil3q53rg7n4574pg"; rev = "a0a9b7e358fa70a85cd468f8ca1fbb02ae0a91df";
}}/home/.direnvrc"); sha256 = "1y9h5s1lf59sczsm0ksq2x1yhl98ba9lwk5yil3q53rg7n4574pg";
}
}/home/.direnvrc");
}; };
programs.zsh.interactiveShellInit = '' programs.zsh.interactiveShellInit = ''

View File

@@ -1,11 +1,8 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }: {
{
imports = [ imports = [
(import <stockholm/makefu/3modules/bump-distrowatch.nix> { (import <stockholm/makefu/3modules/bump-distrowatch.nix> {
inherit lib config; inherit lib config;
pkgs = pkgs // { pkgs = pkgs // { writeDash = pkgs.writers.writeDash; };
writeDash = pkgs.writers.writeDash;
};
}) })
]; ];

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
users.users.me.extraGroups = [ "docker" ]; users.users.me.extraGroups = [ "docker" ];
environment.systemPackages = [ pkgs.docker pkgs.docker_compose ]; environment.systemPackages = [ pkgs.docker pkgs.docker_compose ];

View File

@@ -18,7 +18,7 @@ with config.niveum; {
separator_color = "auto"; separator_color = "auto";
sort = true; sort = true;
markup = "full"; markup = "full";
format = ''%a\n<b>%s</b>\n%b''; format = "%a\\n<b>%s</b>\\n%b";
alignment = "left"; alignment = "left";
show_age_threshold = 60; show_age_threshold = 60;
bounce_freq = 0; bounce_freq = 0;

View File

@@ -1,27 +1,28 @@
{ lib, pkgs, ... }: { lib, pkgs, ... }:
let let
overrides = self: super: { overrides = self: super: {
flameshot-once = self.callPackage <stockholm/krebs/5pkgs/haskell/flameshot-once.nix> {}; flameshot-once =
blessings = self.callPackage <stockholm/krebs/5pkgs/haskell/blessings.nix> {}; self.callPackage <stockholm/krebs/5pkgs/haskell/flameshot-once.nix> { };
blessings =
self.callPackage <stockholm/krebs/5pkgs/haskell/blessings.nix> { };
}; };
flameshot-once = pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {}; flameshot-once =
in pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> { };
{ in {
nixpkgs.overlays = [ nixpkgs.overlays = [
(import <stockholm/submodules/nix-writers/pkgs>) (import <stockholm/submodules/nix-writers/pkgs>)
(import <stockholm/krebs/5pkgs/override>) (import <stockholm/krebs/5pkgs/override>)
(self: super: { (self: super: {
haskell = super.haskell // { haskell = super.haskell // {
packages = lib.mapAttrs (name: value: packages = lib.mapAttrs (name: value:
if lib.hasAttr "override" value if lib.hasAttr "override" value then
then value.override { inherit overrides; } value.override { inherit overrides; }
else value else
) super.haskell.packages; value) super.haskell.packages;
}; };
haskellPackages = super.haskellPackages.override { haskellPackages = super.haskellPackages.override { inherit overrides; };
inherit overrides; xwaitforwindow =
}; super.callPackage <stockholm/krebs/5pkgs/simple/xwaitforwindow.nix> { };
xwaitforwindow = super.callPackage <stockholm/krebs/5pkgs/simple/xwaitforwindow.nix> {};
}) })
]; ];

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
niveum.fonts.size = 9; niveum.fonts.size = 9;
fonts = { fonts = {

View File

@@ -1,12 +1,9 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }: {
{
environment = { environment = {
systemPackages = [ pkgs.fzf ]; systemPackages = [ pkgs.fzf ];
variables = { variables = {
FZF_DEFAULT_OPTS = lib.escapeShellArgs [ FZF_DEFAULT_OPTS =
"--height=40%" lib.escapeShellArgs [ "--height=40%" "--layout=reverse" ];
"--layout=reverse"
];
FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d"; FZF_ALT_C_COMMAND = "${pkgs.fd}/bin/fd --type d";
FZF_ALT_C_OPTS = lib.escapeShellArgs [ FZF_ALT_C_OPTS = lib.escapeShellArgs [
"--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'" "--preview='${pkgs.tree}/bin/tree -L 1 \"{}\"'"
@@ -14,9 +11,8 @@
"--preview-window=hidden" "--preview-window=hidden"
]; ];
FZF_CTRL_T_COMMAND = "${pkgs.fd}/bin/fd --type f"; FZF_CTRL_T_COMMAND = "${pkgs.fd}/bin/fd --type f";
FZF_CTRL_T_OPTS = lib.escapeShellArgs [ FZF_CTRL_T_OPTS =
"--preview='${pkgs.bat}/bin/bat \"{}\"'" lib.escapeShellArgs [ "--preview='${pkgs.bat}/bin/bat \"{}\"'" ];
];
}; };
}; };

View File

@@ -1,5 +1,4 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }: {
{
environment.systemPackages = [ environment.systemPackages = [
pkgs.mr pkgs.mr
pkgs.git pkgs.git
@@ -19,16 +18,15 @@
}; };
home-manager.users.me = { home-manager.users.me = {
home.file.".mrconfig".text = home.file.".mrconfig".text = let
let prependPath = prefix:
prependPath = prefix: lib.attrsets.mapAttrs' (path: lib.attrsets.nameValuePair "${prefix}/${path}"); lib.attrsets.mapAttrs'
(path: lib.attrsets.nameValuePair "${prefix}/${path}");
git = url: { checkout = "git clone ${url}"; }; git = url: { checkout = "git clone ${url}"; };
github = owner: repo: git "git@github.com:${owner}/${repo}"; github = owner: repo: git "git@github.com:${owner}/${repo}";
keybase = owner: repo: git "keybase://private/${owner}/${repo}"; keybase = owner: repo: git "keybase://private/${owner}/${repo}";
in lib.generators.toINI {} ({ in lib.generators.toINI { } ({
DEFAULT = { DEFAULT = { git_gc = ''git gc "$@"''; };
git_gc = "git gc \"$@\"";
};
} // prependPath "projects" { } // prependPath "projects" {
"menstruation.rs" = github "kmein" "menstruation.rs"; "menstruation.rs" = github "kmein" "menstruation.rs";
brockman = github "kmein" "brockman"; brockman = github "kmein" "brockman";
@@ -67,11 +65,13 @@
diffs = "diff --staged"; diffs = "diff --staged";
last = "log -1 HEAD"; last = "log -1 HEAD";
logs = "log --pretty=oneline"; 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; ignores = config.niveum.ignore;
extraConfig = { 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 = { color = {
ui = true; ui = true;
diff = { diff = {

View File

@@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
imports = [ <niveum/modules/hledger.nix> ]; imports = [ <niveum/modules/hledger.nix> ];
niveum.hledger = { niveum.hledger = {

View File

@@ -23,10 +23,22 @@
updateProcessNames = false; updateProcessNames = false;
meters = { meters = {
left = [ left = [
{ kind = "LeftCPUs2"; mode = 1; } {
{ kind = "RightCPUs2"; mode = 1; } kind = "LeftCPUs2";
{ kind = "Memory"; mode = 1; } mode = 1;
{ kind = "Swap"; mode = 1; } }
{
kind = "RightCPUs2";
mode = 1;
}
{
kind = "Memory";
mode = 1;
}
{
kind = "Swap";
mode = 1;
}
]; ];
right = [ "Uptime" "Tasks" "LoadAverage" "Battery" ]; right = [ "Uptime" "Tasks" "LoadAverage" "Battery" ];
}; };

View File

@@ -13,10 +13,13 @@ let
anonymous_identity="anonymous@wlan.hu-berlin.de" anonymous_identity="anonymous@wlan.hu-berlin.de"
altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de" altsubject_match="DNS:srv1-radius.cms.hu-berlin.de;DNS:srv2-radius.cms.hu-berlin.de"
password="${eduroam.password}" password="${eduroam.password}"
ca_cert="${pkgs.fetchurl { ca_cert="${
url = https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem; pkgs.fetchurl {
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk"; url =
}}" "https://www.cms.hu-berlin.de/de/dl/netze/wlan/config/eduroam/t-telesec_globalroot_class_2.pem";
sha256 = "0if8aqd06sid7a0vw009zpa087wxcgdd2x6z2zs4pis5kvyqj2dk";
}
}"
phase2="auth=PAP" phase2="auth=PAP"
''; '';
in { in {
@@ -32,7 +35,8 @@ in {
password = eduroam.password; password = eduroam.password;
}; };
config = fileContents (pkgs.fetchurl { 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"; sha256 = "15b55aibik5460svjq2gwxrcyh6ay4k8savd6cd5lncgndmd8p8h";
}); });
}; };

View File

@@ -38,12 +38,14 @@ let
''; '';
# https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode # https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
emoji-menu = emoji-menu = let
let emoji-file = pkgs.fetchurl { emoji-file = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji"; url =
sha256 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk"; "https://raw.githubusercontent.com/LukeSmithxyz/voidrice/master/.local/share/larbs/emoji";
}; sha256 = "09m2rgb9d5jpiy8q4jz3dw36gkpb4ng2pl7xi7ppsrzzzdvq85qk";
in with pkgs; writers.writeDashBin "emoji-menu" '' };
in with pkgs;
writers.writeDashBin "emoji-menu" ''
PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]} PATH=${lib.makeBinPath [ coreutils dmenu gnused libnotify xclip xdotool ]}
chosen=$(cut -d ';' -f1 ${emoji-file} | dmenu -i -l 10 | sed "s/ .*//") chosen=$(cut -d ';' -f1 ${emoji-file} | dmenu -i -l 10 | sed "s/ .*//")
@@ -102,31 +104,34 @@ in with config.niveum; {
titlebar = false; titlebar = false;
border = 1; border = 1;
}; };
colors = colors = let
let scheme = { background = colours.background; text = colours.foreground; }; scheme = {
in rec { background = colours.background;
focused = scheme // { text = colours.foreground;
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;
};
}; };
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 = [{ bars = [{
workspaceButtons = false; workspaceButtons = false;
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ]; fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
@@ -143,17 +148,17 @@ in with config.niveum; {
}; };
}; };
statusCommand = "${pkgs.unstable.i3status-rust}/bin/i3status-rs ${ statusCommand = "${pkgs.unstable.i3status-rust}/bin/i3status-rs ${
writeTOML (import <niveum/dot/i3status-rust.nix> { writeTOML (import <niveum/dot/i3status-rust.nix> {
wifi-interface = networkInterfaces.wireless; wifi-interface = networkInterfaces.wireless;
batteryBlock = batteryBlocks.default; batteryBlock = batteryBlocks.default;
inherit (config.niveum) colours; inherit (config.niveum) colours;
inherit pkgs; inherit pkgs;
}) })
}"; }";
}]; }];
modes.resize = { modes.resize = {
"Escape" = "mode \"default\""; "Escape" = ''mode "default"'';
"Return" = "mode \"default\""; "Return" = ''mode "default"'';
"h" = "resize shrink width 10 px or 5 ppt"; "h" = "resize shrink width 10 px or 5 ppt";
"j" = "resize grow height 10 px or 5 ppt"; "j" = "resize grow height 10 px or 5 ppt";
"k" = "resize shrink 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}+y" = "exec x-www-browser";
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow"; "${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}+d" = "exec --no-startup-id ${pkgs.dmenu}/bin/dmenu_run";
"${modifier}+Shift+d" = "exec ${pkgs.writers.writeDash "notemenu" '' "${modifier}+Shift+d" = "exec ${
set -efu pkgs.writers.writeDash "notemenu" ''
PATH=$PATH:${lib.makeBinPath [ pkgs.dmenu pkgs.findutils pkgs.coreutils ]} set -efu
PATH=$PATH:${
lib.makeBinPath [ pkgs.dmenu pkgs.findutils pkgs.coreutils ]
}
cd ~/notes cd ~/notes
find . -type f -printf "%T@ %p\n" \ find . -type f -printf "%T@ %p\n" \
| sort --reverse --numeric-sort \ | sort --reverse --numeric-sort \
| cut --delimiter=" " --fields=2 \ | cut --delimiter=" " --fields=2 \
| dmenu -i \ | dmenu -i \
| xargs i3-sensible-terminal -e "$EDITOR" | xargs i3-sensible-terminal -e "$EDITOR"
''}"; ''
}";
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5"; "${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
"${modifier}+u" = "exec ${emoji-menu}/bin/emoji-menu"; "${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"; "${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
"Print" = "exec flameshot-once"; "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"; "XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t";
"XF86AudioRaiseVolume" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5"; "XF86AudioRaiseVolume" =
"XF86Calculator" = "exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc"; "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -i 5";
"XF86AudioPause" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl pause"; "XF86Calculator" =
"XF86AudioPlay" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl play-pause"; "exec ${pkgs.st}/bin/st -c floating -e ${pkgs.bc}/bin/bc";
"XF86AudioNext" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl next"; "XF86AudioPause" =
"XF86AudioPrev" = "exec --no-startup-id ${pkgs.playerctl}/bin/playerctl previous"; "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"; "XF86ScreenSaver" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
# key names detected with xorg.xev: # key names detected with xorg.xev:

View File

@@ -1,7 +1,13 @@
{ {
networking.firewall = { networking.firewall = {
allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; allowedTCPPortRanges = [{
allowedUDPPortRanges = [ { from = 1714; to = 1764; } ]; from = 1714;
to = 1764;
}];
allowedUDPPortRanges = [{
from = 1714;
to = 1764;
}];
}; };
home-manager.users.me = { home-manager.users.me = {

View File

@@ -1,5 +1,4 @@
{ config, ... }: { config, ... }: {
{
services.keybase.enable = true; services.keybase.enable = true;
services.kbfs = { services.kbfs = {

View File

@@ -1,16 +1,17 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let commaSep = builtins.concatStringsSep ",";
commaSep = builtins.concatStringsSep ",";
in { in {
services.xserver = { services.xserver = {
layout = commaSep [ "de" "gr" ]; layout = commaSep [ "de" "gr" ];
xkbVariant = commaSep [ "T3" "polytonic" ]; 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; libinput.enable = true;
}; };
console.keyMap = "de"; console.keyMap = "de";
# improve held key rate # 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";
} }

View File

@@ -11,17 +11,18 @@ let
neomutt.enable = true; neomutt.enable = true;
notmuch.enable = false; notmuch.enable = false;
}; };
addArchiveCommand = folder: lib.recursiveUpdate { addArchiveCommand = folder:
neomutt.extraConfig = '' lib.recursiveUpdate {
# named-mailboxes " Archive" "=${folder}" neomutt.extraConfig = ''
macro pager,index \' "<save-message>+${folder}<enter>" "Archive" # named-mailboxes " Archive" "=${folder}"
''; macro pager,index \' "<save-message>+${folder}<enter>" "Archive"
}; '';
in };
{ in {
environment.systemPackages = [ pkgs.neomutt ]; 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.maildirBasePath = maildir;
accounts.email.accounts = { accounts.email.accounts = {
cock = addArchiveCommand "Archive" (enableDefaults { cock = addArchiveCommand "Archive" (enableDefaults {
@@ -41,19 +42,20 @@ in
realName = "2210"; realName = "2210";
passwordCommand = pass "mail/2210@cock.li"; passwordCommand = pass "mail/2210@cock.li";
}); });
kieran-gmail = addArchiveCommand "[Gmail]/Alle Nachrichten" (enableDefaults { kieran-gmail = addArchiveCommand "[Gmail]/Alle Nachrichten"
primary = true; (enableDefaults {
flavor = "gmail.com"; primary = true;
address = "kieran.meinhardt@gmail.com"; flavor = "gmail.com";
realName = config.niveum.user.name; address = "kieran.meinhardt@gmail.com";
userName = "kieran.meinhardt"; realName = config.niveum.user.name;
passwordCommand = pass "mail/kieran.meinhardt@gmail.com"; userName = "kieran.meinhardt";
folders = { passwordCommand = pass "mail/kieran.meinhardt@gmail.com";
drafts = "[Gmail]/Entw&APw-rfe"; folders = {
sent = "[Gmail]/Gesendet"; drafts = "[Gmail]/Entw&APw-rfe";
trash = "[Gmail]/Papierkorb"; sent = "[Gmail]/Gesendet";
}; trash = "[Gmail]/Papierkorb";
}); };
});
hu-berlin = addArchiveCommand "Archives" (enableDefaults { hu-berlin = addArchiveCommand "Archives" (enableDefaults {
primary = false; primary = false;
address = "meinhark@hu-berlin.de"; address = "meinhark@hu-berlin.de";
@@ -80,25 +82,29 @@ in
vimKeys = true; vimKeys = true;
checkStatsInterval = 60; checkStatsInterval = 60;
settings = { settings = {
attribution = "\"%n (%a), %d:\""; attribution = ''"%n (%a), %d:"'';
date_format = "\"%Y-%m-%d %H:%M\""; date_format = ''"%Y-%m-%d %H:%M"'';
# envelope_from = "yes"; # THIS BREAKS SENDING VIA MSMTP (the default setting already contains msmtpq --read-envelope) # envelope_from = "yes"; # THIS BREAKS SENDING VIA MSMTP (the default setting already contains msmtpq --read-envelope)
fast_reply = "yes"; # skip to compose when forwarding fast_reply = "yes"; # skip to compose when forwarding
fcc_attach = "no"; # save attachments with the body 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 forward_quote = "yes"; # include message in forwards
include = "yes"; # include message in replies include = "yes"; # include message in replies
# index_format = "\"%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)\""; # index_format = "\"%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)\"";
index_format= "\"${pkgs.writeDash "mutt-index" '' index_format = ''
# http://www.mutt.org/doc/manual/#formatstrings "${
recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')" pkgs.writeDash "mutt-index" ''
# output to mutt # http://www.mutt.org/doc/manual/#formatstrings
# V recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')"
echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%" # output to mutt
# args to mutt-index dash script # V
# V echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%"
''} %r |\""; # args to mutt-index dash script
mail_check = "60"; # to avoid lags using IMAP with some email providers (yahoo for example) # V
''
} %r |"'';
mail_check =
"60"; # to avoid lags using IMAP with some email providers (yahoo for example)
mail_check_stats = "yes"; mail_check_stats = "yes";
mark_old = "no"; # unread mail stay unread until read mark_old = "no"; # unread mail stay unread until read
markers = "no"; # disables the `+` displayed at line wraps markers = "no"; # disables the `+` displayed at line wraps
@@ -121,58 +127,235 @@ in
''); '');
}; };
macros = [ macros = [
{ action = "<change-dir><kill-line>..<enter>"; map = "browser"; key = "h"; } # go to parent directory {
{ action = "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" ; map = "index"; key = "\\Cr"; } # mark all messages read action = "<change-dir><kill-line>..<enter>";
{ action = "<shell-escape>mbsync -a<enter>"; map = "index"; key = "O"; } # run mbsync to sync all mail map = "browser";
{ action = "<limit>all\\n"; map = "index"; key = "A"; } # show all messages (undo limit) key = "h";
} # go to parent directory
{
action = "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>";
map = "index";
key = "\\Cr";
} # mark all messages read
{
action = "<shell-escape>mbsync -a<enter>";
map = "index";
key = "O";
} # run mbsync to sync all mail
{
action = "<limit>all\\n";
map = "index";
key = "A";
} # show all messages (undo limit)
# { action = "<save-message>=Archive<enter><enter-command>echo 'Saved to Archive'<enter>"; map = "index"; key = ",a"; } # { action = "<save-message>=Archive<enter><enter-command>echo 'Saved to Archive'<enter>"; map = "index"; key = ",a"; }
{ {
action = "<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \\$x >~/.cache/mutt_terms<enter><limit>~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' \\`\\\"<enter>"; action = ''
<enter-command>unset wait_key<enter><shell-escape>read -p 'Enter a search term to find with notmuch: ' x; echo \$x >~/.cache/mutt_terms<enter><limit>~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' \`\"<enter>'';
map = "index"; map = "index";
key = "\\Cf"; key = "\\Cf";
} }
]; ];
binds = [ binds = [
{ action = "complete-query"; key = "<Tab>"; map = "editor"; } {
{ action = "display-message"; key = "l"; map = "index"; } action = "complete-query";
{ action = "exit"; key = "h"; map = "attach"; } key = "<Tab>";
{ action = "exit"; key = "h"; map = "pager"; } map = "editor";
{ action = "group-reply"; key = "R"; map = "index"; } }
{ action = "group-reply"; key = "R"; map = "pager"; } {
{ action = "limit"; key = "L"; map = "index"; } action = "display-message";
{ action = "next-entry"; key = "j"; map = "index"; } key = "l";
{ action = "next-line"; key = "\\005"; map = "pager"; } # mouse wheel map = "index";
{ action = "next-undeleted"; key = "\\005"; map = "index"; } # mouse wheel }
{ action = "noop"; key = "<space>"; map = "editor"; } {
{ action = "noop"; key = "\\Cf"; map = "index"; } action = "exit";
{ action = "noop"; key = "h"; map = "index"; } key = "h";
{ action = "noop"; key = "i"; map = "index"; } map = "attach";
{ action = "noop"; key = "i"; map = "pager"; } }
{ action = "previous-entry"; key = "k"; map = "index"; } {
{ action = "previous-line"; key = "\\031"; map = "pager"; } # mouse wheel action = "exit";
{ action = "previous-undeleted"; key = "\\031"; map = "index"; } # mouse wheel key = "h";
{ action = "select-entry"; key = "l"; map = "browser"; } map = "pager";
{ action = "sidebar-next"; key = "\\Cj"; map = "index"; } }
{ action = "sidebar-next"; key = "\\Cj"; map = "pager"; } {
{ action = "sidebar-next-new"; key = "\\Cn"; map = "index"; } action = "group-reply";
{ action = "sidebar-next-new"; key = "\\Cn"; map = "pager"; } key = "R";
{ action = "sidebar-open"; key = "\\Co"; map = "index"; } map = "index";
{ action = "sidebar-open"; key = "\\Co"; map = "pager"; } }
{ action = "sidebar-prev"; key = "\\Ck"; map = "index"; } {
{ action = "sidebar-prev"; key = "\\Ck"; map = "pager"; } action = "group-reply";
{ action = "sidebar-prev-new"; key = "\\Cp"; map = "index"; } key = "R";
{ action = "sidebar-prev-new"; key = "\\Cp"; map = "pager"; } 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 = "limit";
{ action = "sync-mailbox"; key = "S"; map = "pager"; } key = "L";
{ action = "tag-entry"; key = "<space>"; map = "index"; } map = "index";
{ action = "undelete-message"; key = "U"; map = "index"; } }
{ action = "view-attachments"; key = "l"; map = "pager"; } {
{ action = "view-mailcap"; key = "<return>"; map = "attach"; } action = "next-entry";
{ action = "view-mailcap"; key = "l"; map = "attach"; } key = "j";
{ action = "view-raw-message"; key = "H"; map = "index"; } map = "index";
{ action = "view-raw-message"; key = "H"; map = "pager"; } }
{
action = "next-line";
key = "\\005";
map = "pager";
} # mouse wheel
{
action = "next-undeleted";
key = "\\005";
map = "index";
} # mouse wheel
{
action = "noop";
key = "<space>";
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 = "<space>";
map = "index";
}
{
action = "undelete-message";
key = "U";
map = "index";
}
{
action = "view-attachments";
key = "l";
map = "pager";
}
{
action = "view-mailcap";
key = "<return>";
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 = '' extraConfig = ''
auto_view text/html # automatically show html auto_view text/html # automatically show html

View File

@@ -1,9 +1,6 @@
{ pkgs, ... }: { pkgs, ... }: {
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(mpv-with-scripts.override { (mpv-with-scripts.override { scripts = [ mpvScripts.mpris ]; })
scripts = [ mpvScripts.mpris ];
})
mpv-poll mpv-poll
]; ];

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
environment.variables.EDITOR = pkgs.lib.mkForce "nvim"; environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
environment.shellAliases.vi = "nvim"; environment.shellAliases.vi = "nvim";
environment.shellAliases.vim = "nvim"; environment.shellAliases.vim = "nvim";
@@ -7,14 +6,22 @@
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
vimPlugins = pkgs.vimPlugins // { vimPlugins = pkgs.vimPlugins // {
cheat-sh-vim = pkgs.callPackage <niveum/packages/vimPlugins/cheat-sh.nix> {}; cheat-sh-vim =
vim-fetch = pkgs.callPackage <niveum/packages/vimPlugins/vim-fetch.nix> {}; pkgs.callPackage <niveum/packages/vimPlugins/cheat-sh.nix> { };
vim-colors-paramount = pkgs.callPackage <niveum/packages/vimPlugins/vim-colors-paramount.nix> {}; vim-fetch =
vim-256noir = pkgs.callPackage <niveum/packages/vimPlugins/vim-256noir.nix> {}; pkgs.callPackage <niveum/packages/vimPlugins/vim-fetch.nix> { };
todo-txt-vim = pkgs.callPackage <niveum/packages/vimPlugins/todo-txt-vim.nix> {}; vim-colors-paramount =
jq-vim = pkgs.callPackage <niveum/packages/vimPlugins/jq-vim.nix> {}; pkgs.callPackage <niveum/packages/vimPlugins/vim-colors-paramount.nix>
vim-fsharp = pkgs.callPackage <niveum/packages/vimPlugins/vim-fsharp.nix> {}; { };
vim-reason-plus = pkgs.callPackage <niveum/packages/vimPlugins/vim-reason-plus.nix> {}; vim-256noir =
pkgs.callPackage <niveum/packages/vimPlugins/vim-256noir.nix> { };
todo-txt-vim =
pkgs.callPackage <niveum/packages/vimPlugins/todo-txt-vim.nix> { };
jq-vim = pkgs.callPackage <niveum/packages/vimPlugins/jq-vim.nix> { };
vim-fsharp =
pkgs.callPackage <niveum/packages/vimPlugins/vim-fsharp.nix> { };
vim-reason-plus =
pkgs.callPackage <niveum/packages/vimPlugins/vim-reason-plus.nix> { };
}; };
}; };
@@ -42,7 +49,8 @@
vim-fetch vim-fetch
vim-fugitive vim-fugitive
vim-gitgutter vim-gitgutter
vim-pandoc vim-pandoc-syntax # vim-pandoc-after vim-pandoc
vim-pandoc-syntax # vim-pandoc-after
vim-repeat vim-repeat
vim-sensible vim-sensible
# vim-startify # vim-startify

View File

@@ -1,6 +1,7 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
let 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 <niveum/packages/scripts> { inherit pkgs lib; }; scripts = import <niveum/packages/scripts> { inherit pkgs lib; };
linkhandler-bin = "${scripts.linkhandler}/bin/linkhandler"; linkhandler-bin = "${scripts.linkhandler}/bin/linkhandler";
@@ -54,8 +55,7 @@ let
color info red black bold color info red black bold
color article white black color article white black
''; '';
in in {
{
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
newsboat = pkgs.writers.writeDashBin "newsboat" '' newsboat = pkgs.writers.writeDashBin "newsboat" ''
${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -c ${newsboat-home}/cache.db -u ${newsboat-home}/urls "$@" ${pkgs.newsboat}/bin/newsboat -C ${newsboat-config} -c ${newsboat-home}/cache.db -u ${newsboat-home}/urls "$@"

View File

@@ -1,8 +1,5 @@
{ config, ... }: { config, ... }: {
{
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
unstable = import <nixos-unstable> { unstable = import <nixos-unstable> { config = config.nixpkgs.config; };
config = config.nixpkgs.config;
};
}; };
} }

View File

@@ -1,16 +1,13 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let scripts = import <niveum/packages/scripts> { inherit pkgs lib; };
scripts = import <niveum/packages/scripts> { inherit pkgs lib; }; in {
in
{
imports = [ imports = [
./krebs.nix ./krebs.nix
./writing.nix ./writing.nix
./python.nix ./python.nix
./haskell ./haskell
{ {
environment.systemPackages = environment.systemPackages = let
let
# nightly = pkgs.rustChannelOf { # nightly = pkgs.rustChannelOf {
# date = "2019-12-27"; # date = "2019-12-27";
# channel = "nightly"; # channel = "nightly";

View File

@@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
home-manager.users.me.home.file = { home-manager.users.me.home.file = {
".ghc/ghci.conf".text = '' ".ghc/ghci.conf".text = ''
:set editor vim :set editor vim
@@ -10,15 +9,16 @@
:set -Wall :set -Wall
:set -XOverloadedStrings :set -XOverloadedStrings
''; '';
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\"" # :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
".stack/config.yaml".text = let inherit (config.niveum) user; in builtins.toJSON { ".stack/config.yaml".text = let inherit (config.niveum) user;
templates.params = { in builtins.toJSON {
author-name = user.name; templates.params = {
author-email = user.email; author-name = user.name;
copyright = "Copyright: (c) 2019 ${user.name}"; author-email = user.email;
github-username = user.github; copyright = "Copyright: (c) 2019 ${user.name}";
}; github-username = user.github;
}; };
};
}; };
services.hoogle = { services.hoogle = {
@@ -27,19 +27,20 @@
port = 8091; port = 8091;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs;
cabal2nix [
cabal-install cabal2nix
hlint cabal-install
haskellPackages.brittany hlint
# haskellPackages.hfmt haskellPackages.brittany
(haskellPackages.ghcWithHoogle (import ./packages.nix)) # haskellPackages.hfmt
] ++ map haskell.lib.justStaticExecutables [ (haskellPackages.ghcWithHoogle (import ./packages.nix))
haskellPackages.ghcid ] ++ map haskell.lib.justStaticExecutables [
haskellPackages.hasktags haskellPackages.ghcid
haskellPackages.hindent haskellPackages.hasktags
haskellPackages.pointfree haskellPackages.hindent
# haskellPackages.pointful haskellPackages.pointfree
haskellPackages.hpack # haskellPackages.pointful
]; haskellPackages.hpack
];
} }

View File

@@ -1,19 +1,24 @@
{ lib, pkgs, ... }: { lib, pkgs, ... }:
let krebs-packages = pkgs: { let
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> {}; krebs-packages = pkgs: {
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> {}; dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> { };
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {}; yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> { };
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {}; acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> { };
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> {}; urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> { };
untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> {}; mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> { };
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> {}; untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> { };
krebspaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/krebspaste> {}; kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
bepasty-client-cli = pkgs.callPackage <stockholm/krebs/5pkgs/simple/bepasty-client-cli> {}; krebspaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/krebspaste> { };
irc-announce = pkgs.callPackage <stockholm/krebs/5pkgs/simple/irc-announce> {}; bepasty-client-cli =
git-preview = pkgs.callPackage <stockholm/krebs/5pkgs/simple/git-preview> {}; pkgs.callPackage <stockholm/krebs/5pkgs/simple/bepasty-client-cli> { };
}; irc-announce =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/irc-announce> { };
git-preview =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/git-preview> { };
};
in { in {
nixpkgs.config.packageOverrides = krebs-packages; 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));
} }

View File

@@ -1,22 +1,19 @@
{ pkgs, ... }: { pkgs, ... }: {
{
environment.systemPackages = [ environment.systemPackages = [
(pkgs.python3.withPackages (pkgs.python3.withPackages (py: [
(py: [ py.black
py.black py.python-language-server
py.python-language-server py.pyls-mypy
py.pyls-mypy py.pyls-black
py.pyls-black py.pyls-isort
py.pyls-isort py.flake8
py.flake8 py.flask
py.flask py.pygments
py.pygments py.docopt
py.docopt py.schema
py.schema py.ansicolors
py.ansicolors py.virtualenv
py.virtualenv ]))
])
)
]; ];
home-manager.users.me.xdg.configFile."pycodestyle".text = '' home-manager.users.me.xdg.configFile."pycodestyle".text = ''

View File

@@ -7,10 +7,13 @@ let
inherit sha256; 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"; scardanelli = config.networking.hostName == "scardanelli";
in in {
{
environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [ environment.variables.STARDICT_DATA_DIR = toString (makeStardictDataDir [
{ {
name = "gr-de"; name = "gr-de";
@@ -35,31 +38,31 @@ in
} }
]); ]);
environment.variables.CITATIONSTYLES = toString
environment.variables.CITATIONSTYLES = toString (pkgs.linkFarm "citation-styles" [ (pkgs.linkFarm "citation-styles" [
(zoteroStyle { (zoteroStyle {
name = "chicago-author-date-de"; name = "chicago-author-date-de";
sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s"; sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s";
}) })
(zoteroStyle { (zoteroStyle {
name = "din-1505-2"; name = "din-1505-2";
sha256 = sha256 = if scardanelli then
if scardanelli "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq"
then "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq" else
else "150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi"; "150kbnxl1r4g1s40khdavv5s6ah10ws135r9k883f6srk78sz6zi";
}) })
(zoteroStyle { (zoteroStyle {
name = "apa"; name = "apa";
sha256 = sha256 = if scardanelli then
if scardanelli "0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk"
then "0g8vhp7gnd315h5b60r3zqp49kaq3fkxqnz2v7j2a0zp6s3cisdk" else
else "1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8"; "1rg41mblmqifba1azb6481dwxhsbl606kf6ysqkqd786f9l9dcf8";
}) })
]); ]);
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
texlive.combined.scheme-full 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 haskellPackages.pandoc-citeproc
# nur.repos.kmein.text2pdf # nur.repos.kmein.text2pdf
libreoffice libreoffice

View File

@@ -1,8 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
let let hp-driver = pkgs.hplipWithPlugin;
hp-driver = pkgs.hplipWithPlugin; in {
in
{
services.printing = { services.printing = {
enable = true; enable = true;
drivers = [ hp-driver ]; drivers = [ hp-driver ];
@@ -15,24 +13,21 @@ in
users.users.me.extraGroups = [ "scanner" ]; users.users.me.extraGroups = [ "scanner" ];
hardware.printers.ensurePrinters = [ hardware.printers.ensurePrinters = [{
{ name = "OfficeJet";
name = "OfficeJet"; location = "Zimmer";
location = "Zimmer"; deviceUri = "https://192.168.178.27";
deviceUri = "https://192.168.178.27"; model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd";
model = "drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd"; ppdOptions = {
ppdOptions = { Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None
Duplex = "DuplexNoTumble"; # DuplexNoTumble DuplexTumble None PageSize = "A4"; # A4 A4.FB A4.Duplex
PageSize = "A4"; # A4 A4.FB A4.Duplex MediaType = "Plain";
MediaType = "Plain"; OutputMode = "Normal";
OutputMode = "Normal"; ColorModel = "KGray"; # RGB CMYGray KGray
ColorModel = "KGray"; # RGB CMYGray KGray };
}; }];
}
];
} }
/* /* HP/hp-officejet_4650_series.ppd.gz
HP/hp-officejet_4650_series.ppd.gz drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd
drv:///hp/hpcups.drv/hp-officejet_4650_series.ppd
*/ */

View File

@@ -1,3 +1 @@
{ { services.redshift.enable = false; }
services.redshift.enable = false;
}

View File

@@ -1,10 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
imports = [ <niveum/modules/retiolum.nix> ]; imports = [ <niveum/modules/retiolum.nix> ];
networking.hosts = { networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
"42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ];
};
environment.etc."tinc/retiolum/rsa_key.priv" = { environment.etc."tinc/retiolum/rsa_key.priv" = {
text = builtins.readFile <secrets/retiolum.key>; text = builtins.readFile <secrets/retiolum.key>;

View File

@@ -18,19 +18,28 @@ with config.niveum; {
background = window.background; background = window.background;
backgroundAlt = window.background; backgroundAlt = window.background;
foreground = colours.background; foreground = colours.background;
highlight = { foreground = colours.cyan.dark; inherit (window) background; }; highlight = {
foreground = colours.cyan.dark;
inherit (window) background;
};
}; };
active = { active = {
background = window.background; background = window.background;
backgroundAlt = window.background; backgroundAlt = window.background;
foreground = colours.yellow.dark; foreground = colours.yellow.dark;
highlight = { foreground = colours.green.dark; inherit (window) background; }; highlight = {
foreground = colours.green.dark;
inherit (window) background;
};
}; };
urgent = { urgent = {
background = window.background; background = window.background;
backgroundAlt = window.background; backgroundAlt = window.background;
foreground = colours.red.dark; foreground = colours.red.dark;
highlight = { foreground = colours.magenta.dark; inherit (window) background; }; highlight = {
foreground = colours.magenta.dark;
inherit (window) background;
};
}; };
}; };
}; };

View File

@@ -2,29 +2,25 @@
let let
inherit (import <niveum/lib> { inherit pkgs; }) toTOML; inherit (import <niveum/lib> { inherit pkgs; }) toTOML;
inherit (lib.strings) fileContents; inherit (lib.strings) fileContents;
in in {
{ environment.systemPackages = with pkgs; [ spotify spotify-tui playerctl ];
environment.systemPackages = with pkgs; [
spotify
spotify-tui
playerctl
];
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix # https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/audio/spotifyd.nix
systemd.user.services.spotifyd = systemd.user.services.spotifyd = let
let
spotifyd = pkgs.unstable.spotifyd.override { spotifyd = pkgs.unstable.spotifyd.override {
withMpris = true; withMpris = true;
withPulseAudio = true; withPulseAudio = true;
inherit (pkgs) libpulseaudio dbus; inherit (pkgs) libpulseaudio dbus;
}; };
spotifydConf = pkgs.writeText "spotifyd.conf" (lib.generators.toINI {} { spotifydConf = pkgs.writeText "spotifyd.conf" (lib.generators.toINI { } {
global = { global = {
username = fileContents <shared-secrets/spotify/username>; username = fileContents <shared-secrets/spotify/username>;
password = fileContents <shared-secrets/spotify/password>; password = fileContents <shared-secrets/spotify/password>;
backend = "pulseaudio"; backend = "pulseaudio";
on_song_change_hook = toString (pkgs.writers.writeDash "songinfo" '' 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) metadata=$(playerctl metadata --player spotifyd)
title=$(echo "$metadata" | awk '/^xesam:title\s/ { print substr($0, index($0, $3)) }') 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 "/") 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" ]; after = [ "network-online.target" "sound.target" ];
description = "spotifyd, a Spotify playing daemon"; description = "spotifyd, a Spotify playing daemon";
serviceConfig = { serviceConfig = {
ExecStart = "${spotifyd}/bin/spotifyd --no-daemon --config-path ${spotifydConf}"; ExecStart =
"${spotifyd}/bin/spotifyd --no-daemon --config-path ${spotifydConf}";
Restart = "always"; Restart = "always";
RestartSec = 12; RestartSec = 12;
}; };

View File

@@ -2,12 +2,16 @@
let let
sshPort = 22022; sshPort = 22022;
sshKey = { 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"; homeros =
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"; "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";
wilde = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde"; 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 { in {
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add"; services.xserver.displayManager.sessionCommands =
"${pkgs.openssh}/bin/ssh-add";
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
@@ -19,17 +23,11 @@ in {
users.motd = "Welcome to ${config.networking.hostName}!"; users.motd = "Welcome to ${config.networking.hostName}!";
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys =
sshKey.homeros [ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
sshKey.scardanelli
sshKey.wilde
];
users.users.me.openssh.authorizedKeys.keys = [ users.users.me.openssh.authorizedKeys.keys =
sshKey.homeros [ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
sshKey.scardanelli
sshKey.wilde
];
home-manager.users.me.programs.ssh = { home-manager.users.me.programs.ssh = {
enable = true; enable = true;

View File

@@ -15,39 +15,50 @@ in {
environment.systemPackages = [ pkgs.sxiv ]; environment.systemPackages = [ pkgs.sxiv ];
# TODO fix # TODO fix
home-manager.users.me.xdg.configFile."sxiv/exec/key-handler".source = pkgs.writers.writeDash "key-handler" '' home-manager.users.me.xdg.configFile."sxiv/exec/key-handler".source =
PATH=$PATH:${lib.makeBinPath [ pkgs.gnused pkgs.gawk pkgs.dmenu pkgs.coreutils pkgs.libnotify pkgs.imagemagick pkgs.xclip ]} 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 echo >&2 key "$1" pressed
while read file; do while read file; do
case "$1" in case "$1" in
"c") "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" ] && 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 [ -z "$destdir" ] && exit
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && 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." & cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
;; ;;
"m") "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" ] && 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 [ -z "$destdir" ] && exit
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && 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." & mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
;; ;;
"r") "r")
convert -rotate 90 "$file" "$file" ;; convert -rotate 90 "$file" "$file" ;;
"R") "R")
convert -rotate -90 "$file" "$file" ;; convert -rotate -90 "$file" "$file" ;;
"f") "f")
convert -flop "$file" "$file" ;; convert -flop "$file" "$file" ;;
"y") "y")
echo -n "$file" | xclip -selection clipboard && echo -n "$file" | xclip -selection clipboard &&
notify-send "$file copied to clipboard" & ;; notify-send "$file copied to clipboard" & ;;
"Y") "Y")
readlink -f "$file" | xclip -selection clipboard && readlink -f "$file" | xclip -selection clipboard &&
notify-send "$(readlink -f "$file") copied to clipboard" & ;; notify-send "$(readlink -f "$file") copied to clipboard" & ;;
"d") "d")
[ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;;
esac esac
done done
''; '';
} }

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = rec { niveum.colours = rec {
black = { bright = "#151515"; dark = "#000000"; }; black = {
red = { bright = "#de575c"; dark = "#de575c"; }; bright = "#151515";
yellow = { bright = "#ebe971"; dark = "#ebe971"; }; dark = "#000000";
green = { bright = "#00b853"; dark = "#00b853"; }; };
blue = { bright = "#90d0f0"; dark = "#7fc6f0"; }; red = {
magenta = { bright = "#cf9ffa"; dark = "#cf9ffa"; }; bright = "#de575c";
cyan = { bright = "#4ae5e8"; dark = "#4ae5e8"; }; dark = "#de575c";
white = { bright = "#ffffff"; dark = "#bbbbbb"; }; };
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; background = black.dark;
foreground = white.dark; foreground = white.dark;
cursor = green.bright; cursor = green.bright;

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = { niveum.colours = {
black = { bright = "#444444"; dark = "#1c1c1c"; }; black = {
red = { bright = "#ff8700"; dark = "#af5f5f"; }; bright = "#444444";
green = { bright = "#87af87"; dark = "#5f875f"; }; dark = "#1c1c1c";
yellow = { bright = "#ffffaf"; dark = "#87875f"; }; };
blue = { bright = "#8fafd7"; dark = "#5f87af"; }; red = {
magenta = { bright = "#8787af"; dark = "#5f5f87"; }; bright = "#ff8700";
cyan = { bright = "#5fafaf"; dark = "#5f8787"; }; dark = "#af5f5f";
white = { bright = "#999999"; dark = "#6c6c6c"; }; };
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"; background = "#262626";
foreground = "#bcbcbc"; foreground = "#bcbcbc";
cursor = "#bcbcbc"; cursor = "#bcbcbc";

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = rec { niveum.colours = rec {
black = { bright = "#454545"; dark = "#222222"; }; black = {
red = { bright = "#FA8072"; dark = "#B22222"; }; bright = "#454545";
green = { bright = "#779A3E"; dark = "#556B2F"; }; dark = "#222222";
yellow = { bright = "#DAA520"; dark = "#B8860B"; }; };
blue = { bright = "#6495ED"; dark = "#4682B4"; }; red = {
magenta = { bright = "#DA70D6"; dark = "#9932CC"; }; bright = "#FA8072";
cyan = { bright = "#B0E0E6"; dark = "#87CEEB"; }; dark = "#B22222";
white = { bright = "#FFFFFF"; dark = "#C0C0C0"; }; };
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"; background = "#000000";
foreground = "#AAAAAA"; foreground = "#AAAAAA";
cursor = green.bright; cursor = green.bright;

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = rec { niveum.colours = rec {
black = { bright = "#818383"; dark = "#000000"; }; black = {
red = { bright = "#fc391f"; dark = "#c23621"; }; bright = "#818383";
yellow = { bright = "#eaec23"; dark = "#adad27"; }; dark = "#000000";
green = { bright = "#31e722"; dark = "#25bc24"; }; };
blue = { bright = "#5833ff"; dark = "#492ee1"; }; red = {
magenta = { bright = "#f935f8"; dark = "#d338d3"; }; bright = "#fc391f";
cyan = { bright = "#14f0f0"; dark = "#33bbc8"; }; dark = "#c23621";
white = { bright = "#e9ebeb"; dark = "#cbcccd"; }; };
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; background = black.dark;
foreground = white.dark; foreground = white.dark;
cursor = green.bright; cursor = green.bright;

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = rec { niveum.colours = rec {
black = { bright = "#4b4b4b"; dark = "#242424"; }; black = {
red = { bright = "#fc1c18"; dark = "#d71c15"; }; bright = "#4b4b4b";
green = { bright = "#6bc219"; dark = "#5aa513"; }; dark = "#242424";
yellow = { bright = "#fec80e"; dark = "#fdb40c"; }; };
blue = { bright = "#0955ff"; dark = "#063b8c"; }; red = {
magenta = { bright = "#fb0050"; dark = "#e40038"; }; bright = "#fc1c18";
cyan = { bright = "#3ea8fc"; dark = "#2595e1"; }; dark = "#d71c15";
white = { bright = "#8c00ec"; dark = "#efefef"; }; };
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"; background = "#181818";
foreground = white.dark; foreground = white.dark;
cursor = "#bbbbbb"; cursor = "#bbbbbb";

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = rec { niveum.colours = rec {
black = { bright = "#282c34"; dark = "#282c34"; }; black = {
red = { bright = "#e06c75"; dark = "#e06c75"; }; bright = "#282c34";
green = { bright = "#98c379"; dark = "#98c379"; }; dark = "#282c34";
yellow = { bright = "#e5c07b"; dark = "#e5c07b"; }; };
blue = { bright = "#61afef"; dark = "#61afef"; }; red = {
magenta = { bright = "#c678dd"; dark = "#c678dd"; }; bright = "#e06c75";
cyan = { bright = "#56b6c2"; dark = "#56b6c2"; }; dark = "#e06c75";
white = { bright = "#dcdfe4"; dark = "#dcdfe4"; }; };
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; background = black.dark;
foreground = white.bright; foreground = white.bright;
cursor = "#a3b3cc"; cursor = "#a3b3cc";

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = rec { niveum.colours = rec {
black = { dark = "#073642"; bright = "#002b36"; }; black = {
red = { dark = "#dc322f"; bright = "#cb4b16"; }; dark = "#073642";
yellow = { dark = "#b58900"; bright = "#657b83"; }; bright = "#002b36";
green = { dark = "#859900"; bright = "#586e75"; }; };
blue = { dark = "#268bd2"; bright = "#839496"; }; red = {
magenta = { dark = "#d33682"; bright = "#6c71c4"; }; dark = "#dc322f";
cyan = { dark = "#2aa198"; bright = "#93a1a1"; }; bright = "#cb4b16";
white = { dark = "#eee8d5"; bright = "#fdf6e3"; }; };
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; background = black.bright;
foreground = blue.bright; foreground = blue.bright;
cursor = cyan.bright; cursor = cyan.bright;

View File

@@ -1,13 +1,37 @@
{ {
niveum.colours = rec { niveum.colours = rec {
black = { dark = "#073642"; bright = "#002b36"; }; black = {
red = { dark = "#dc322f"; bright = "#cb4b16"; }; dark = "#073642";
yellow = { dark = "#b58900"; bright = "#657b83"; }; bright = "#002b36";
green = { dark = "#859900"; bright = "#586e75"; }; };
blue = { dark = "#268bd2"; bright = "#839496"; }; red = {
magenta = { dark = "#d33682"; bright = "#6c71c4"; }; dark = "#dc322f";
cyan = { dark = "#2aa198"; bright = "#93a1a1"; }; bright = "#cb4b16";
white = { dark = "#eee8d5"; bright = "#fdf6e3"; }; };
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; background = white.bright;
foreground = yellow.bright; foreground = yellow.bright;
cursor = green.bright; cursor = green.bright;

View File

@@ -3,19 +3,12 @@ let inherit (config.niveum) theme colourPalette;
in { in {
console.colors = map (c: lib.strings.removePrefix "#" c) colourPalette; console.colors = map (c: lib.strings.removePrefix "#" c) colourPalette;
environment.systemPackages = [ environment.systemPackages =
theme.gtk.package [ theme.gtk.package theme.icon.package theme.cursor.package ];
theme.icon.package
theme.cursor.package
];
services.xserver.displayManager.lightdm.greeters.gtk = { services.xserver.displayManager.lightdm.greeters.gtk = {
theme = { theme = { inherit (theme.gtk) name package; };
inherit (theme.gtk) name package; iconTheme = { inherit (theme.icon) name package; };
};
iconTheme = {
inherit (theme.icon) name package;
};
}; };
home-manager.users.me = { home-manager.users.me = {

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
environment.systemPackages = [ environment.systemPackages = [
pkgs.tmuxp pkgs.tmuxp
pkgs.reptyr # move programs over to a tmux session pkgs.reptyr # move programs over to a tmux session

View File

@@ -1,5 +1,4 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }: {
{
imports = [ <niveum/modules/traadfri.nix> ]; imports = [ <niveum/modules/traadfri.nix> ];
niveum.traadfri = { niveum.traadfri = {

View File

@@ -1,7 +1,5 @@
{ lib, config, ... }: { lib, config, ... }:
let let inherit (lib.sources) commitIdFromGitRepo;
inherit (lib.sources) commitIdFromGitRepo; in {
in
{
environment.etc."niveum/version".text = commitIdFromGitRepo <niveum/.git>; environment.etc."niveum/version".text = commitIdFromGitRepo <niveum/.git>;
} }

View File

@@ -1,6 +1 @@
{ pkgs, ... }: { pkgs, ... }: { environment.systemPackages = [ pkgs.vscode ]; }
{
environment.systemPackages = [
pkgs.vscode
];
}

View File

@@ -1,22 +1,21 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let
/* /* elementary-wallpapers = pkgs.fetchFromGitHub {
elementary-wallpapers = pkgs.fetchFromGitHub { owner = "elementary";
owner = "elementary"; repo = "wallpapers";
repo = "wallpapers"; rev = "6c81141e33ef69702a3f48e7181cb979a680190d"; # tag: 5.4
rev = "6c81141e33ef69702a3f48e7181cb979a680190d"; # tag: 5.4 sha256 = "1ihvv9v8m5f2n2v3bgg769l52wbg241zgp3d45q6phk7p8s1gz3s";
sha256 = "1ihvv9v8m5f2n2v3bgg769l52wbg241zgp3d45q6phk7p8s1gz3s"; };
}; elementary-wallpapers-jpg = pkgs.runCommand "wallpapers" {} ''
elementary-wallpapers-jpg = pkgs.runCommand "wallpapers" {} '' mkdir $out
mkdir $out cp ${elementary-wallpapers}/*.jpg $out/
cp ${elementary-wallpapers}/*.jpg $out/ '';
''; luke-smith-wallpapers = pkgs.fetchFromGitHub {
luke-smith-wallpapers = pkgs.fetchFromGitHub { owner = "LukeSmithxyz";
owner = "LukeSmithxyz"; repo = "wallpapers";
repo = "wallpapers"; rev = "33cad3099919366cea2627f930da9b47609e8554";
rev = "33cad3099919366cea2627f930da9b47609e8554"; sha256 = "1li6rrn016fpgvmnijqhvkp07kj83cjwcjx2l2b3asb99d51814i";
sha256 = "1li6rrn016fpgvmnijqhvkp07kj83cjwcjx2l2b3asb99d51814i"; };
};
*/ */
kmein-wallpapers = pkgs.fetchFromGitHub { kmein-wallpapers = pkgs.fetchFromGitHub {
owner = "kmein"; owner = "kmein";
@@ -24,8 +23,7 @@ let
rev = "7c553bc6bd78afa6dbf2824691466bbad0d8e6e9"; rev = "7c553bc6bd78afa6dbf2824691466bbad0d8e6e9";
sha256 = "1zik5z1cq1084j1hdwm204afz89f5hpg21z0vvcbppzkmldfxnnq"; sha256 = "1zik5z1cq1084j1hdwm204afz89f5hpg21z0vvcbppzkmldfxnnq";
}; };
in in {
{
home-manager.users.me = { home-manager.users.me = {
services.random-background = { services.random-background = {
enable = true; enable = true;

View File

@@ -25,14 +25,15 @@ let
-invalid "Computer says no." \ -invalid "Computer says no." \
-mode "$MODE" -mode "$MODE"
''; '';
in in {
{
services.xserver.xautolock = rec { services.xserver.xautolock = rec {
enable = true; 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"; locker = "${my-xlock}/bin/xlock";
nowlocker = locker; nowlocker = locker;
enableNotifier = true; 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."'';
}; };
} }

View File

@@ -1,9 +1,9 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{ home-manager.users.me.home.file.".zshrc".text = ''
home-manager.users.me.home.file.".zshrc".text = "# nothing to see here\n"; # nothing to see here
'';
programs.zsh = programs.zsh = let
let
zsh-completions = pkgs.fetchFromGitHub { zsh-completions = pkgs.fetchFromGitHub {
owner = "zsh-users"; owner = "zsh-users";
repo = "zsh-completions"; repo = "zsh-completions";

View File

@@ -1,42 +1,44 @@
let let
gitFromJson = path: gitFromJson = path:
let object = importJson path; in { let object = importJson path;
inherit (object) url; in {
ref = object.rev; inherit (object) url;
}; ref = object.rev;
};
krops = builtins.fetchGit (gitFromJson .versions/krops.json); krops = builtins.fetchGit (gitFromJson .versions/krops.json);
lib = import "${krops}/lib"; lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" {}; pkgs = import "${krops}/pkgs" { };
importJson = (import <nixpkgs> {}).lib.importJSON; importJson = (import <nixpkgs> { }).lib.importJSON;
regularSystem = path: name: { regularSystem = path: name: {
source = lib.evalSource [ source = lib.evalSource [{
{ niveum.file = toString ./.;
niveum.file = toString ./.; system.file = toString path;
system.file = toString path; nixos-config.symlink = "system/configuration.nix";
nixos-config.symlink = "system/configuration.nix";
nixpkgs.git = gitFromJson .versions/nixpkgs.json; nixpkgs.git = gitFromJson .versions/nixpkgs.json;
nixos-unstable.git = gitFromJson .versions/nixpkgs-unstable.json; nixos-unstable.git = gitFromJson .versions/nixpkgs-unstable.json;
home-manager.git = gitFromJson .versions/home-manager.json; home-manager.git = gitFromJson .versions/home-manager.json;
stockholm.git = gitFromJson .versions/stockholm.json; stockholm.git = gitFromJson .versions/stockholm.json;
secrets.pass = { secrets.pass = {
dir = toString ~/.password-store/systems; dir = toString ~/.password-store/systems;
inherit name; inherit name;
}; };
shared-secrets.pass = { shared-secrets.pass = {
dir = toString ~/.password-store; dir = toString ~/.password-store;
name = "shared"; name = "shared";
}; };
} }];
];
target = "root@${name}:22022"; target = "root@${name}:22022";
}; };
inherit (pkgs.krops) writeDeploy; inherit (pkgs.krops) writeDeploy;
in { in {
scardanelli = writeDeploy "deploy-scardanelli" (regularSystem systems/scardanelli "scardanelli"); scardanelli = writeDeploy "deploy-scardanelli"
homeros = writeDeploy "deploy-homeros" (regularSystem systems/homeros "homeros"); (regularSystem systems/scardanelli "scardanelli");
homeros =
writeDeploy "deploy-homeros" (regularSystem systems/homeros "homeros");
wilde = writeDeploy "deploy-wilde" (regularSystem systems/wilde "wilde"); wilde = writeDeploy "deploy-wilde" (regularSystem systems/wilde "wilde");
catullus = writeDeploy "deploy-catullus" (regularSystem systems/catullus "catullus"); catullus =
writeDeploy "deploy-catullus" (regularSystem systems/catullus "catullus");
} }

View File

@@ -1,10 +1,10 @@
{ pkgs, wifi-interface, colours, batteryBlock }: { pkgs, wifi-interface, colours, batteryBlock }:
let let
setsid = script: pkgs.writers.writeDash "setsid-command" '' setsid = script:
${pkgs.utillinux}/bin/setsid ${script} pkgs.writers.writeDash "setsid-command" ''
''; ${pkgs.utillinux}/bin/setsid ${script}
in '';
{ in {
theme = { theme = {
name = "plain"; name = "plain";
overrides = { overrides = {
@@ -22,7 +22,7 @@ in
info_bg = colours.background; info_bg = colours.background;
separator = ""; separator = "";
separator_bg = "auto"; separator_bg = "auto";
separator_fg = "auto" ; separator_fg = "auto";
}; };
}; };
icons = { icons = {
@@ -78,11 +78,11 @@ in
| tail -n 1 \ | tail -n 1 \
| ${pkgs.gawk}/bin/awk '{ print " " $2 "/" $4 }' | ${pkgs.gawk}/bin/awk '{ print " " $2 "/" $4 }'
''; '';
on_click = on_click = let sleepSeconds = 2.5;
let
sleepSeconds = 2.5;
in pkgs.writers.writeDash "show-tasks" '' 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"; format_mem = "{Mug}G";
clickable = false; clickable = false;
} }
{ { block = "load"; }
block = "load";
}
{ {
block = "time"; block = "time";
interval = 5; interval = 5;

View File

@@ -8,20 +8,18 @@
Server = "irc.freenode.net:6667"; Server = "irc.freenode.net:6667";
Nick = "tg_bridge"; Nick = "tg_bridge";
}; };
gateway = [ gateway = [{
{ name = "krebs-bridge";
name = "krebs-bridge"; enable = true;
enable = true; inout = [
inout = [ {
{ account = "irc.freenode";
account = "irc.freenode"; channel = "#krebs";
channel = "#krebs"; }
} {
{ account = "telegram.kmein";
account = "telegram.kmein"; channel = "-330372458";
channel = "-330372458"; }
} ];
]; }];
}
];
} }

View File

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

View File

@@ -34,9 +34,7 @@ let
}; };
in { in {
options.niveum = { options.niveum = {
applications = { applications = { fileManager = mkOption { type = types.str; }; };
fileManager = mkOption { type = types.str; };
};
colours = mkOption { type = my-types.colourTheme; }; colours = mkOption { type = my-types.colourTheme; };
@@ -66,16 +64,29 @@ in {
batteryBlocks.default = mkOption { type = types.str; }; batteryBlocks.default = mkOption { type = types.str; };
promptColours = promptColours = let
let colours16 = types.enum [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ]; colours16 = types.enum [
"black"
"red"
"green"
"yellow"
"blue"
"magenta"
"cyan"
"white"
];
in { in {
success = mkOption { type = colours16; default = "green"; }; success = mkOption {
failure = mkOption { type = colours16; default = "red"; }; type = colours16;
default = "green";
};
failure = mkOption {
type = colours16;
default = "red";
};
}; };
fonts = { fonts = { size = mkOption { type = types.int; }; };
size = mkOption { type = types.int; };
};
user = { user = {
github = mkOption { type = types.str; }; github = mkOption { type = types.str; };
@@ -85,7 +96,29 @@ in {
ignore = mkOption { ignore = mkOption {
type = types.listOf types.str; 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 = { theme = {

View File

@@ -2,9 +2,7 @@
with lib; with lib;
let cfg = config.niveum.dropbox; let cfg = config.niveum.dropbox;
in { in {
options.niveum.dropbox = { options.niveum.dropbox = { enable = mkEnableOption "Dropbox"; };
enable = mkEnableOption "Dropbox";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.user.services.dropbox = { systemd.user.services.dropbox = {

View File

@@ -1,17 +1,14 @@
{ pkgs, config, lib, ... }: { pkgs, config, lib, ... }:
with lib; with lib;
let cfg = config.niveum.google-drive; let cfg = config.niveum.google-drive;
in in {
{
options.niveum.google-drive = { options.niveum.google-drive = {
enable = mkEnableOption "Google Drive"; enable = mkEnableOption "Google Drive";
directory = mkOption { type = types.path; }; directory = mkOption { type = types.path; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [ environment.systemPackages = [ pkgs.grive2 ];
pkgs.grive2
];
systemd.user.services.google-drive = { systemd.user.services.google-drive = {
description = "Google Drive synchronisation service"; description = "Google Drive synchronisation service";

View File

@@ -20,26 +20,45 @@ let
in { in {
options.niveum.hledger = { options.niveum.hledger = {
enable = mkEnableOption "hledger"; enable = mkEnableOption "hledger";
package = mkOption { type = types.package; default = pkgs.hledger; }; package = mkOption {
ledgerFile = mkOption { type = types.str; default = null; }; type = types.package;
default = pkgs.hledger;
};
ledgerFile = mkOption {
type = types.str;
default = null;
};
server = { server = {
enable = mkEnableOption "hledger server"; enable = mkEnableOption "hledger server";
port = mkOption { type = pkgs.unstable.lib.types.port; default = 5000; }; port = mkOption {
host = mkOption { type = types.str; default = "127.0.0.1"; }; type = pkgs.unstable.lib.types.port;
default = 5000;
};
host = mkOption {
type = types.str;
default = "127.0.0.1";
};
capabilities = mkOption { capabilities = mkOption {
type = types.listOf (types.enum ["view" "add" "manage"]); type = types.listOf (types.enum [ "view" "add" "manage" ]);
default = [ "view" "add" ]; default = [ "view" "add" ];
}; };
flags = mkOption { type = types.listOf types.str; default = []; }; flags = mkOption {
type = types.listOf types.str;
default = [ ];
};
user = mkOption { type = types.attrs; }; 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 { config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package hledger-git hledger-edit ]; 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 { systemd.services.hledger-web = mkIf cfg.server.enable {
description = "hledger server"; description = "hledger server";

View File

@@ -1,16 +1,8 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
with lib; with lib;
let let cfg = config.niveum.minecraft;
cfg = config.niveum.minecraft; in {
in options.niveum.minecraft = { enable = mkEnableOption "Minecraft"; };
{
options.niveum.minecraft = {
enable = mkEnableOption "Minecraft";
};
config = mkIf cfg.enable { config = mkIf cfg.enable { environment.systemPackages = [ pkgs.minecraft ]; };
environment.systemPackages = [
pkgs.minecraft
];
};
} }

View File

@@ -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 = { networking.firewall = {
allowedTCPPorts = [ 655 ]; allowedTCPPorts = [ 655 ];

View File

@@ -2,9 +2,7 @@
with lib; with lib;
let cfg = config.niveum.seafile; let cfg = config.niveum.seafile;
in { in {
options.niveum.seafile = { options.niveum.seafile = { enable = mkEnableOption "Seafile"; };
enable = mkEnableOption "Seafile";
};
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.user.services.seafile = { systemd.user.services.seafile = {

View File

@@ -3,19 +3,22 @@ with lib;
let let
cfg = config.niveum.telegramBots; cfg = config.niveum.telegramBots;
botService = name: bot: nameValuePair "telegram-bot-${name}" { botService = name: bot:
enable = bot.enable; nameValuePair "telegram-bot-${name}" {
startAt = bot.time; enable = bot.enable;
serviceConfig.Type = "oneshot"; startAt = bot.time;
wants = [ "network-online.target" ]; serviceConfig.Type = "oneshot";
script = strings.concatStringsSep "\n" (["QUOTE=$(${bot.command})"] ++ map (chatId: '' wants = [ "network-online.target" ];
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \ script = strings.concatStringsSep "\n" ([ "QUOTE=$(${bot.command})" ]
-d chat_id="${chatId}" \ ++ map (chatId: ''
-d text="$QUOTE" ${ ${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
lib.strings.optionalString (bot.parseMode != null) "-d parse_mode=${bot.parseMode}" -d chat_id="${chatId}" \
} -d text="$QUOTE" ${
'') bot.chatIds); lib.strings.optionalString (bot.parseMode != null)
}; "-d parse_mode=${bot.parseMode}"
}
'') bot.chatIds);
};
in { in {
options.niveum.telegramBots = mkOption { options.niveum.telegramBots = mkOption {
type = types.attrsOf (types.submodule { type = types.attrsOf (types.submodule {
@@ -23,18 +26,18 @@ in {
enable = mkEnableOption "Telegram bot"; enable = mkEnableOption "Telegram bot";
time = mkOption { type = types.str; }; time = mkOption { type = types.str; };
token = mkOption { type = types.strMatching "[0-9A-Za-z:-]+"; }; 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; }; command = mkOption { type = types.str; };
parseMode = mkOption { parseMode = mkOption {
type = types.nullOr (types.enum ["HTML" "Markdown"]); type = types.nullOr (types.enum [ "HTML" "Markdown" ]);
default = null; default = null;
}; };
}; };
}); });
default = {}; default = { };
}; };
config = { config = { systemd.services = attrsets.mapAttrs' botService cfg; };
systemd.services = attrsets.mapAttrs' botService cfg;
};
} }

View File

@@ -2,37 +2,38 @@
with lib; with lib;
let let
cfg = config.niveum.traadfri; cfg = config.niveum.traadfri;
traadfri = traadfri = let
let traadfri-package = pkgs.fetchFromGitHub { traadfri-package = pkgs.fetchFromGitHub {
owner = "kmein"; owner = "kmein";
repo = "traadfri"; repo = "traadfri";
rev = "7b30d404ecd2d9ff06c60ed33967448e8c2f42f5"; rev = "7b30d404ecd2d9ff06c60ed33967448e8c2f42f5";
sha256 = "1ff37k86vi7bnng3vna8myfkyqbkg25w6ds7gl94m4hax8wikz26"; sha256 = "1ff37k86vi7bnng3vna8myfkyqbkg25w6ds7gl94m4hax8wikz26";
}; };
in pkgs.python3Packages.callPackage traadfri-package { in pkgs.python3Packages.callPackage traadfri-package {
libcoap = pkgs.callPackage <niveum/packages/libcoap.nix> { tls = true; }; libcoap = pkgs.callPackage <niveum/packages/libcoap.nix> { tls = true; };
}; };
in in {
{
options.niveum.traadfri = { options.niveum.traadfri = {
enable = mkEnableOption "Trådfri CLI"; enable = mkEnableOption "Trådfri CLI";
user = mkOption { type = types.str; }; user = mkOption { type = types.str; };
host = mkOption { type = types.str; }; host = mkOption { type = types.str; };
key = mkOption { type = types.str; }; key = mkOption { type = types.str; };
rooms = mkOption { type = types.attrsOf types.int; default = {}; }; rooms = mkOption {
bulbs = mkOption { type = types.attrsOf types.int; default = {}; }; type = types.attrsOf types.int;
default = { };
};
bulbs = mkOption {
type = types.attrsOf types.int;
default = { };
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.shellAliases = environment.shellAliases = lib.attrsets.mapAttrs' (name: value:
lib.attrsets.mapAttrs' lib.nameValuePair "traadfri-${name}" "traadfri bulb ${toString value}")
(name: value: cfg.bulbs // lib.attrsets.mapAttrs' (name: value:
lib.nameValuePair "traadfri-${name}" "traadfri bulb ${toString value}") lib.nameValuePair "traadfri-${name}" "traadfri group ${toString value}")
cfg.bulbs cfg.rooms;
// lib.attrsets.mapAttrs'
(name: value:
lib.nameValuePair "traadfri-${name}" "traadfri group ${toString value}")
cfg.rooms;
environment.systemPackages = [ environment.systemPackages = [
(pkgs.writers.writeDashBin "traadfri" '' (pkgs.writers.writeDashBin "traadfri" ''

View File

@@ -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")

View File

@@ -1,14 +1,15 @@
{ fetchzip, symlinkJoin, lib, scardanelli ? false }: { fetchzip, symlinkJoin, lib, scardanelli ? false }:
let let
gfs-font = name: sha256: fetchzip { gfs-font = name: sha256:
inherit name sha256; fetchzip {
url = "http://www.greekfontsociety-gfs.gr/_assets/fonts/${name}.zip"; inherit name sha256;
postFetch = '' url = "http://www.greekfontsociety-gfs.gr/_assets/fonts/${name}.zip";
mkdir -p $out/share/fonts postFetch = ''
unzip -j -o $downloadedFile "*.otf" -d $out/share/fonts/opentype 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
''; unzip -j -o $downloadedFile "**/*.otf" -d $out/share/fonts/opentype
}; '';
};
in symlinkJoin { in symlinkJoin {
name = "gfs-fonts"; name = "gfs-fonts";
paths = lib.mapAttrsToList gfs-font { paths = lib.mapAttrsToList gfs-font {
@@ -16,31 +17,32 @@ in symlinkJoin {
GFS_Baskerville = "07gx5b9b43zv74d2lay37sajd4ba2wqn3b7xzvyhn265ds9x7cxk"; GFS_Baskerville = "07gx5b9b43zv74d2lay37sajd4ba2wqn3b7xzvyhn265ds9x7cxk";
GFS_Bodoni = "0jhl0728ikzha1krm01sk52nz3jzibidwmyvgidg61d87l8nbf2p"; GFS_Bodoni = "0jhl0728ikzha1krm01sk52nz3jzibidwmyvgidg61d87l8nbf2p";
GFS_Bodoni_Classic = "06jw2irskn75s50mgwkx08rzwqi82gpc6lgjsimsi8p81566gfrh"; GFS_Bodoni_Classic = "06jw2irskn75s50mgwkx08rzwqi82gpc6lgjsimsi8p81566gfrh";
GFS_Complutum = "1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf GFS_Complutum =
"1q7dxs2z3yrgchd2pz9h72mjrk62kdc2mmqw8kg9q76k28f8n3p0"; # -> GFSPolyglot.otf
GFS_Decker = "016v1j5n9ph4i2cpmlk26pcxhp3q2fjwlaryppd5akl84dfkpncl"; GFS_Decker = "016v1j5n9ph4i2cpmlk26pcxhp3q2fjwlaryppd5akl84dfkpncl";
GFS_Didot = "0ysvrp527wm0wxfp6wmlgmxfx7ysr5mwpmjmqp1h605cy44jblfm"; GFS_Didot = "0ysvrp527wm0wxfp6wmlgmxfx7ysr5mwpmjmqp1h605cy44jblfm";
GFS_Didot_Classic = "0n5awqksvday3l3d85yhwmbmfj9bcpxivy4wpd4zrkgl7b85af2c"; GFS_Didot_Classic = "0n5awqksvday3l3d85yhwmbmfj9bcpxivy4wpd4zrkgl7b85af2c";
GFS_Didot_Display = GFS_Didot_Display = if scardanelli then
if scardanelli "0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7"
then "0n2di2zyc76w6f8mc6hfilc2ir6igks7ldjp9fkw1gjp06330fi7" else
else "0gg5xb8jic646gz9p05ry62nk7w0k546fxp5p4vvnawmckql2dj1"; "0gg5xb8jic646gz9p05ry62nk7w0k546fxp5p4vvnawmckql2dj1";
GFS_Elpis = "02l7wd3nbn1kpv7ghxh19k4dbvd49ijyxd6gq83gcr9vlmxcq2s2"; GFS_Elpis = "02l7wd3nbn1kpv7ghxh19k4dbvd49ijyxd6gq83gcr9vlmxcq2s2";
GFS_Gazis = "0x9iwj6pinaykrds0iw6552hf256d0dr41sipdb1jnnlr2d3bf9w"; GFS_Gazis = "0x9iwj6pinaykrds0iw6552hf256d0dr41sipdb1jnnlr2d3bf9w";
GFS_Goschen = "1jvbn33wzq2yj0aygwy9pd2msg3wkmdp0npjzazadrmfjpnpkcy9"; GFS_Goschen = "1jvbn33wzq2yj0aygwy9pd2msg3wkmdp0npjzazadrmfjpnpkcy9";
GFS_NeoHellenic = "1ixm2frdc6i5lbn9h0h4gdsvsw2k4hny75q8ig4kgs28ac3dbzq3"; GFS_NeoHellenic = "1ixm2frdc6i5lbn9h0h4gdsvsw2k4hny75q8ig4kgs28ac3dbzq3";
GFS_Olga = "0f05ng02na84x9x6yhskxqwxwyabjisyl8a0k3fiah60i620p39d"; GFS_Olga = "0f05ng02na84x9x6yhskxqwxwyabjisyl8a0k3fiah60i620p39d";
GFS_Orpheus = GFS_Orpheus = if scardanelli then
if scardanelli "18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz"
then "18n6fag4pyr8jdwnsz0vixf47jz4ym8mjmppc1w3k7v27cg1z9dz" else
else "1rvjpvk1fx55vyp3dyxcbww1a24rm7xv5faqs735yf6lqzpkqnax"; "1rvjpvk1fx55vyp3dyxcbww1a24rm7xv5faqs735yf6lqzpkqnax";
GFS_Orpheus_Classic = GFS_Orpheus_Classic = if scardanelli then
if scardanelli "1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps"
then "1rqy1kf7slw56zfhbv264yzarjisnqbqydj4f7hghiknhnmdakps" else
else "0d2yzwg6albmgl1d0xhsfrmxj79r42wp712rpry567nv1ry42k0a"; "0d2yzwg6albmgl1d0xhsfrmxj79r42wp712rpry567nv1ry42k0a";
GFS_Orpheus_Sans = GFS_Orpheus_Sans = if scardanelli then
if scardanelli "02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg"
then "02rh7z8c3h3xyfi52rn47z4finizx636d05bg5g23v0l0mqs6nkg" else
else "1rdlm2kmkvi4y3ii68ik8k3w3183vvb3q2pnk04lbb0ggg9w5jdb"; "1rdlm2kmkvi4y3ii68ik8k3w3183vvb3q2pnk04lbb0ggg9w5jdb";
GFS_Philostratos = "0zh3d0cn6b2fjbwnvmg379z20zh7w626w2bnj19xcazjvqkwhzx1"; GFS_Philostratos = "0zh3d0cn6b2fjbwnvmg379z20zh7w626w2bnj19xcazjvqkwhzx1";
GFS_Porson = "0r3snwgxkdx7h34sg3s0hr8fac3rnpllq62bk44m266hj6a80a5k"; GFS_Porson = "0r3snwgxkdx7h34sg3s0hr8fac3rnpllq62bk44m266hj6a80a5k";
GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j"; GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j";

View File

@@ -1,6 +1,7 @@
# { stdenv, python }: # { stdenv, python }:
{ pkgs ? import <nixpkgs> {} }: { pkgs ? import <nixpkgs> { } }:
with pkgs; with pkgs.python2Packages; with pkgs;
with pkgs.python2Packages;
buildPythonApplication rec { buildPythonApplication rec {
pname = "gourmet"; pname = "gourmet";
@@ -10,7 +11,5 @@ buildPythonApplication rec {
}; };
buildInputs = [ distutils_extra intltool ]; buildInputs = [ distutils_extra intltool ];
propagatedBuildInputs = [ sqlalchemy reportlab lxml ]; propagatedBuildInputs = [ sqlalchemy reportlab lxml ];
meta = with stenv.lib; { meta = with stenv.lib; { maintainers = with maintainers; [ kmein ]; };
maintainers = with maintainers; [ kmein ];
};
} }

View File

@@ -16,8 +16,9 @@ stdenv.mkDerivation rec {
make all make all
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://iolanguage.org/; homepage = "https://iolanguage.org/";
description = "Io programming language. Inspired by Self, Smalltalk and LISP."; description =
"Io programming language. Inspired by Self, Smalltalk and LISP.";
license = licenses.bsd3; license = licenses.bsd3;
}; };
} }

View File

@@ -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 { stdenv.mkDerivation {
name = "libcoap"; name = "libcoap";
src = fetchFromGitHub { src = fetchFromGitHub {
@@ -8,17 +9,10 @@ stdenv.mkDerivation {
sha256 = "1nic584jwkndg0w831h0fnxk0zx0apf2lw5md079m3di7zcxs6bw"; sha256 = "1nic584jwkndg0w831h0fnxk0zx0apf2lw5md079m3di7zcxs6bw";
fetchSubmodules = true; fetchSubmodules = true;
}; };
buildInputs = [ buildInputs = [ automake autoconf which libtool ] ++ lib.optional tls gnutls;
automake
autoconf
which
libtool
] ++ lib.optional tls gnutls;
preConfigure = "./autogen.sh"; preConfigure = "./autogen.sh";
configureFlags = [ configureFlags = [ "--disable-documentation" "--disable-shared" ]
"--disable-documentation" ++ lib.optional tls "--enable-dtls";
"--disable-shared"
] ++ lib.optional tls "--enable-dtls";
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = "https://github.com/obgm/libcoap"; homepage = "https://github.com/obgm/libcoap";
description = "A CoAP (RFC 7252) implementation in C"; description = "A CoAP (RFC 7252) implementation in C";

View File

@@ -19,7 +19,7 @@ stdenv.mkDerivation {
wrapProgram $out/bin/daybook --prefix PATH ":" ${pandoc}/bin ; wrapProgram $out/bin/daybook --prefix PATH ":" ${pandoc}/bin ;
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/kmein/daybook; homepage = "https://github.com/kmein/daybook";
description = "A diary writing utility in sh"; description = "A diary writing utility in sh";
license = licenses.mit; license = licenses.mit;
platforms = platforms.linux; platforms = platforms.linux;

View File

@@ -1,18 +1,20 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> {}; kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
wrapScript = { packages ? [], name, script }: pkgs.writers.writeDashBin name '' wrapScript = { packages ? [ ], name, script }:
PATH=$PATH:${lib.makeBinPath (packages ++ [pkgs.coreutils pkgs.findutils])} pkgs.writers.writeDashBin name ''
${script} "$@" PATH=$PATH:${
''; lib.makeBinPath (packages ++ [ pkgs.coreutils pkgs.findutils ])
}
${script} "$@"
'';
voidrice = pkgs.fetchFromGitHub { voidrice = pkgs.fetchFromGitHub {
owner = "LukeSmithxyz"; owner = "LukeSmithxyz";
repo = "voidrice"; repo = "voidrice";
rev = "dff66cd1efb36afd54dd6dcf2fdaa9475d5646c1"; rev = "dff66cd1efb36afd54dd6dcf2fdaa9475d5646c1";
sha256 = "19f33ins2kzgiw72d62j8zz9ai3j8m4qqfqmagxkg9yhxqkdqry7"; sha256 = "19f33ins2kzgiw72d62j8zz9ai3j8m4qqfqmagxkg9yhxqkdqry7";
}; };
in in {
{
instaget = wrapScript { instaget = wrapScript {
packages = [ pkgs.jq pkgs.curl pkgs.gnugrep ]; packages = [ pkgs.jq pkgs.curl pkgs.gnugrep ];
script = ./instaget.sh; script = ./instaget.sh;
@@ -90,7 +92,8 @@ in
}; };
linkhandler = wrapScript { 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"; script = "${voidrice}/.local/bin/linkhandler";
name = "linkhandler"; name = "linkhandler";
}; };
@@ -124,6 +127,6 @@ in
packages = [ pkgs.xclip pkgs.scrot kpaste pkgs.libnotify pkgs.dmenu ]; packages = [ pkgs.xclip pkgs.scrot kpaste pkgs.libnotify pkgs.dmenu ];
}; };
bvg = pkgs.callPackage ./bvg.nix {}; bvg = pkgs.callPackage ./bvg.nix { };
nav = pkgs.callPackage ./nav.nix {}; nav = pkgs.callPackage ./nav.nix { };
} }

View File

@@ -22,8 +22,13 @@ let
}; };
in writeShellScriptBin "depp" '' in writeShellScriptBin "depp" ''
if [ $# -gt 0 ]; then if [ $# -gt 0 ]; then
git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@" git ${
lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)
} "$@"
else 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 fi
'' ''

View File

@@ -4,33 +4,35 @@ let
cfg = eval.config; cfg = eval.config;
eval = lib.evalModules { eval = lib.evalModules {
modules = [ { modules = [{
_file = toString ./klem.nix; _file = toString ./klem.nix;
imports = [ (args.config or {}) ]; imports = [ (args.config or { }) ];
options = { options = {
clipboardSelection = lib.mkOption { clipboardSelection = lib.mkOption {
default = "clipboard"; default = "clipboard";
type = lib.types.enum ["primary" "secondary" "clipboard"]; type = lib.types.enum [ "primary" "secondary" "clipboard" ];
}; };
scripts = lib.mkOption { scripts = lib.mkOption {
default = { default = {
pastebin = "${pkgs.curl}/bin/curl -fSs -F 'f:1=<-' ix.io"; 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/\\<r\\>/krebsco.de/'"; "replace p.r" = "${pkgs.gnused}/bin/sed 's/\\<r\\>/krebsco.de/'";
}; };
type = lib.types.attrs; type = lib.types.attrs;
}; };
}; };
} ]; }];
}; };
scriptCase = option: script: '' scriptCase = option: script: ''
'${option}') ${toString script} ;; '${option}') ${toString script} ;;
''; '';
in in pkgs.writers.writeDashBin "klem" ''
pkgs.writers.writeDashBin "klem" ''
${pkgs.xclip}/bin/xclip -selection ${cfg.clipboardSelection} -out \ ${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)} ${lib.concatStringsSep "\n" (lib.mapAttrsToList scriptCase cfg.scripts)}
*) ${pkgs.coreutils}/bin/cat ;; *) ${pkgs.coreutils}/bin/cat ;;
esac \ esac \

View File

@@ -2,11 +2,14 @@
let let
inherit (import <niveum/lib> { inherit pkgs; }) writeTOML; inherit (import <niveum/lib> { inherit pkgs; }) writeTOML;
sshKey = { 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"; homeros =
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"; "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";
wilde = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde"; 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 <nixos-unstable> {}; unstable = import <nixos-unstable> { };
wtf-config = pkgs.writeText "config.yml" (builtins.toJSON { wtf-config = pkgs.writeText "config.yml" (builtins.toJSON {
wtf = { wtf = {
colors = { colors = {
@@ -18,8 +21,8 @@ let
}; };
}; };
grid = { grid = {
columns = [40 54]; columns = [ 40 54 ];
rows = [10 20]; rows = [ 10 20 ];
}; };
refreshInterval = 1; refreshInterval = 1;
mods = { mods = {
@@ -107,34 +110,32 @@ in {
})); }));
}; };
} }
{ { services.keybase.enable = true; }
services.keybase.enable = true;
}
{ {
environment.systemPackages = [ pkgs.wtf ]; environment.systemPackages = [ pkgs.wtf ];
systemd.services.wtf = { systemd.services.wtf = {
wantedBy = [ "multi-user.target" ]; 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"; serviceConfig.Type = "oneshot";
}; };
} }
/* /* {
{ imports = [ <stockholm/krebs/3modules/urlwatch.nix> ];
imports = [ <stockholm/krebs/3modules/urlwatch.nix> ];
krebs.urlwatch = { krebs.urlwatch = {
enable = true; enable = true;
onCalendar = "*-*-* 05:00:00"; onCalendar = "*-*-* 05:00:00";
sendmail.enable = false; sendmail.enable = false;
telegram = { telegram = {
enable = true; enable = true;
chatId = [ "18980945" ]; chatId = [ "18980945" ];
botToken = lib.strings.fileContents <secrets/telegram/kmein.token>; botToken = lib.strings.fileContents <secrets/telegram/kmein.token>;
}; };
urls = []; urls = [];
}; };
} }
*/ */
]; ];
@@ -147,19 +148,16 @@ in {
networking.wireless = { networking.wireless = {
enable = false; enable = false;
networks.Aether = { pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; }; networks.Aether = {
pskRaw =
"e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
};
}; };
environment.variables.TERM = "linux"; environment.variables.TERM = "linux";
environment.variables.HTOPRC = toString <niveum/dot/htoprc>; environment.variables.HTOPRC = toString <niveum/dot/htoprc>;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [ git vim htop wget reptyr ];
git
vim
htop
wget
reptyr
];
users.mutableUsers = false; users.mutableUsers = false;
users.users.me = { users.users.me = {
@@ -168,7 +166,8 @@ in {
createHome = true; createHome = true;
group = "users"; group = "users";
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/"; hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
shell = pkgs.bash; shell = pkgs.bash;
}; };
@@ -180,17 +179,11 @@ in {
passwordAuthentication = false; passwordAuthentication = false;
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys =
sshKey.homeros [ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
sshKey.scardanelli
sshKey.wilde
];
users.users.me.openssh.authorizedKeys.keys = [ users.users.me.openssh.authorizedKeys.keys =
sshKey.homeros [ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
sshKey.scardanelli
sshKey.wilde
];
networking.retiolum = { networking.retiolum = {
ipv4 = "10.243.2.3"; ipv4 = "10.243.2.3";

View File

@@ -1,5 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, ... }: {
{
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "cma=32M" ]; boot.kernelParams = [ "cma=32M" ];
@@ -10,5 +9,8 @@
}; };
}; };
swapDevices = [ { device = "/swapfile"; size = 1024; } ]; swapDevices = [{
device = "/swapfile";
size = 1024;
}];
} }

View File

@@ -6,9 +6,9 @@ let
rev = "1971f082ec6e14d392a0dc3ac62e0b1e4187409b"; rev = "1971f082ec6e14d392a0dc3ac62e0b1e4187409b";
sha256 = "0hipj616vcsa3f62s83jvlx8zx4bmbgl5h2n4w8ba5ngp40lkmb3"; sha256 = "0hipj616vcsa3f62s83jvlx8zx4bmbgl5h2n4w8ba5ngp40lkmb3";
}; };
autorenkalender = pkgs.python3Packages.callPackage autorenkalender-package {}; autorenkalender =
in pkgs.python3Packages.callPackage autorenkalender-package { };
{ in {
niveum.telegramBots.autorenkalender = { niveum.telegramBots.autorenkalender = {
enable = true; enable = true;
time = "07:00"; time = "07:00";

View File

@@ -1,7 +1,6 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
telebots = telebots = let
let
telebots-package = pkgs.fetchFromGitHub { telebots-package = pkgs.fetchFromGitHub {
owner = "kmein"; owner = "kmein";
repo = "telebots"; repo = "telebots";
@@ -9,9 +8,15 @@ let
sha256 = "08rp1pcisk4zzhxdlgrlhxa0sbza5qhxa70rjycg4r7fmixkkbz2"; sha256 = "08rp1pcisk4zzhxdlgrlhxa0sbza5qhxa70rjycg4r7fmixkkbz2";
}; };
in { in {
reverse = pkgs.python3Packages.callPackage "${telebots-package}/telegram-reverse" {}; reverse =
odyssey = pkgs.python3Packages.callPackage "${telebots-package}/telegram-odyssey" {}; pkgs.python3Packages.callPackage "${telebots-package}/telegram-reverse"
betacode = pkgs.python3Packages.callPackage "${telebots-package}/telegram-betacode" {}; { };
odyssey =
pkgs.python3Packages.callPackage "${telebots-package}/telegram-odyssey"
{ };
betacode =
pkgs.python3Packages.callPackage "${telebots-package}/telegram-betacode"
{ };
}; };
in { in {
imports = [ imports = [
@@ -24,27 +29,31 @@ in {
systemd.services.telegram-odyssey = { systemd.services.telegram-odyssey = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
description = "Telegram bot reciting the Odyssey to you"; description = "Telegram bot reciting the Odyssey to you";
environment.TELEGRAM_ODYSSEY_TOKEN = lib.strings.fileContents <secrets/telegram/odyssey.token>; environment.TELEGRAM_ODYSSEY_TOKEN =
lib.strings.fileContents <secrets/telegram/odyssey.token>;
enable = true; enable = true;
script = ''${telebots.odyssey}/bin/telegram-odyssey''; script = "${telebots.odyssey}/bin/telegram-odyssey";
serviceConfig.Restart = "always"; serviceConfig.Restart = "always";
}; };
systemd.services.telegram-reverse = { systemd.services.telegram-reverse = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
description = "Telegram bot for reversing things"; description = "Telegram bot for reversing things";
environment.TELEGRAM_REVERSE_TOKEN = lib.strings.fileContents <secrets/telegram/reverse.token>; environment.TELEGRAM_REVERSE_TOKEN =
lib.strings.fileContents <secrets/telegram/reverse.token>;
enable = true; enable = true;
script = ''${telebots.reverse}/bin/telegram-reverse''; script = "${telebots.reverse}/bin/telegram-reverse";
serviceConfig.Restart = "always"; serviceConfig.Restart = "always";
}; };
systemd.services.telegram-betacode = { systemd.services.telegram-betacode = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
description = "Telegram bot for converting Ancient Greek betacode into unicode"; description =
environment.TELEGRAM_BETACODE_TOKEN = lib.strings.fileContents <secrets/telegram/betacode.token>; "Telegram bot for converting Ancient Greek betacode into unicode";
environment.TELEGRAM_BETACODE_TOKEN =
lib.strings.fileContents <secrets/telegram/betacode.token>;
enable = true; enable = true;
script = ''${telebots.betacode}/bin/telegram-betacode''; script = "${telebots.betacode}/bin/telegram-betacode";
serviceConfig.Restart = "always"; serviceConfig.Restart = "always";
}; };
} }

View File

@@ -2,8 +2,7 @@
let let
scripts = import <niveum/packages/scripts> { inherit pkgs lib; }; scripts = import <niveum/packages/scripts> { inherit pkgs lib; };
inherit (scripts) literature-quote; inherit (scripts) literature-quote;
in in {
{
niveum.telegramBots.quotebot = { niveum.telegramBots.quotebot = {
enable = true; enable = true;
time = "08/6:00"; time = "08/6:00";

View File

@@ -1,31 +1,31 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let
nachtischsatan-bot = { token }: pkgs.writers.writePython3 "nachtischsatan-bot" { nachtischsatan-bot = { token }:
libraries = [ pkgs.python3Packages.python-telegram-bot ]; pkgs.writers.writePython3 "nachtischsatan-bot" {
} '' libraries = [ pkgs.python3Packages.python-telegram-bot ];
import random } ''
import time import random
import time
from telegram.ext import Updater, MessageHandler from telegram.ext import Updater, MessageHandler
from telegram.ext.filters import Filters from telegram.ext.filters import Filters
def flubber(bot, update): def flubber(bot, update):
time.sleep(random.randrange(4000) / 1000) time.sleep(random.randrange(4000) / 1000)
update.message.reply_text("*flubberflubber*") update.message.reply_text("*flubberflubber*")
updater = Updater( updater = Updater(
'${token}' '${token}'
) )
updater.dispatcher.add_handler(MessageHandler(Filters.all, flubber)) updater.dispatcher.add_handler(MessageHandler(Filters.all, flubber))
updater.start_polling() updater.start_polling()
updater.idle() updater.idle()
''; '';
in in {
{
systemd.services.telegram-nachtischsatan = { systemd.services.telegram-nachtischsatan = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
description = "*flubberflubber*"; description = "*flubberflubber*";

View File

@@ -6,15 +6,15 @@ let
rev = "f4201c5419354377a26b7f7873368683efbea417"; rev = "f4201c5419354377a26b7f7873368683efbea417";
sha256 = "1ixffmxy3sxy2if7fd44ps451rds14hnz4d0x9nkh8lzshqk6v4y"; sha256 = "1ixffmxy3sxy2if7fd44ps451rds14hnz4d0x9nkh8lzshqk6v4y";
}; };
telegram-proverb = pkgs.python3Packages.callPackage proverb-bot-package {}; telegram-proverb = pkgs.python3Packages.callPackage proverb-bot-package { };
in in {
{
systemd.services.telegram-proverb = { systemd.services.telegram-proverb = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
description = "Telegram bot for generating inspiring but useless proverbs"; description = "Telegram bot for generating inspiring but useless proverbs";
environment.TELEGRAM_PROVERB_TOKEN = lib.strings.fileContents <secrets/telegram/proverb.token>; environment.TELEGRAM_PROVERB_TOKEN =
lib.strings.fileContents <secrets/telegram/proverb.token>;
enable = true; enable = true;
script = ''${telegram-proverb}/bin/proverb_bot.py''; script = "${telegram-proverb}/bin/proverb_bot.py";
serviceConfig.Restart = "always"; serviceConfig.Restart = "always";
}; };
} }

View File

@@ -1,12 +1,17 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }: {
{
imports = [ imports = [
<niveum/configs/default.nix> <niveum/configs/default.nix>
<niveum/configs/kdeconnect.nix> <niveum/configs/kdeconnect.nix>
./hardware-configuration.nix ./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 ]; environment.systemPackages = [ pkgs.zeroad pkgs.minecraft ];

View File

@@ -1,26 +1,31 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: {
{ imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
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.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/83544ad3-1d23-4c2d-82bc-fafef13a996f"; device = "/dev/disk/by-uuid/83544ad3-1d23-4c2d-82bc-fafef13a996f";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/8F9E-7556"; device = "/dev/disk/by-uuid/8F9E-7556";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = 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" ]; # services.xserver.videoDrivers = [ "nvidia" ];

View File

@@ -1,17 +1,13 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let 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 { in {
imports = [ imports = [ <niveum/configs/default.nix> ./hardware-configuration.nix ];
<niveum/configs/default.nix>
./hardware-configuration.nix
];
services.xserver.xrandrHeads = [ "eDP1" ]; services.xserver.xrandrHeads = [ "eDP1" ];
users.users.me.openssh.authorizedKeys.keys = [ users.users.me.openssh.authorizedKeys.keys = [ sshKey.rilke ];
sshKey.rilke
];
niveum = { niveum = {
batteryBlocks.default = "BAT1"; batteryBlocks.default = "BAT1";

View File

@@ -1,26 +1,23 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: {
{ imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
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.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/8bc52e48-58e0-463d-8268-941a5a54cd4a"; device = "/dev/disk/by-uuid/8bc52e48-58e0-463d-8268-941a5a54cd4a";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/6E76-4ED9"; device = "/dev/disk/by-uuid/6E76-4ED9";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = 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; nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";

View File

@@ -6,7 +6,10 @@
./hardware-configuration.nix ./hardware-configuration.nix
<stockholm/krebs/2configs/hw/x220.nix> <stockholm/krebs/2configs/hw/x220.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" ]; boot.kernelModules = [ "tp_smapi" "acpi_call" ];
environment.systemPackages = [ pkgs.tpacpi-bat ]; environment.systemPackages = [ pkgs.tpacpi-bat ];
} }

View File

@@ -1,26 +1,23 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }: {
{ imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
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.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/b700a1f4-127e-40d3-a1cf-d194785e915b"; device = "/dev/disk/by-uuid/b700a1f4-127e-40d3-a1cf-d194785e915b";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/4474-04C0"; device = "/dev/disk/by-uuid/4474-04C0";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = 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; nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";