Add ochsenchopf host
This commit is contained in:
parent
75e2230bd6
commit
9be69627fe
5 changed files with 104 additions and 1 deletions
35
host/ochsenchopf/default.nix
Normal file
35
host/ochsenchopf/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, pkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
./filesystems.nix
|
||||
./networking.nix
|
||||
|
||||
../../defaults/hardware/thinkpad-x1-gen9.nix
|
||||
|
||||
../../defaults/base
|
||||
../../defaults/cifs-auth-fix
|
||||
../../defaults/desktop
|
||||
|
||||
# TODO: threemaModules.openvpn
|
||||
];
|
||||
|
||||
virtualisation = { # TODO: This should probably be somewhere else.
|
||||
docker = {
|
||||
enable = true;
|
||||
enableOnBoot = false;
|
||||
};
|
||||
libvirtd.enable = true;
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like fi:le locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.11"; # Did you read the comment?
|
||||
|
||||
}
|
30
host/ochsenchopf/filesystems.nix
Normal file
30
host/ochsenchopf/filesystems.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
"luks".device = "/dev/disk/by-label/luks";
|
||||
};
|
||||
|
||||
fileSystems = let rootdev = "/dev/disk/by-label/hv_ochsenchopf"; in {
|
||||
"/" = {
|
||||
device = rootdev;
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos" ];
|
||||
};
|
||||
"/home" = {
|
||||
device = rootdev;
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
}
|
12
host/ochsenchopf/networking.nix
Normal file
12
host/ochsenchopf/networking.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
#enableFccUnlock = true; # TODO: Enable with nixos 22.05
|
||||
};
|
||||
useDHCP = false;
|
||||
hostName = "ochsenchopf";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue