diff --git a/modules/core/nixos.nix b/modules/core/nixos.nix new file mode 100644 index 0000000..5eed0ad --- /dev/null +++ b/modules/core/nixos.nix @@ -0,0 +1,25 @@ +{ + self, + pkgs, + lib, + inputs, + ... +}: +{ + nix = { + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; + }; + }; + + programs.nix-ld = { + enable = true; + libraries = with pkgs; [ ]; + }; + + services.envfs.enable = true; + + system.stateVersion = "24.05"; +} diff --git a/modules/core/system.nix b/modules/core/system.nix index c4c5e0b..08cdebd 100644 --- a/modules/core/system.nix +++ b/modules/core/system.nix @@ -3,35 +3,30 @@ pkgs, lib, inputs, + system, ... }: { + imports = + (lib.optionals (system == "x64_64-linux") [ (import ./i18n.nix) ]) + ++ (lib.optionals (system == "aarch64-linux") [ (import ./i18n.nix) ]) + ++ (lib.optionals (system == "x64_64-linux") [ (import ./nixos.nix) ]) + ++ (lib.optionals (system == "aarch64-linux") [ (import ./nixos.nix) ]); + nix = { settings = { - download-buffer-size = 67108864; # Set buffer size to 64MB for large downloads - allowed-users = [ "@wheel" ]; - auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" ]; + download-buffer-size = 67108864; # Set buffer size to 64MB for large downloads + allowed-users = [ "@wheel" ]; # substituters = [ "http://violet.booping.local" ]; # trusted-public-keys = [ "violet.booping.local:2gshN3xfGSL7eKFc8tGkqSoIb3WQxuB2RJ8DuakLLqc=%" ]; }; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; + optimise.automatic = true; }; - programs.nix-ld = { - enable = true; - libraries = with pkgs; [ ]; - }; - - services.envfs.enable = true; - nixpkgs = { overlays = [ self.overlays.default @@ -42,9 +37,9 @@ nixpkgs.config = { allowUnfree = true; permittedInsecurePackages = [ - "jitsi-meet-1.0.8043" - "olm-3.2.16" - "libsoup-2.74.3" + # "jitsi-meet-1.0.8043" + # "olm-3.2.16" + # "libsoup-2.74.3" ]; overlays = [ self.overlays.default @@ -53,8 +48,6 @@ ]; }; - # powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - # Font packages environment.systemPackages = with pkgs; [ noto-fonts-cjk-sans @@ -62,14 +55,8 @@ ipaexfont ]; - i18n.defaultLocale = "en_US.UTF-8"; - i18n.supportedLocales = [ - "en_US.UTF-8/UTF-8" - "ja_JP.UTF-8/UTF-8" - ]; time.timeZone = lib.mkDefault "Europe/Amsterdam"; environment.variables = { LC_TIME = "C.UTF-8"; }; - system.stateVersion = "24.05"; }