-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix nixd nixos and home-manager option expresisons
- Loading branch information
1 parent
9f4b563
commit 62c493a
Showing
4 changed files
with
12 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,22 @@ | ||
{ | ||
osConfig, | ||
config, | ||
self, | ||
lib, | ||
pkgs, | ||
userInfo, | ||
}: { | ||
enable = true; | ||
|
||
settings = let | ||
inherit (osConfig.networking) hostName; | ||
|
||
flakeExpr = | ||
# nix | ||
'' | ||
(builtins.getFlake "${config.home.homeDirectory}/dotfiles") | ||
''; | ||
flake = ''(builtins.getFlake "${self}")''; | ||
nixosOpts = ''${flake}.nixosConfigurations.${hostName}.options''; | ||
in { | ||
nixpkgs.expr = | ||
# nix | ||
'' | ||
import ${flakeExpr}.inputs.nixpkgs {} | ||
''; | ||
nixpkgs.expr = ''import ${flake}.inputs.nixpkgs {}''; | ||
formatting.command = ["${lib.getExe pkgs.alejandra}"]; | ||
options = { | ||
nixos.expr = | ||
# nix | ||
'' | ||
${flakeExpr}.nixosConfigurations.${hostName}.options | ||
''; | ||
home-manager.expr = | ||
# nix | ||
'' | ||
${flakeExpr}.homeConfigurations."${userInfo.username}@${hostName}".options | ||
''; | ||
nixos.expr = nixosOpts; | ||
home-manager.expr = ''${nixosOpts}.home-manager.users.type.getSubOptions []''; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters