refactor: simplify host config

This commit is contained in:
2026-04-05 16:01:08 +02:00
parent 2929a10d62
commit 0b79904103
8 changed files with 34 additions and 14 deletions

View File

@@ -9,5 +9,15 @@
name = lib.mkOption {
type = lib.types.str;
};
timezone = lib.mkOption {
type = lib.types.str;
default = "Europe/Brussels";
};
locale = lib.mkOption {
type = lib.types.str;
default = "en_US.UTF-8";
};
};
}

View File

@@ -1,4 +1,9 @@
{ config, lib, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.desktop;
@@ -16,6 +21,11 @@ in
config = {
programs.niri.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gnome ];
};
services = {
dbus.enable = true;
logind.settings.Login = {

View File

@@ -1,4 +1,6 @@
{ config, ... }:
{
time.timeZone = "Europe/Brussels";
i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = config.host.timezone;
i18n.defaultLocale = config.host.locale;
}

View File

@@ -1,11 +1,8 @@
{
hostName ? "nixos",
...
}:
{ config, ... }:
{
networking = {
inherit hostName;
hostName = config.host.name;
wireless.iwd.enable = true;
networkmanager.wifi.backend = "iwd";
nftables.enable = true;

View File

@@ -1,7 +1,9 @@
{ config, ... }:
{
users.users.h = {
users.users.${config.host.username} = {
isNormalUser = true;
description = "h";
description = config.host.username;
extraGroups = [ "wheel" ];
initialPassword = "h";
};