106 lines
3.5 KiB
Nix
Executable file
106 lines
3.5 KiB
Nix
Executable file
# 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, lib, ... }:
|
||
|
||
{
|
||
# Bootloader.
|
||
boot.loader.systemd-boot.enable = true;
|
||
boot.loader.timeout = 5;
|
||
boot.loader.efi.canTouchEfiVariables = true;
|
||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||
|
||
# I'm using Nix OS, it's logo is a snowflake and the computer is
|
||
# a lot taller than the pi it's replacing, so Everest! :3 :3
|
||
networking.hostName = "Everest"; # Define your hostname.
|
||
|
||
# Set up networking
|
||
networking = {
|
||
wireless.enable = false; # Computer doesn't have wifi
|
||
enableIPv6 = false;
|
||
useNetworkd = true;
|
||
dhcpcd.enable = false;
|
||
interfaces.eno1 = {
|
||
wakeOnLan.enable = true;
|
||
ipv4.addresses = [ {
|
||
address = "192.168.0.160";
|
||
prefixLength = 24;
|
||
} ];
|
||
};
|
||
defaultGateway = "192.168.0.1";
|
||
nameservers = [ "8.8.8.8" ];
|
||
};
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "Europe/Madrid";
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "en_US.UTF-8";
|
||
|
||
i18n.extraLocaleSettings = {
|
||
LC_ADDRESS = "es_ES.UTF-8";
|
||
LC_IDENTIFICATION = "es_ES.UTF-8";
|
||
LC_MEASUREMENT = "es_ES.UTF-8";
|
||
LC_MONETARY = "es_ES.UTF-8";
|
||
LC_NAME = "es_ES.UTF-8";
|
||
LC_NUMERIC = "es_ES.UTF-8";
|
||
LC_PAPER = "es_ES.UTF-8";
|
||
LC_TELEPHONE = "es_ES.UTF-8";
|
||
LC_TIME = "es_ES.UTF-8";
|
||
};
|
||
|
||
# Configure keymap in X11
|
||
services.xserver = {
|
||
layout = "es";
|
||
xkbVariant = "";
|
||
};
|
||
|
||
# Configure console keymap
|
||
console.keyMap = "es";
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.toast = {
|
||
isNormalUser = true;
|
||
description = "Toast";
|
||
extraGroups = [ "networkmanager" "wheel" "transmission"];
|
||
packages = with pkgs; [];
|
||
openssh.authorizedKeys.keys = [
|
||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC2bOVmxUNvg9qFv9DlzMmTRlzcNsyNq1F1wBuAXySwsWAzHGaO+WGdSCINxW3k2ccXn7M/o1r89LeTzRzi8sWQYCpBaIqYVszM/r7SvTS4gASyKhM6lNlyUEPOnvCXH7rdtF+fjoA1TJPv7GBk78QRhGh+eVO3qhY1m++5C1CPFlyrc6sSfgIBQJ5GQZFl/7YEgsrPo+M+0Sd7LkaCOyNmJA0Wi0BA3bbf5sJhrZVMMg/p7w+eMphz2kd1VTVjW3yeMq9zLCiu4SOTBNGCMEvKIdUZbQ83lNrqO2z1/3T1bDwJgpz3xusfkNCeNJSmhfFw5ydHEUp/9jshq38WmulKAMw2Kl/Zed62AVU7Ux7YjUkZkWvo8i3eXuLUxoG891S7cWV1/ijs9QMajOLLT14FG7RbzUYYaYlx+/iNGji9d4sp9/oMYyO45TMe+vEezFSBygP7TY0QFOr4xTi49ZRQFsszbFnGRv+k3wVKoGoeNt0xWB8pBEPFtaeHJpQyJX8= id_rsa_moon"
|
||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOeu3crGqtxwaqgoQPt5mWlC8+PL/Icvcvo0MBAaK80L Key for work laptop"
|
||
];
|
||
};
|
||
|
||
# Large builds (the linux kernel) fail to build because /tmp is too small when using tmpfs
|
||
boot.tmp.useTmpfs = false;
|
||
|
||
home-manager = {
|
||
backupFileExtension = "backup";
|
||
useGlobalPkgs = true;
|
||
users.toast = { config, ... }: {
|
||
home = {
|
||
stateVersion = "23.05";
|
||
file = {
|
||
# This symlinks the Transmission downloads folder into my user's downloads folder for easy access
|
||
"Downloads/Transmission".source = config.lib.file.mkOutOfStoreSymlink "/var/lib/transmission/Downloads";
|
||
};
|
||
};
|
||
xdg = {
|
||
#enable = true;
|
||
userDirs = {
|
||
enable = true;
|
||
createDirectories = true;
|
||
publicShare = null; # Disable the public folder
|
||
};
|
||
};
|
||
};
|
||
};
|
||
|
||
# Open ports in the firewall.
|
||
# 8384 is syncthing's webui, and 22000 is syncthing related too
|
||
# No idea what 5201 and 21027 do tho
|
||
networking.firewall.allowedTCPPorts = [ 5201 8384 22000 ];
|
||
networking.firewall.allowedUDPPorts = [ 5201 22000 21027];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
}
|