mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
flake.nix: move the imported modules into the shared config
This makes it easier to think about the default shared configurations.
This commit is contained in:
parent
ec216c82d7
commit
1a9960a0f3
39
flake.nix
39
flake.nix
@ -144,13 +144,18 @@
|
||||
# Only use imports as minimally as possible with the absolute
|
||||
# requirements of a host. On second thought, only on flakes with
|
||||
# optional NixOS modules.
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.nur.nixosModules.nur
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.guix-overlay.nixosModules.guix
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
imports =
|
||||
# Append with our custom NixOS modules from the modules folder.
|
||||
import ./modules/nixos { inherit lib; isInternal = true; }
|
||||
|
||||
# Then, make the most with the modules from the flake inputs.
|
||||
++ [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.nur.nixosModules.nur
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.guix-overlay.nixosModules.guix
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
|
||||
# BOOOOOOOOOOOOO! Somebody give me a tomato!
|
||||
services.xserver.excludePackages = with pkgs; [ xterm ];
|
||||
@ -178,12 +183,7 @@
|
||||
# The global configuration for the home-manager module.
|
||||
home-manager.useUserPackages = lib.mkDefault true;
|
||||
home-manager.useGlobalPkgs = lib.mkDefault true;
|
||||
home-manager.sharedModules =
|
||||
(import ./modules/home-manager {
|
||||
inherit lib;
|
||||
isInternal = true;
|
||||
})
|
||||
++ [ userSharedConfig ];
|
||||
home-manager.sharedModules = [ userSharedConfig ];
|
||||
home-manager.extraSpecialArgs = extraArgs;
|
||||
|
||||
# Enabling some things for sops.
|
||||
@ -204,10 +204,15 @@
|
||||
# configurations with `nixpkgs.useGlobalPkgs` set to `true` so avoid
|
||||
# setting nixpkgs-related options here.
|
||||
userSharedConfig = { pkgs, config, lib, ... }: {
|
||||
imports = [
|
||||
inputs.nur.hmModules.nur
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
imports =
|
||||
# Import our own custom modules from here..
|
||||
import ./modules/home-manager { inherit lib; isInternal = true; }
|
||||
|
||||
# ...plus a bunch of third-party modules.
|
||||
++ [
|
||||
inputs.nur.hmModules.nur
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
|
||||
# Hardcoding this is not really great especially if you consider using
|
||||
# other locales but its default values are already hardcoded so what
|
||||
|
@ -9,12 +9,7 @@
|
||||
# The system of the NixOS system.
|
||||
inherit system lib;
|
||||
specialArgs = extraArgs;
|
||||
modules =
|
||||
# Append with our custom NixOS modules from the modules folder.
|
||||
(import ../modules/nixos { inherit lib; isInternal = true; })
|
||||
|
||||
# Our own modules.
|
||||
++ extraModules;
|
||||
modules = extraModules;
|
||||
};
|
||||
|
||||
# A wrapper around the home-manager configuration function.
|
||||
@ -22,12 +17,7 @@
|
||||
inputs."${home-manager-channel}".lib.homeManagerConfiguration {
|
||||
inherit lib pkgs;
|
||||
extraSpecialArgs = extraArgs;
|
||||
modules =
|
||||
# Importing our custom home-manager modules.
|
||||
(import ../modules/home-manager { inherit lib; isInternal = true; })
|
||||
|
||||
# Plus our own.
|
||||
++ extraModules;
|
||||
modules = extraModules;
|
||||
};
|
||||
|
||||
# A wrapper around the nixos-generators `nixosGenerate` function.
|
||||
@ -35,12 +25,7 @@
|
||||
inputs.nixos-generators.nixosGenerate {
|
||||
inherit pkgs system format lib;
|
||||
specialArgs = extraArgs;
|
||||
modules =
|
||||
# Import all of the NixOS modules.
|
||||
(import ../modules/nixos { inherit lib; isInternal = true; })
|
||||
|
||||
# Our own modules.
|
||||
++ extraModules;
|
||||
modules = extraModules;
|
||||
};
|
||||
|
||||
listImagesWithSystems = data:
|
||||
|
Loading…
Reference in New Issue
Block a user