hosts/hyacinth: init
This commit is contained in:
parent
1d770f1678
commit
f8952fc47e
8 changed files with 130 additions and 6 deletions
|
|
@ -69,6 +69,7 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations."blossom" = mkSystem nixpkgs "blossom" "x86_64-linux" true [];
|
nixosConfigurations."blossom" = mkSystem nixpkgs "blossom" "x86_64-linux" true [];
|
||||||
|
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" true [];
|
||||||
|
|
||||||
nixosConfigurations."caramel" = mkSystem nixpkgs-raccoon "caramel" "aarch64-linux" false [{
|
nixosConfigurations."caramel" = mkSystem nixpkgs-raccoon "caramel" "aarch64-linux" false [{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
|
|
||||||
41
hosts/hyacinth/default.nix
Normal file
41
hosts/hyacinth/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{ config, inputs, modules, overlays, pkgs, ... }: {
|
||||||
|
networking.hostName = "hyacinth";
|
||||||
|
system.stateVersion = "21.11";
|
||||||
|
time.timeZone = "Asia/Phnom_Penh";
|
||||||
|
|
||||||
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||||
|
nixpkgs.overlays = [ inputs.neovim-nightly.overlay ];
|
||||||
|
age.secrets = {
|
||||||
|
passwd.file = ../../secrets/passwd.age;
|
||||||
|
wg_hyacinth.file = ../../secrets/wg_blossom.age;
|
||||||
|
wpa_conf.file = ../../secrets/wpa_conf.age;
|
||||||
|
};
|
||||||
|
imports = with modules.system; [
|
||||||
|
inputs.home-manager.nixosModule
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
audio
|
||||||
|
base
|
||||||
|
greetd
|
||||||
|
gui
|
||||||
|
input
|
||||||
|
kernel
|
||||||
|
nix
|
||||||
|
packages
|
||||||
|
security
|
||||||
|
snapper
|
||||||
|
wireguard
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
|
||||||
|
../../users/rin
|
||||||
|
];
|
||||||
|
programs.corectrl.enable = true;
|
||||||
|
services.murmur = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
35
hosts/hyacinth/filesystem.nix
Normal file
35
hosts/hyacinth/filesystem.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ config, ... }:
|
||||||
|
let
|
||||||
|
mkLabelMount = label: type: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = subvol: atime: mkLabelMount "CAKE" "btrfs" // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=8G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "CUP" "vfat";
|
||||||
|
|
||||||
|
"/mnt/butter" = mkBtrfsMount "/" true;
|
||||||
|
"/nix" = mkBtrfsMount "/current/snow" false;
|
||||||
|
"/home" = mkBtrfsMount "/current/home" true;
|
||||||
|
"/home/.snapshots" = mkBtrfsMount "/snapshot/home" false;
|
||||||
|
"/root" = mkBtrfsMount "/current/root" false;
|
||||||
|
"/var" = mkBtrfsMount "/current/var" false;
|
||||||
|
"/persist" = {
|
||||||
|
depends = [ "/var" ];
|
||||||
|
device = "/var/persist";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
26
hosts/hyacinth/kernel.nix
Normal file
26
hosts/hyacinth/kernel.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, lib, pkgs, ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd.availableKernelModules = [ "xhci_pci" "nvme" ];
|
||||||
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
kernelParams = [
|
||||||
|
"amdgpu.gpu_recovery=1"
|
||||||
|
"intel_pstate=passive"
|
||||||
|
];
|
||||||
|
kernelPackages = lib.mkForce (pkgs.linuxPackagesFor pkgs.me.linux-lava);
|
||||||
|
|
||||||
|
extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out ];
|
||||||
|
kernelModules = [ "v4l2loopback" ];
|
||||||
|
};
|
||||||
|
services.xserver.xrandrHeads = [{
|
||||||
|
output = "DisplayPort-0";
|
||||||
|
primary = true;
|
||||||
|
monitorConfig = ''
|
||||||
|
Modeline "1920x1080_165.00" 525.00 1920 2088 2296 2672 1080 1083 1088 1192 -hsync +vsync
|
||||||
|
Option "PreferredMode" "1920x1080_165.00"
|
||||||
|
'';
|
||||||
|
}];
|
||||||
|
}
|
||||||
21
hosts/hyacinth/networking.nix
Normal file
21
hosts/hyacinth/networking.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
|
||||||
|
networking = {
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces.enp5s0.useDHCP = false;
|
||||||
|
|
||||||
|
interfaces.enp5s0.ipv4.addresses = [{
|
||||||
|
address = "192.168.100.16";
|
||||||
|
prefixLength = 24;
|
||||||
|
}];
|
||||||
|
defaultGateway = "192.168.100.1";
|
||||||
|
nameservers = [ "1.1.1.1" ];
|
||||||
|
|
||||||
|
extraHosts = ''
|
||||||
|
192.168.100.12 strawberry
|
||||||
|
192.168.100.15 caramel
|
||||||
|
|
||||||
|
10.100.0.1 sugarcane
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -31,9 +31,9 @@ let
|
||||||
serverIp
|
serverIp
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
blossom = {
|
hyacinth = {
|
||||||
gateway = "192.168.100.1";
|
gateway = "192.168.100.1";
|
||||||
interface = "wlp3s0";
|
interface = "enp5s0";
|
||||||
routes = [
|
routes = [
|
||||||
serverIp
|
serverIp
|
||||||
];
|
];
|
||||||
|
|
@ -45,7 +45,7 @@ let
|
||||||
publicKey = "VDqcpS0lJzFgwikj61MJ1xc9P8Cuq0NXa+Hc+etn2iA=";
|
publicKey = "VDqcpS0lJzFgwikj61MJ1xc9P8Cuq0NXa+Hc+etn2iA=";
|
||||||
allowedIPs = [ "10.100.0.2/32" ];
|
allowedIPs = [ "10.100.0.2/32" ];
|
||||||
};
|
};
|
||||||
blossom = {
|
hyacinth = {
|
||||||
publicKey = "6nVhazYdmC15A/nke9VrqIg3sOBVOmqj4GEsyBq7MVo=";
|
publicKey = "6nVhazYdmC15A/nke9VrqIg3sOBVOmqj4GEsyBq7MVo=";
|
||||||
allowedIPs = [ "10.100.0.3/32" ];
|
allowedIPs = [ "10.100.0.3/32" ];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
xsession.windowManager.bspwm = {
|
xsession.windowManager.bspwm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
monitors = { eDP-1 = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "0"]; };
|
monitors = { "DisplayPort-0" = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "0"]; };
|
||||||
settings = {
|
settings = {
|
||||||
window_gap = 10;
|
window_gap = 10;
|
||||||
border_width = 0;
|
border_width = 0;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
script = builtins.readFile ../../scripts/polybar.sh;
|
script = builtins.readFile ../../scripts/polybar.sh;
|
||||||
settings = {
|
settings = {
|
||||||
"bar/scroller" = {
|
"bar/scroller" = {
|
||||||
monitor = "eDP-1";
|
monitor = "DisplayPort-0";
|
||||||
width = "100%";
|
width = "100%";
|
||||||
height = 1;
|
height = 1;
|
||||||
background = colours.background1;
|
background = colours.background1;
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
"bar/top" = {
|
"bar/top" = {
|
||||||
monitor = "eDP-1";
|
monitor = "DisplayPort-0";
|
||||||
width = "100%";
|
width = "100%";
|
||||||
height = 29;
|
height = 29;
|
||||||
background = colours.background1;
|
background = colours.background1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue