Added top-level config.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
config = {
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
};
|
||||
}
|
||||
@@ -1,22 +1,24 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
i18n.defaultLocale = "${config.numbus.locale}.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "${config.numbus.locale}.UTF-8";
|
||||
LC_IDENTIFICATION = "${config.numbus.locale}.UTF-8";
|
||||
LC_MEASUREMENT = "${config.numbus.locale}.UTF-8";
|
||||
LC_MONETARY = "${config.numbus.locale}.UTF-8";
|
||||
LC_NAME = "${config.numbus.locale}.UTF-8";
|
||||
LC_NUMERIC = "${config.numbus.locale}.UTF-8";
|
||||
LC_PAPER = "${config.numbus.locale}.UTF-8";
|
||||
LC_TELEPHONE = "${config.numbus.locale}.UTF-8";
|
||||
LC_TIME = "${config.numbus.locale}.UTF-8";
|
||||
};
|
||||
config = {
|
||||
i18n.defaultLocale = "${config.numbus.locale}.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "${config.numbus.locale}.UTF-8";
|
||||
LC_IDENTIFICATION = "${config.numbus.locale}.UTF-8";
|
||||
LC_MEASUREMENT = "${config.numbus.locale}.UTF-8";
|
||||
LC_MONETARY = "${config.numbus.locale}.UTF-8";
|
||||
LC_NAME = "${config.numbus.locale}.UTF-8";
|
||||
LC_NUMERIC = "${config.numbus.locale}.UTF-8";
|
||||
LC_PAPER = "${config.numbus.locale}.UTF-8";
|
||||
LC_TELEPHONE = "${config.numbus.locale}.UTF-8";
|
||||
LC_TIME = "${config.numbus.locale}.UTF-8";
|
||||
};
|
||||
|
||||
console.keyMap = lib.toLower config.numbus.language;
|
||||
services.xserver.xkb = {
|
||||
layout = lib.toLower config.numbus.language;
|
||||
variant = "";
|
||||
console.keyMap = lib.toLower config.numbus.language;
|
||||
services.xserver.xkb = {
|
||||
layout = lib.toLower config.numbus.language;
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
+20
-18
@@ -5,24 +5,26 @@ let
|
||||
in
|
||||
|
||||
{
|
||||
systemd.services.hd-idle = {
|
||||
description = "External HD spin down daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
let
|
||||
idleTime = toString 1800;
|
||||
hardDriveParameter = lib.strings.concatMapStringsSep " " (x: "-a ${x} -i ${idleTime}") hardDrives;
|
||||
in
|
||||
"${pkgs.hd-idle}/bin/hd-idle -i 0 ${hardDriveParameter}";
|
||||
config = {
|
||||
systemd.services.hd-idle = {
|
||||
description = "External HD spin down daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
let
|
||||
idleTime = toString 1800;
|
||||
hardDriveParameter = lib.strings.concatMapStringsSep " " (x: "-a ${x} -i ${idleTime}") hardDrives;
|
||||
in
|
||||
"${pkgs.hd-idle}/bin/hd-idle -i 0 ${hardDriveParameter}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.autoaspm.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
boot.kernelParams = [
|
||||
"pcie_aspm=force"
|
||||
"consoleblank=60"
|
||||
];
|
||||
services.autoaspm.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
boot.kernelParams = [
|
||||
"pcie_aspm=force"
|
||||
"consoleblank=60"
|
||||
];
|
||||
};
|
||||
}
|
||||
+17
-15
@@ -1,21 +1,23 @@
|
||||
{ config, inputs, ... }:
|
||||
|
||||
{
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
allowReboot = false;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [ "--print-build-logs" ];
|
||||
dates = "02:00";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
config = {
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
allowReboot = false;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [ "--print-build-logs" ];
|
||||
dates = "02:00";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.settings.auto-optimise-store = true;
|
||||
};
|
||||
}
|
||||
@@ -9,7 +9,7 @@ let
|
||||
databaseVersion = "14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23";
|
||||
# Helper
|
||||
helper = import ./lib.nix { inherit config pkgs lib; };
|
||||
cfg = config.numbus.services.${name};
|
||||
cfg = config.numbus.services.immich;
|
||||
# Container configuration
|
||||
name = "immich";
|
||||
in
|
||||
@@ -29,7 +29,7 @@ helper.mkPodmanService {
|
||||
DB_HOSTNAME = "immich-database";
|
||||
UPLOAD_LOCATION = "${cfg.dataDir}";
|
||||
DB_DATA_LOCATION = "${cfg.configDir}/database";
|
||||
TZ = "${time.timeZone}";
|
||||
TZ = "${config.time.timeZone}";
|
||||
};
|
||||
dirPermissions = [
|
||||
"100999:users ${cfg.dataDir}"
|
||||
|
||||
Reference in New Issue
Block a user