refactor: simplify host config
This commit is contained in:
@@ -31,7 +31,7 @@ in
|
|||||||
../../modules/firewall
|
../../modules/firewall
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
../../modules/gaming
|
../../modules/gaming
|
||||||
(import ../../modules/networking { hostName = config.host.name; })
|
../../modules/networking
|
||||||
../../modules/keyboard
|
../../modules/keyboard
|
||||||
../../modules/localization
|
../../modules/localization
|
||||||
../../modules/nvidia
|
../../modules/nvidia
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ in
|
|||||||
../../modules/backups
|
../../modules/backups
|
||||||
../../modules/bluetooth
|
../../modules/bluetooth
|
||||||
../../modules/keyboard
|
../../modules/keyboard
|
||||||
(import ../../modules/networking { hostName = config.host.name; })
|
../../modules/networking
|
||||||
../../modules/users
|
../../modules/users
|
||||||
../../modules/localization
|
../../modules/localization
|
||||||
../../modules/fonts
|
../../modules/fonts
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/boot/bootloader.nix
|
../../modules/boot/bootloader.nix
|
||||||
../../modules/keyboard
|
../../modules/keyboard
|
||||||
(import ../../modules/networking { hostName = config.host.name; })
|
../../modules/networking
|
||||||
../../modules/users
|
../../modules/users
|
||||||
../../modules/audio
|
../../modules/audio
|
||||||
../../modules/localization
|
../../modules/localization
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
inherit inputs config pkgs;
|
inherit inputs config pkgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.hostName = config.host.name;
|
|
||||||
ssh.username = config.host.username;
|
ssh.username = config.host.username;
|
||||||
|
|
||||||
secrets.username = config.host.username;
|
secrets.username = config.host.username;
|
||||||
|
|||||||
@@ -9,5 +9,15 @@
|
|||||||
name = lib.mkOption {
|
name = lib.mkOption {
|
||||||
type = lib.types.str;
|
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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.desktop;
|
cfg = config.desktop;
|
||||||
@@ -16,6 +21,11 @@ in
|
|||||||
config = {
|
config = {
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = true;
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gnome ];
|
||||||
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
logind.settings.Login = {
|
logind.settings.Login = {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
time.timeZone = "Europe/Brussels";
|
time.timeZone = config.host.timezone;
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = config.host.locale;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
{
|
{ config, ... }:
|
||||||
hostName ? "nixos",
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
inherit hostName;
|
hostName = config.host.name;
|
||||||
wireless.iwd.enable = true;
|
wireless.iwd.enable = true;
|
||||||
networkmanager.wifi.backend = "iwd";
|
networkmanager.wifi.backend = "iwd";
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
users.users.h = {
|
users.users.${config.host.username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "h";
|
description = config.host.username;
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
initialPassword = "h";
|
initialPassword = "h";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user