hosts: init sora

This commit is contained in:
notohh 2023-06-23 09:25:35 -04:00
parent b60c592ced
commit 883a0ae098
Signed by: notohh
GPG key ID: BD47506D475EE86D
6 changed files with 123 additions and 0 deletions

View file

@ -137,4 +137,23 @@ in {
} }
]; ];
}; };
sora = nixosSystem {
inherit system;
specialArgs = {inherit inputs;};
modules = [
./arashi
hmModule
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.notoh = {
imports = [
./sora/home.nix
];
};
};
}
];
};
} }

View file

@ -40,5 +40,15 @@ inputs: {
sshOpts = ["-t" "-i" "~/.ssh/arashi"]; sshOpts = ["-t" "-i" "~/.ssh/arashi"];
magicRollback = false; magicRollback = false;
}; };
sora = {
hostname = "sora";
profiles.system = {
user = "root";
path = activate.nixos inputs.self.nixosConfigurations.sora;
};
sshUser = "notoh";
sshOpts = ["-t" "-i" "~/.ssh/kumo"];
magicRollback = false;
};
}; };
} }

View file

@ -0,0 +1,21 @@
{pkgs, ...}: {
imports = [
./hardware-configuration.nix
./networking.nix
];
environment.systemPackages = with pkgs; [
git
croc
helix
];
boot.cleanTmpDir = true;
zramSwap.enable = true;
networking.hostName = "sora";
networking.domain = "";
services.openssh.enable = true;
users.users.notoh.openssh.authorizedKeys.keys = [
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDqTg12niJ4nkm7jv9bcfiALJ7YA8LhmSpaq035fY/cU1vTrrfJjnilSgIE69IoC+gBxKWly01S9f4RpF0n7BoYx+GopFP99K8D8koaPL5dku7PCRrWBbu/5ZrMhjNrHvQkse36mTcNGgouorhShuJ9LpWF2oBqkKjzLWKnjU3NRJwCUJFizR3thfc2Hri61vxQGt1WQJrqDPZpUnLL6WAeJK/aHOhMOMLbfEPrtmmBse+xtwFFV+jxEY4MitvgnweQ5i7yKqtrldKQ0o03AO3NRikeQbRmEm6zlHTQpd6EOktTKOJKZYtOZ1ASHPxp8B10B0MBVpYWrvCmb+vyrWszYKeCyuu6a57gfoai+AHNEyxrtT2diJANia4WgW8kHGxuVAXFpKX/tr5ZvGXq8uWlQUgrAHphlaEF+x97aqi8GuZTqq5Y9xH4iwm6V8EK3VvLWTwyQauCq7IypxlNsyj8hUo9TtYQaIHHt1kNFahXLKnIuqmdVq6TGYt9AuK5Zek=''
];
}

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";
};
}

14
hosts/sora/home.nix Normal file
View file

@ -0,0 +1,14 @@
{...}: {
imports = [
../../home
];
systemd.user.startServices = "sd-switch";
programs.home-manager.enable = true;
home = {
username = "notoh";
homeDirectory = "/home/notoh";
stateVersion = "23.05";
};
}

49
hosts/sora/networking.nix Normal file
View file

@ -0,0 +1,49 @@
{lib, ...}: {
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 = "5.161.181.184";
prefixLength = 32;
}
];
ipv6.addresses = [
{
address = "2a01:4ff:f0:337a::1";
prefixLength = 64;
}
{
address = "fe80::9400:2ff:fe4e:83c1";
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:02:4e:83:c1", NAME="eth0"
'';
}