[NixOS] Provide inputs as a specialArgs
This commit is contained in:
parent
e97c2b2fce
commit
dcddbd8c92
@ -28,7 +28,7 @@
|
||||
url = github:IvanMalison/notifications-tray-icon/master;
|
||||
};
|
||||
};
|
||||
outputs = {
|
||||
outputs = inputs@{
|
||||
self, nix, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad,
|
||||
xmonad-contrib, notifications-tray-icon
|
||||
}:
|
||||
@ -56,30 +56,29 @@
|
||||
nixos-hardware.nixosModules.raspberry-pi-4
|
||||
];
|
||||
});
|
||||
mkNixosConfig = args@{ system ? "x86_64-linux", baseModules ? [ forAll ], modules ? [], specialArgs ? {}, ... }:
|
||||
nixpkgs.lib.nixosSystem (args // {
|
||||
inherit system;
|
||||
modules = baseModules ++ modules;
|
||||
specialArgs = { inherit inputs; } // specialArgs;
|
||||
});
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
ivanm-dfinity-razer = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ forAll ./machines/ivanm-dfinity-razer.nix ];
|
||||
ivanm-dfinity-razer = mkNixosConfig {
|
||||
modules = [ ./machines/ivanm-dfinity-razer.nix ];
|
||||
};
|
||||
ryzen-shine = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ forAll ./machines/ryzen-shine.nix ];
|
||||
ryzen-shine = mkNixosConfig {
|
||||
modules = [ ./machines/ryzen-shine.nix ];
|
||||
};
|
||||
adele = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ forAll ./machines/adele.nix ({ ... }: {
|
||||
imports = [
|
||||
nixos-hardware.nixosModules.dell-xps-17-9700-intel
|
||||
];
|
||||
})];
|
||||
adele = mkNixosConfig {
|
||||
modules = [ ./machines/adele.nix ];
|
||||
};
|
||||
biskcomp = nixpkgs.lib.nixosSystem {
|
||||
biskcomp = mkNixosConfig {
|
||||
system = "aarch64-linux";
|
||||
modules = [ forAll piHardware ./machines/biskcomp.nix ];
|
||||
};
|
||||
air-gapped-pi = nixpkgs.lib.nixosSystem {
|
||||
air-gapped-pi = mkNixosConfig {
|
||||
system = "aarch64-linux";
|
||||
modules = [ forAll piHardware ./machines/air-gapped-pi.nix ];
|
||||
};
|
||||
|
@ -1,29 +1,18 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../full.nix
|
||||
../base.nix
|
||||
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-intel
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
boot.kernelPatches = [{
|
||||
name = "enable-soundwire-drivers";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y
|
||||
SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m
|
||||
SND_SOC_RT1308 m
|
||||
'';
|
||||
ignoreConfigErrors = true;
|
||||
}];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
|
@ -1,6 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.raspberry-pi-4
|
||||
];
|
||||
|
||||
hardware.raspberry-pi."4".fkms-3d.enable = true;
|
||||
|
||||
boot = {
|
||||
|
Loading…
Reference in New Issue
Block a user