2024-01-10 23:07:25 +00:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page, on
|
|
|
|
|
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
|
|
|
|
|
2024-01-31 04:41:12 +00:00
|
|
|
|
{ config, lib, pkgs, common_dir, ... }:
|
2024-01-10 23:07:25 +00:00
|
|
|
|
|
2024-01-31 04:41:12 +00:00
|
|
|
|
{
|
2024-01-10 23:07:25 +00:00
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
|
|
|
|
|
(common_dir + /options.nix)
|
|
|
|
|
|
|
|
|
|
(common_dir + /bootloader/grub.nix)
|
|
|
|
|
(common_dir + /users/users.nix)
|
|
|
|
|
|
2024-01-13 23:21:33 +00:00
|
|
|
|
# ./minecraft.nix
|
|
|
|
|
# ./frp.nix
|
2024-01-10 23:07:25 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Use the GRUB 2 boot loader with legacy boot
|
2024-01-13 21:16:41 +00:00
|
|
|
|
grub.device = "/dev/sda";
|
2024-01-10 23:07:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# USB WiFi driver kernel module
|
|
|
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.rtl8821au ];
|
2024-01-14 05:11:11 +00:00
|
|
|
|
boot.kernelModules = [ "8821au" "sg" ];
|
2024-01-10 23:07:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
networking.hostName = "nixserver";
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
2024-01-16 02:25:58 +00:00
|
|
|
|
services.tailscale = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
extraUpFlags = [
|
|
|
|
|
"--login-server=https://scale.cam123.dev:443"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-10 23:07:25 +00:00
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Denver";
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
# i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
# console = {
|
|
|
|
|
# font = "Lat2-Terminus16";
|
|
|
|
|
# keyMap = "us";
|
|
|
|
|
# useXkbConfig = true; # use xkb.options in tty.
|
|
|
|
|
# };
|
|
|
|
|
|
|
|
|
|
# Enable sound.
|
|
|
|
|
# sound.enable = true;
|
|
|
|
|
# hardware.pulseaudio.enable = true;
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
user.cameron.enable = true;
|
|
|
|
|
|
|
|
|
|
programs = {
|
|
|
|
|
zsh.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
# $ nix search wget
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-01-10 23:14:23 +00:00
|
|
|
|
neovim
|
2024-01-10 23:07:25 +00:00
|
|
|
|
git
|
|
|
|
|
curl
|
|
|
|
|
wget
|
|
|
|
|
ranger
|
|
|
|
|
lf
|
|
|
|
|
tmux
|
2024-01-13 21:16:41 +00:00
|
|
|
|
|
|
|
|
|
# Temp
|
|
|
|
|
makemkv
|
2024-01-10 23:07:25 +00:00
|
|
|
|
];
|
2024-01-13 21:24:19 +00:00
|
|
|
|
|
|
|
|
|
# Also temporary
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2024-01-10 23:07:25 +00:00
|
|
|
|
|
|
|
|
|
environment.shells = with pkgs; [ bash zsh ];
|
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
|
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
|
services.openssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
|
|
settings = {
|
|
|
|
|
PasswordAuthentication = false;
|
|
|
|
|
PermitRootLogin = "no";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2024-01-13 21:24:19 +00:00
|
|
|
|
# Enable Jellyfin
|
2024-01-14 05:03:45 +00:00
|
|
|
|
services.jellyfin = {
|
|
|
|
|
enable = true;
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
};
|
2024-01-13 21:24:19 +00:00
|
|
|
|
|
2024-01-10 23:07:25 +00:00
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
|
|
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|
|
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|
|
|
|
# accidentally delete configuration.nix.
|
2024-01-13 21:16:41 +00:00
|
|
|
|
# system.copySystemConfiguration = true;
|
2024-01-10 23:07:25 +00:00
|
|
|
|
|
|
|
|
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
|
|
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
|
|
|
#
|
|
|
|
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|
|
|
|
# even if you've upgraded your system to a new NixOS release.
|
|
|
|
|
#
|
|
|
|
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
|
|
|
# so changing it will NOT upgrade your system.
|
|
|
|
|
#
|
|
|
|
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|
|
|
|
# out of date, out of support, or vulnerable.
|
|
|
|
|
#
|
|
|
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
|
|
|
# and migrated your data accordingly.
|
|
|
|
|
#
|
|
|
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
|
|
|
system.stateVersion = "23.11"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|