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