hosts/anastacia: init with generated configuration
This commit is contained in:
parent
16b65ac39c
commit
43e754db72
4 changed files with 84 additions and 0 deletions
14
hosts/anastacia/default.nix
Normal file
14
hosts/anastacia/default.nix
Normal 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";
|
||||
}
|
10
hosts/anastacia/hardware-configuration.nix
Normal file
10
hosts/anastacia/hardware-configuration.nix
Normal 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";
|
||||
};
|
||||
}
|
52
hosts/anastacia/networking.nix
Normal file
52
hosts/anastacia/networking.nix
Normal 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"
|
||||
|
||||
'';
|
||||
}
|
|
@ -28,4 +28,12 @@ in {
|
|||
self.nixosModules.theme
|
||||
];
|
||||
};
|
||||
|
||||
anastacia = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./anastacia
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue