Moving inputs out of flake.nix and into specialArgs for

conditional imports
This commit is contained in:
xqtc161 2024-02-22 17:54:50 +01:00
parent 7be7a45939
commit 9f7743716a
3 changed files with 13 additions and 26 deletions

View file

@ -26,15 +26,17 @@
in { in {
nixosConfigurations = pkgs.util.mapHostAttrs (host: host) (host: lib.nixosSystem { nixosConfigurations = pkgs.util.mapHostAttrs (host: host) (host: lib.nixosSystem {
inherit system; inherit system;
modules = [ ./hosts/${host} home-manager.nixosModules.home-manager { modules = [
home-manager.useGlobalPkgs = true; ./hosts/${host}
home-manager.useUserPackages = true; home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs; home-manager.extraSpecialArgs = inputs;
home-manager.users.xqtc = {...}: {imports = [ ./home nixvim.homeManagerModules.nixvim ]; }; home-manager.users.xqtc = {...}: {imports = [ ./home nixvim.homeManagerModules.nixvim ]; };
} }
#(lib.optionalString (host == "lilith") inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480)
]; ];
specialArgs = { inherit inputs; };
}); });
}; };
} }

View file

@ -15,12 +15,6 @@ else
config.font_size = 11 config.font_size = 11
end end
config.window_background_opacity = .85 config.window_background_opacity = .85
local arrowkeys = {
[1] = { "LeftArrow", "left" },
[2] = "RightArrow",
[3] = "UpArrow",
[4] = "DownArrow",
}
config.keys = { config.keys = {
{ {
key = 't', key = 't',
@ -66,16 +60,8 @@ for i = 1, 8 do
}) })
end end
for i in pairs(arrowkeys) do
table.insert(config.keys, {
key = tostring(i),
mods = 'CTRL',
action = wezterm.action.ActivateTab(i - 1),
})
end
config.hide_tab_bar_if_only_one_tab = true config.hide_tab_bar_if_only_one_tab = true
config.use_fancy_tab_bar = false
config.text_background_opacity = .4 config.text_background_opacity = .4
config.enable_scroll_bar = false config.enable_scroll_bar = false
config.enable_tab_bar = true config.enable_tab_bar = true

View file

@ -1,13 +1,12 @@
{ config, lib, pkgs, nixos-hardware, ... }: { config, lib, inputs, pkgs, nixos-hardware, ... }:
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
#../antivirus.nix #../antivirus.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
../gc.nix ../gc.nix
#nixos-hardware.nixosModules.lenovo.thinkpad.t480
#(builtins.getFlake (builtins.fetchGit "github:NixOs/nixos-hardware")).nixosModules.lenovo-thinkpad-t480
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -73,7 +72,7 @@
# }; # };
# Enable the X11 windowing system. # Enable the X11 windowing system.
services.xserver.enable = true; #services.xserver.enable = true;
#services.xserver.displayManager.gdm.enable = true; #services.xserver.displayManager.gdm.enable = true;
#services.xserver.displayManager.ly.enable = true; #services.xserver.displayManager.ly.enable = true;
#services.xserver.desktopManager.gnome.enable = true; #services.xserver.desktopManager.gnome.enable = true;