From 1add39aae00699e0dbba8b468d65eed1c30da4a6 Mon Sep 17 00:00:00 2001 From: Fabian Montero Date: Mon, 2 Dec 2024 14:57:33 -0600 Subject: [PATCH] re-order configuration --- sys/modules/graphics.nix | 10 ++++--- sys/platforms/posixlycorrect/default.nix | 36 +++++++++++++----------- sys/platforms/vps/default.nix | 28 +++++++++--------- 3 files changed, 40 insertions(+), 34 deletions(-) diff --git a/sys/modules/graphics.nix b/sys/modules/graphics.nix index 98fa94a..31493c4 100644 --- a/sys/modules/graphics.nix +++ b/sys/modules/graphics.nix @@ -11,10 +11,12 @@ in { enable = mkEnableOption "graphics settings"; }; config = mkIf cfg.enable { - services.xserver = { - enable = true; - xkb.layout = "us"; #TODO - displayManager.startx.enable = true; #TODO maybe crear un modulo para ly? + services = { + xserver = { + enable = true; + xkb.layout = "us"; #TODO + displayManager.startx.enable = true; #TODO maybe crear un modulo para ly? + }; libinput.enable = true; }; diff --git a/sys/platforms/posixlycorrect/default.nix b/sys/platforms/posixlycorrect/default.nix index 3d36e3b..b2182a3 100644 --- a/sys/platforms/posixlycorrect/default.nix +++ b/sys/platforms/posixlycorrect/default.nix @@ -22,24 +22,26 @@ androidSupport.enable = true; }; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.tmp.useTmpfs = true; - boot.kernelPackages = pkgs.linuxPackages_latest; + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + tmp.useTmpfs = true; + kernelPackages = pkgs.linuxPackages_latest; + }; - networking.hostName = "posixlycorrect"; - networking.networkmanager.enable = true; + networking = { + hostName = "posixlycorrect"; + networkmanager.enable = true; - # Set your time zone. - time.timeZone = "America/Costa_Rica"; - - # The global useDHCP flag is deprecated, therefore explicitly set to false here. - # Per-interface useDHCP will be mandatory in the future, so this generated config - # replicates the default behaviour. - networking.useDHCP = false; - networking.interfaces.enp7s0.useDHCP = true; - networking.interfaces.wlp6s0.useDHCP = true; + # The global useDHCP flag is deprecated, therefore explicitly set to false here. + # Per-interface useDHCP will be mandatory in the future, so this generated config + # replicates the default behaviour. + useDHCP = false; + interfaces.enp7s0.useDHCP = true; + interfaces.wlp6s0.useDHCP = true; + }; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; @@ -54,4 +56,6 @@ }; groups.fabian.gid = 1002; }; + + time.timeZone = "America/Costa_Rica"; } diff --git a/sys/platforms/vps/default.nix b/sys/platforms/vps/default.nix index 6cb9c72..bc4d279 100644 --- a/sys/platforms/vps/default.nix +++ b/sys/platforms/vps/default.nix @@ -17,6 +17,20 @@ with lib; { baseline.enable = true; }; + networking.hostName = "vps"; + + users = { + users.fabian = { + isNormalUser = true; + uid = 1000; + group = "fabian"; + shell = pkgs.zsh; + extraGroups = ["users" "wheel" "networkmanager" "dialout" "libvirtd"]; + openssh.authorizedKeys.keyFiles = [public_files/pki/fabian.ssh]; + }; + groups.fabian.gid = 1000; + }; + services.openssh = { settings.PasswordAuthentication = false; }; @@ -36,20 +50,6 @@ with lib; { }; }; - networking.hostName = "vps"; - - users = { - users.fabian = { - isNormalUser = true; - uid = 1000; - group = "fabian"; - shell = pkgs.zsh; - extraGroups = ["users" "wheel" "networkmanager" "dialout" "libvirtd"]; - openssh.authorizedKeys.keyFiles = [public_files/pki/fabian.ssh]; - }; - groups.fabian.gid = 1000; - }; - systemd.extraConfig = '' DefaultTimeoutStartSec=900s '';