hosts/anastacia: init with generated configuration

This commit is contained in:
Anthony Rodriguez 2024-10-23 11:25:01 +02:00
parent 16b65ac39c
commit 43e754db72
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
4 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,14 @@
{...}: {
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
];
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking.hostName = "anastacia";
networking.domain = "";
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al''];
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,10 @@
{modulesPath, ...}: {
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";
};
}

View file

@ -0,0 +1,52 @@
{lib, ...}: {
# This file was populated at runtime with the networking
# details gathered from the active system.
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 = "78.47.146.254";
prefixLength = 32;
}
];
ipv6.addresses = [
{
address = "2a01:4f8:1c1c:8495::1";
prefixLength = 64;
}
{
address = "fe80::9400:3ff:fecb:6deb";
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:cb:6d:eb", NAME="eth0"
'';
}

View file

@ -28,4 +28,12 @@ in {
self.nixosModules.theme self.nixosModules.theme
]; ];
}; };
anastacia = nixosSystem {
system = "x86_64-linux";
inherit specialArgs;
modules = [
./anastacia
];
};
} }