From cd02abbf62430110cf9fd1afcea1d5925b393d64 Mon Sep 17 00:00:00 2001
From: Thiago Sposito
Date: Thu, 15 Jan 2026 14:30:45 -0300
Subject: [PATCH] fix: Nixcloud correct configuration for the host
---
hosts/Nixcloud/default.nix | 86 +++++++++++++----------
hosts/Nixcloud/hardware-configuration.nix | 16 ++---
hosts/Nixcloud/networking.nix | 6 +-
3 files changed, 58 insertions(+), 50 deletions(-)
diff --git a/hosts/Nixcloud/default.nix b/hosts/Nixcloud/default.nix
index e2670e3..6440f99 100644
--- a/hosts/Nixcloud/default.nix
+++ b/hosts/Nixcloud/default.nix
@@ -9,13 +9,57 @@
imports = [
./hardware-configuration.nix
./networking.nix
+
];
+ boot.loader.grub = {
+ enable = true;
+ efiSupport = true; # Enable EFI features
+ efiInstallAsRemovable = true; # Force install without accessing BIOS variables
+ };
boot.tmp.cleanOnBoot = true;
+ nix = {
+ registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
+ (lib.filterAttrs (_: lib.isType "flake")) inputs
+ );
+
+ nixPath = [ "/etc/nix/path" ];
+
+ settings = {
+ download-buffer-size = "512M";
+ experimental-features = "nix-command flakes";
+ auto-optimise-store = true;
+ };
+ };
+
+ environment = {
+ shells = with pkgs; [ bash ];
+ etc = lib.mapAttrs' (name: value: {
+ name = "nix/path/${name}";
+ value.source = value.flake;
+ }) config.nix.registry;
+ systemPackages = with pkgs; [
+ git
+ sops
+ wget
+ ];
+ };
+
zramSwap.enable = true;
+ programs = {
+ gnupg = {
+ agent = {
+ enableSSHSupport = true;
+ enable = true;
+ pinentryPackage = pkgs.pinentry-tty;
+ };
+ };
+ };
networking.hostName = "srv1065175";
networking.domain = "hstgr.cloud";
+
services.openssh.enable = true;
+
users.users = {
root.openssh.authorizedKeys.keyFiles = [
(builtins.fetchurl {
@@ -32,44 +76,10 @@
})
];
};
-
system.stateVersion = "23.11";
-
- environment = {
- shells = with pkgs; [ bash ];
- etc = lib.mapAttrs' (name: value: {
- name = "nix/path/${name}";
- value.source = value.flake;
- }) config.nix.registry;
- systemPackages = with pkgs; [
- git
- sops
- wget
- ];
- };
-
- nix = {
- registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
- (lib.filterAttrs (_: lib.isType "flake")) inputs
- );
-
- nixPath = [ "/etc/nix/path" ];
-
- settings = {
- download-buffer-size = "512M";
- experimental-features = "nix-command flakes";
- auto-optimise-store = true;
- };
- };
-
- programs = {
- gnupg = {
- agent = {
- enableSSHSupport = true;
- enable = true;
- pinentryPackage = pkgs.pinentry-tty;
- };
- };
- };
+ boot.kernelParams = [
+ "console=tty1"
+ "console=ttyS0,115200"
+ ];
time.timeZone = "America/Sao_Paulo";
}
diff --git a/hosts/Nixcloud/hardware-configuration.nix b/hosts/Nixcloud/hardware-configuration.nix
index 56c06ac..430838a 100644
--- a/hosts/Nixcloud/hardware-configuration.nix
+++ b/hosts/Nixcloud/hardware-configuration.nix
@@ -1,19 +1,17 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
+ boot.loader.grub.device = "nodev";
- nixpkgs.hostPlatform = "x86_64-linux";
-
- boot.loader.grub.device = "/dev/sda";
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
- "vmw_pvscsi"
- ];
+ "vmw_pvscsi" ];
boot.initrd.kernelModules = [ "nvme" ];
- fileSystems."/" = {
- device = "/dev/sda1";
- fsType = "ext4";
+ fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
+ fileSystems."/boot" = {
+ device = "/dev/sda15";
+ fsType = "vfat";
};
-}
+}
\ No newline at end of file
diff --git a/hosts/Nixcloud/networking.nix b/hosts/Nixcloud/networking.nix
index 82cf395..5c58c54 100644
--- a/hosts/Nixcloud/networking.nix
+++ b/hosts/Nixcloud/networking.nix
@@ -1,10 +1,10 @@
{ lib, ... }:
{
+ # This file was populated at runtime with the networking
+ # details gathered from the active system.
networking = {
nameservers = [
- "45.143.83.10"
- "1.1.1.1"
- "8.8.4.4"
+ "8.8.8.8"
];
defaultGateway = "72.61.129.254";
defaultGateway6 = {