fondue: init
This commit is contained in:
parent
eee9b5df5b
commit
2b4cb226a1
5 changed files with 83 additions and 0 deletions
|
|
@ -109,6 +109,7 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations."apricot" = mkSystem "apricot" "x86_64-linux" false;
|
nixosConfigurations."apricot" = mkSystem "apricot" "x86_64-linux" false;
|
||||||
|
nixosConfigurations."fondue" = mkSystem "fondue" "x86_64-linux" false;
|
||||||
nixosConfigurations."winter" = mkSystem "winter" "x86_64-linux" true;
|
nixosConfigurations."winter" = mkSystem "winter" "x86_64-linux" true;
|
||||||
|
|
||||||
packages.x86_64-linux = customPackages nixpkgs.legacyPackages.x86_64-linux;
|
packages.x86_64-linux = customPackages nixpkgs.legacyPackages.x86_64-linux;
|
||||||
|
|
|
||||||
23
hosts/fondue/default.nix
Normal file
23
hosts/fondue/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, modules, modulesPath, overlays, pkgs, ... }: {
|
||||||
|
networking.hostName = "fondue";
|
||||||
|
system.stateVersion = "21.05";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
base
|
||||||
|
input
|
||||||
|
kernel
|
||||||
|
nix
|
||||||
|
packages
|
||||||
|
security
|
||||||
|
snapper
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
|
||||||
|
../../users/rin.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
28
hosts/fondue/filesystem.nix
Normal file
28
hosts/fondue/filesystem.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
}
|
||||||
18
hosts/fondue/kernel.nix
Normal file
18
hosts/fondue/kernel.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ 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;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
hosts/fondue/networking.nix
Normal file
13
hosts/fondue/networking.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ 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" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue