nixos/modules/system/default.nix

56 lines
1.7 KiB
Nix
Raw Normal View History

2023-07-22 00:01:56 +08:00
inputs:
{
2023-09-02 14:04:03 +08:00
imports = inputs.localLib.mkModules
[
./nix.nix
2023-10-02 13:32:20 +08:00
./fileSystems
2023-09-02 14:54:37 +08:00
./grub.nix
2023-09-02 15:07:16 +08:00
./initrd.nix
2023-09-02 15:25:05 +08:00
./kernel.nix
./impermanence.nix
2023-09-02 21:03:23 +08:00
./gui.nix
2023-09-02 21:21:29 +08:00
./nixpkgs.nix
2023-09-02 22:27:26 +08:00
./networking
2023-09-02 21:39:01 +08:00
./systemd.nix
2023-09-02 21:47:12 +08:00
./security.nix
2023-09-02 22:11:08 +08:00
./sops.nix
2023-12-09 20:01:50 +08:00
./user.nix
2023-12-19 18:54:31 +08:00
./sysctl.nix
2023-09-02 14:04:03 +08:00
];
2023-09-01 21:05:26 +08:00
config =
2023-09-02 21:47:12 +08:00
{
2023-11-16 15:51:47 +08:00
services = { dbus.implementation = "broker"; fstrim = { enable = true; interval = "daily"; }; };
2023-09-02 21:47:12 +08:00
time.timeZone = "Asia/Shanghai";
boot =
{
supportedFilesystems = [ "ntfs" ];
consoleLogLevel = 7;
};
hardware.enableAllFirmware = true;
environment.sessionVariables = rec
{
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
# ANDROID_HOME = "${XDG_DATA_HOME}/android";
HISTFILE= "${XDG_STATE_HOME}/bash/history";
CUDA_CACHE_PATH = "${XDG_CACHE_HOME}/nv";
DOCKER_CONFIG = "${XDG_CONFIG_HOME}/docker";
GNUPGHOME = "${XDG_DATA_HOME}/gnupg";
GTK2_RC_FILES = "${XDG_CONFIG_HOME}/gtk-2.0/gtkrc";
XCOMPOSECACHE = "${XDG_CACHE_HOME}/X11/xcompose";
MATHEMATICA_USERBASE = "${XDG_CONFIG_HOME}/mathematica";
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java";
};
i18n =
2023-11-16 15:51:47 +08:00
{ defaultLocale = "C.UTF-8"; supportedLocales = [ "zh_CN.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "C.UTF-8/UTF-8" ]; };
2023-09-12 16:31:20 +08:00
users.mutableUsers = false;
2023-09-02 21:47:12 +08:00
# environment.pathsToLink = [ "/include" ];
# environment.variables.CPATH = "/run/current-system/sw/include";
# environment.variables.LIBRARY_PATH = "/run/current-system/sw/lib";
virtualisation.oci-containers.backend = "docker";
2023-09-18 05:45:56 +08:00
home-manager.sharedModules = [{ home.stateVersion = "22.11"; }];
2023-09-02 21:47:12 +08:00
};
2023-07-22 00:01:56 +08:00
}