nixnew/modules/core/default.nix

71 lines
1.7 KiB
Nix

{ inputs, pkgs, ... }: {
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [
"electron-24.8.6"
"electron-25.9.0"
];
documentation = {
enable = true;
doc.enable = true;
info.enable = true;
man.enable = true;
dev.enable = true;
};
environment.systemPackages = with pkgs; [
man-pages
man-pages-posix
];
nix = {
# hardlink duplicate files in the nix store
settings.auto-optimise-store = true;
extraOptions = ''
experimental-features = nix-command flakes
# keep intermediary deps alive (no redownloading to rebuild after gc)
keep-outputs = true
keep-derivations = true
'';
# flake registries are used by the new nix commands.
# this binds the nixpkgs registry to the one in `flake.nix`.
registry = {
nixpkgs.flake = inputs.nixpkgs;
stable.flake = inputs.stable;
};
# the nix path is used to discover channels for the old nix commands.
# this binds the nix path to the channels following `flake.nix` declared below.
nixPath = [
"nixpkgs=/etc/nix/inputs/nixpkgs"
"stable=/etc/nix/inputs/stable"
];
};
# add entries for `nixPath` above.
environment.etc = {
"nix/inputs/nixpkgs".source = inputs.nixpkgs.outPath;
"nix/inputs/stable".source = inputs.stable.outPath;
};
# allow processes to request scheduling priority
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
}