2024-08-24 22:16:51 -04:00
|
|
|
# This is your system's configuration file.
|
|
|
|
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
outputs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
# You can import other NixOS modules here
|
|
|
|
imports = [
|
2024-08-29 14:15:26 -04:00
|
|
|
./modules/networking.nix
|
|
|
|
./modules/gpg.nix
|
2024-08-27 16:54:58 -04:00
|
|
|
inputs.nix-minecraft.nixosModules.minecraft-servers
|
2024-08-24 22:16:51 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
# You can add overlays here
|
|
|
|
overlays = [
|
|
|
|
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
|
|
outputs.overlays.additions
|
2024-08-29 14:15:26 -04:00
|
|
|
outputs.overlays.selfsuper
|
|
|
|
outputs.overlays.finalprev
|
2024-08-24 22:16:51 -04:00
|
|
|
outputs.overlays.unstable-packages
|
2024-08-27 16:54:58 -04:00
|
|
|
inputs.nix-minecraft.overlay
|
2024-08-24 22:16:51 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
# Configure your nixpkgs instance
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# This will add each flake input as a registry
|
|
|
|
# To make nix commands consistent with your flake
|
|
|
|
nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
|
|
|
|
|
|
|
# This will additionally add your inputs to the system's legacy channels
|
|
|
|
# Making legacy nix commands consistent as well, awesome!
|
|
|
|
nix.nixPath = ["/etc/nix/path"];
|
|
|
|
environment.etc =
|
|
|
|
lib.mapAttrs'
|
|
|
|
(name: value: {
|
|
|
|
name = "nix/path/${name}";
|
|
|
|
value.source = value.flake;
|
|
|
|
})
|
|
|
|
config.nix.registry;
|
|
|
|
|
|
|
|
# Enable flakes and garbage collection
|
|
|
|
nix = {
|
|
|
|
settings = {
|
|
|
|
# Enable flakes and new 'nix' command
|
|
|
|
experimental-features = "nix-command flakes";
|
|
|
|
# Deduplicate and optimize nix store
|
|
|
|
auto-optimise-store = true;
|
|
|
|
};
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 14d";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Set timezone
|
|
|
|
time.timeZone = let
|
2024-08-29 14:15:26 -04:00
|
|
|
secrets = import ./modules/secrets.nix;
|
2024-08-24 22:16:51 -04:00
|
|
|
in secrets.timeZone;
|
|
|
|
|
2024-08-29 14:15:26 -04:00
|
|
|
# Select a terminal font
|
2024-08-24 22:16:51 -04:00
|
|
|
console = {
|
|
|
|
earlySetup = true;
|
2024-08-29 14:15:26 -04:00
|
|
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
|
|
|
|
packages = with pkgs; [ terminus_font ];
|
|
|
|
keyMap = "us";
|
2024-08-24 22:16:51 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
# Enable git
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
lfs.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Basic firewall settings
|
|
|
|
networking.nftables.enable = true;
|
|
|
|
|
|
|
|
# Enable the ZSH shell
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
|
|
|
|
# Disable Nano
|
|
|
|
programs.nano.enable = false;
|
|
|
|
|
|
|
|
# Disable the HTML documentation link
|
|
|
|
documentation = {
|
|
|
|
nixos.enable = false;
|
|
|
|
info.enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Allow binary firmware
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
|
|
|
|
# Force Electron to use Wayland
|
|
|
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
|
|
|
|
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
|
|
system.stateVersion = "24.05";
|
|
|
|
}
|