winter: rename to blossom

This commit is contained in:
LavaDesu 2021-11-02 00:53:56 +07:00
parent 72c6763508
commit f91c64d71e
Signed by: cilly
GPG key ID: 6500251E087653C9
10 changed files with 26 additions and 20 deletions

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

@ -0,0 +1,30 @@
{ config, modules, overlays, pkgs, ... }: {
networking.hostName = "blossom";
system.stateVersion = "21.05";
time.timeZone = "Asia/Phnom_Penh";
age.secrets = {
passwd.file = ../../secrets/passwd.age;
wg_blossom.file = ../../secrets/wg_blossom.age;
wpa_conf.file = ../../secrets/wpa_conf.age;
};
imports = with modules.system; [
audio
base
gui
input
kernel
nix
packages
security
snapper
wireguard
./filesystem.nix
./kernel.nix
./networking.nix
../../users/rin.nix
];
}

View file

@ -0,0 +1,50 @@
{ config, ... }:
let
mkMount = uuid: type: {
device = "/dev/disk/by-uuid/${uuid}";
fsType = type;
options = [ "defaults" "relatime" ];
};
mkBtrfsMount = subvolid: atime: mkMount "cf0f4302-f006-46a5-afc7-ada04d17f6f2" "btrfs" // {
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvolid=${builtins.toString subvolid}" (if atime then "relatime" else "noatime") ];
};
in
{
fileSystems = {
"/" = {
device = "rootfs";
fsType = "tmpfs";
options = [ "defaults" "size=4G" "mode=755" ];
};
"/boot" = mkMount "186A-A42E" "vfat";
"/mnt/hdd" = mkMount "d5e3cfe5-c73a-4695-b81b-fc0215d4cefe" "ext4";
"/mnt/prev" = mkMount "8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d" "btrfs" // {
options = [ "autodefrag" "compress=zstd:3" "defaults" "nossd" "noatime" "ro" ];
};
"/mnt/butter" = mkBtrfsMount 5 true;
"/nix" = mkBtrfsMount 257 false;
"/home" = mkBtrfsMount 259 true;
"/home/.snapshots" = mkBtrfsMount 262 false;
"/root" = mkBtrfsMount 260 false;
"/var" = mkBtrfsMount 258 false;
# "/mnt/nfs" = {
# device = "192.168.100.11:/srv/nfs";
# fsType = "nfs";
# options = [ "defaults" ];
# };
"/mnt/apricot" = {
device = "rin@apricot:/";
fsType = "fuse.sshfs";
options = [
"noauto"
"x-systemd.automount"
"_netdev"
"IdentityFile=/home/rin/.ssh/id_rsa"
"allow_other"
"reconnect"
];
};
};
}

22
hosts/blossom/kernel.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, pkgs, ... }: {
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
grub = {
enable = true;
efiSupport = true;
device = "nodev";
};
};
initrd.kernelModules = [ "i915" ];
kernelParams = [
"amdgpu.gpu_recovery=1"
"amdgpu.si_support=1"
"radeon.si_support=0"
"intel_pstate=passive"
"msr.allow_writes=on"
];
kernelPackages = pkgs.lib.mkForce (pkgs.linuxPackagesFor pkgs.linux-lava);
};
}

View file

@ -0,0 +1,35 @@
{ config, ... }: {
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
networking = {
wireless = {
enable = true;
interfaces = [ "wlp3s0" ];
};
useDHCP = false;
interfaces.eno1.useDHCP = false;
interfaces.wlp3s0.useDHCP = false;
interfaces.eno1.ipv4.addresses = [{
address = "10.0.0.2";
prefixLength = 24;
}];
interfaces.wlp3s0.ipv4.addresses = [{
address = "192.168.100.13";
prefixLength = 24;
}];
defaultGateway = "192.168.100.1";
nameservers = [ "8.8.8.8" ];
extraHosts = ''
192.168.100.10 strawberry
192.168.100.11 peach
192.168.100.12 butterfly
192.168.100.13 winter
192.168.100.13 blossom
192.168.100.14 apricot
10.100.0.1 fondue
'';
};
}