Add computer specific packages, used it to add 'light' to 4800H

This commit is contained in:
2023-01-16 12:36:01 -05:00
parent 43bb5b9060
commit e68546568c

View File

@@ -129,7 +129,7 @@
}; };
}; };
}; };
commonConfigFunc = ({ config, lib, pkgs, modulesPath, ... }: { commonConfigFunc = ({ config, lib, pkgs, modulesPath, ... }: (specificPkgs: {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
@@ -222,7 +222,7 @@
gsettings set $gnome_schema gtk-theme 'Dracula' gsettings set $gnome_schema gtk-theme 'Dracula'
''; '';
}) })
]; ] ++ specificPkgs;
programs.waybar.enable = true; programs.waybar.enable = true;
# kanshi systemd service # kanshi systemd service
@@ -242,7 +242,7 @@
services.openssh.enable = true; services.openssh.enable = true;
networking.firewall.enable = false; networking.firewall.enable = false;
}); }));
in { in {
nixosConfigurations.nixos4800H = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos4800H = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
@@ -250,7 +250,7 @@
modules = [ modules = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
homeManagerSharedModule homeManagerSharedModule
({ config, lib, pkgs, modulesPath, ... }@innerArgs: (lib.recursiveUpdate (commonConfigFunc innerArgs) { ({ config, lib, pkgs, modulesPath, ... }@innerArgs: (lib.recursiveUpdate (commonConfigFunc innerArgs [ pkgs.light ]) {
# HARDWARE # HARDWARE
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@@ -303,7 +303,7 @@
modules = [ modules = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
homeManagerSharedModule homeManagerSharedModule
({ config, lib, pkgs, modulesPath, ... }@innerArgs: (lib.recursiveUpdate (commonConfigFunc innerArgs) { ({ config, lib, pkgs, modulesPath, ... }@innerArgs: (lib.recursiveUpdate (commonConfigFunc innerArgs []) {
# HARDWARE # HARDWARE
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];