Add etzel configuration

This commit is contained in:
Fabian Hauser 2020-05-07 17:32:56 +00:00
parent 716ebbe19f
commit 8f4593316a
2 changed files with 103 additions and 0 deletions

73
host/etzel.nix Normal file
View file

@ -0,0 +1,73 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [
../hardware/apu1.nix
../role/base
];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.initrd.luks.devices = {
"root" = {device = "/dev/disk/by-uuid/196202a2-ecb2-4c43-9a62-9e58f4d5de95"; keyFile = "/etc/luks.keyfile";};
"swap" = {device = "/dev/disk/by-uuid/a268e9e6-8636-42b1-84bc-0a432e493d0d"; keyFile = "/etc/luks.keyfile";};
};
boot.initrd.secrets."/etc/luks.keyfile" = /boot/luks.keyfile;
fileSystems = {
"/" = {
device = "/dev/mapper/root";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/disk/by-uuid/14a4d9dc-2d3b-44e1-938e-1429f1639507";
fsType = "ext4";
};
};
swapDevices = [{ device = "/dev/mapper/swap"; }];
networking.hostName = "etzel"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.enp1s0.useDHCP = true;
networking.interfaces.enp2s0.useDHCP = true;
networking.interfaces.enp3s0.useDHCP = true;
networking.interfaces.wlp4s0.useDHCP = true;
networking.interfaces.wlp6s0.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its 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 = "20.03"; # Did you read the comment?
}