108 lines
2.6 KiB
Nix
108 lines
2.6 KiB
Nix
# 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 = [
|
|
./modules/networking.nix
|
|
./modules/gpg.nix
|
|
inputs.nix-minecraft.nixosModules.minecraft-servers
|
|
];
|
|
|
|
nixpkgs = {
|
|
# You can add overlays here
|
|
overlays = [
|
|
# Add overlays your own flake exports (from overlays and pkgs dir):
|
|
outputs.overlays.additions
|
|
outputs.overlays.selfsuper
|
|
outputs.overlays.finalprev
|
|
outputs.overlays.unstable-packages
|
|
inputs.nix-minecraft.overlay
|
|
];
|
|
|
|
# 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
|
|
secrets = import ./modules/secrets.nix;
|
|
in secrets.timeZone;
|
|
|
|
# Select a terminal font
|
|
console = {
|
|
earlySetup = true;
|
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
|
|
packages = with pkgs; [ terminus_font ];
|
|
keyMap = "us";
|
|
};
|
|
|
|
# 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";
|
|
}
|