Move common host configuration to a mixin

This commit is contained in:
Oliver Davies 2025-04-05 23:49:28 +01:00
parent 8a4222cd88
commit dd8c556963
9 changed files with 6 additions and 8 deletions

View file

@ -3,6 +3,7 @@
{
imports = [
../../modules/editor/nvim.nix
../../modules/mixins/common
../../modules/mixins/direnv.nix
../../modules/mixins/docker.nix
../../modules/mixins/fzf.nix
@ -15,7 +16,6 @@
./modules/notes.nix
./modules/wiki.nix
../common
../../users/opdavies
];

View file

@ -1,133 +0,0 @@
{
headless,
hostname,
inputs,
outputs,
pkgs,
self,
stateVersion,
system,
username,
...
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
./programs.nix
];
nix = {
settings = {
auto-optimise-store = true;
download-buffer-size = "104857600";
experimental-features = [
"nix-command"
"flakes"
];
warn-dirty = false;
};
};
users.defaultUserShell = pkgs.zsh;
environment.systemPackages =
with pkgs;
[
cryptsetup
fastfetch
mermaid-cli
mkcert
passmenu-otp
(pass.withExtensions (
e: with e; [
passExtensions.pass-audit
passExtensions.pass-import
passExtensions.pass-otp
passExtensions.pass-update
]
))
]
++ pkgs.lib.optionals (!headless) [
acpi
arandr
brightnessctl
cpufrequtils
libnotify
pmutils
ffmpegthumbnailer
hunspellDicts.en-gb-large
libreoffice
shotwell
vscode
];
home-manager = {
extraSpecialArgs = {
inherit
hostname
inputs
outputs
headless
self
system
username
;
};
useGlobalPkgs = true;
useUserPackages = true;
users."${username}" = import "${self}/home/${username}";
};
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [ "electron-27.3.11" ];
};
overlays = [
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;
}

View file

@ -1,16 +0,0 @@
{ pkgs, ... }:
{
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-qt;
};
zsh = {
enable = true;
histSize = 5000;
};
};
}

View file

@ -7,9 +7,9 @@
./programs.nix
./services.nix
../../modules/mixins/common
../../modules/mixins/zsh
../common
../../users/opdavies
../../users/eric
../../users/luke

View file

@ -10,6 +10,7 @@
./secrets.nix
./services.nix
../../modules/mixins/common
../../modules/mixins/docker.nix
../../modules/mixins/zsh
@ -21,7 +22,6 @@
./modules/jellyfin.nix
./modules/paperless.nix
../common
../../users/opdavies
];

View file

@ -9,6 +9,7 @@
../../modules/editor/nvim.nix
../../modules/mixins/bluetooth.nix
../../modules/mixins/common
../../modules/mixins/direnv.nix
../../modules/mixins/docker.nix
../../modules/mixins/flameshot.nix
@ -27,7 +28,6 @@
../../modules/profiles/dwm
../../modules/profiles/xbanish.nix
../common
../../users/opdavies
./modules/neomutt.nix

View file

@ -9,7 +9,8 @@
./services
./users.nix
../common
../../modules/mixins/common
../../users/opdavies
];