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

View File

@@ -1,6 +1,7 @@
{
programs.bash = {
promptInit = ''PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "'';
promptInit = ''
PS1="$(tput bold)\w \$([[ \$? == 0 ]] && echo \"\[\033[1;32m\]\" || echo \"\[\033[1;31m\]\")\$$(tput sgr0) "'';
interactiveShellInit = ''
set -o vi
'';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,4 @@
{ pkgs, config, lib, ... }:
{
{ pkgs, config, lib, ... }: {
environment.systemPackages = [
pkgs.mr
pkgs.git
@@ -19,16 +18,15 @@
};
home-manager.users.me = {
home.file.".mrconfig".text =
let
prependPath = prefix: lib.attrsets.mapAttrs' (path: lib.attrsets.nameValuePair "${prefix}/${path}");
home.file.".mrconfig".text = let
prependPath = prefix:
lib.attrsets.mapAttrs'
(path: lib.attrsets.nameValuePair "${prefix}/${path}");
git = url: { checkout = "git clone ${url}"; };
github = owner: repo: git "git@github.com:${owner}/${repo}";
keybase = owner: repo: git "keybase://private/${owner}/${repo}";
in lib.generators.toINI {} ({
DEFAULT = {
git_gc = "git gc \"$@\"";
};
in lib.generators.toINI { } ({
DEFAULT = { git_gc = ''git gc "$@"''; };
} // prependPath "projects" {
"menstruation.rs" = github "kmein" "menstruation.rs";
brockman = github "kmein" "brockman";
@@ -67,11 +65,13 @@
diffs = "diff --staged";
last = "log -1 HEAD";
logs = "log --pretty=oneline";
graph = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
graph =
"log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
};
ignores = config.niveum.ignore;
extraConfig = {
core.pager = "${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | ${pkgs.less}/bin/less --tabs=4 -RFX";
core.pager =
"${pkgs.gitAndTools.diff-so-fancy}/bin/diff-so-fancy | ${pkgs.less}/bin/less --tabs=4 -RFX";
color = {
ui = true;
diff = {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,16 +1,17 @@
{ pkgs, lib, ... }:
let
commaSep = builtins.concatStringsSep ",";
let commaSep = builtins.concatStringsSep ",";
in {
services.xserver = {
layout = commaSep [ "de" "gr" ];
xkbVariant = commaSep [ "T3" "polytonic" ];
xkbOptions = commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
xkbOptions =
commaSep [ "compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle" ];
libinput.enable = true;
};
console.keyMap = "de";
# improve held key rate
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
services.xserver.displayManager.sessionCommands =
"${pkgs.xorg.xset}/bin/xset r rate 300 50";
}

View File

@@ -11,17 +11,18 @@ let
neomutt.enable = true;
notmuch.enable = false;
};
addArchiveCommand = folder: lib.recursiveUpdate {
neomutt.extraConfig = ''
# named-mailboxes " Archive" "=${folder}"
macro pager,index \' "<save-message>+${folder}<enter>" "Archive"
'';
};
in
{
addArchiveCommand = folder:
lib.recursiveUpdate {
neomutt.extraConfig = ''
# named-mailboxes " Archive" "=${folder}"
macro pager,index \' "<save-message>+${folder}<enter>" "Archive"
'';
};
in {
environment.systemPackages = [ pkgs.neomutt ];
home-manager.users.me = let maildir = "${config.users.users.me.home}/mail"; in {
home-manager.users.me = let maildir = "${config.users.users.me.home}/mail";
in {
accounts.email.maildirBasePath = maildir;
accounts.email.accounts = {
cock = addArchiveCommand "Archive" (enableDefaults {
@@ -41,19 +42,20 @@ in
realName = "2210";
passwordCommand = pass "mail/2210@cock.li";
});
kieran-gmail = addArchiveCommand "[Gmail]/Alle Nachrichten" (enableDefaults {
primary = true;
flavor = "gmail.com";
address = "kieran.meinhardt@gmail.com";
realName = config.niveum.user.name;
userName = "kieran.meinhardt";
passwordCommand = pass "mail/kieran.meinhardt@gmail.com";
folders = {
drafts = "[Gmail]/Entw&APw-rfe";
sent = "[Gmail]/Gesendet";
trash = "[Gmail]/Papierkorb";
};
});
kieran-gmail = addArchiveCommand "[Gmail]/Alle Nachrichten"
(enableDefaults {
primary = true;
flavor = "gmail.com";
address = "kieran.meinhardt@gmail.com";
realName = config.niveum.user.name;
userName = "kieran.meinhardt";
passwordCommand = pass "mail/kieran.meinhardt@gmail.com";
folders = {
drafts = "[Gmail]/Entw&APw-rfe";
sent = "[Gmail]/Gesendet";
trash = "[Gmail]/Papierkorb";
};
});
hu-berlin = addArchiveCommand "Archives" (enableDefaults {
primary = false;
address = "meinhark@hu-berlin.de";
@@ -80,25 +82,29 @@ in
vimKeys = true;
checkStatsInterval = 60;
settings = {
attribution = "\"%n (%a), %d:\"";
date_format = "\"%Y-%m-%d %H:%M\"";
attribution = ''"%n (%a), %d:"'';
date_format = ''"%Y-%m-%d %H:%M"'';
# envelope_from = "yes"; # THIS BREAKS SENDING VIA MSMTP (the default setting already contains msmtpq --read-envelope)
fast_reply = "yes"; # skip to compose when forwarding
fcc_attach = "no"; # save attachments with the body
forward_format = "\" %s\""; # format of subject when forwarding
forward_format = ''" %s"''; # format of subject when forwarding
forward_quote = "yes"; # include message in forwards
include = "yes"; # include message in replies
# index_format = "\"%2C %Z %?X?A& ? %D %-15.15F %s (%-4.4c)\"";
index_format= "\"${pkgs.writeDash "mutt-index" ''
# http://www.mutt.org/doc/manual/#formatstrings
recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')"
# output to mutt
# V
echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%"
# args to mutt-index dash script
# V
''} %r |\"";
mail_check = "60"; # to avoid lags using IMAP with some email providers (yahoo for example)
index_format = ''
"${
pkgs.writeDash "mutt-index" ''
# http://www.mutt.org/doc/manual/#formatstrings
recipent="$(echo $1 | sed 's/[^,]*<\([^>]*\)[^,]*/ \1/g')"
# output to mutt
# V
echo "%4C %Z %?GI?%GI& ? %[%y-%m-%d] %-20.20a %?M?(%3M)& ? %s %> $recipent %?g?%g?%"
# args to mutt-index dash script
# V
''
} %r |"'';
mail_check =
"60"; # to avoid lags using IMAP with some email providers (yahoo for example)
mail_check_stats = "yes";
mark_old = "no"; # unread mail stay unread until read
markers = "no"; # disables the `+` displayed at line wraps
@@ -121,58 +127,235 @@ in
'');
};
macros = [
{ action = "<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 = "<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 = "<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 = "<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 = "<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";
key = "\\Cf";
}
];
binds = [
{ action = "complete-query"; key = "<Tab>"; map = "editor"; }
{ action = "display-message"; key = "l"; map = "index"; }
{ action = "exit"; key = "h"; map = "attach"; }
{ action = "exit"; key = "h"; map = "pager"; }
{ action = "group-reply"; key = "R"; map = "index"; }
{ action = "group-reply"; key = "R"; map = "pager"; }
{ action = "limit"; key = "L"; map = "index"; }
{ action = "next-entry"; key = "j"; map = "index"; }
{ action = "next-line"; key = "\\005"; map = "pager"; } # mouse wheel
{ action = "next-undeleted"; key = "\\005"; map = "index"; } # mouse wheel
{ action = "noop"; key = "<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"; }
{
action = "complete-query";
key = "<Tab>";
map = "editor";
}
{
action = "display-message";
key = "l";
map = "index";
}
{
action = "exit";
key = "h";
map = "attach";
}
{
action = "exit";
key = "h";
map = "pager";
}
{
action = "group-reply";
key = "R";
map = "index";
}
{
action = "group-reply";
key = "R";
map = "pager";
}
{
action = "limit";
key = "L";
map = "index";
}
{
action = "next-entry";
key = "j";
map = "index";
}
{
action = "next-line";
key = "\\005";
map = "pager";
} # mouse wheel
{
action = "next-undeleted";
key = "\\005";
map = "index";
} # mouse wheel
{
action = "noop";
key = "<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 = ''
auto_view text/html # automatically show html

View File

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

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
environment.variables.EDITOR = pkgs.lib.mkForce "nvim";
environment.shellAliases.vi = "nvim";
environment.shellAliases.vim = "nvim";
@@ -7,14 +6,22 @@
nixpkgs.config.packageOverrides = pkgs: {
vimPlugins = pkgs.vimPlugins // {
cheat-sh-vim = pkgs.callPackage <niveum/packages/vimPlugins/cheat-sh.nix> {};
vim-fetch = pkgs.callPackage <niveum/packages/vimPlugins/vim-fetch.nix> {};
vim-colors-paramount = pkgs.callPackage <niveum/packages/vimPlugins/vim-colors-paramount.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> {};
cheat-sh-vim =
pkgs.callPackage <niveum/packages/vimPlugins/cheat-sh.nix> { };
vim-fetch =
pkgs.callPackage <niveum/packages/vimPlugins/vim-fetch.nix> { };
vim-colors-paramount =
pkgs.callPackage <niveum/packages/vimPlugins/vim-colors-paramount.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-fugitive
vim-gitgutter
vim-pandoc vim-pandoc-syntax # vim-pandoc-after
vim-pandoc
vim-pandoc-syntax # vim-pandoc-after
vim-repeat
vim-sensible
# vim-startify

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,19 +1,24 @@
{ lib, pkgs, ... }:
let krebs-packages = pkgs: {
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> {};
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> {};
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {};
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {};
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> {};
untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> {};
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> {};
krebspaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/krebspaste> {};
bepasty-client-cli = 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> {};
};
let
krebs-packages = pkgs: {
dic = pkgs.callPackage <stockholm/krebs/5pkgs/simple/dic> { };
yt-next = pkgs.callPackage <stockholm/lass/5pkgs/yt-next> { };
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> { };
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> { };
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> { };
untilport = pkgs.callPackage <stockholm/krebs/5pkgs/simple/untilport> { };
kpaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/kpaste> { };
krebspaste = pkgs.callPackage <stockholm/krebs/5pkgs/simple/krebspaste> { };
bepasty-client-cli =
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 {
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 = [
(pkgs.python3.withPackages
(py: [
py.black
py.python-language-server
py.pyls-mypy
py.pyls-black
py.pyls-isort
py.flake8
py.flask
py.pygments
py.docopt
py.schema
py.ansicolors
py.virtualenv
])
)
(pkgs.python3.withPackages (py: [
py.black
py.python-language-server
py.pyls-mypy
py.pyls-black
py.pyls-isort
py.flake8
py.flask
py.pygments
py.docopt
py.schema
py.ansicolors
py.virtualenv
]))
];
home-manager.users.me.xdg.configFile."pycodestyle".text = ''

View File

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

View File

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

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> ];
networking.hosts = {
"42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ];
};
networking.hosts = { "42:0:ca48:f98f:63d7:31ce:922b:245d" = [ "go" ]; };
environment.etc."tinc/retiolum/rsa_key.priv" = {
text = builtins.readFile <secrets/retiolum.key>;

View File

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

View File

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

View File

@@ -2,12 +2,16 @@
let
sshPort = 22022;
sshKey = {
homeros = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com";
scardanelli = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com";
wilde = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde";
homeros =
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com";
scardanelli =
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com";
wilde =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde";
};
in {
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
services.xserver.displayManager.sessionCommands =
"${pkgs.openssh}/bin/ssh-add";
programs.ssh.startAgent = true;
@@ -19,17 +23,11 @@ in {
users.motd = "Welcome to ${config.networking.hostName}!";
users.users.root.openssh.authorizedKeys.keys = [
sshKey.homeros
sshKey.scardanelli
sshKey.wilde
];
users.users.root.openssh.authorizedKeys.keys =
[ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
users.users.me.openssh.authorizedKeys.keys = [
sshKey.homeros
sshKey.scardanelli
sshKey.wilde
];
users.users.me.openssh.authorizedKeys.keys =
[ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
home-manager.users.me.programs.ssh = {
enable = true;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -25,14 +25,15 @@ let
-invalid "Computer says no." \
-mode "$MODE"
'';
in
{
in {
services.xserver.xautolock = rec {
enable = true;
killer = if suspendIfBored then "${pkgs.systemd}/bin/systemctl suspend" else null;
killer =
if suspendIfBored then "${pkgs.systemd}/bin/systemctl suspend" else null;
locker = "${my-xlock}/bin/xlock";
nowlocker = locker;
enableNotifier = true;
notifier = ''${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking" "in 10 seconds."'';
notifier = ''
${pkgs.libnotify}/bin/notify-send -u normal -a xautolock "Locking" "in 10 seconds."'';
};
}

View File

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

View File

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

View File

@@ -1,10 +1,10 @@
{ pkgs, wifi-interface, colours, batteryBlock }:
let
setsid = script: pkgs.writers.writeDash "setsid-command" ''
${pkgs.utillinux}/bin/setsid ${script}
'';
in
{
setsid = script:
pkgs.writers.writeDash "setsid-command" ''
${pkgs.utillinux}/bin/setsid ${script}
'';
in {
theme = {
name = "plain";
overrides = {
@@ -22,7 +22,7 @@ in
info_bg = colours.background;
separator = "";
separator_bg = "auto";
separator_fg = "auto" ;
separator_fg = "auto";
};
};
icons = {
@@ -78,11 +78,11 @@ in
| tail -n 1 \
| ${pkgs.gawk}/bin/awk '{ print " " $2 "/" $4 }'
'';
on_click =
let
sleepSeconds = 2.5;
on_click = let sleepSeconds = 2.5;
in pkgs.writers.writeDash "show-tasks" ''
${pkgs.st}/bin/st -c floating -e ${pkgs.dash}/bin/dash -c "${pkgs.todo-txt-cli}/bin/todo.sh list && sleep ${toString sleepSeconds}"
${pkgs.st}/bin/st -c floating -e ${pkgs.dash}/bin/dash -c "${pkgs.todo-txt-cli}/bin/todo.sh list && sleep ${
toString sleepSeconds
}"
'';
}
{
@@ -141,9 +141,7 @@ in
format_mem = "{Mug}G";
clickable = false;
}
{
block = "load";
}
{ block = "load"; }
{
block = "time";
interval = 5;

View File

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

View File

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

View File

@@ -34,9 +34,7 @@ let
};
in {
options.niveum = {
applications = {
fileManager = mkOption { type = types.str; };
};
applications = { fileManager = mkOption { type = types.str; }; };
colours = mkOption { type = my-types.colourTheme; };
@@ -66,16 +64,29 @@ in {
batteryBlocks.default = mkOption { type = types.str; };
promptColours =
let colours16 = types.enum [ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
promptColours = let
colours16 = types.enum [
"black"
"red"
"green"
"yellow"
"blue"
"magenta"
"cyan"
"white"
];
in {
success = mkOption { type = colours16; default = "green"; };
failure = mkOption { type = colours16; default = "red"; };
success = mkOption {
type = colours16;
default = "green";
};
failure = mkOption {
type = colours16;
default = "red";
};
};
fonts = {
size = mkOption { type = types.int; };
};
fonts = { size = mkOption { type = types.int; }; };
user = {
github = mkOption { type = types.str; };
@@ -85,7 +96,29 @@ in {
ignore = mkOption {
type = types.listOf types.str;
default = [ "*~" ".stack-work/" "__pycache__/" ".mypy_cache/" "*.py[co]" "*.o" "*.hi" "*.aux" "*.bbl" "*.bcf" "*.blg" "*.fdb_latexmk" "*.fls" "*.out" "*.run.xml" "*.toc" "*.bbl" "*.class" "*.dyn_hi" "*.dyn_o" "dist/" ];
default = [
"*~"
".stack-work/"
"__pycache__/"
".mypy_cache/"
"*.py[co]"
"*.o"
"*.hi"
"*.aux"
"*.bbl"
"*.bcf"
"*.blg"
"*.fdb_latexmk"
"*.fls"
"*.out"
"*.run.xml"
"*.toc"
"*.bbl"
"*.class"
"*.dyn_hi"
"*.dyn_o"
"dist/"
];
};
theme = {

View File

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

View File

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

View File

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

View File

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

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 = {
allowedTCPPorts = [ 655 ];

View File

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

View File

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

View File

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

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

View File

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

View File

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

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

View File

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

View File

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

View File

@@ -22,8 +22,13 @@ let
};
in writeShellScriptBin "depp" ''
if [ $# -gt 0 ]; then
git ${lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)} "$@"
git ${
lib.concatStringsSep " " (lib.attrsets.mapAttrsToList aliasFlag aliases)
} "$@"
else
printf "${lib.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)}\n"
printf "${
lib.concatStringsSep "\n"
(lib.attrsets.mapAttrsToList (n: v: n + " " + v) aliases)
}\n"
fi
''

View File

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

View File

@@ -2,11 +2,14 @@
let
inherit (import <niveum/lib> { inherit pkgs; }) writeTOML;
sshKey = {
homeros = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com";
scardanelli = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com";
wilde = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde";
homeros =
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDn13Y6CznabMvKJPIrr/dj1TX4boe8F98yc3FDElJeprQo2RXlDzjg/po9/lHTHaoC5yQUjlRg/AnI4vizYkn2sqJebAeSPahmpS+l0eFnjZgsqds2cCFqSPB6Qc5YEkGRhN4aq/ABz0jdFJLBYOYGxuuXowYxyNrqrItxDR7tF7upG+kVjYiDoP/qFm8C7zv6Zy8aoehNbzf8HlIJd0ITbMr/vUftNsQ8C84QmbZljReHmchPgE8GUfVLTlCORkhndbvNX3jXo+75y7JOIZZ6193FZHM4seg/VSDWYLJtpnhttD1w6qmiLrlimqbJB9ihoXq2eDmQ+4zo6hxQ6pFH6P0xQClJ0hxVWn6hEM3rkMwoMfbq4v54gKJsYxcGdnwjAX6d9DQv/QVjmVZffKWsGGoC7uz7bdmc0akVKi+GLSPOx8sJwXqvyvFStfqLaweVcuikUqQ72JLK7pZyliA7na6KuQ1PE3LTpfSr0lbBJ73xtS2rU1nF/Oe5zwA4LX5s/QeDVmS86D8acUrSCO62pBB3Yv8go0KR4mEvfxLiUWV6gR2uTeIPXvo4ouYFZqyABAGybjUATlGCXJaeHd/y/VWkpIB8ocqNESlRMCEe4TrYjw91AEmYBL6kWIeop3dyhovm3dTB3fQvC97kbL16wuXBrOcN4lEc+56ShhmvdQ== kieran.meinhardt@gmail.com";
scardanelli =
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC19H0FhSNWcfBRPKzbTVSMJikIWZl0CoM8zCm+/3fdMgoaLRpeZWe/AfDK6b4qOjk/sez/J0JUFCGr+JbMwjsduoazsuQowu9L9DLP9Q5UkJje4BD7MHznaeu9/XfVng/MvyaEWArA/VUJeKQesHe76tR511/+n3+bdzlIh8Zw/3wfFxmg1OTNA99/vLkXrQzHDTuV/yj1pxykL4xFtN0OIssW1IKncJeKtkO/OHGT55ypz52Daj6bNKqvxiTuzeEhv5M+5ppyIPcRf1uj/7IaPKttCgZAntEqBTIR9MbyXFeAZVayzaFnLl2okeam5XreeZbj+Y1h2ZjxiIuWoab3MLndSekVfLtfa63gtcWIf8CIvZO2wJoH8v73y0U78JsfWVaTM09ZCfFlHHA/bWqZ6laAjW+mWLO/c77DcYkB3IBzaMVNfc6mfTcGFIC+biWeYpKgA0zC6rByUPbmbIoMueP9zqJwqUaM90Nwd6559inBB107/BK3Ktb3b+37mMCstetIPB9e4EFpGMjhmnL/G81jS53ACWLXJYzt7mKU/fEsiW93MtaB+Le46OEC18y/4G8F7p/nnH7i0kO74ukxbnc4PlpiM7iWT6ra2Cyy+nzEgdXCNXywIxr05TbCQDwX6/NY8k7Hokgdfyz+1Pq3sX0yCcWRPaoB26YF12KYFQ== kieran.meinhardt@gmail.com";
wilde =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDyTnGhFq0Q+vghNhrqNrAyY+CsN7nNz8bPfiwIwNpjk kfm@wilde";
};
unstable = import <nixos-unstable> {};
unstable = import <nixos-unstable> { };
wtf-config = pkgs.writeText "config.yml" (builtins.toJSON {
wtf = {
colors = {
@@ -18,8 +21,8 @@ let
};
};
grid = {
columns = [40 54];
rows = [10 20];
columns = [ 40 54 ];
rows = [ 10 20 ];
};
refreshInterval = 1;
mods = {
@@ -107,34 +110,32 @@ in {
}));
};
}
{
services.keybase.enable = true;
}
{ services.keybase.enable = true; }
{
environment.systemPackages = [ pkgs.wtf ];
systemd.services.wtf = {
wantedBy = [ "multi-user.target" ];
script = "${pkgs.tmux}/bin/tmux new-session -d '${pkgs.wtf}/bin/wtf --config=${wtf-config}'";
script =
"${pkgs.tmux}/bin/tmux new-session -d '${pkgs.wtf}/bin/wtf --config=${wtf-config}'";
serviceConfig.Type = "oneshot";
};
}
/*
{
imports = [ <stockholm/krebs/3modules/urlwatch.nix> ];
/* {
imports = [ <stockholm/krebs/3modules/urlwatch.nix> ];
krebs.urlwatch = {
enable = true;
onCalendar = "*-*-* 05:00:00";
sendmail.enable = false;
telegram = {
enable = true;
chatId = [ "18980945" ];
botToken = lib.strings.fileContents <secrets/telegram/kmein.token>;
};
urls = [];
};
}
krebs.urlwatch = {
enable = true;
onCalendar = "*-*-* 05:00:00";
sendmail.enable = false;
telegram = {
enable = true;
chatId = [ "18980945" ];
botToken = lib.strings.fileContents <secrets/telegram/kmein.token>;
};
urls = [];
};
}
*/
];
@@ -147,19 +148,16 @@ in {
networking.wireless = {
enable = false;
networks.Aether = { pskRaw = "e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a"; };
networks.Aether = {
pskRaw =
"e1b18af54036c5c9a747fe681c6a694636d60a5f8450f7dec0d76bc93e2ec85a";
};
};
environment.variables.TERM = "linux";
environment.variables.HTOPRC = toString <niveum/dot/htoprc>;
environment.systemPackages = with pkgs; [
git
vim
htop
wget
reptyr
];
environment.systemPackages = with pkgs; [ git vim htop wget reptyr ];
users.mutableUsers = false;
users.users.me = {
@@ -168,7 +166,8 @@ in {
createHome = true;
group = "users";
extraGroups = [ "wheel" ];
hashedPassword = "$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
shell = pkgs.bash;
};
@@ -180,17 +179,11 @@ in {
passwordAuthentication = false;
};
users.users.root.openssh.authorizedKeys.keys = [
sshKey.homeros
sshKey.scardanelli
sshKey.wilde
];
users.users.root.openssh.authorizedKeys.keys =
[ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
users.users.me.openssh.authorizedKeys.keys = [
sshKey.homeros
sshKey.scardanelli
sshKey.wilde
];
users.users.me.openssh.authorizedKeys.keys =
[ sshKey.homeros sshKey.scardanelli sshKey.wilde ];
networking.retiolum = {
ipv4 = "10.243.2.3";

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,17 +1,13 @@
{ config, pkgs, ... }:
let
sshKey.rilke = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWRcTILWzSzOAWqwBjJC97K9wKm+pfxk15L5AiTUlUMyBzVQsU+d2jUEe1rmp+kjVXL0qgNMI+eBzEAzaafUMdCPeIkMyeiOlXaYxq8NHApcZUSYV9CmzWqePj8Dlu8uexoF3TJi6tj3mmGM8BY50qkwk4mlT/5xLPPnh/HHyFmoZlj6183Z4vJRnK8UZ6x2gevVaE36lP27MikZ/MQ6/PaHJ5TNZy63rQwzKXw6ZQMx4JU22CwyZqPn1wjlGEkpJFOBKtnypURdVBsPydaZd/I7b/13FMwso2hSUoXqeV6iaeno2FWOrB3cAaFogNWKPRkEacKEE5mQOvLGGdG1Xp u0_a138@localhost";
sshKey.rilke =
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDWRcTILWzSzOAWqwBjJC97K9wKm+pfxk15L5AiTUlUMyBzVQsU+d2jUEe1rmp+kjVXL0qgNMI+eBzEAzaafUMdCPeIkMyeiOlXaYxq8NHApcZUSYV9CmzWqePj8Dlu8uexoF3TJi6tj3mmGM8BY50qkwk4mlT/5xLPPnh/HHyFmoZlj6183Z4vJRnK8UZ6x2gevVaE36lP27MikZ/MQ6/PaHJ5TNZy63rQwzKXw6ZQMx4JU22CwyZqPn1wjlGEkpJFOBKtnypURdVBsPydaZd/I7b/13FMwso2hSUoXqeV6iaeno2FWOrB3cAaFogNWKPRkEacKEE5mQOvLGGdG1Xp u0_a138@localhost";
in {
imports = [
<niveum/configs/default.nix>
./hardware-configuration.nix
];
imports = [ <niveum/configs/default.nix> ./hardware-configuration.nix ];
services.xserver.xrandrHeads = [ "eDP1" ];
users.users.me.openssh.authorizedKeys.keys = [
sshKey.rilke
];
users.users.me.openssh.authorizedKeys.keys = [ sshKey.rilke ];
niveum = {
batteryBlocks.default = "BAT1";

View File

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

View File

@@ -6,7 +6,10 @@
./hardware-configuration.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" ];
environment.systemPackages = [ pkgs.tpacpi-bat ];
}

View File

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