1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 11:31:09 +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";