mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 18:19:11 +00:00
flake-parts/setups: fix the word casing consistency of the options
This commit is contained in:
parent
5caa2b5663
commit
93dbf68166
@ -5,11 +5,11 @@ let
|
||||
cfg = config.setups.home-manager;
|
||||
|
||||
# A thin wrapper around the home-manager configuration function.
|
||||
mkHome = { system, nixpkgs-branch ? "nixpkgs", home-manager-branch ? "home-manager", extraModules ? [ ] }:
|
||||
mkHome = { system, nixpkgsBranch ? "nixpkgs", homeManagerBranch ? "home-manager", extraModules ? [ ] }:
|
||||
let
|
||||
pkgs = inputs.${nixpkgs-branch}.legacyPackages.${system};
|
||||
pkgs = inputs.${nixpkgsBranch}.legacyPackages.${system};
|
||||
in
|
||||
inputs.${home-manager-branch}.lib.homeManagerConfiguration {
|
||||
inputs.${homeManagerBranch}.lib.homeManagerConfiguration {
|
||||
extraSpecialArgs = {
|
||||
foodogsquaredModulesPath = builtins.toString ../../home-manager;
|
||||
};
|
||||
@ -97,7 +97,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
nixpkgs-branch = lib.mkOption {
|
||||
nixpkgsBranch = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixpkgs";
|
||||
example = "nixos-unstable-small";
|
||||
@ -113,7 +113,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
home-manager-branch = lib.mkOption {
|
||||
homeManagerBranch = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "home-manager";
|
||||
example = "home-manager-stable";
|
||||
@ -123,7 +123,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
home-directory = lib.mkOption {
|
||||
homeDirectory = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "/home/${name}";
|
||||
example = "/var/home/public-user";
|
||||
@ -154,7 +154,7 @@ let
|
||||
{
|
||||
nixpkgs.overlays = config.overlays;
|
||||
home.username = lib.mkForce name;
|
||||
home.homeDirectory = lib.mkForce config.home-directory;
|
||||
home.homeDirectory = lib.mkForce config.homeDirectory;
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -229,7 +229,7 @@ in
|
||||
(builtins.map
|
||||
(system:
|
||||
lib.nameValuePair system (mkHome {
|
||||
inherit (metadata) nixpkgs-branch home-manager-branch;
|
||||
inherit (metadata) nixpkgsBranch homeManagerBranch;
|
||||
inherit system;
|
||||
extraModules =
|
||||
cfg.sharedModules
|
||||
|
@ -9,9 +9,9 @@ let
|
||||
cfg = config.setups.nixos;
|
||||
|
||||
# A thin wrapper around the NixOS configuration function.
|
||||
mkHost = { extraModules ? [ ], nixpkgs-branch ? "nixpkgs", system }:
|
||||
mkHost = { extraModules ? [ ], nixpkgsBranch ? "nixpkgs", system }:
|
||||
let
|
||||
nixpkgs = inputs.${nixpkgs-branch};
|
||||
nixpkgs = inputs.${nixpkgsBranch};
|
||||
|
||||
# Just to be sure, we'll use everything with the given nixpkgs' stdlib.
|
||||
lib' = nixpkgs.lib.extend (import ../../../lib/extras/extend-lib.nix);
|
||||
@ -37,12 +37,12 @@ let
|
||||
};
|
||||
|
||||
# A very very thin wrapper around `mkHost` to build with the given format.
|
||||
mkImage = { system, nixpkgs-branch ? "nixpkgs", extraModules ? [ ], format ? "iso" }:
|
||||
mkImage = { system, nixpkgsBranch ? "nixpkgs", extraModules ? [ ], format ? "iso" }:
|
||||
let
|
||||
extraModules' =
|
||||
extraModules ++ [ inputs.nixos-generators.nixosModules.${format} ];
|
||||
image = mkHost {
|
||||
inherit nixpkgs-branch system;
|
||||
inherit nixpkgsBranch system;
|
||||
extraModules = extraModules';
|
||||
};
|
||||
in
|
||||
@ -152,7 +152,7 @@ let
|
||||
description = "The domain of the NixOS system.";
|
||||
};
|
||||
|
||||
nixpkgs-branch = lib.mkOption {
|
||||
nixpkgsBranch = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixpkgs";
|
||||
description = ''
|
||||
@ -168,7 +168,7 @@ let
|
||||
example = "nixos-unstable-small";
|
||||
};
|
||||
|
||||
home-manager-branch = lib.mkOption {
|
||||
homeManagerBranch = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "home-manager";
|
||||
example = "home-manager-stable";
|
||||
@ -199,7 +199,7 @@ let
|
||||
|
||||
config = {
|
||||
modules = [
|
||||
inputs.${config.home-manager-branch}.nixosModules.home-manager
|
||||
inputs.${config.homeManagerBranch}.nixosModules.home-manager
|
||||
../../../configs/nixos/${name}
|
||||
|
||||
{
|
||||
@ -266,7 +266,7 @@ in
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
domain = "work.example.com";
|
||||
formats = [ "do" "linode" ];
|
||||
nixpkgs-branch = "nixos-unstable-small";
|
||||
nixpkgsBranch = "nixos-unstable-small";
|
||||
deploy = {
|
||||
};
|
||||
};
|
||||
@ -302,7 +302,7 @@ in
|
||||
(builtins.map
|
||||
(system:
|
||||
lib.nameValuePair system (mkHost {
|
||||
nixpkgs-branch = metadata.nixpkgs-branch;
|
||||
nixpkgsBranch = metadata.nixpkgsBranch;
|
||||
extraModules = cfg.sharedModules ++ metadata.modules;
|
||||
inherit system;
|
||||
})
|
||||
@ -367,7 +367,7 @@ in
|
||||
lib.nameValuePair
|
||||
"${name}-${format}"
|
||||
(mkImage {
|
||||
inherit (metadata) nixpkgs-branch;
|
||||
inherit (metadata) nixpkgsBranch;
|
||||
inherit system format;
|
||||
extraModules = cfg.sharedModules ++ metadata.modules;
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user