fix: Nixcloud correct configuration for the host
This commit is contained in:
parent
a84e66b4a2
commit
cd02abbf62
3 changed files with 58 additions and 50 deletions
|
|
@ -9,13 +9,57 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./networking.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;
|
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;
|
zramSwap.enable = true;
|
||||||
|
programs = {
|
||||||
|
gnupg = {
|
||||||
|
agent = {
|
||||||
|
enableSSHSupport = true;
|
||||||
|
enable = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-tty;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
networking.hostName = "srv1065175";
|
networking.hostName = "srv1065175";
|
||||||
networking.domain = "hstgr.cloud";
|
networking.domain = "hstgr.cloud";
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
users.users = {
|
users.users = {
|
||||||
root.openssh.authorizedKeys.keyFiles = [
|
root.openssh.authorizedKeys.keyFiles = [
|
||||||
(builtins.fetchurl {
|
(builtins.fetchurl {
|
||||||
|
|
@ -32,44 +76,10 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
boot.kernelParams = [
|
||||||
environment = {
|
"console=tty1"
|
||||||
shells = with pkgs; [ bash ];
|
"console=ttyS0,115200"
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
time.timeZone = "America/Sao_Paulo";
|
time.timeZone = "America/Sao_Paulo";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,17 @@
|
||||||
{ modulesPath, ... }:
|
{ modulesPath, ... }:
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
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 = [
|
boot.initrd.availableKernelModules = [
|
||||||
"ata_piix"
|
"ata_piix"
|
||||||
"uhci_hcd"
|
"uhci_hcd"
|
||||||
"xen_blkfront"
|
"xen_blkfront"
|
||||||
"vmw_pvscsi"
|
"vmw_pvscsi" ];
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ "nvme" ];
|
boot.initrd.kernelModules = [ "nvme" ];
|
||||||
fileSystems."/" = {
|
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
||||||
device = "/dev/sda1";
|
fileSystems."/boot" = {
|
||||||
fsType = "ext4";
|
device = "/dev/sda15";
|
||||||
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
|
# This file was populated at runtime with the networking
|
||||||
|
# details gathered from the active system.
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [
|
nameservers = [
|
||||||
"45.143.83.10"
|
"8.8.8.8"
|
||||||
"1.1.1.1"
|
|
||||||
"8.8.4.4"
|
|
||||||
];
|
];
|
||||||
defaultGateway = "72.61.129.254";
|
defaultGateway = "72.61.129.254";
|
||||||
defaultGateway6 = {
|
defaultGateway6 = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue