mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-09 17:52:36 +08:00
DRY nixpkgs config
This commit is contained in:
parent
fb32c442b2
commit
d83cd6b142
6 changed files with 5 additions and 8 deletions
|
|
@ -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 = (
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
swapDevices = [{ device = "/swapfile"; size = 2048; }];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = ''
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@
|
|||
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = ''
|
||||
|
|
|
|||
|
|
@ -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 = ''
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
Option "Xinerama" "off"
|
||||
'';
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue