mirror of
https://github.com/kmein/niveum
synced 2026-03-25 14:01:06 +01:00
Compare commits
21 Commits
af0bd29cd5
...
feature/ha
| Author | SHA1 | Date | |
|---|---|---|---|
| eafc87415a | |||
| 1e37581325 | |||
| c63cb4d157 | |||
| 88257e9ffb | |||
| b9d0258132 | |||
| 53bbc65716 | |||
| e76489b6d8 | |||
|
|
f4e2885b86 | ||
| 07f5d25e96 | |||
| b5e9fd73e0 | |||
| 34687dde21 | |||
| 4ce7c7a91a | |||
|
|
9db408226b | ||
| 8ea79b574b | |||
| bcb0878765 | |||
| 365aa29897 | |||
| cfb782da7f | |||
| e721abeb6c | |||
| 249e8c016d | |||
| 3be3410baa | |||
|
|
9f0cb708f2 |
@@ -12,7 +12,6 @@
|
||||
in {
|
||||
imports = [
|
||||
inputs.self.nixosModules.system-dependent
|
||||
inputs.self.nixosModules.traadfri
|
||||
inputs.self.nixosModules.power-action
|
||||
{
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
@@ -286,12 +285,12 @@ in {
|
||||
./sound.nix
|
||||
./sudo.nix
|
||||
./tmux.nix
|
||||
./traadfri.nix
|
||||
./unclutter.nix
|
||||
./vscode.nix
|
||||
./watson.nix
|
||||
./zsh.nix
|
||||
./tor.nix
|
||||
./stw-berlin.nix
|
||||
./mastodon-bot.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
defaultOptions = ["--height=40%"];
|
||||
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||
changeDirWidgetOptions = [
|
||||
"--preview '${pkgs.tree}/bin/tree -L 1 {}'"
|
||||
"--preview='${pkgs.tree}/bin/tree -L 1 {}'"
|
||||
"--bind=space:toggle-preview"
|
||||
"--preview-window=hidden"
|
||||
];
|
||||
fileWidgetCommand = defaultCommand;
|
||||
fileWidgetOptions = ["--preview 'head -$LINES {}'"];
|
||||
fileWidgetOptions = ["--preview='head -$LINES {}'"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -212,11 +212,7 @@ in {
|
||||
"${modifier}+r" = "mode resize";
|
||||
"${modifier}+v" = "split v";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+q" = "exec ${pkgs.writers.writeDash "newsboat-sync" ''
|
||||
notify-send --app-name="newsboat" "Updating ..."
|
||||
newsboat -x reload
|
||||
notify-send --app-name="newsboat" "Finished updating."
|
||||
''}";
|
||||
"${modifier}+q" = "exec ${config.services.clipmenu.package}/bin/clipmenu";
|
||||
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
startAt = "weekly";
|
||||
serviceConfig = {
|
||||
user = "kfm";
|
||||
WorkingDirectory = "/home/kfm/cloud/Seafile/Books/Germanistik/LB";
|
||||
WorkingDirectory = "/home/kfm/cloud/nextcloud/Books/Germanistik/LB";
|
||||
};
|
||||
script = ''
|
||||
first_year=2019
|
||||
|
||||
@@ -275,7 +275,7 @@ in {
|
||||
libreoffice
|
||||
# gnumeric
|
||||
dia
|
||||
pandoc
|
||||
unstablePackages.pandoc
|
||||
niveumPackages.man-pandoc
|
||||
typst
|
||||
# proselint
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
dictionaries = {
|
||||
@@ -148,6 +149,7 @@
|
||||
sha256 = "1pk234pbq4pk55d8sjk0pp9j5sajm82f8804kf2xm2x5p387q1rg";
|
||||
};
|
||||
};
|
||||
coptic.dictionary = inputs.coptic-dictionary.packages.x86_64-linux.coptic-stardict;
|
||||
russian = {
|
||||
LingvoGermanRussian = pkgs.fetchzip {
|
||||
url = "http://download.huzheng.org/lingvo/stardict-GR-LingvoUniversal-2.4.2.tar.bz2";
|
||||
@@ -313,6 +315,7 @@ in {
|
||||
(makeStardict "sd-russian" dictionaries.russian)
|
||||
(makeStardict "sd" dictionaries.englishGerman)
|
||||
(makeStardict "jbo" dictionaries.lojban)
|
||||
(makeStardict "cop" dictionaries.coptic)
|
||||
(makeStardict "sd-turkish" dictionaries.turkish)
|
||||
];
|
||||
}
|
||||
|
||||
51
configs/stw-berlin.nix
Normal file
51
configs/stw-berlin.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
age.secrets.stw-berlin-card-code.file = ../secrets/stw-berlin-card-code.age;
|
||||
|
||||
systemd.services.stw-berlin = {
|
||||
enable = true;
|
||||
wants = ["network-online.target"];
|
||||
startAt = "weekly";
|
||||
serviceConfig = {
|
||||
user = "kfm";
|
||||
WorkingDirectory = "/home/kfm/cloud/nextcloud/Uni/Meta/Mensa";
|
||||
LoadCredential = [
|
||||
"password:${config.age.secrets.stw-berlin-card-code.path}"
|
||||
];
|
||||
};
|
||||
script = ''
|
||||
KARTEN_ID=8071859
|
||||
PASSWORT=$(cat "$CREDENTIALS_DIRECTORY"/password)
|
||||
|
||||
endpoint=https://ks.stw.berlin:4433/TL1/TLM/KASVC
|
||||
authorization_header='Authorization: Basic S0FTVkM6ekt2NXlFMUxaVW12VzI5SQ=='
|
||||
|
||||
get_auth_token() {
|
||||
${pkgs.curl}/bin/curl -sSL "$endpoint/LOGIN?karteNr=$KARTEN_ID&format=JSON&datenformat=JSON" \
|
||||
-X POST \
|
||||
-H "$authorization_header" \
|
||||
--data-raw '{"BenutzerID":"'$KARTEN_ID'","Passwort":"'$PASSWORT'"}' \
|
||||
| ${pkgs.jq}/bin/jq -r '.[0].authToken|@uri'
|
||||
}
|
||||
|
||||
|
||||
get_transactions() {
|
||||
${pkgs.curl}/bin/curl -sSL "$endpoint/TRANS?format=JSON&authToken=$(get_auth_token)&karteNr=$KARTEN_ID&datumVon=12.02.2018&datumBis=$(date -d tomorrow +%d.%m.%Y)" \
|
||||
-H "$authorization_header" \
|
||||
| ${pkgs.jq}/bin/jq
|
||||
}
|
||||
|
||||
get_items() {
|
||||
${pkgs.curl}/bin/curl -sSL "$endpoint/TRANSPOS?format=JSON&authToken=$(get_auth_token)&karteNr=$KARTEN_ID&datumVon=12.02.2018&datumBis=$(date -d tomorrow +%d.%m.%Y)" \
|
||||
-H "$authorization_header" \
|
||||
| ${pkgs.jq}/bin/jq
|
||||
}
|
||||
|
||||
get_transactions > transactions-$(date -I).json
|
||||
get_items > items-$(date -I).json
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib) localAddresses;
|
||||
living-room-id = 131090;
|
||||
in {
|
||||
environment.systemPackages = [
|
||||
(pkgs.writers.writeDashBin "traadfri-party" ''
|
||||
while true; do
|
||||
for color in $(traadfri colours | shuf); do
|
||||
echo "$color"
|
||||
traadfri group "''${2:-${toString living-room-id}}" --on --colour="$color"
|
||||
sleep "''${1:-2}"
|
||||
done
|
||||
done
|
||||
'')
|
||||
];
|
||||
|
||||
age.secrets.traadfri-key = {
|
||||
file = ../secrets/traadfri-key.age;
|
||||
owner = config.users.users.me.name;
|
||||
group = config.users.users.me.group;
|
||||
mode = "400";
|
||||
};
|
||||
|
||||
niveum.traadfri = {
|
||||
enable = true;
|
||||
user = "kmein";
|
||||
host = localAddresses.tradfri;
|
||||
keyFile = config.age.secrets.traadfri-key.path;
|
||||
rooms = {
|
||||
corridor = 131080;
|
||||
kitchen = 131081;
|
||||
bedroom = 131082;
|
||||
living-room = living-room-id;
|
||||
bedside = 131087;
|
||||
chain = 131089;
|
||||
};
|
||||
};
|
||||
}
|
||||
112
flake.lock
generated
112
flake.lock
generated
@@ -58,6 +58,27 @@
|
||||
"url": "https://cgit.krebsco.de/blessings"
|
||||
}
|
||||
},
|
||||
"coptic-dictionary": {
|
||||
"inputs": {
|
||||
"kellia-dictionary": "kellia-dictionary",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1691406669,
|
||||
"narHash": "sha256-8QKnoDfdQuy2ODnCi6NNUv+wewONseGEH1QAvzA7io0=",
|
||||
"owner": "kmein",
|
||||
"repo": "coptic-dictionary",
|
||||
"rev": "7316ef7a4264afa65c96a2e089845c79fa25f19c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kmein",
|
||||
"repo": "coptic-dictionary",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -101,11 +122,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"lastModified": 1692799911,
|
||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -152,11 +173,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687871164,
|
||||
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
|
||||
"lastModified": 1692099905,
|
||||
"narHash": "sha256-/pSusGhmIdSdAaywQRFA5dVbfdIzlWQTecM+E46+cJ0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
|
||||
"rev": "2a6679aa9cc3872c29ba2a57fe1b71b3e3c5649f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -166,6 +187,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kellia-dictionary": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1660946774,
|
||||
"narHash": "sha256-7C+vE1hvo9OfonmBVT1as6c8rZeLf8f4nEsELwnUPXc=",
|
||||
"owner": "KELLIA",
|
||||
"repo": "dictionary",
|
||||
"rev": "4fe62847e93b8a87ad7ca5de19190b34ff9e0c99",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "KELLIA",
|
||||
"repo": "dictionary",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"menstruation-backend": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
@@ -290,11 +327,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1690558459,
|
||||
"narHash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=",
|
||||
"lastModified": 1692986144,
|
||||
"narHash": "sha256-M4VFpy7Av9j+33HF5nIGm0k2+DXXW4qSSKdidIKg5jY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33",
|
||||
"rev": "74e5bdc5478ebbe7ba5849f0d765f92757bb9dbf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -338,11 +375,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1690696720,
|
||||
"narHash": "sha256-GCt5xPBXZZjZv7LAgdnk3Ddi/0JVz4H0WIA0IKsP0C4=",
|
||||
"lastModified": 1693094031,
|
||||
"narHash": "sha256-PyPWn5/WzryKDKuuiJJ8cd1BJCenhjbaicYQbwRM9Ao=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4b4b4cf51b42616bc2de1c8fb92ec6a7ba862071",
|
||||
"rev": "38b9aaf6682015f1d2fc7b7f48da96992c30cfa3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -431,11 +468,11 @@
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1690695647,
|
||||
"narHash": "sha256-9l2fuu/8QnSDOAmyuvsYJsN1U63akWPxcK4W4V6vxr4=",
|
||||
"lastModified": 1693082793,
|
||||
"narHash": "sha256-di/x+vrMYmjSHabbiuPi6EZ0m6HoPXOVtA7ugU3rVZM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "612e4e11ca96d2c205053a74ab3949c516a7e4ec",
|
||||
"rev": "0f81f016eecec153a26099beb25b0c8bac87bd23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -470,11 +507,11 @@
|
||||
},
|
||||
"retiolum": {
|
||||
"locked": {
|
||||
"lastModified": 1690585210,
|
||||
"narHash": "sha256-2AvPueR/Ma5keG0vAjKn9jEb6Yu3xVV+7SE6kQRXb+k=",
|
||||
"lastModified": 1691992809,
|
||||
"narHash": "sha256-qUTsMDSV2L5t6Oj+L60n0KQKbvOhak3+d6++h9AZJPg=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "6c500ce24e1234d498e4da9718065ce154579192",
|
||||
"revCount": 313,
|
||||
"rev": "6216c30551876303dac5373e92690a7f05fd0f6f",
|
||||
"revCount": 315,
|
||||
"type": "git",
|
||||
"url": "https://git.thalheim.io/Mic92/retiolum"
|
||||
},
|
||||
@@ -486,6 +523,7 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"coptic-dictionary": "coptic-dictionary",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"menstruation-backend": "menstruation-backend",
|
||||
@@ -503,7 +541,6 @@
|
||||
"stylix": "stylix",
|
||||
"telebots": "telebots",
|
||||
"tinc-graph": "tinc-graph",
|
||||
"traadfri": "traadfri",
|
||||
"voidrice": "voidrice",
|
||||
"wallpaper-generator": "wallpaper-generator",
|
||||
"wallpapers": "wallpapers"
|
||||
@@ -519,11 +556,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690683485,
|
||||
"narHash": "sha256-Sp/QpbMg86v12xhCsa6q0yTH8LYaJIcxzbf9LO1zFzM=",
|
||||
"lastModified": 1693015707,
|
||||
"narHash": "sha256-SFr93DYn502sVT9nB5U8/cKg1INyEk/jCeq8tHioz7Y=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "05d480a7aef1aae1bfb67a39134dcf48c5322528",
|
||||
"rev": "e90223633068a44f0fb62374e0fa360ccc987292",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -644,37 +681,14 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"traadfri": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs-old"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1677165914,
|
||||
"narHash": "sha256-3N08NabgDwTUy1n5wxpT27iddFrgXW35E1x2UgAKkDQ=",
|
||||
"owner": "kmein",
|
||||
"repo": "traadfri",
|
||||
"rev": "11571116ed5d2c6478c615d663d1f96f57a97ba9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kmein",
|
||||
"repo": "traadfri",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"voidrice": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1690153564,
|
||||
"narHash": "sha256-WezWBUnEesneqeX7Z9zkbnVHhIIbt25mpSutezLDpVU=",
|
||||
"lastModified": 1692950210,
|
||||
"narHash": "sha256-0RHvrinkg8LEV/aGnT2n9MNOwaf2ke/YAXRIipZiT2w=",
|
||||
"owner": "Lukesmithxyz",
|
||||
"repo": "voidrice",
|
||||
"rev": "d8a8970715070f73bcb6333e3fe851b6802ac702",
|
||||
"rev": "86f05abcce1fd270032975775adb40040c746cfe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
13
flake.nix
13
flake.nix
@@ -3,6 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
coptic-dictionary.url = "github:kmein/coptic-dictionary";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||
menstruation-backend.url = "github:kmein/menstruation.rs";
|
||||
@@ -20,13 +21,13 @@
|
||||
stylix.url = "github:danth/stylix/release-23.05";
|
||||
telebots.url = "github:kmein/telebots";
|
||||
tinc-graph.url = "github:kmein/tinc-graph";
|
||||
traadfri.url = "github:kmein/traadfri";
|
||||
voidrice.url = "github:Lukesmithxyz/voidrice";
|
||||
wallpaper-generator.url = "github:pinpox/wallpaper-generator/v1.1";
|
||||
wallpapers.url = "github:kmein/wallpapers";
|
||||
|
||||
agenix.inputs.home-manager.follows = "home-manager";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
coptic-dictionary.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
menstruation-backend.inputs.flake-utils.follows = "flake-utils";
|
||||
menstruation-backend.inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -49,8 +50,6 @@
|
||||
tinc-graph.inputs.flake-utils.follows = "flake-utils";
|
||||
tinc-graph.inputs.nixpkgs.follows = "nixpkgs";
|
||||
tinc-graph.inputs.rust-overlay.follows = "rust-overlay";
|
||||
traadfri.inputs.flake-utils.follows = "flake-utils";
|
||||
traadfri.inputs.nixpkgs.follows = "nixpkgs-old";
|
||||
voidrice.flake = false;
|
||||
wallpaper-generator.inputs.flake-utils.follows = "flake-utils";
|
||||
wallpapers.flake = false;
|
||||
@@ -80,7 +79,7 @@
|
||||
mock-secrets = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "mock-secrets" ''
|
||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f > secrets.txt
|
||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
|
||||
'');
|
||||
};
|
||||
deploy = {
|
||||
@@ -107,7 +106,6 @@
|
||||
power-action = import modules/power-action.nix;
|
||||
system-dependent = import modules/system-dependent.nix;
|
||||
telegram-bot = import modules/telegram-bot.nix;
|
||||
traadfri = import modules/traadfri.nix;
|
||||
};
|
||||
|
||||
lib = {
|
||||
@@ -279,6 +277,9 @@
|
||||
})
|
||||
];
|
||||
};
|
||||
unstablePackages = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
};
|
||||
wrapScript = {
|
||||
packages ? [],
|
||||
name,
|
||||
@@ -332,7 +333,7 @@
|
||||
mpv-radio = pkgs.callPackage packages/mpv-radio.nix {di-fm-key-file = "/dev/null";};
|
||||
mpv-tuner = pkgs.callPackage packages/mpv-tuner.nix {di-fm-key-file = "/dev/null";};
|
||||
mpv-tv = pkgs.callPackage packages/mpv-tv.nix {};
|
||||
mpv-visualizer = pkgs.callPackage packages/mpv-visualizer.nix {};
|
||||
mpv-visualizer = unstablePackages.mpvScripts.visualizer;
|
||||
new-mac = pkgs.callPackage packages/new-mac.nix {};
|
||||
nix-git = pkgs.callPackage packages/nix-git.nix {};
|
||||
nix-index-update = pkgs.callPackage packages/nix-index-update.nix {inherit system;};
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
android = "192.168.178.35";
|
||||
manakish = "192.168.178.29";
|
||||
|
||||
tradfri = "192.168.178.28";
|
||||
officejet = "192.168.178.27";
|
||||
fritzbox = "192.168.178.1";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
print(vim.g.snippet_directory)
|
||||
if vim.g.snippet_directory then
|
||||
require("luasnip.loaders.from_vscode").lazy_load({
|
||||
paths = { vim.g.snippet_directory }
|
||||
@@ -44,8 +43,6 @@ cmp.setup({
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
}, {
|
||||
--{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.niveum.traadfri;
|
||||
in {
|
||||
options.niveum.traadfri = {
|
||||
enable = mkEnableOption "Trådfri CLI";
|
||||
user = mkOption {type = types.str;};
|
||||
host = mkOption {type = types.str;};
|
||||
keyFile = mkOption {type = types.path;};
|
||||
rooms = mkOption {
|
||||
type = types.attrsOf types.int;
|
||||
default = {};
|
||||
};
|
||||
bulbs = mkOption {
|
||||
type = types.attrsOf types.int;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages =
|
||||
[
|
||||
(pkgs.writers.writeDashBin "traadfri" ''
|
||||
export TRAADFRI_USER="${cfg.user}"
|
||||
export TRAADFRI_KEY="$(cat ${lib.escapeShellArg cfg.keyFile})"
|
||||
export TRAADFRI_HUB="${cfg.host}"
|
||||
${inputs.traadfri.defaultPackage.x86_64-linux}/bin/traadfri $@
|
||||
'')
|
||||
]
|
||||
++ lib.mapAttrsToList (name: value:
|
||||
pkgs.writers.writeDashBin "traadfri-${name}" ''
|
||||
exec traadfri --target Room ${toString value} "$@"
|
||||
'')
|
||||
cfg.rooms
|
||||
++ lib.mapAttrsToList (name: value:
|
||||
pkgs.writers.writeDashBin "traadfri-${name}" ''
|
||||
exec traadfri --target Bulb ${toString value} "$@"
|
||||
'')
|
||||
cfg.bulbs;
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
curl,
|
||||
xclip,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "visualizer";
|
||||
version = "unstable-2021-07-10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mfcc64";
|
||||
repo = "mpv-scripts";
|
||||
rev = "a0cd87eeb974a4602c5d8086b4051b5ab72f42e1";
|
||||
sha256 = "1xgd1nd117lpj3ppynhgaa5sbkfm7l8n6c9a2fy8p07is2dkndrq";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/mpv/scripts
|
||||
cp visualizer.lua $out/share/mpv/scripts
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.scriptName = "visualizer.lua";
|
||||
|
||||
meta = with lib; {
|
||||
description = "various audio visualization";
|
||||
homepage = "https://github.com/mfcc64/mpv-scripts";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [kmein];
|
||||
};
|
||||
}
|
||||
2
secrets
2
secrets
Submodule secrets updated: aaefa9ed14...9efd6ac7e1
121
secrets.txt
121
secrets.txt
@@ -1,65 +1,66 @@
|
||||
secrets/di-fm-key.age
|
||||
secrets/email-password-meinhark.age
|
||||
secrets/kabsa-retiolum-privateKey-ed25519.age
|
||||
secrets/makanek-specus-privateKey.age
|
||||
secrets/manakish-retiolum-privateKey-rsa.age
|
||||
secrets/kfm-password.age
|
||||
secrets/email-password-fysi.age
|
||||
secrets/github-token-i3status-rust.age
|
||||
secrets/nextcloud-password-admin.age
|
||||
secrets/zaatar-retiolum-privateKey-ed25519.age
|
||||
secrets/manakish-syncthing-cert.age
|
||||
secrets/telegram-token-betacode.age
|
||||
secrets/tabula-retiolum-privateKey-rsa.age
|
||||
secrets/zaatar-ympd-basicAuth.age
|
||||
secrets/zaatar-moodle-dl-basicAuth.age
|
||||
secrets/mega-password.age
|
||||
secrets/telegram-token-reverse.age
|
||||
secrets/email-password-meinhaki.age
|
||||
secrets/spotify-password.age
|
||||
secrets/telegram-token-kmein.age
|
||||
secrets/maxmind-license-key.age
|
||||
secrets/makanek-retiolum-privateKey-rsa.age
|
||||
secrets/spotify-username.age
|
||||
secrets/onlyoffice-jwt-key.age
|
||||
secrets/miniflux-credentials.age
|
||||
secrets/email-password-fsklassp.age
|
||||
secrets/kabsa-retiolum-privateKey-rsa.age
|
||||
secrets/traadfri-key.age
|
||||
secrets/tahina-retiolum-privateKey-rsa.age
|
||||
secrets/makanek-retiolum-privateKey-ed25519.age
|
||||
secrets/zaatar-retiolum-privateKey-rsa.age
|
||||
secrets/kabsa-specus-privateKey.age
|
||||
secrets/email-password-meinhak99.age
|
||||
secrets/nextcloud-password-kieran.age
|
||||
secrets/ful-root.age
|
||||
secrets/manakish-syncthing-key.age
|
||||
secrets/email-password-dslalewa.age
|
||||
secrets/zaatar-moodle-dl-tokens.json.age
|
||||
secrets/tabula-retiolum-privateKey-ed25519.age
|
||||
secrets/tahina-retiolum-privateKey-ed25519.age
|
||||
secrets/cifs-credentials-hu-berlin.age
|
||||
secrets/kabsa-syncthing-key.age
|
||||
secrets/hetzner-storagebox-credentials.age
|
||||
secrets/ful-retiolum-privateKey-rsa.age
|
||||
secrets/ful-retiolum-privateKey-ed25519.age
|
||||
secrets/zaatar-syncthing-key.age
|
||||
secrets/openweathermap-api-key.age
|
||||
secrets/secrets.nix
|
||||
secrets/email-password-cock.age
|
||||
secrets/telegram-token-nachtischsatan.age
|
||||
secrets/kabsa-syncthing-cert.age
|
||||
secrets/grafana-password-admin.age
|
||||
secrets/email-password-posteo.age
|
||||
secrets/manakish-retiolum-privateKey-ed25519.age
|
||||
secrets/restic.age
|
||||
secrets/home-assistant-token.age
|
||||
secrets/zaatar-syncthing-cert.age
|
||||
secrets/nextcloud-password-database.age
|
||||
secrets/telegram-token-menstruation.age
|
||||
secrets/alertmanager-token-reporters.age
|
||||
secrets/blackboard-calendar-ics.age
|
||||
secrets/cifs-credentials-hu-berlin.age
|
||||
secrets/di-fm-key.age
|
||||
secrets/email-password-cock.age
|
||||
secrets/email-password-dslalewa.age
|
||||
secrets/email-password-fsklassp.age
|
||||
secrets/email-password-fysi.age
|
||||
secrets/email-password-meinhak99.age
|
||||
secrets/email-password-meinhaki.age
|
||||
secrets/email-password-meinhark.age
|
||||
secrets/email-password-posteo.age
|
||||
secrets/ful-retiolum-privateKey-ed25519.age
|
||||
secrets/ful-retiolum-privateKey-rsa.age
|
||||
secrets/ful-root.age
|
||||
secrets/ful-specus-privateKey.age
|
||||
secrets/github-token-i3status-rust.age
|
||||
secrets/grafana-password-admin.age
|
||||
secrets/hetzner-storagebox-credentials.age
|
||||
secrets/home-assistant-token.age
|
||||
secrets/kabsa-retiolum-privateKey-ed25519.age
|
||||
secrets/kabsa-retiolum-privateKey-rsa.age
|
||||
secrets/kabsa-specus-privateKey.age
|
||||
secrets/kabsa-syncthing-cert.age
|
||||
secrets/kabsa-syncthing-key.age
|
||||
secrets/kfm-password.age
|
||||
secrets/ledger-basicAuth.age
|
||||
secrets/makanek-retiolum-privateKey-ed25519.age
|
||||
secrets/makanek-retiolum-privateKey-rsa.age
|
||||
secrets/makanek-specus-privateKey.age
|
||||
secrets/manakish-retiolum-privateKey-ed25519.age
|
||||
secrets/manakish-retiolum-privateKey-rsa.age
|
||||
secrets/manakish-syncthing-cert.age
|
||||
secrets/manakish-syncthing-key.age
|
||||
secrets/maxmind-license-key.age
|
||||
secrets/mega-password.age
|
||||
secrets/miniflux-credentials.age
|
||||
secrets/nextcloud-password-admin.age
|
||||
secrets/nextcloud-password-database.age
|
||||
secrets/nextcloud-password-fysi.age
|
||||
secrets/weechat-sec.conf.age
|
||||
secrets/nextcloud-password-kieran.age
|
||||
secrets/onlyoffice-jwt-key.age
|
||||
secrets/openweathermap-api-key.age
|
||||
secrets/restic.age
|
||||
secrets/secrets.nix
|
||||
secrets/spotify-password.age
|
||||
secrets/spotify-username.age
|
||||
secrets/stw-berlin-card-code.age
|
||||
secrets/tabula-retiolum-privateKey-ed25519.age
|
||||
secrets/tabula-retiolum-privateKey-rsa.age
|
||||
secrets/tahina-retiolum-privateKey-ed25519.age
|
||||
secrets/tahina-retiolum-privateKey-rsa.age
|
||||
secrets/telegram-token-betacode.age
|
||||
secrets/telegram-token-kmein.age
|
||||
secrets/telegram-token-menstruation.age
|
||||
secrets/telegram-token-nachtischsatan.age
|
||||
secrets/telegram-token-proverb.age
|
||||
secrets/telegram-token-reverse.age
|
||||
secrets/weechat-sec.conf.age
|
||||
secrets/zaatar-moodle-dl-basicAuth.age
|
||||
secrets/zaatar-moodle-dl-tokens.json.age
|
||||
secrets/zaatar-retiolum-privateKey-ed25519.age
|
||||
secrets/zaatar-retiolum-privateKey-rsa.age
|
||||
secrets/zaatar-syncthing-cert.age
|
||||
secrets/zaatar-syncthing-key.age
|
||||
secrets/zaatar-ympd-basicAuth.age
|
||||
|
||||
@@ -11,6 +11,7 @@ in {
|
||||
./matomo.nix
|
||||
./radio.nix
|
||||
./panoptikon.nix
|
||||
./ledger.nix
|
||||
../../configs/monitoring.nix
|
||||
../../configs/tor.nix
|
||||
../../configs/save-space.nix
|
||||
|
||||
54
systems/ful/ledger.nix
Normal file
54
systems/ful/ledger.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.hledger-web = {
|
||||
enable = true;
|
||||
capabilities = {
|
||||
add = true;
|
||||
view = true;
|
||||
manage = false;
|
||||
};
|
||||
serveApi = false; # serve only the JSON API
|
||||
baseUrl = "https://ledger.kmein.de";
|
||||
journalFiles = [
|
||||
"privat.journal"
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services.hledger-backup = {
|
||||
enable = true;
|
||||
startAt = "hourly";
|
||||
wants = ["network-online.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
script = ''
|
||||
${pkgs.git}/bin/git config user.name "hledger-web"
|
||||
${pkgs.git}/bin/git config user.email "hledger-web@${config.networking.hostName}"
|
||||
${pkgs.git}/bin/git commit -am $(date -Ih)
|
||||
${pkgs.git}/bin/git pull --rebase
|
||||
${pkgs.git}/bin/git push
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = "hledger";
|
||||
Group = "hledger";
|
||||
WorkingDirectory = config.services.hledger-web.stateDir;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets = {
|
||||
ledger-basicAuth = {
|
||||
file = ../../secrets/ledger-basicAuth.age;
|
||||
owner = "nginx";
|
||||
group = "nginx";
|
||||
mode = "400";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."ledger.kmein.de" = {
|
||||
enableACME = true;
|
||||
basicAuthFile = config.age.secrets.ledger-basicAuth.path;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.hledger-web.port}";
|
||||
};
|
||||
}
|
||||
@@ -16,17 +16,6 @@ in {
|
||||
http_port = 9444;
|
||||
http_addr = "127.0.0.1";
|
||||
};
|
||||
smtp = let
|
||||
inherit (import ../../../lib/email.nix {inherit lib;}) cock;
|
||||
address = builtins.split "@" cock.user;
|
||||
in {
|
||||
enabled = true;
|
||||
from_address = cock.address;
|
||||
password = "$__file{${config.age.secrets.email-password-cock.path}}";
|
||||
user = cock.user;
|
||||
host = cock.smtpSettings cock.smtp;
|
||||
startTLS_policy = "MandatoryStartTLS";
|
||||
};
|
||||
dashboards.default_home_dashboard_path = toString ./grafana-dashboards/niveum.json;
|
||||
security = {
|
||||
admin_user = "admin";
|
||||
@@ -258,6 +247,12 @@ in {
|
||||
group = "prometheus";
|
||||
mode = "440";
|
||||
};
|
||||
home-assistant-token = {
|
||||
file = ../../../secrets/home-assistant-token.age;
|
||||
owner = "prometheus";
|
||||
group = "prometheus";
|
||||
mode = "440";
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus.alertmanagers = [
|
||||
@@ -326,6 +321,14 @@ in {
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "home_assistant";
|
||||
scrape_interval = "60s";
|
||||
metrics_path = "/api/prometheus";
|
||||
scheme = "http";
|
||||
static_configs = [{targets = ["zaatar.r:8123"];}];
|
||||
bearer_token_file = config.age.secrets.home-assistant-token.path;
|
||||
}
|
||||
{
|
||||
job_name = "ful";
|
||||
static_configs = [
|
||||
|
||||
@@ -80,22 +80,8 @@ in {
|
||||
|
||||
logLevel = 2;
|
||||
|
||||
extraOptions = let
|
||||
inherit (import ../../lib/email.nix {inherit lib;}) cock;
|
||||
address = builtins.split "@" cock.user;
|
||||
in {
|
||||
extraOptions = {
|
||||
defaultapp = "files";
|
||||
mail_smtpmode = "smtp";
|
||||
mail_sendmailmode = "smtp";
|
||||
mail_smtphost = cock.smtp;
|
||||
mail_smtpport = "587";
|
||||
mail_from_address = builtins.elemAt address 0;
|
||||
mail_domain = builtins.elemAt address 2;
|
||||
mail_smtpsecure = "tls";
|
||||
mail_smtpauthtype = "LOGIN";
|
||||
mail_smtpauth = 1;
|
||||
mail_smtpname = cock.user;
|
||||
# mail_smtppassword = cock.password; # TODO how to do this?
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{config, ...}: let
|
||||
port = 8123;
|
||||
inherit (import ../../lib) restic;
|
||||
influxPort = 9100;
|
||||
volumeName = "home-assistant.bak";
|
||||
in {
|
||||
networking.firewall.allowedTCPPorts = [port];
|
||||
networking.firewall.allowedTCPPorts = [port influxPort];
|
||||
|
||||
services.nginx.virtualHosts."home.kmein.r" = {
|
||||
locations."/" = {
|
||||
@@ -11,6 +12,13 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
services.influxdb = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
http.bind-address = ":${toString influxPort}";
|
||||
};
|
||||
};
|
||||
|
||||
services.restic.backups.niveum = {
|
||||
initialize = true;
|
||||
inherit (restic) repository;
|
||||
|
||||
Reference in New Issue
Block a user