forked from pub-solar/infra
hosts: init trinkgenossin
This commit is contained in:
parent
49c21fe740
commit
ca8e578b11
|
@ -87,6 +87,21 @@
|
|||
self.nixosModules.promtail
|
||||
];
|
||||
};
|
||||
|
||||
trinkgenossin = self.nixos-flake.lib.mkLinuxSystem {
|
||||
imports = [
|
||||
self.inputs.agenix.nixosModules.default
|
||||
self.nixosModules.home-manager
|
||||
./trinkgenossin
|
||||
self.nixosModules.overlays
|
||||
self.nixosModules.unlock-luks-on-boot
|
||||
self.nixosModules.core
|
||||
#self.nixosModules.prometheus-exporters
|
||||
#self.nixosModules.promtail
|
||||
|
||||
self.nixosModules.garage
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
37
hosts/trinkgenossin/configuration.nix
Normal file
37
hosts/trinkgenossin/configuration.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
flake,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.devices = ["/dev/vda"];
|
||||
|
||||
boot.kernelParams = [
|
||||
"boot.shell_on_fail=1"
|
||||
"ip=dhcp"
|
||||
];
|
||||
|
||||
services.openssh.openFirewall = true;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
12
hosts/trinkgenossin/default.nix
Normal file
12
hosts/trinkgenossin/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ flake, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./configuration.nix
|
||||
|
||||
./networking.nix
|
||||
#./wireguard.nix
|
||||
#./backups.nix
|
||||
];
|
||||
}
|
56
hosts/trinkgenossin/hardware-configuration.nix
Normal file
56
hosts/trinkgenossin/hardware-configuration.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"sr_mod"
|
||||
"virtio_blk"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.initrd.luks.devices."cryptroot" = {
|
||||
device = "/dev/disk/by-uuid/52a1fd17-63d7-4d0a-b7ff-74aceaf6085a";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/garage/data" = {
|
||||
device = "/dev/disk/by-label/data";
|
||||
fsType = "xfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/garage/meta" = {
|
||||
device = "/dev/disk/by-label/metadata";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-label/swap"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
virtualisation.hypervGuest.enable = true;
|
||||
}
|
15
hosts/trinkgenossin/networking.nix
Normal file
15
hosts/trinkgenossin/networking.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
flake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.garage.settings.rpc_public_addr = "[2a01:239:35d:f500::1]:3901";
|
||||
|
||||
networking.hostName = "trinkgenossin";
|
||||
networking.hostId = "00000003";
|
||||
|
||||
networking.enableIPv6 = true;
|
||||
networking.useDHCP = true;
|
||||
}
|
Loading…
Reference in a new issue