DRY nixpkgs config

This commit is contained in:
Sridhar Ratnakumar 2021-11-06 10:29:47 -04:00
parent fb32c442b2
commit d83cd6b142
6 changed files with 5 additions and 8 deletions

View file

@ -24,14 +24,16 @@
outputs = inputs@{ self, home-manager, nixpkgs, ... }:
let
system = "x86_64-linux";
# Add nixpkgs overlays and config here. They apply to system and home-manager builds.
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
(import inputs.emacs-overlay)
];
};
mkComputer = configurationNix: extraModules: nixpkgs.lib.nixosSystem {
inherit system;
inherit system pkgs;
# Arguments to pass to all modules.
specialArgs = { inherit system inputs; };
modules = (

View file

@ -8,7 +8,6 @@
swapDevices = [{ device = "/swapfile"; size = 2048; }];
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixUnstable;
extraOptions = ''

View file

@ -100,7 +100,6 @@
};
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixUnstable;
extraOptions = ''

View file

@ -9,7 +9,7 @@
boot.initrd.availableKernelModules = [ "nvme" "ahci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
@ -17,7 +17,7 @@
fsType = "ext4";
};
swapDevices = [];
swapDevices = [ ];
nix.maxJobs = lib.mkDefault 32;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
@ -99,7 +99,6 @@
hostName = "ryzen9";
};
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixUnstable;
extraOptions = ''

View file

@ -51,7 +51,6 @@
Option "Xinerama" "off"
'';
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixFlakes;
extraOptions = ''

View file

@ -38,7 +38,6 @@
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = [ "ntfs" ];
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixFlakes;
extraOptions = ''