nix run github:astro/deadnix
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
...
|
||||
}: let
|
||||
cfg = config.zfs-root.fileSystems;
|
||||
inherit (lib) mkIf types mkDefault mkOption mkMerge mapAttrsToList;
|
||||
inherit (lib) types mkDefault mkOption mkMerge mapAttrsToList;
|
||||
in {
|
||||
options.zfs-root.fileSystems = {
|
||||
datasets = mkOption {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
};
|
||||
extraArgs = ["--verbose"];
|
||||
datasets = let
|
||||
fs_zfs = lib.filterAttrs (n: v: v.fsType == "zfs") config.fileSystems;
|
||||
fs_zfs = lib.filterAttrs (_: v: v.fsType == "zfs") config.fileSystems;
|
||||
mountpoint2fs =
|
||||
builtins.listToAttrs
|
||||
(map (mountpoint: {
|
||||
@@ -32,7 +32,7 @@
|
||||
})
|
||||
config.mj.base.snapshot.mountpoints);
|
||||
s_datasets =
|
||||
lib.mapAttrs' (mountpoint: fs: {
|
||||
lib.mapAttrs' (_mountpoint: fs: {
|
||||
name = fs.device;
|
||||
value = {use_template = ["prod"];};
|
||||
})
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
};
|
||||
programs.mosh.enable = true;
|
||||
programs.ssh.knownHosts = let
|
||||
sshAttrs = lib.genAttrs ["extraHostNames" "publicKey"] (name: null);
|
||||
sshAttrs = lib.genAttrs ["extraHostNames" "publicKey"] (_: null);
|
||||
in
|
||||
lib.mapAttrs (name: cfg: builtins.intersectAttrs sshAttrs cfg) myData.hosts;
|
||||
lib.mapAttrs (_name: cfg: builtins.intersectAttrs sshAttrs cfg) myData.hosts;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
passwd.motiejus or {};
|
||||
|
||||
root = assert lib.assertMsg (passwd ? root) "root password needs to be defined";
|
||||
lib.filterAttrs (n: v: v != null) passwd.root;
|
||||
lib.filterAttrs (_: v: v != null) passwd.root;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
mkPreHook = mountpoint: zfs_name: i: ''
|
||||
mkPreHook = zfs_name: i: ''
|
||||
set -x
|
||||
sleep ${toString i}
|
||||
mkdir "$RUNTIME_DIRECTORY/snapshot"
|
||||
@@ -79,7 +79,7 @@ in {
|
||||
extraArgs = "--remote-path=borg1";
|
||||
compression = "auto,lzma";
|
||||
startAt = attrs.backup_at;
|
||||
preHook = mkPreHook mountpoint fs.device i;
|
||||
preHook = mkPreHook fs.device i;
|
||||
prune.keep = {
|
||||
within = "1d";
|
||||
daily = 7;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{...}: {
|
||||
imports = [
|
||||
./borgstor
|
||||
./certget
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.mj.services.deployerbot;
|
||||
mkOptional = {
|
||||
derivationTarget,
|
||||
pingTarget,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
myData,
|
||||
...
|
||||
}: {
|
||||
options.mj.services.friendlyport = with lib.types; {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myData,
|
||||
...
|
||||
}: let
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myData,
|
||||
...
|
||||
}: {
|
||||
options.mj.services.matrix-synapse = with lib.types; {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
}: let
|
||||
cfg = config.mj.services.nsd-acme;
|
||||
mkHook = zone: let
|
||||
rc = config.services.nsd.remoteControl;
|
||||
fullZone = "_acme-endpoint.${zone}";
|
||||
in
|
||||
pkgs.writeShellScript "nsd-acme-hook" ''
|
||||
@@ -188,7 +187,7 @@ in {
|
||||
systemd.timers =
|
||||
lib.mapAttrs'
|
||||
(
|
||||
zone: cfg:
|
||||
zone: _:
|
||||
lib.nameValuePair "nsd-acme-${zone}" {
|
||||
description = "nsd-acme for zone ${zone}";
|
||||
wantedBy = ["timers.target"];
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myData,
|
||||
...
|
||||
}: let
|
||||
|
||||
Reference in New Issue
Block a user