init tachibana
This commit is contained in:
parent
dc7ab702fc
commit
5a35993e17
15
hosts/tachibana/default.nix
Normal file
15
hosts/tachibana/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{inputs, ...}: {
|
||||
imports = [
|
||||
../../system
|
||||
./hardware-configuration.nix
|
||||
./disk.nix
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
|
||||
networking.hostName = "tachibana";
|
||||
time.timeZone = "America/Chicago";
|
||||
users.users.ahnwuoa = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
};
|
||||
}
|
||||
52
hosts/tachibana/disk.nix
Normal file
52
hosts/tachibana/disk.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{pkgs, ...}: {
|
||||
disko.devices.disk = {
|
||||
main = {
|
||||
device = "/dev/disk/by-id/nvme-Samsung_SSD_9100_PRO_4TB_S7YANJ0Y613585N";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "1G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "32G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "2T";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
home = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "home";
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
hosts/tachibana/hardware-configuration.nix
Normal file
26
hosts/tachibana/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# 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 =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp13s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp12s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
7
hosts/tachibana/users/ahnwuoa/default.nix
Normal file
7
hosts/tachibana/users/ahnwuoa/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
../../../../user
|
||||
];
|
||||
|
||||
home.username = "ahnwuoa";
|
||||
}
|
||||
Loading…
Reference in a new issue