-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de6263d
commit 1c6d84d
Showing
2 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ config, pkgs, ... }: | ||
|
||
{ | ||
imports = | ||
[ | ||
../../secrets/users-test.nix | ||
./hardware-configuration.nix | ||
]; | ||
|
||
# Use GRUB2 as the boot loader. | ||
# We don't use systemd-boot because GRUB2 has a NixOS module for dual EFI partitions | ||
boot.loader.systemd-boot.enable = false; | ||
|
||
boot.loader.grub = { | ||
enable = true; | ||
efiSupport = true; | ||
efiInstallAsRemovable = true; | ||
mirroredBoots = [ | ||
{ | ||
devices = [ "nodev" ]; | ||
path = "/boot1"; | ||
} | ||
{ | ||
devices = [ "nodev" ]; | ||
path = "/boot2"; | ||
} | ||
]; | ||
copyKernels = true; | ||
}; | ||
|
||
boot.supportedFilesystems = [ "zfs" ]; | ||
|
||
networking.hostName = "faftest2"; | ||
networking.hostId = "faf2f4f5"; | ||
|
||
# Network (Hetzner uses static IP assignments, and we don't use DHCP here) | ||
networking.useDHCP = true; | ||
networking.usePredictableInterfaceNames = false; | ||
networking.interfaces."eth0".ipv4.addresses = [ | ||
{ | ||
address = "88.99.240.117"; | ||
prefixLength = 26; | ||
} | ||
]; | ||
networking.defaultGateway = "88.99.240.65"; | ||
networking.defaultGateway6 = { address = "fe80::1"; interface = "eth0"; }; | ||
networking.nameservers = [ "8.8.8.8" ]; | ||
|
||
# Initial empty root password for easy login: | ||
users.users.root.initialHashedPassword = ""; | ||
services.openssh.permitRootLogin = "prohibit-password"; | ||
|
||
users.users.root.openssh.authorizedKeys.keys = [ | ||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDs+LyhedR8+3W2xjQglnL9ZQMkpA/69rE9nyPptcj4a hal@arch" | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDIDgYjxtGirvoIc63P4TUHDmnXaoWNorPL4m0xJelHayveJc0DbstnwcIwCULTTDOeYTgzexYbCjlpEaABz4lMM9sNdyOQaUj7jn20nPzXAr/nyaTq7wP0klIiOrCvyaEl9eA5IhcwltACPdnDMm+Mr2+v4qyTFJzwVVtyoV42KqWOUzcTfx8/8qlgEbTpih3XX3UeuUtjPQCm8tMDnJiQO4E1UYw6n+fJ9Be4p4tBVbMF7JDn9g3d2DIgfgGWug/n4RMHUNvzLe+X/v8EQZtgNWf1MU7g6xdhWAUDvL75BOJstSDUAgrzPjAqLBpDV+MKAvCctDYKUnpDvGeCXfBn Brutus5000@SURFACE" | ||
]; | ||
|
||
services.openssh.enable = true; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Do not modify this file! It was generated by ‘nixos-generate-config’ | ||
# and may be overwritten by future invocations. Please make changes | ||
# to /etc/nixos/configuration.nix instead. | ||
{ config, lib, pkgs, modulesPath, ... }: | ||
|
||
{ | ||
imports = | ||
[ (modulesPath + "/installer/scan/not-detected.nix") | ||
]; | ||
|
||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "sd_mod" ]; | ||
boot.initrd.kernelModules = [ ]; | ||
boot.kernelModules = [ "kvm-intel" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
fileSystems."/" = | ||
{ device = "tank/nixos"; | ||
fsType = "zfs"; | ||
}; | ||
|
||
fileSystems."/boot1" = | ||
{ device = "/dev/disk/by-uuid/2F17-BB7E"; | ||
fsType = "vfat"; | ||
}; | ||
|
||
fileSystems."/boot2" = | ||
{ device = "/dev/disk/by-uuid/2F18-88C4"; | ||
fsType = "vfat"; | ||
}; | ||
|
||
swapDevices = [ ]; | ||
|
||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||
# (the default) this is the recommended approach. When using systemd-networkd it's | ||
# still possible to use this option, but it's recommended to use it in conjunction | ||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | ||
networking.useDHCP = lib.mkDefault true; | ||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; | ||
|
||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
} |