Skip to content

Commit

Permalink
chore!: shorten configuration option names
Browse files Browse the repository at this point in the history
  • Loading branch information
squirmy committed Apr 13, 2024
1 parent eaa0341 commit 7979262
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 21 deletions.
4 changes: 2 additions & 2 deletions configuration/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{...}: {
nix-machine.configurations.nix-machine = {
options = ./options.nix;
nixDarwin = ./nix-darwin;
homeManager = ./home-manager;
darwin = ./nix-darwin;
home = ./home-manager;
};
}
4 changes: 2 additions & 2 deletions dev/tests/provided-darwin/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
config = flakeLib.config.merge {
squirmy = {
options = ../_fixture/provided-config/options.nix;
nixDarwin = ../_fixture/provided-config/nix-darwin.nix;
homeManager = ../_fixture/provided-config/home-manager.nix;
darwin = ../_fixture/provided-config/nix-darwin.nix;
home = ../_fixture/provided-config/home-manager.nix;
path = null;
};
};
Expand Down
4 changes: 2 additions & 2 deletions dev/tests/provided-hm/expr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
config = flakeLib.config.merge {
squirmy = {
options = ../_fixture/provided-config/options.nix;
nixDarwin = ../_fixture/provided-config/nix-darwin.nix;
homeManager = ../_fixture/provided-config/home-manager.nix;
darwin = ../_fixture/provided-config/nix-darwin.nix;
home = ../_fixture/provided-config/home-manager.nix;
path = null;
};
};
Expand Down
4 changes: 2 additions & 2 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
type = lib.types.deferredModule;
default = {};
};
nixDarwin = lib.mkOption {
darwin = lib.mkOption {
type = lib.types.deferredModule;
default = {};
};
homeManager = lib.mkOption {
home = lib.mkOption {
type = lib.types.deferredModule;
default = {};
};
Expand Down
8 changes: 1 addition & 7 deletions lib/config/resolve.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{lib, ...}: c: let
# todo; break backwards compatibility and just return c
resolveProvided = c: {
options = c.options;
darwin = c.nixDarwin;
home = c.homeManager;
};

resolveProvided = c: c;
resolveFlat = c: import ./resolve-flat.nix {inherit lib;} c.path;

resolver =
Expand Down
4 changes: 2 additions & 2 deletions templates/expose-configuration/configuration/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{...}: {
nix-machine.configurations.private = {
options = ./options.nix;
nixDarwin = ./nix-darwin;
homeManager = ./home-manager;
darwin = ./nix-darwin;
home = ./home-manager;
};
}
4 changes: 2 additions & 2 deletions templates/minimal/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
nix-machine.configurations.private = {
# configuration to apply to nix-darwin
# https://daiderd.com/nix-darwin/manual/index.html
nixDarwin = {...}: {
darwin = {...}: {
security.pam.enableSudoTouchIdAuth = true;
};

# configuration to apply to home-manager
# https://mipmip.github.io/home-manager-option-search/
homeManager = {pkgs, ...}: {
home = {pkgs, ...}: {
home.packages = [
pkgs.fortune
];
Expand Down
4 changes: 2 additions & 2 deletions templates/simple-macos/configuration/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{...}: {
nix-machine.configurations.private = {
nixDarwin = ./nix-darwin;
homeManager = ./home-manager;
darwin = ./nix-darwin;
home = ./home-manager;
};
}

0 comments on commit 7979262

Please sign in to comment.