hosts: init yuki

This commit is contained in:
notohh 2023-06-03 22:53:57 -04:00
parent 5f7f5dcdd8
commit 9e5b722097
Signed by: notohh
GPG key ID: BD47506D475EE86D
7 changed files with 123 additions and 1 deletions

View file

@ -42,6 +42,14 @@
HostName 192.168.1.54 HostName 192.168.1.54
User notoh User notoh
IdentityFile ~/.ssh/kariru IdentityFile ~/.ssh/kariru
Host yuki
HostName 192.168.1.36
User notoh
IdentityFile ~/.ssh/yuki
Host hetzner
HostName 5.161.181.184
User root
IdentityFile ~/.ssh/kumo
Host pihole Host pihole
Hostname 192.168.1.221 Hostname 192.168.1.221
User root User root

View file

@ -71,4 +71,24 @@ in {
} }
]; ];
}; };
yuki = nixosSystem {
inherit system;
specialArgs = {inherit inputs;};
modules = [
sopsModule
diskoModule
hmModule
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.notoh = {
imports = [
./yuki/home.nix
];
};
};
}
];
};
} }

View file

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

View file

@ -11,7 +11,6 @@
../../modules/fonts.nix ../../modules/fonts.nix
]; ];
# bootloader
boot.loader = { boot.loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;

30
hosts/yuki/default.nix Normal file
View file

@ -0,0 +1,30 @@
{
config,
pkgs,
...
}: {
imports = [
./hardware-configuration.nix
../../modules
];
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 8;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
networking.hostName = "yuki";
networking.networkmanager.enable = true;
services.xserver = {
layout = "us";
xkbVariant = "";
};
services.openssh.enable = true;
}

View file

@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/56f5b5b9-9ab5-4c05-be80-2e34405bfbd9";
fsType = "ext4";
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/4E08-C711";
fsType = "vfat";
};
swapDevices = [
{device = "/dev/disk/by-uuid/34a9e234-35da-4140-b231-2bb983a5204b";}
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

19
hosts/yuki/home.nix Normal file
View file

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