treewide: fixup stockholm lib, explicit dependencies and impure quirks

This commit is contained in:
makefu 2023-06-22 00:07:21 +02:00
parent b66365e722
commit 1c4b5c4174
12 changed files with 35 additions and 18 deletions

View file

@ -1,11 +1,13 @@
{ config, ... }:
# back up all state
let
sec = toString <secrets>;
sshkey = sec + "/borg.priv";
phrase = sec + "/borg.pw";
sshkey = config.sops.secrets."borg.priv".path;
phrase = config.sops.secrets."borg.pw".path;
in
{
sops.secrets."borg.priv" = {};
sops.secrets."borg.pw" = {};
services.borgbackup.jobs.state = {
repo = "borg-${config.krebs.build.host.name}@backup.makefu.r:.";
paths = config.state;

View file

@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }:
# TODO: remove tv lib :)
with import <stockholm/lib>;
{ config, lib, pkgs, stockholm, ... }:
with stockholm.lib;
let
repos = krebs-repos;

View file

@ -20,6 +20,8 @@
drawThickness=0
filenamePattern=%F_%T_shot
'';
users.users.${config.krebs.build.user.name}.packages = [ pkgs.clipit ];
systemd.user.services.clipit = {
Unit = {
Description = "clipboard manager";

View file

@ -2,7 +2,7 @@
{
users.users.makefu.packages = with pkgs;[ bat direnv clipit ];
users.users.makefu.packages = with pkgs;[ bat direnv ];
home-manager.users.makefu = {
programs.beets.enable = true;
programs.firefox = {
@ -23,5 +23,5 @@
"kjacjjdnoddnpbbcjilcajfhhbdhkpgk" # forest
];
};
};
}

View file

@ -1,4 +1,6 @@
{ config, ... }:
{
sops.secrets."nixos-community" = {};
nix = {
distributedBuilds = true;
buildMachines = [

View file

@ -1,4 +1,5 @@
{ config, ... }:
{
sops.defaultSopsFile = ../../secrets/common.yaml;
sops.defaultSopsFile = ../.. + "/secrets/${config.krebs.build.host.name}.yaml";
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
}

View file

@ -3,8 +3,14 @@
imports = [ ./default.nix ];
sops.secrets = {
"passwd/makefu".neededForUsers = true;
"passwd/root".neededForUsers = true;
"passwd/makefu" = {
neededForUsers = true;
sopsFile = ../../secrets/common.yaml;
};
"passwd/root" = {
neededForUsers = true;
sopsFile = ../../secrets/common.yaml;
};
};
users.users = {

View file

@ -1,5 +1,5 @@
{ config, lib, ... }:
with import <stockholm/lib>;
{ config, lib, stockholm, ... }:
with stockholm.lib;
let
base-dir = config.services.rtorrent.downloadDir;
in {

View file

@ -20,7 +20,7 @@
# nix related
nix-index
nix-review
brain
# brain
whatsupnix
nixpkgs-pytools
nixpkgs-fmt
@ -28,7 +28,7 @@
# git-related
git-preview
tig
(pkgs.callPackage ./init-host {})
# (pkgs.callPackage ./init-host {})
# used more than once
imagemagick
qrencode

View file

@ -5,7 +5,8 @@
# ./steam.nix
];
users.users.makefu.packages = with pkgs; [
games-user-env
# kaputt:
# games-user-env
wine
pkg2zip
steam

View file

@ -5,7 +5,8 @@
mosh
sshfs
rclone
(pkgs.callPackage ./secrets.nix {})
# (pkgs.callPackage ./secrets.nix {})
opensc pcsctools libu2f-host
];

View file

@ -31,6 +31,9 @@ in mkIf (hasAttr "wiregrill" config.krebs.build.host.nets) {
};
};
# host secret
sops.secrets."wiregrill.key" = {};
services.dnsmasq = mkIf isRouter {
enable = true;
resolveLocalQueries = false;
@ -87,7 +90,7 @@ in mkIf (hasAttr "wiregrill" config.krebs.build.host.nets) {
(optional (!isNull self.ip4) self.ip4.addr) ++
(optional (!isNull self.ip6) self.ip6.addr);
listenPort = self.wireguard.port;
privateKeyFile = (toString <secrets>) + "/wiregrill.key";
privateKeyFile = config.sops.secrets."wiregrill.key".path;
allowedIPsAsRoutes = true;
peers = mapAttrsToList
(_: host: {