2024-05-01 20:46:28 +00:00
|
|
|
{
|
2024-06-13 14:00:35 +00:00
|
|
|
description = "A system flake with various options for bootstrapping a complete Aux install.";
|
2024-05-01 20:46:28 +00:00
|
|
|
|
2024-06-13 14:00:35 +00:00
|
|
|
inputs = {
|
|
|
|
# Import Auxolotl libs
|
|
|
|
auxlib.url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz?dir=lib";
|
|
|
|
|
|
|
|
# Import the desired Nixpkgs repo. Defaults to unstable.
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
|
|
|
|
# SecureBoot support
|
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.0";
|
|
|
|
};
|
2024-05-01 20:46:28 +00:00
|
|
|
|
|
|
|
outputs =
|
2024-06-13 14:00:35 +00:00
|
|
|
inputs@{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
lanzaboote,
|
|
|
|
auxlib,
|
|
|
|
...
|
|
|
|
}:
|
2024-05-01 20:46:28 +00:00
|
|
|
let
|
2024-06-13 14:00:35 +00:00
|
|
|
forAllSystems =
|
|
|
|
function:
|
|
|
|
nixpkgs.lib.genAttrs [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-darwin"
|
|
|
|
] (system: function nixpkgs.legacyPackages.${system});
|
|
|
|
|
|
|
|
baseModules = [
|
|
|
|
./modules/autoimport.nix
|
|
|
|
lanzaboote.nixosModules.lanzaboote
|
|
|
|
];
|
|
|
|
|
2024-05-01 20:46:28 +00:00
|
|
|
system = "x86_64-linux";
|
|
|
|
hostName = builtins.abort "You need to fill in your hostName"; # Set this variable equal to your hostName
|
|
|
|
in
|
|
|
|
{
|
2024-06-13 14:00:35 +00:00
|
|
|
nixosConfigurations."myHost" = nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = baseModules ++ [
|
|
|
|
./host/configuration.nix
|
2024-05-07 11:03:53 +00:00
|
|
|
{
|
|
|
|
networking.hostName = hostName;
|
|
|
|
nixpkgs.hostPlatform = system;
|
|
|
|
}
|
2024-05-01 22:00:23 +00:00
|
|
|
];
|
2024-05-01 20:46:28 +00:00
|
|
|
};
|
2024-06-13 14:00:35 +00:00
|
|
|
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
2024-05-01 20:46:28 +00:00
|
|
|
};
|
|
|
|
}
|