Move common host configuration to a mixin
This commit is contained in:
parent
8a4222cd88
commit
dd8c556963
9 changed files with 6 additions and 8 deletions
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
};
|
||||
|
||||
zsh = {
|
||||
enable = true;
|
||||
histSize = 5000;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -7,9 +7,9 @@
|
|||
./programs.nix
|
||||
./services.nix
|
||||
|
||||
../../modules/mixins/common
|
||||
../../modules/mixins/zsh
|
||||
|
||||
../common
|
||||
../../users/opdavies
|
||||
../../users/eric
|
||||
../../users/luke
|
||||
|
|
|
@ -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
|
||||
];
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
./services
|
||||
./users.nix
|
||||
|
||||
../common
|
||||
../../modules/mixins/common
|
||||
|
||||
../../users/opdavies
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue