chore: reorganise common modules
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
eebd71f003
commit
7230527d95
13 changed files with 109 additions and 124 deletions
20
hosts/common/global/default.nix
Normal file
20
hosts/common/global/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# This config will be applied to all hosts
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.lix-module.nixosModules.default
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
|
||||
./locale.nix
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||
|
||||
networking.domain = "lndr.be";
|
||||
}
|
||||
21
hosts/common/global/locale.nix
Normal file
21
hosts/common/global/locale.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
time.timeZone = lib.mkDefault "Europe/Brussels";
|
||||
|
||||
location.provider = "geoclue2";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_BE.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_BE.UTF-8";
|
||||
LC_MEASUREMENT = "nl_BE.UTF-8";
|
||||
LC_MONETARY = "nl_BE.UTF-8";
|
||||
LC_NAME = "nl_BE.UTF-8";
|
||||
LC_NUMERIC = "nl_BE.UTF-8";
|
||||
LC_PAPER = "nl_BE.UTF-8";
|
||||
LC_TELEPHONE = "nl_BE.UTF-8";
|
||||
LC_TIME = "nl_BE.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
||||
31
hosts/common/optional/virt.nix
Normal file
31
hosts/common/optional/virt.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.dconf.enable = true;
|
||||
|
||||
users.users.lander.extraGroups = [ "libvirtd" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
win-spice
|
||||
gnome.adwaita-icon-theme
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
services.spice-vdagentd.enable = true;
|
||||
}
|
||||
19
hosts/common/optional/yubikey-gpg.nix
Normal file
19
hosts/common/optional/yubikey-gpg.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.ssh.startAgent = false;
|
||||
|
||||
services.pcscd.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = lib.mkForce false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-personalization
|
||||
yubioath-flutter
|
||||
];
|
||||
}
|
||||
20
hosts/common/users/lander/default.nix
Normal file
20
hosts/common/users/lander/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in
|
||||
{
|
||||
users.users.lander = {
|
||||
isNormalUser = true;
|
||||
description = "Lander";
|
||||
extraGroups = ifTheyExist [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
pkgs.home-manager
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.lander = import ../../../../home/lander/${config.networking.hostName}.nix;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue