87 lines
1.7 KiB
Nix
87 lines
1.7 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
mkUser = userName: {
|
|
isNormalUser = true;
|
|
home = "/home/${userName}";
|
|
initialPassword = "password";
|
|
extraGroups = ["wheel" "networkmanager" "docker" "video" "syncthing"];
|
|
shell = pkgs.zsh;
|
|
};
|
|
|
|
defaultUser = "daniel";
|
|
in {
|
|
# Use the systemd-boot EFI boot loader.
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
boot.loader.systemd-boot.enable = lib.mkDefault true;
|
|
boot.loader.efi.canTouchEfiVariables = lib.mkDefault true;
|
|
|
|
# nix flakes compatibility
|
|
nix = {
|
|
extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
warn-dirty = false
|
|
'';
|
|
};
|
|
|
|
# Set time zone.
|
|
time.timeZone = "Europe/London";
|
|
|
|
# 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;
|
|
|
|
console = {
|
|
useXkbConfig = true;
|
|
};
|
|
|
|
virtualisation.docker.enable = true;
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
users.users."${defaultUser}" = mkUser defaultUser;
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
# $ nix search wget
|
|
environment.systemPackages = with pkgs; [
|
|
curl
|
|
fd
|
|
firefox
|
|
fzf
|
|
gcc
|
|
git
|
|
htop
|
|
helix
|
|
nnn
|
|
ripgrep
|
|
wget
|
|
zsh
|
|
];
|
|
|
|
environment.homeBinInPath = true;
|
|
|
|
environment.variables = {
|
|
EDITOR = "hx";
|
|
};
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
services = {
|
|
openssh.enable = true;
|
|
|
|
syncthing = {
|
|
enable = true;
|
|
user = defaultUser;
|
|
dataDir = "/home/${defaultUser}";
|
|
};
|
|
|
|
tailscale = {
|
|
enable = true;
|
|
};
|
|
};
|
|
}
|