nix-config/hosts/common/default.nix

113 lines
1.8 KiB
Nix
Raw Normal View History

{
hostname,
inputs,
outputs,
pkgs,
self,
stateVersion,
system,
username,
...
}:
{
imports = [
./users
inputs.home-manager.nixosModules.home-manager
outputs.nixosModules.default
];
nix = {
settings = {
auto-optimise-store = true;
2025-03-15 11:30:07 +00:00
download-buffer-size = "104857600";
experimental-features = [
"nix-command"
"flakes"
];
warn-dirty = false;
};
};
2025-04-06 00:45:11 +01:00
programs.zsh.enable = true;
2025-01-01 19:01:51 +00:00
users.defaultUserShell = pkgs.zsh;
2025-04-06 00:23:37 +01:00
environment.systemPackages = with pkgs; [
cryptsetup
fastfetch
mermaid-cli
mkcert
];
home-manager = {
2025-04-21 15:46:01 +01:00
backupFileExtension = "backup";
extraSpecialArgs = {
inherit
hostname
inputs
outputs
self
system
username
;
};
useGlobalPkgs = true;
useUserPackages = true;
2025-04-06 01:03:53 +01:00
users."${username}" = import ./home.nix;
};
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [ "electron-27.3.11" ];
};
overlays = [
2025-02-13 22:53:24 +00:00
inputs.nur.overlays.default
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.stable-packages
];
};
nix.extraOptions = ''
trusted-users = root ${username}
'';
networking.hostName = hostname;
time.timeZone = "Europe/London";
i18n = {
defaultLocale = "en_GB.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
};
console.keyMap = "uk";
security.sudo.wheelNeedsPassword = false;
system.stateVersion = stateVersion;
}