fix: fix some module configs

This commit is contained in:
Dmitriy Kholkin 2025-06-07 17:35:07 +03:00
parent 1b90d0ff0f
commit e8445e20ad
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
4 changed files with 23 additions and 17 deletions

View File

@ -118,10 +118,10 @@ in
requires = [ cfg.eraseOnBoot.waitForDevice ]; requires = [ cfg.eraseOnBoot.waitForDevice ];
after = [ cfg.eraseOnBoot.waitForDevice ]; after = [ cfg.eraseOnBoot.waitForDevice ];
before = [ "sysroot.mount" ]; before = [ "sysroot.mount" ];
path = [ path = with pkgs; [
pkgs.btrfs-progs btrfs-progs
pkgs.coreutils coreutils
pkgs.util-linuxMinimal.mount util-linuxMinimal.mount
]; ];
unitConfig.DefaultDependencies = "no"; unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";

View File

@ -69,6 +69,10 @@ in
}; };
}; };
boot.kernelParams = [
"zfs.metaslab_lba_weighting_enabled=0"
];
services.zfs = { services.zfs = {
autoScrub.enable = true; autoScrub.enable = true;
autoScrub.interval = "monthly"; autoScrub.interval = "monthly";

View File

@ -3,13 +3,12 @@ let
inherit (lib) mkDefault mkEnableOption mkIf; inherit (lib) mkDefault mkEnableOption mkIf;
cfg = config.ataraxia.defaults.locale; cfg = config.ataraxia.defaults.locale;
c = "C.UTF-8";
dk = "en_DK.UTF-8"; dk = "en_DK.UTF-8";
gb = "en_GB.UTF-8"; gb = "en_GB.UTF-8";
ie = "en_IE.UTF-8"; ie = "en_IE.UTF-8";
ru = "ru_RU.UTF-8"; ru = "ru_RU.UTF-8";
us = "en_US.UTF-8"; us = "en_US.UTF-8";
lang = "en_IE:en_US:en:C:ru_RU"; lang = "en_US:en:C:ru_RU:ru";
in in
{ {
options.ataraxia.defaults.locale = { options.ataraxia.defaults.locale = {
@ -17,10 +16,8 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.sessionVariables = { # Locale
XKB_DEFAULT_LAYOUT = "us,ru"; i18n.defaultCharset = "UTF-8";
XKB_DEFAULT_OPTIONS = "grp:win_space_toggle";
};
i18n.defaultLocale = ie; i18n.defaultLocale = ie;
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
LANGUAGE = lang; LANGUAGE = lang;
@ -31,14 +28,18 @@ in
LC_PAPER = ru; LC_PAPER = ru;
LC_TELEPHONE = ru; LC_TELEPHONE = ru;
}; };
i18n.supportedLocales = map (x: "${x}/UTF-8") [ i18n.extraLocales = map (x: "${x}/${config.i18n.defaultCharset}") [
c
dk
gb gb
ie
ru
us us
]; ];
# Keyboard layout
console.earlySetup = true;
console.useXkbConfig = true;
services.xserver.xkb = {
layout = "us,ru";
options = "grp:win_space_toggle";
};
# Timezone
time.timeZone = mkDefault "Europe/Moscow"; time.timeZone = mkDefault "Europe/Moscow";
}; };
} }

View File

@ -41,7 +41,7 @@ in
ataraxia.defaults.users.enable = mkDefault true; ataraxia.defaults.users.enable = mkDefault true;
persist.enable = mkDefault true; persist.enable = mkDefault true;
persist.cache.clean.enable = true; persist.cache.clean.enable = mkDefault true;
# Do not compress journal logs if using native fs compression # Do not compress journal logs if using native fs compression
services.journald.extraConfig = mkIf fsCompression (mkDefault "Compress=false"); services.journald.extraConfig = mkIf fsCompression (mkDefault "Compress=false");
@ -56,7 +56,8 @@ in
zramSwap = { zramSwap = {
enable = true; enable = true;
algorithm = "zstd"; algorithm = "zstd";
memoryPercent = 100; priority = mkDefault 100;
memoryPercent = mkDefault 50;
}; };
}; };
serverRole = recursiveUpdate baseRole { serverRole = recursiveUpdate baseRole {