nix run github:astro/deadnix

This commit is contained in:
Motiejus Jakštys 2023-09-30 17:06:41 +03:00
parent 305eba5d2e
commit 0e9f90a960
18 changed files with 16 additions and 30 deletions

View File

@ -48,7 +48,7 @@
system = "x86_64-linux";
overlays = [
deploy-rs.overlay
(self: super: {
(_self: super: {
deploy-rs = {
inherit (pkgsIA64) deploy-rs;
lib = super.deploy-rs.lib;
@ -60,7 +60,7 @@
system = "aarch64-linux";
overlays = [
deploy-rs.overlay
(self: super: {
(_self: super: {
deploy-rs = {
inherit (pkgsArm64) deploy-rs;
lib = super.deploy-rs.lib;
@ -225,7 +225,9 @@
};
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
checks = builtins.mapAttrs (_system: deployLib:
deployLib.deployChecks self.deploy)
deploy-rs.lib;
}
// flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};

View File

@ -1,6 +1,5 @@
{
config,
pkgs,
myData,
modulesPath,
...

View File

@ -1,6 +1,5 @@
{
config,
pkgs,
myData,
...
}: let

View File

@ -1,7 +1,5 @@
{
config,
pkgs,
lib,
myData,
...
}: let

View File

@ -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 {

View File

@ -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"];};
})

View File

@ -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;
};
}

View File

@ -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;
};
};

View File

@ -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;

View File

@ -1,6 +1,5 @@
{
config,
lib,
pkgs,
...
}: {

View File

@ -1,9 +1,4 @@
{
config,
lib,
pkgs,
...
}: {
{...}: {
imports = [
./borgstor
./certget

View File

@ -4,7 +4,6 @@
pkgs,
...
}: let
cfg = config.mj.services.deployerbot;
mkOptional = {
derivationTarget,
pingTarget,

View File

@ -1,7 +1,6 @@
{
config,
lib,
myData,
...
}: {
options.mj.services.friendlyport = with lib.types; {

View File

@ -1,7 +1,6 @@
{
config,
lib,
pkgs,
myData,
...
}: let

View File

@ -2,7 +2,6 @@
config,
lib,
pkgs,
myData,
...
}: {
options.mj.services.matrix-synapse = with lib.types; {

View File

@ -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"];

View File

@ -1,7 +1,6 @@
{
config,
lib,
pkgs,
myData,
...
}: let

View File

@ -3,7 +3,7 @@ let
motiejus_yk2 = "age1yubikey1qgyvs2ul0enzqf4sscq96zyxk73jnj4lknpemak2hp39lejdwc0s5uzzhpc";
motiejus_bk1 = "age1kyehn8yr9tfu3w0z4d9p9qrj0tjjh92ljxmz2nyr6xnm7y8kpv5spwwc9n";
motiejus_bk2 = "age14f39j0wx84n93lgqn6d9gcd3yhuwak6qwrxy8v83ydn7266uafts09ecva";
motiejus = [motiejus_yk1 motiejus_yk2 motiejus_bk1];
motiejus = [motiejus_yk1 motiejus_yk2 motiejus_bk1 motiejus_bk2];
fwminex = (import ./data.nix).hosts."fwminex.motiejus.jakst".publicKey;
fra1-a = (import ./data.nix).hosts."fra1-a.servers.jakst".publicKey;