-
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.
feature/modular-outputs: Enable and refactor flake with modular outputs
- Loading branch information
1 parent
ab08c9d
commit fff4cef
Showing
39 changed files
with
186 additions
and
160 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 was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
8 changes: 6 additions & 2 deletions
8
...urations/hosts/h2946065/configuration.nix → hosts/h2946065/configuration.nix
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ nixpkgs, sops-nix, ... }@inputs: | ||
let | ||
inherit (nixpkgs.lib) nixosSystem; | ||
in | ||
{ | ||
nixosConfigurations.h2946065 = nixosSystem { | ||
modules = [ | ||
sops-nix.nixosModules.sops | ||
(import ./configuration.nix inputs) | ||
../../secrets | ||
]; | ||
}; | ||
} |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ nix-darwin, home-manager, ... }@inputs: | ||
{ | ||
darwinConfigurations = { | ||
"michaels-mbp-mozilla" = nix-darwin.lib.darwinSystem { | ||
system = "aarch64-darwin"; | ||
modules = [ | ||
home-manager.darwinModule | ||
(import ./configuration.nix inputs) | ||
]; | ||
}; | ||
}; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ nix-darwin, home-manager, ... }@inputs: | ||
{ | ||
darwinConfigurations = { | ||
"michaels-mbp" = nix-darwin.lib.darwinSystem { | ||
system = "aarch64-darwin"; | ||
modules = [ | ||
home-manager.darwinModule | ||
(import ./configuration.nix inputs) | ||
]; | ||
}; | ||
}; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ self, sops-nix, ... }: | ||
{ ... }: | ||
{ | ||
imports = | ||
with self.nixosModules; | ||
[ | ||
format.raw-efi | ||
hardware.intel-nuc | ||
nix | ||
personal-cloud | ||
ssh | ||
users | ||
] | ||
++ [ sops-nix.nixosModules.sops ]; | ||
|
||
console.keyMap = "de"; | ||
|
||
system.stateVersion = "25.11"; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ nixpkgs, self, ... }@inputs: | ||
let | ||
inherit (nixpkgs.lib) nixosSystem; | ||
in | ||
({ | ||
nixosConfigurations = builtins.mapAttrs ( | ||
hostname: isMaster: | ||
nixosSystem { | ||
modules = [ | ||
(if isMaster then self.nixosModules.roles.k8s-master else self.nixosModules.roles.k8s-worker) | ||
../../../secrets | ||
(import ./configuration.nix inputs) | ||
{ networking.hostName = hostname; } | ||
]; | ||
} | ||
) { "rack-01-k8s-master-nuc-01" = true; }; | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ ... }@inputs: | ||
modulePath: _: | ||
let | ||
module = import modulePath; | ||
isFlakeModule = | ||
module: | ||
builtins.isFunction module | ||
&& (builtins.functionArgs module |> builtins.intersectAttrs inputs) != { }; | ||
in | ||
if isFlakeModule module then module inputs else module |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ nixpkgs, ... }@inputs': | ||
let | ||
inherit (nixpkgs.lib.attrsets) recursiveUpdate; | ||
inherit (nixpkgs.lib.filesystem) listFilesRecursive; | ||
in | ||
{ | ||
directory, | ||
inputs ? inputs', | ||
outputPattern ? ".*/outputs\\.nix$", | ||
}: | ||
let | ||
isOutputFile = path: (builtins.match outputPattern path) != null; | ||
evaluateOutputFile = outputFile: import outputFile inputs; | ||
in | ||
listFilesRecursive directory | ||
|> builtins.map (path: builtins.toString path) | ||
|> builtins.filter isOutputFile | ||
|> builtins.map evaluateOutputFile | ||
|> builtins.foldl' recursiveUpdate { } |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ self, nixpkgs, ... }: | ||
let | ||
inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive; | ||
inherit (self.lib) callModule; | ||
in | ||
directory: | ||
packagesFromDirectoryRecursive { | ||
callPackage = callModule; | ||
inherit directory; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
inputs: { | ||
lib = { | ||
callModule = import ./callModule.nix inputs; | ||
callOutputs = import ./callOutputs.nix inputs; | ||
modulesFromDirectoryRecursive = import ./modulesFromDirectoryRecursive.nix inputs; | ||
}; | ||
} |
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.