mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
flake.nix: refactor and remove system
from extraArgs
This commit is contained in:
parent
12251141e7
commit
d70f3b3e69
10
flake.nix
10
flake.nix
@ -99,7 +99,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
defaultSystem = inputs.flake-utils.lib.system.x86_64-linux;
|
defaultSystem = inputs.flake-utils.lib.system.x86_64-linux;
|
||||||
systems = with inputs.flake-utils.lib.system; [ x86_64-linux ];
|
systems = with inputs.flake-utils.lib.system; [ defaultSystem ];
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||||
|
|
||||||
# We're considering this as the variant since we'll export the custom
|
# We're considering this as the variant since we'll export the custom
|
||||||
@ -108,14 +108,14 @@
|
|||||||
import ./lib { lib = prev; }
|
import ./lib { lib = prev; }
|
||||||
// import ./lib/private.nix { lib = final; });
|
// import ./lib/private.nix { lib = final; });
|
||||||
|
|
||||||
withExtraArgs = system: { inherit inputs self system; };
|
extraArgs = { inherit inputs self; };
|
||||||
|
|
||||||
mkHost = { system ? defaultSystem, extraModules ? [ ] }:
|
mkHost = { system ? defaultSystem, extraModules ? [ ] }:
|
||||||
(lib'.makeOverridable inputs.nixpkgs.lib.nixosSystem) {
|
(lib'.makeOverridable inputs.nixpkgs.lib.nixosSystem) {
|
||||||
# The system of the NixOS system.
|
# The system of the NixOS system.
|
||||||
inherit system;
|
inherit system;
|
||||||
lib = lib';
|
lib = lib';
|
||||||
specialArgs = withExtraArgs system;
|
specialArgs = extraArgs;
|
||||||
modules =
|
modules =
|
||||||
# Append with our custom NixOS modules from the modules folder.
|
# Append with our custom NixOS modules from the modules folder.
|
||||||
(lib'.modulesToList (lib'.filesToAttr ./modules/nixos))
|
(lib'.modulesToList (lib'.filesToAttr ./modules/nixos))
|
||||||
@ -212,7 +212,7 @@
|
|||||||
home-manager.sharedModules =
|
home-manager.sharedModules =
|
||||||
lib'.modulesToList (lib'.filesToAttr ./modules/home-manager)
|
lib'.modulesToList (lib'.filesToAttr ./modules/home-manager)
|
||||||
++ [ userDefaultConfig ];
|
++ [ userDefaultConfig ];
|
||||||
home-manager.extraSpecialArgs = withExtraArgs system;
|
home-manager.extraSpecialArgs = extraArgs;
|
||||||
|
|
||||||
# Enabling some things for sops.
|
# Enabling some things for sops.
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
@ -225,7 +225,7 @@
|
|||||||
|
|
||||||
mkUser = { system ? defaultSystem, extraModules ? [ ] }:
|
mkUser = { system ? defaultSystem, extraModules ? [ ] }:
|
||||||
inputs.home-manager.lib.homeManagerConfiguration {
|
inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
extraSpecialArgs = withExtraArgs system;
|
extraSpecialArgs = extraArgs;
|
||||||
lib = lib';
|
lib = lib';
|
||||||
pkgs = nixpkgs.legacyPackages.${builtins.currentSystem};
|
pkgs = nixpkgs.legacyPackages.${builtins.currentSystem};
|
||||||
modules =
|
modules =
|
||||||
|
Loading…
Reference in New Issue
Block a user