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