treewide: fix deadnix errors

This commit is contained in:
Felix Buehler 2023-11-07 22:00:00 +01:00
parent a36dccb271
commit 46881de8eb
59 changed files with 70 additions and 93 deletions

View file

@ -61,7 +61,7 @@
# prevent rebuilding deploy-rs everytime when nixpkgs changes # prevent rebuilding deploy-rs everytime when nixpkgs changes
overlays = [ overlays = [
deploy-rs.overlay deploy-rs.overlay
(self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; }) (_self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; })
]; ];
}; };

View file

@ -1,7 +1,7 @@
{ self, lib, ... }: { self, ... }:
let let
inherit (self.inputs) nixos-generators nur; inherit (self.inputs) nixos-generators;
defaultModule = { ... }: { defaultModule = {
imports = [ imports = [
./base-config.nix ./base-config.nix
]; ];
@ -11,7 +11,6 @@ in
{ {
perSystem = perSystem =
{ pkgs { pkgs
, self'
, ... , ...
}: }:
{ {

View file

@ -10,7 +10,7 @@ let
disko disko
; ;
nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem; nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem;
overlay-unstable = final: prev: { overlay-unstable = final: _prev: {
unstable = import nixpkgs-unstable { unstable = import nixpkgs-unstable {
inherit (final) system; inherit (final) system;
config.allowUnfree = true; config.allowUnfree = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
{ {
# Packages # Packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -1,5 +1,4 @@
{ config, lib, pkgs, ... }: { ... }:
{ {
boot.initrd = { boot.initrd = {
availableKernelModules = [ availableKernelModules = [

View file

@ -1,5 +1,4 @@
{ config, lib, pkgs, ... }: { ... }:
{ {
networking.networkmanager = { networking.networkmanager = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, ... }: { config, pkgs, inputs, ... }:
{ {
nix = { nix = {
daemonCPUSchedPolicy = "idle"; daemonCPUSchedPolicy = "idle";

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, ... }:
{ {
sops.secrets."users/felix/password".neededForUsers = true; sops.secrets."users/felix/password".neededForUsers = true;
sops.secrets."users/felix/password" = { }; sops.secrets."users/felix/password" = { };

View file

@ -1,4 +1,4 @@
{ config, ... }: { ... }:
{ {
boot.loader = { boot.loader = {
timeout = 1; timeout = 1;

View file

@ -1,4 +1,4 @@
{ config, ... }: { ... }:
{ {
imports = [ imports = [
./boot.nix ./boot.nix

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, ... }:
let let
ifname = "ens18"; ifname = "ens18";

View file

@ -1,5 +1,5 @@
# Deployed services # Deployed services
{ config, lib, ... }: { config, ... }:
let let
secrets = config.sops.secrets; secrets = config.sops.secrets;
in in

View file

@ -1,8 +1,5 @@
# enabled system services # enabled system services
{ config, lib, ... }: { ... }:
let
secrets = config.sops.secrets;
in
{ {
my.system = { my.system = {
podman.enable = true; podman.enable = true;

View file

@ -1,4 +1,4 @@
{ config, ... }: { ... }:
{ {
imports = [ imports = [
./disko-config.nix ./disko-config.nix

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { ... }:
{ {
boot = { boot = {
loader = { loader = {

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { ... }:
{ {
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
8080 # aria 8080 # aria

View file

@ -1,5 +1,5 @@
# Deployed services # Deployed services
{ config, lib, ... }: { config, ... }:
let let
secrets = config.sops.secrets; secrets = config.sops.secrets;
in in

View file

@ -1,8 +1,5 @@
# enabled system services # enabled system services
{ config, lib, ... }: { ... }:
let
secrets = config.sops.secrets;
in
{ {
my.system = { my.system = {
avahi.enable = true; avahi.enable = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
sops.secrets."wifi/bismarck" = { sops.secrets."wifi/bismarck" = {
path = "/etc/NetworkManager/system-connections/Bismarck WLAN.nmconnection"; path = "/etc/NetworkManager/system-connections/Bismarck WLAN.nmconnection";

View file

@ -1,5 +1,4 @@
{ config, lib, pkgs, ... }: { ... }:
{ {
boot = { boot = {
loader = { loader = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { ... }:
{ {
imports = [ imports = [
./boot.nix ./boot.nix

View file

@ -1,4 +1,4 @@
{ config, lib, ... }: { ... }:
let let
cpuFlavor = "intel"; cpuFlavor = "intel";
in in

View file

@ -1,5 +1,5 @@
# network settings # network settings
{ config, lib, ... }: { ... }:
{ {
# hotfixes for dns settings # hotfixes for dns settings
networking.extraHosts = networking.extraHosts =

View file

@ -1,8 +1,5 @@
# enabled profiles # enabled profiles
{ config, lib, ... }: { ... }:
let
secrets = config.sops.secrets;
in
{ {
my.profiles = { my.profiles = {
"3d-design".enable = true; "3d-design".enable = true;

View file

@ -1,5 +1,5 @@
# Deployed services # Deployed services
{ config, lib, ... }: { config, ... }:
let let
secrets = config.sops.secrets; secrets = config.sops.secrets;
in in

View file

@ -1,8 +1,5 @@
# enabled system services # enabled system services
{ config, lib, ... }: { ... }:
let
secrets = config.sops.secrets;
in
{ {
my.system = { my.system = {
avahi.enable = true; avahi.enable = true;

View file

@ -1,6 +1,5 @@
# Hardware-related modules # Hardware-related modules
{ ... }: { ... }:
{ {
imports = [ imports = [
./bluetooth ./bluetooth

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.hardware.drive-monitor; cfg = config.my.hardware.drive-monitor;
in in

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.hardware.firmware; cfg = config.my.hardware.firmware;
in in

View file

@ -1,5 +1,5 @@
# manages and downloads subtitles # manages and downloads subtitles
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.bazarr; cfg = config.my.services.bazarr;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -2,7 +2,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.my.services.blackbox; cfg = config.my.services.blackbox;
domain = config.networking.domain;
blackBoxConfig = { blackBoxConfig = {
modules = { modules = {
http_2xx = { http_2xx = {

View file

@ -2,7 +2,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.my.services.blocky; cfg = config.my.services.blocky;
domain = config.networking.domain;
in in
{ {
options.my.services.blocky = with lib; { options.my.services.blocky = with lib; {

View file

@ -1,5 +1,5 @@
# running dyndns updates # running dyndns updates
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.dyndns; cfg = config.my.services.dyndns;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -73,7 +73,7 @@ in
}; };
''; '';
type = lib.types.attrsOf (lib.types.submodule ( type = lib.types.attrsOf (lib.types.submodule (
{ name, config, ... }: { { ... }: {
options = { options = {
# enable = lib.mkEnableOption "exportarr-${name}"; # enable = lib.mkEnableOption "exportarr-${name}";
port = lib.mkOption { port = lib.mkOption {
@ -119,7 +119,7 @@ in
config = lib.mkIf (cfg != { }) { config = lib.mkIf (cfg != { }) {
assertions = lib.mapAttrsToList assertions = lib.mapAttrsToList
(name: config: { (name: _config: {
assertion = builtins.elem name [ "sonarr" "radarr" "lidarr" "prowlarr" "readarr" "sabnzbd" ]; assertion = builtins.elem name [ "sonarr" "radarr" "lidarr" "prowlarr" "readarr" "sabnzbd" ];
message = "exportarr does not support this service."; message = "exportarr does not support this service.";
}) })

View file

@ -1,5 +1,5 @@
# My own personal homepage # My own personal homepage
{ config, lib, pkgs, inputs, ... }: { config, lib, inputs, ... }:
let let
cfg = config.my.services.homepage; cfg = config.my.services.homepage;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
{ {
options.webapps = { options.webapps = {
@ -124,6 +124,6 @@
}); });
} }
); );
my.services.blackbox.http_endpoints = lib.mapAttrsToList (key: value: value.dashboard.link) config.webapps.apps ++ [ "https://${config.networking.domain}/" ]; my.services.blackbox.http_endpoints = lib.mapAttrsToList (_key: value: value.dashboard.link) config.webapps.apps ++ [ "https://${config.networking.domain}/" ];
}; };
} }

View file

@ -1,5 +1,5 @@
# The Free Software Media System # The Free Software Media System
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.initrd-ssh; cfg = config.my.services.initrd-ssh;
in in

View file

@ -1,5 +1,5 @@
# manages and downloads films # manages and downloads films
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.jellyseerr; cfg = config.my.services.jellyseerr;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -2,7 +2,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.my.services.loki; cfg = config.my.services.loki;
domain = config.networking.domain;
in in
{ {
options.my.services.loki = with lib; { options.my.services.loki = with lib; {

View file

@ -1,8 +1,7 @@
# adjusted from: https://github.com/NixOS/nixos-org-configurations/blob/master/delft/eris/alertmanager-matrix-forwarder.nix # adjusted from: https://github.com/NixOS/nixos-org-configurations/blob/master/delft/eris/alertmanager-matrix-forwarder.nix
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.matrix-bot; cfg = config.my.services.matrix-bot;
domain = config.networking.domain;
in in
{ {
options.my.services.matrix-bot = with lib; { options.my.services.matrix-bot = with lib; {

View file

@ -2,7 +2,6 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, ... }:
let let
cfg = config.my.services.node-exporter; cfg = config.my.services.node-exporter;
domain = config.networking.domain;
in in
{ {
options.my.services.node-exporter = with lib; { options.my.services.node-exporter = with lib; {
@ -57,7 +56,7 @@ in
let let
inputsWithDate = lib.filterAttrs (_: input: input ? lastModified) inputs; inputsWithDate = lib.filterAttrs (_: input: input ? lastModified) inputs;
flakeAttrs = input: (lib.mapAttrsToList (n: v: ''${n}="${v}"'') flakeAttrs = input: (lib.mapAttrsToList (n: v: ''${n}="${v}"'')
(lib.filterAttrs (n: v: (builtins.typeOf v) == "string") input)); (lib.filterAttrs (_n: v: (builtins.typeOf v) == "string") input));
lastModified = name: input: '' lastModified = name: input: ''
flake_input_last_modified{input="${name}",${lib.concatStringsSep "," (flakeAttrs input)}} ${toString input.lastModified}''; flake_input_last_modified{input="${name}",${lib.concatStringsSep "," (flakeAttrs input)}} ${toString input.lastModified}'';
in in

View file

@ -1,5 +1,5 @@
# 3d-printing software # 3d-printing software
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.octoprint; cfg = config.my.services.octoprint;
in in
@ -9,7 +9,7 @@ in
plugins = mkOption { plugins = mkOption {
type = types.functionTo (types.listOf types.package); type = types.functionTo (types.listOf types.package);
default = plugins: [ ]; default = [ ];
defaultText = literalExpression "plugins: []"; defaultText = literalExpression "plugins: []";
example = literalExpression "plugins: with plugins; [ themeify stlviewer ]"; example = literalExpression "plugins: with plugins; [ themeify stlviewer ]";
description = lib.mdDoc "Additional plugins to be used. Available plugins are passed through the plugins input."; description = lib.mdDoc "Additional plugins to be used. Available plugins are passed through the plugins input.";

View file

@ -1,5 +1,5 @@
# document management system # document management system
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.paperless; cfg = config.my.services.paperless;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,5 +1,5 @@
# a password-generator using the marokov model # a password-generator using the marokov model
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.passworts; cfg = config.my.services.passworts;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,5 +1,5 @@
# self-hosted photo gallery # self-hosted photo gallery
{ config, pkgs, lib, ... }: { config, lib, ... }:
let let
cfg = config.my.services.photoprism; cfg = config.my.services.photoprism;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,5 +1,5 @@
# # log forwarding # # log forwarding
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.promtail; cfg = config.my.services.promtail;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,5 +1,5 @@
# manages indexes # manages indexes
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.prowlarr; cfg = config.my.services.prowlarr;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,5 +1,5 @@
# manages and downloads films # manages and downloads films
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.radarr; cfg = config.my.services.radarr;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,5 +1,5 @@
# manages and downloads series # manages and downloads series
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.sonarr; cfg = config.my.services.sonarr;
domain = config.networking.domain; domain = config.networking.domain;

View file

@ -1,5 +1,5 @@
# avahi related settings # avahi related settings
{ config, inputs, lib, options, pkgs, ... }: { config, lib, options, ... }:
let let
cfg = config.my.system.avahi; cfg = config.my.system.avahi;
in in

View file

@ -1,5 +1,5 @@
# Docker related settings # Docker related settings
{ config, inputs, lib, options, pkgs, ... }: { config, lib, options, pkgs, ... }:
let let
cfg = config.my.system.docker; cfg = config.my.system.docker;
in in

View file

@ -1,5 +1,5 @@
# Podman related settings # Podman related settings
{ config, inputs, lib, options, pkgs, ... }: { config, lib, options, pkgs, ... }:
let let
cfg = config.my.system.podman; cfg = config.my.system.podman;
in in

View file

@ -1,9 +1,9 @@
# overlays for nixpkgs # overlays for nixpkgs
self: super: _self: _super:
{ {
# freshrss = super.freshrss.overrideAttrs (old: { # freshrss = _super.freshrss.overrideAttrs (old: {
# version = "1.21.0"; # version = "1.21.0";
# src = super.fetchFromGitHub { # src = _super.fetchFromGitHub {
# owner = "FreshRSS"; # owner = "FreshRSS";
# repo = "FreshRSS"; # repo = "FreshRSS";
# rev = "1.21.0"; # rev = "1.21.0";

View file

@ -1,4 +1,4 @@
final: prev: final: _prev:
{ {
homer = final.callPackage ./homer { }; homer = final.callPackage ./homer { };
grafana-dashboards = final.callPackage ./grafana-dashboards { }; grafana-dashboards = final.callPackage ./grafana-dashboards { };

View file

@ -6,7 +6,7 @@ let
inherit (pkgs) stdenv fetchurl; inherit (pkgs) stdenv fetchurl;
in in
lib.makeScope pkgs.newScope (self: lib.makeScope pkgs.newScope (_self:
let let
buildGrafanaDashboard = args: stdenv.mkDerivation (args // { buildGrafanaDashboard = args: stdenv.mkDerivation (args // {
pname = "grafana-dashboard-${args.pname}-${toString args.id}"; pname = "grafana-dashboard-${args.pname}-${toString args.id}";
@ -38,7 +38,7 @@ in
pname = "node-systemd"; pname = "node-systemd";
version = "1"; version = "1";
hash = "sha256-MEWU5rIqlbaGu3elqdSoMZfbk67WDnH0VWuC8FqZ8v8="; hash = "sha256-MEWU5rIqlbaGu3elqdSoMZfbk67WDnH0VWuC8FqZ8v8=";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./node-systemd.json; # sadly only imported dashboards work src = ./node-systemd.json; # sadly only imported dashboards work
}); });
@ -54,7 +54,7 @@ in
pname = "nextcloud"; pname = "nextcloud";
version = "1"; version = "1";
hash = "sha256-Z28Q/sMg3jxglkszAs83IpL8f4p9loNnTQzjc3S/SAQ="; hash = "sha256-Z28Q/sMg3jxglkszAs83IpL8f4p9loNnTQzjc3S/SAQ=";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./nextcloud.json; # sadly only imported dashboards work src = ./nextcloud.json; # sadly only imported dashboards work
}); });
@ -70,7 +70,7 @@ in
pname = "navidrome"; pname = "navidrome";
version = "1"; version = "1";
hash = "sha256-MU890UAEI9wrnVIC/R0HkYwFa6mJ8Y7ESAWuaSQ8FQ8="; hash = "sha256-MU890UAEI9wrnVIC/R0HkYwFa6mJ8Y7ESAWuaSQ8FQ8=";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./navidrome.json; # sadly data source is not detected src = ./navidrome.json; # sadly data source is not detected
}); });
@ -80,7 +80,7 @@ in
pname = "hedgedoc"; pname = "hedgedoc";
version = "1"; version = "1";
hash = lib.fakeSha256; hash = lib.fakeSha256;
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./hedgedoc.json; # sadly data source is not detected src = ./hedgedoc.json; # sadly data source is not detected
}); });
@ -96,7 +96,7 @@ in
pname = "loki"; pname = "loki";
version = "1"; version = "1";
hash = "sha256-1sxTDSEwi2O/Ce+rWqqhMvsYEJeELBfkb9W2R6cDjcU="; hash = "sha256-1sxTDSEwi2O/Ce+rWqqhMvsYEJeELBfkb9W2R6cDjcU=";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./loki.json; # sadly not yet updated to latest grafana src = ./loki.json; # sadly not yet updated to latest grafana
}); });
@ -112,7 +112,7 @@ in
pname = "gitea"; pname = "gitea";
version = "1"; version = "1";
hash = "sha256-IAaI/HvMxcWE3PGQFK8avNjgj88DgcDvkWRcDAWSejM="; hash = "sha256-IAaI/HvMxcWE3PGQFK8avNjgj88DgcDvkWRcDAWSejM=";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./gitea.json; # sadly not yet updated to latest grafana src = ./gitea.json; # sadly not yet updated to latest grafana
}); });
@ -121,7 +121,7 @@ in
pname = "prometheus"; pname = "prometheus";
version = "2"; version = "2";
hash = "sha256-+nsi8/dYNvGVGV+ftfO1gSAQbO5GpZwW480T5mHMM4Q="; hash = "sha256-+nsi8/dYNvGVGV+ftfO1gSAQbO5GpZwW480T5mHMM4Q=";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./prometheus.json; # sadly only imported dashboards work src = ./prometheus.json; # sadly only imported dashboards work
}); });
@ -129,7 +129,7 @@ in
id = 3590; id = 3590;
pname = "grafana"; pname = "grafana";
version = "3"; version = "3";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./grafana.json; # sadly only imported dashboards work src = ./grafana.json; # sadly only imported dashboards work
}); });
@ -138,7 +138,7 @@ in
pname = "blackbox"; pname = "blackbox";
version = "1"; version = "1";
hash = "sha256-nnBFWFDAqKUqTOYxOrkRPlVla4ioQZ6rqEqakdzUj1Q="; hash = "sha256-nnBFWFDAqKUqTOYxOrkRPlVla4ioQZ6rqEqakdzUj1Q=";
}).overrideAttrs (self: super: { }).overrideAttrs (_: {
src = ./blackbox.json; # sadly only imported dashboards work src = ./blackbox.json; # sadly only imported dashboards work
}); });
}) })

View file

@ -1,5 +1,4 @@
# Configuration that spans across system and home, or are collections of modules # Configuration that spans across system and home, or are collections of modules
{ ... }:
{ {
imports = [ imports = [
./3d-design ./3d-design

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.profiles.sway-autostart; cfg = config.my.profiles.sway-autostart;
in in

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.profiles.sway-location; cfg = config.my.profiles.sway-location;
in in