nixos/modules/base/system.nix

101 lines
2.6 KiB
Nix
Raw Normal View History

{ config, nix-index-database, nixpkgs-unstable, nixpkgs, lib, pkgs, ... }: {
2023-08-01 15:35:09 +02:00
imports = [
nix-index-database.nixosModules.nix-index
];
nix = {
# https://nixos.wiki/wiki/Storage_optimization
gc = {
2023-11-12 03:03:15 +01:00
# Automatically run the nix garbage collector, removing files from
# the store that are not referenced by any generation.
# https://nixos.org/manual/nix/stable/package-management/garbage-collection
2023-08-01 15:35:09 +02:00
automatic = true;
dates = "weekly";
2023-12-29 16:12:01 +01:00
options = "--delete-older-than 7d";
2023-08-01 15:35:09 +02:00
};
settings = {
2023-11-12 03:03:15 +01:00
# Automatically optimise the store after each build. Store optimisation
# reduces nix store space by 25-35% by finding identical files and
# hard-linking them to each other.
# https://nixos.org/manual/nix/unstable/command-ref/nix-store/optimise.html
2023-08-01 15:35:09 +02:00
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
};
# The nix registry is used to refer to flakes using symbolic identifiers
# when running commands such as `nix run nixpkgs#hello`. By default,
# the global registry from [1] is used, which aliases `nixpkgs` to the
# nixpkgs-unstable branch. We overwrite the default global `nixpkgs`
# registry with one which refers to the same nixpkgs as the rest of
# the system, aligning it with flake.lock.
# [1] https://github.com/NixOS/flake-registry/blob/master/flake-registry.json
registry = {
nixpkgs.flake = nixpkgs;
nixpkgs-unstable.flake = nixpkgs-unstable;
};
2023-08-01 15:35:09 +02:00
};
2023-11-11 23:00:19 +01:00
# Enable all firmware with a license allowing redistribution
hardware.enableRedistributableFirmware = true;
2023-08-01 15:35:09 +02:00
environment.systemPackages = with pkgs; [
bat
2023-11-13 13:20:40 +01:00
black
2023-08-01 15:35:09 +02:00
clang
curl
dig
fd
2023-12-06 13:20:42 +01:00
file
2023-08-01 15:35:09 +02:00
fzf
gcc
git
gnumake
htop
inetutils
jq
magic-wormhole
ntp
2023-08-08 18:17:02 +02:00
progress
2023-08-01 15:35:09 +02:00
pwgen
2024-01-17 11:58:01 +01:00
python310
python311
2024-01-12 16:45:18 +01:00
python312
2023-08-01 15:35:09 +02:00
rsync
sqlite
tmux
traceroute
tree
unzip
wget
2024-02-29 22:33:29 +01:00
wireguard-tools
2023-08-01 15:35:09 +02:00
xkcdpass
yq
];
# https://github.com/nix-community/comma
programs.nix-index-database.comma.enable = true;
programs.command-not-found.enable = false;
i18n = {
defaultLocale = "en_DK.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_DK.UTF-8";
LC_IDENTIFICATION = "en_DK.UTF-8";
LC_MEASUREMENT = "en_DK.UTF-8";
LC_MONETARY = "en_DK.UTF-8";
LC_NAME = "en_DK.UTF-8";
LC_NUMERIC = "en_DK.UTF-8";
LC_PAPER = "en_DK.UTF-8";
LC_TELEPHONE = "en_DK.UTF-8";
LC_TIME = "en_DK.UTF-8";
};
2023-08-04 13:08:58 +02:00
supportedLocales = lib.mkOptionDefault [
"da_DK.UTF-8/UTF-8"
];
2023-08-01 15:35:09 +02:00
};
time = {
timeZone = "Europe/Copenhagen";
};
}