Files
nixos/modules/nix-config/default.nix
T
2026-04-25 20:58:14 +02:00

99 lines
2.0 KiB
Nix

{
pkgs,
currentSystemUser,
currentSystemDe,
config,
...
}:
{
imports = [
./caches.nix
./hardware.nix
./keyboard.nix
./security.nix
./services.nix
]
++ (
if (currentSystemDe != "none") then
[
./de.nix
./fonts.nix
./sound.nix
]
else
[ ]
);
xdg.portal = {
enable = true;
config = {
common = {
default = [
"gnome"
"gtk"
];
"org.freedesktop.impl.portal.ScreenCast" = "gnome";
"org.freedesktop.impl.portal.Screenshot" = "gnome";
"org.freedesktop.impl.portal.RemoteDesktop" = "gnome";
};
};
xdgOpenUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-gnome
];
};
time.timeZone = "Europe/Rome";
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "it_IT.UTF-8";
LC_IDENTIFICATION = "it_IT.UTF-8";
LC_MEASUREMENT = "it_IT.UTF-8";
LC_MONETARY = "it_IT.UTF-8";
LC_NAME = "it_IT.UTF-8";
LC_NUMERIC = "it_IT.UTF-8";
LC_PAPER = "it_IT.UTF-8";
LC_TELEPHONE = "it_IT.UTF-8";
LC_TIME = "it_IT.UTF-8";
};
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # Use Wayland when possible (this does not seem to work)
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
GOPATH = "$HOME/.go";
};
programs.fish.enable = true; # This must be true before initializing my user
users.users.${currentSystemUser} = {
isNormalUser = true;
description = "Patrick Canal";
shell = pkgs.fish;
hashedPasswordFile = config.sops.secrets.user_password.path;
extraGroups = [
"networkmanager"
"wheel"
"docker"
"libvirtd"
];
};
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
trusted-users = [
"root"
currentSystemUser
];
};
documentation.man.cache.enable = false;
}