Skip to content

Commit

Permalink
fix!: update configuration options types
Browse files Browse the repository at this point in the history
  • Loading branch information
squirmy committed Apr 13, 2024
1 parent 0464332 commit 8a97e83
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 22 deletions.
6 changes: 3 additions & 3 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;
darwin = ./nix-darwin;
home = ./home-manager;
options = [./options.nix];
darwin = [./nix-darwin];
home = [./home-manager];
};
}
12 changes: 6 additions & 6 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

configurationOptions = {
options = lib.mkOption {
type = lib.types.deferredModule;
default = {};
type = lib.types.listOf lib.types.deferredModule;
default = [];
};
darwin = lib.mkOption {
type = lib.types.deferredModule;
default = {};
type = lib.types.listOf lib.types.deferredModule;
default = [];
};
home = lib.mkOption {
type = lib.types.deferredModule;
default = {};
type = lib.types.listOf lib.types.deferredModule;
default = [];
};
path = lib.mkOption {
type = lib.types.nullOr lib.types.path;
Expand Down
6 changes: 3 additions & 3 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;
darwin = ./nix-darwin;
home = ./home-manager;
options = [./options.nix];
darwin = [./nix-darwin];
home = [./home-manager];
};
}
20 changes: 12 additions & 8 deletions templates/minimal/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@
nix-machine.configurations.private = {
# configuration to apply to nix-darwin
# https://daiderd.com/nix-darwin/manual/index.html
darwin = {...}: {
security.pam.enableSudoTouchIdAuth = true;
};
darwin = [
({...}: {
security.pam.enableSudoTouchIdAuth = true;
})
];

# configuration to apply to home-manager
# https://mipmip.github.io/home-manager-option-search/
home = {pkgs, ...}: {
home.packages = [
pkgs.fortune
];
};
home = [
({pkgs, ...}: {
home.packages = [
pkgs.fortune
];
})
];
};
};
}
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 = {
darwin = ./nix-darwin;
home = ./home-manager;
darwin = [./nix-darwin];
home = [./home-manager];
};
}

0 comments on commit 8a97e83

Please sign in to comment.