more hcloud stuff :3
This commit is contained in:
parent
6546b56bfb
commit
8902ed72ac
8 changed files with 50 additions and 50 deletions
|
@ -62,6 +62,7 @@
|
||||||
imports = [ ./hosts/${name} ./profiles/base ];
|
imports = [ ./hosts/${name} ./profiles/base ];
|
||||||
|
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
|
networking.domain = "cherrykitten.xyz";
|
||||||
|
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
|
|
|
@ -1,10 +1,39 @@
|
||||||
{ ... }: {
|
{ lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
|
||||||
./gotosocial.nix
|
./gotosocial.nix
|
||||||
|
../../profiles/hcloud
|
||||||
];
|
];
|
||||||
|
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
nameservers = [
|
||||||
|
"8.8.8.8"
|
||||||
|
];
|
||||||
|
defaultGateway = "172.31.1.1";
|
||||||
|
defaultGateway6 = {
|
||||||
|
address = "fe80::1";
|
||||||
|
interface = "eth0";
|
||||||
|
};
|
||||||
|
dhcpcd.enable = false;
|
||||||
|
usePredictableInterfaceNames = lib.mkForce false;
|
||||||
|
interfaces = {
|
||||||
|
eth0 = {
|
||||||
|
ipv4.addresses = [
|
||||||
|
{ address = "128.140.109.125"; prefixLength = 32; }
|
||||||
|
];
|
||||||
|
ipv6.addresses = [
|
||||||
|
{ address = "2a01:4f8:c2c:bd32::1"; prefixLength = 64; }
|
||||||
|
{ address = "fe80::9400:3ff:fe24:677a"; prefixLength = 64; }
|
||||||
|
];
|
||||||
|
ipv4.routes = [{ address = "172.31.1.1"; prefixLength = 32; }];
|
||||||
|
ipv6.routes = [{ address = "fe80::1"; prefixLength = 128; }];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
ATTR{address}=="96:00:03:24:67:7a", NAME="eth0"
|
||||||
|
'';
|
||||||
|
|
||||||
boot.tmp.cleanOnBoot = true;
|
|
||||||
zramSwap.enable = true;
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
{ modulesPath, lib, ... }: {
|
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
|
||||||
boot.loader.grub.device = "/dev/sda";
|
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
|
||||||
boot.initrd.kernelModules = [ "nvme" ];
|
|
||||||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
|
||||||
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
nameservers = [
|
|
||||||
"8.8.8.8"
|
|
||||||
];
|
|
||||||
defaultGateway = "172.31.1.1";
|
|
||||||
defaultGateway6 = {
|
|
||||||
address = "fe80::1";
|
|
||||||
interface = "eth0";
|
|
||||||
};
|
|
||||||
dhcpcd.enable = false;
|
|
||||||
usePredictableInterfaceNames = lib.mkForce false;
|
|
||||||
interfaces = {
|
|
||||||
eth0 = {
|
|
||||||
ipv4.addresses = [
|
|
||||||
{ address = "128.140.109.125"; prefixLength = 32; }
|
|
||||||
];
|
|
||||||
ipv6.addresses = [
|
|
||||||
{ address = "2a01:4f8:c2c:bd32::1"; prefixLength = 64; }
|
|
||||||
{ address = "fe80::9400:3ff:fe24:677a"; prefixLength = 64; }
|
|
||||||
];
|
|
||||||
ipv4.routes = [{ address = "172.31.1.1"; prefixLength = 32; }];
|
|
||||||
ipv6.routes = [{ address = "fe80::1"; prefixLength = 128; }];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
ATTR{address}=="96:00:03:24:67:7a", NAME="eth0"
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit ed6a87bc3a5e5c44cff4b30e5900b436b92ad9a1
|
Subproject commit 9f826561fd578f38aded0962cfcfea70155c8536
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, pkgs, inputs, ... }: {
|
{ lib, pkgs, inputs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../../users/root
|
../../users/root
|
||||||
../../users/sammy
|
../../users/sammy
|
||||||
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
deployment.tags = [ pkgs.stdenv.hostPlatform.system ];
|
deployment.tags = [ pkgs.stdenv.hostPlatform.system ];
|
||||||
deployment.targetUser = lib.mkDefault "sammy";
|
deployment.targetUser = lib.mkDefault "sammy";
|
||||||
deployment.targetHost = lib.mkDefault config.networking.fqdnOrHostName;
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
12
profiles/hcloud/default.nix
Normal file
12
profiles/hcloud/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ modulesPath, config, ... }: {
|
||||||
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
|
|
||||||
|
zramSwap.enable = true;
|
||||||
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
boot.loader.grub.device = "/dev/sda";
|
||||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||||
|
boot.initrd.kernelModules = [ "nvme" ];
|
||||||
|
|
||||||
|
deployment.targetHost = (builtins.elemAt config.networking.interfaces.eth0.ipv4.addresses 0).address;
|
||||||
|
deployment.tags = [ "hcloud" "hetzner" "cloud"];
|
||||||
|
}
|
|
@ -1,13 +1,12 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
deployment.keys."root_password_hash" = {
|
deployment.keys."root_password_hash" = {
|
||||||
destDir = "/nix/persist/keys";
|
|
||||||
keyCommand = [ "pass" "users/root/hashedPassword" ];
|
keyCommand = [ "pass" "users/root/hashedPassword" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
hashedPasswordFile = lib.mkDefault "/nix/persist/keys/root_password_hash";
|
hashedPasswordFile = lib.mkDefault "/run/keys/root_password_hash";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.root = import ./home.nix;
|
home-manager.users.root = import ./home.nix;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
deployment.keys."sammy_password_hash" = {
|
deployment.keys."sammy_password_hash" = {
|
||||||
destDir = "/nix/persist/keys";
|
|
||||||
keyCommand = [ "pass" "users/sammy/hashedPassword" ];
|
keyCommand = [ "pass" "users/sammy/hashedPassword" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB" ];
|
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJZyQSZw+pExsx2RXB+yxbaJGB9mtvudbQ/BP7E1yKvr openpgp:0x6068FEBB" ];
|
||||||
hashedPasswordFile = lib.mkDefault "/nix/persist/keys/sammy_password_hash";
|
hashedPasswordFile = lib.mkDefault "/run/keys/sammy_password_hash";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.sammy = import ./home.nix;
|
home-manager.users.sammy = import ./home.nix;
|
||||||
|
|
Loading…
Reference in a new issue