Files
nixos-config/modules/nixos/default.nix
Christoph Schmatzler 298bbfae53 tabs
Signed-off-by: Christoph Schmatzler <christoph@schmatzler.com>
2025-11-02 11:36:27 +00:00

83 lines
1.3 KiB
Nix

{
pkgs,
nixvim,
user,
constants,
sops-nix,
...
}: {
imports = [
../core.nix
../syncthing.nix
../tailscale.nix
sops-nix.nixosModules.sops
];
security.sudo.enable = true;
system.stateVersion = constants.stateVersions.nixos;
time.timeZone = "UTC";
nix = {
settings.trusted-users = ["${user}"];
gc.dates = "weekly";
nixPath = ["nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos"];
};
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 42;
};
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelPackages = pkgs.linuxPackages_latest;
};
users.users = {
${user} = {
isNormalUser = true;
home = "/home/${user}";
extraGroups = [
"wheel"
"sudo"
"network"
"systemd-journal"
"docker"
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = constants.sshKeys;
};
root = {
openssh.authorizedKeys.keys = constants.sshKeys;
};
};
home-manager = {
useGlobalPkgs = true;
users.${user} = {
pkgs,
config,
lib,
...
}: {
_module.args = {inherit user constants;};
imports = [
nixvim.homeModules.nixvim
../home/default.nix
./home/default.nix
];
};
};
}