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 {
nixosConfigurations = pkgs.util.mapHostAttrs (host: host) (host: lib.nixosSystem {
inherit system;
modules = [ ./hosts/${host} home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
modules = [
./hosts/${host}
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
home-manager.users.xqtc = {...}: {imports = [ ./home nixvim.homeManagerModules.nixvim ]; };
}
#(lib.optionalString (host == "lilith") inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480)
home-manager.extraSpecialArgs = inputs;
home-manager.users.xqtc = {...}: {imports = [ ./home nixvim.homeManagerModules.nixvim ]; };
}
];
specialArgs = { inherit inputs; };
});
};
}

View file

@ -15,12 +15,6 @@ else
config.font_size = 11
end
config.window_background_opacity = .85
local arrowkeys = {
[1] = { "LeftArrow", "left" },
[2] = "RightArrow",
[3] = "UpArrow",
[4] = "DownArrow",
}
config.keys = {
{
key = 't',
@ -66,16 +60,8 @@ for i = 1, 8 do
})
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.use_fancy_tab_bar = false
config.text_background_opacity = .4
config.enable_scroll_bar = false
config.enable_tab_bar = true

View file

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