mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-03-19 07:40:30 +01:00
feat: move nixos-specific modules to their own module that is dynamically imported
This commit is contained in:
parent
0ec2828d3e
commit
6bd255f636
2 changed files with 38 additions and 26 deletions
25
modules/core/nixos.nix
Normal file
25
modules/core/nixos.nix
Normal file
|
|
@ -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";
|
||||
}
|
||||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue