nixos/modules/base.nix
2026-01-29 15:59:27 +01:00

35 lines
795 B
Nix

{ config, pkgs, mainDisk, lib, ... }:
let
cfg = config.my.allowUnfree;
in
{
options = {
my.allowUnfree.names = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
description = "Package names allowed by allowUnfreePredicate";
};
};
config = {
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
programs.zsh.enable = true;
environment.systemPackages = with pkgs; [
git
curl
htop
tmux
killall
neovim
];
nixpkgs.config.allowUnfreePredicate =
pkg: builtins.elem (lib.getName pkg) cfg.names;
};
}