Move more things to the common host configuration

This commit is contained in:
Oliver Davies 2024-12-30 17:43:49 +00:00
parent c5afed5767
commit 815ec0f429
9 changed files with 147 additions and 528 deletions

View file

@ -1,7 +1,13 @@
{
headless,
hostname,
inputs,
outputs,
pkgs,
self,
stateVersion,
system,
username,
...
}:
@ -10,7 +16,90 @@
inputs.home-manager.nixosModules.home-manager
outputs.nixosModules.default
./programs.nix
./users.nix
];
environment.systemPackages =
with pkgs;
[
fastfetch
mermaid-cli
mkcert
]
++ pkgs.lib.optionals (!headless) [
acpi
arandr
brightnessctl
cpufrequtils
libnotify
pmutils
ffmpegthumbnailer
libreoffice
logseq
shotwell
vscode
xfce.thunar
xfce.thunar-volman
xfce.tumbler
];
home-manager = {
extraSpecialArgs = {
inherit
hostname
inputs
outputs
headless
self
system
username
;
};
useGlobalPkgs = true;
useUserPackages = true;
users."${username}" = import "${self}/nix/home/${username}";
};
nixpkgs = {
config.allowUnfree = true;
overlays = [
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;
}

View file

@ -0,0 +1,8 @@
{
programs = {
zsh = {
enable = true;
histSize = 5000;
};
};
}

View file

@ -0,0 +1,20 @@
{ username, ... }:
{
users = {
users.${username} = {
isNormalUser = true;
description = "Oliver Davies";
extraGroups = [
"docker"
"networkmanager"
"wheel"
];
packages = [ ];
};
defaultUserShell = "/etc/profiles/per-user/${username}/bin/zsh";
};
}