dotfiles/modules/nixos/common/core/nix.nix
Christopher Mühl 786af32daf
Publish my config
This is the result of ~100 commits to my NixOS config. Since I haven't
always used `agenix-rekey`, this is another initial commit so that none
of the secrets in my git history are leaked
2025-07-30 23:36:39 +02:00

37 lines
878 B
Nix

{
self,
pkgs,
config,
...
}: {
# Needed for Nix flakes
environment.systemPackages = [pkgs.git];
nix.settings = {
# auto-optimize-store = true;
# builders-use-substitutes = true;
experimental-features = ["nix-command" "flakes"];
flake-registry = "/etc/nix/registry.json";
keep-derivations = true;
keep-outputs = true;
trusted-users = ["root" "@wheel"];
};
nixpkgs = {
config.allowUnfree = true;
config.permittedInsecurePackages = [
"nixos-config"
"electron-27.3.11"
"dotnet-sdk-6.0.428"
];
};
environment.etc."current-system-packages".text = let
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in
formatted;
}