Skip to content

Instantly share code, notes, and snippets.

@Patagonicus
Created March 29, 2020 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Patagonicus/0d8432734772d2f07d02dfeed1a3bea6 to your computer and use it in GitHub Desktop.
Save Patagonicus/0d8432734772d2f07d02dfeed1a3bea6 to your computer and use it in GitHub Desktop.
{ config, pkgs, ... }:
{
imports = [./hardware-configuration.nix];
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
initrd = {
availableKernelModules = [ "xhci_pci" "ext4" "aesni_intel" "dm_crypt" "dm-snapshot" "e1000e" ];
network.enable = true;
network.ssh = {
enable = true;
port = 2222;
authorizedKeys = ["ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKuBgomRar++dDcu+LTdVPfVZqaarKOdeXxJkLYG+XToyqMYOK3LTHGs/gD5rF0KwX+IV/f1HsiJeEPc0UhpATA= philipp@jonagold"];
hostECDSAKey = /etc/nixos/initrd_ecdsa_host_key;
};
preLVMCommands = ''
echo
echo "Interface names:"
ls -l /sys/class/net
echo
echo "Waiting"
read
'';
luks.devices.fritter = {
device = "/dev/disk/by-uuid/cb168787-98c1-418d-9ca6-229a0166a483";
preLVM = true;
};
};
};
networking.hostName = "fritter";
networking.useDHCP = false;
networking.usePredictableInterfaceNames = false;
networking.interfaces.eth0.useDHCP = true;
i18n = {
consoleFont = "Lat2-Terminus16";
consoleKeyMap = "neo";
defaultLocale = "en_US.UTF-8";
};
time.timeZone = "Europe/Berlin";
environment.systemPackages = with pkgs; [
borgbackup
ddrescue
efibootmgr
file
git
gnupg
gptfdisk
htop
imagemagick
iotop
lsof
moreutils
ncdu
neovim
nmap
parted
pwgen
tmux
unzip
wget
];
programs = {
fish.enable = true;
tmux = {
enable = true;
aggressiveResize = true;
extraTmuxConf = "set-option -g mode-keys vi";
};
mosh.enable = true;
};
services.openssh = {
enable = true;
challengeResponseAuthentication = false;
passwordAuthentication = true;
permitRootLogin = "yes";
};
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
users.users.philipp = {
isNormalUser = true;
extraGroups = [ "wheel" ];
shell = pkgs.fish;
};
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.09"; # Did you read the comment?
system.autoUpgrade.enable = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment