hosts/{apricot,fondue}: decommission
This commit is contained in:
parent
69db6e160b
commit
a1d7374809
12 changed files with 12 additions and 235 deletions
18
README.md
18
README.md
|
|
@ -11,12 +11,18 @@ may or may not work on your machine if copied directly (but theoretically they s
|
|||
But if you insist, just copy-paste one of the hosts in `hosts/`, one of the users in `users/`, and modify them
|
||||
to your liking. Open up `flake.nix`, add your new host config at the bottom, and then build it!
|
||||
|
||||
## Host naming
|
||||
| Name | Description |
|
||||
| ------- | ----------- |
|
||||
| apricot | Homeserver |
|
||||
| blossom | Laptop and main PC |
|
||||
| fondue | VM lent by [a friend](https://github.com/Aiamded) in Australia |
|
||||
## Hosts
|
||||
| Name | Description |
|
||||
| ------- | ----------- |
|
||||
| blossom | Laptop and main PC |
|
||||
| caramel | Raspberry Pi 400, stateless |
|
||||
| sugarcane | OVHCloud VPS, stateless |
|
||||
|
||||
## Users
|
||||
| Name | Description |
|
||||
| ---- | ----------- |
|
||||
| rin | Main user for usage |
|
||||
| hana | Lightweight user intended for inspecting stateless hosts |
|
||||
|
||||
## License
|
||||
Licensed under CC0; basically you can fork, modify, redistribute, or do whatever you want I don't really care.
|
||||
|
|
|
|||
|
|
@ -81,9 +81,7 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
#nixosConfigurations."apricot" = mkSystem nixpkgs "apricot" "x86_64-linux" false;
|
||||
nixosConfigurations."blossom" = mkSystem nixpkgs "blossom" "x86_64-linux" true;
|
||||
#nixosConfigurations."fondue" = mkSystem nixpkgs "fondue" "x86_64-linux" false;
|
||||
|
||||
nixosConfigurations."caramel" = mkSystem nixpkgs-porcupine "caramel" "aarch64-linux" false;
|
||||
nixosConfigurations."sugarcane" = mkSystem nixpkgs-porcupine "sugarcane" "x86_64-linux" false;
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
{ config, inputs, modules, overlays, pkgs, ... }: {
|
||||
networking.hostName = "apricot";
|
||||
system.stateVersion = "21.05";
|
||||
time.timeZone = "Asia/Phnom_Penh";
|
||||
|
||||
age.secrets = {
|
||||
passwd.file = ../../secrets/passwd.age;
|
||||
wg_apricot.file = ../../secrets/wg_apricot.age;
|
||||
wpa_conf.file = ../../secrets/wpa_conf.age;
|
||||
};
|
||||
imports = with modules.system; [
|
||||
inputs.home-manager.nixosModule
|
||||
home-manager
|
||||
|
||||
base
|
||||
input
|
||||
kernel
|
||||
nix
|
||||
packages
|
||||
security
|
||||
snapper
|
||||
transmission
|
||||
wireguard
|
||||
|
||||
./filesystem.nix
|
||||
./kernel.nix
|
||||
./networking.nix
|
||||
|
||||
../../users/rin
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
mkMount = uuid: type: {
|
||||
device = "/dev/disk/by-uuid/${uuid}";
|
||||
fsType = type;
|
||||
options = [ "defaults" "relatime" ];
|
||||
};
|
||||
mkBtrfsMount = subvolid: atime: mkMount "c79ebe18-2d2b-4f0f-9940-afd9378afa09" "btrfs" // {
|
||||
options = [ "autodefrag" "compress=zstd:3" "defaults" "nossd" "nossd_spread" "subvolid=${builtins.toString subvolid}" (if atime then "relatime" else "noatime")];
|
||||
};
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "rootfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=4G" "mode=755" ];
|
||||
};
|
||||
"/boot" = mkMount "2818-A529" "vfat";
|
||||
"/mnt/hdd" = mkMount "436ad832-8dcc-4813-b663-4d0b7b773ff2" "ext4";
|
||||
|
||||
"/mnt/butter" = mkBtrfsMount 5 true;
|
||||
"/nix" = mkBtrfsMount 258 false;
|
||||
"/home" = mkBtrfsMount 260 true;
|
||||
"/home/.snapshots" = mkBtrfsMount 263 false;
|
||||
"/root" = mkBtrfsMount 261 false;
|
||||
"/var" = mkBtrfsMount 259 false;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
initrd.kernelModules = [ "i915" ];
|
||||
kernelParams = [
|
||||
"intel_pstate=passive"
|
||||
];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{ config, ... }: {
|
||||
environment.etc."wpa_supplicant.conf".source = config.age.secrets.wpa_conf.path;
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = [ "wlp1s0" ];
|
||||
};
|
||||
|
||||
useDHCP = false;
|
||||
interfaces.enp2s0.useDHCP = false;
|
||||
interfaces.wlp1s0.useDHCP = false;
|
||||
|
||||
interfaces.enp2s0.ipv4.addresses = [{
|
||||
address = "10.0.0.1";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
interfaces.wlp1s0.ipv4.addresses = [{
|
||||
address = "192.168.100.14";
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -34,17 +34,5 @@ in
|
|||
# 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
{ config, inputs, modules, modulesPath, overlays, pkgs, ... }: {
|
||||
networking.hostName = "fondue";
|
||||
system.stateVersion = "21.05";
|
||||
time.timeZone = "Australia/Melbourne";
|
||||
|
||||
age.secrets = {
|
||||
passwd.file = ../../secrets/passwd.age;
|
||||
wg_fondue.file = ../../secrets/wg_fondue.age;
|
||||
};
|
||||
imports = with modules.system; [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
inputs.home-manager.nixosModule
|
||||
home-manager
|
||||
|
||||
base
|
||||
input
|
||||
kernel
|
||||
nix
|
||||
packages
|
||||
security
|
||||
snapper
|
||||
wireguard
|
||||
|
||||
./filesystem.nix
|
||||
./firewall.nix
|
||||
./kernel.nix
|
||||
./networking.nix
|
||||
|
||||
../../users/rin
|
||||
];
|
||||
}
|
||||
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
mkMount = uuid: type: {
|
||||
device = "/dev/disk/by-uuid/${uuid}";
|
||||
fsType = type;
|
||||
options = [ "defaults" "relatime" ];
|
||||
};
|
||||
mkBtrfsMount = subvolid: atime: mkMount "8253d2ea-0813-4f71-9968-553965f0054b" "btrfs" // {
|
||||
options = [ "autodefrag" "compress=zstd:3" "defaults" "ssd" "ssd_spread" "subvolid=${builtins.toString subvolid}" (if atime then "relatime" else "noatime")];
|
||||
};
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "rootfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=2G" "mode=755" ];
|
||||
};
|
||||
"/boot" = mkMount "0F35-9054" "vfat";
|
||||
|
||||
"/mnt/butter" = mkBtrfsMount 5 true;
|
||||
"/nix" = mkBtrfsMount 258 false;
|
||||
"/home" = mkBtrfsMount 260 true;
|
||||
"/home/.snapshots" = mkBtrfsMount 262 false;
|
||||
"/root" = mkBtrfsMount 261 false;
|
||||
"/var" = mkBtrfsMount 259 false;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{ ... }: {
|
||||
networking.firewall.allowedTCPPorts = [ 22 80 ];
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
initrd = {
|
||||
availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{ config, ... }: {
|
||||
networking = {
|
||||
useDHCP = false;
|
||||
interfaces.enp2s1.useDHCP = false;
|
||||
|
||||
interfaces.enp2s1.ipv4.addresses = [{
|
||||
address = "192.168.100.101";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
defaultGateway = "192.168.100.1";
|
||||
nameservers = [ "8.8.8.8" ];
|
||||
|
||||
extraHosts = ''
|
||||
10.100.0.2 apricot
|
||||
10.100.0.3 winter
|
||||
10.100.0.3 blossom
|
||||
10.100.0.4 strawberry
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue