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";
|
|
|
|
|
2024-06-15 18:26:05 +00:00
|
|
|
# Flatpak support
|
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/v0.4.1";
|
|
|
|
|
2024-06-13 14:00:35 +00:00
|
|
|
# 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-06-15 18:26:05 +00:00
|
|
|
|
|
|
|
# NixOS hardware quirks
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
|
|
|
|
# Add Home-manager support
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-06-13 14:00:35 +00:00
|
|
|
};
|
2024-05-01 20:46:28 +00:00
|
|
|
|
|
|
|
outputs =
|
2024-06-13 14:00:35 +00:00
|
|
|
inputs@{
|
|
|
|
self,
|
|
|
|
auxlib,
|
2024-06-15 18:26:05 +00:00
|
|
|
home-manager,
|
|
|
|
lanzaboote,
|
|
|
|
nix-flatpak,
|
|
|
|
nixos-hardware,
|
|
|
|
nixpkgs,
|
2024-06-13 14:00:35 +00:00
|
|
|
...
|
|
|
|
}:
|
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
|
2024-06-15 18:26:05 +00:00
|
|
|
home-manager.nixosModules.home-manager
|
2024-06-13 14:00:35 +00:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
2024-06-15 18:26:05 +00:00
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
|
|
# Set global home-manager settings
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
/*
|
|
|
|
When running, Home Manager will use the global package cache.
|
|
|
|
It will also back up any files that it would otherwise overwrite.
|
|
|
|
The originals will have the extension ".home-manager_backup".
|
|
|
|
*/
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
backupFileExtension = "home-manager_backup";
|
|
|
|
};
|
|
|
|
}
|
2024-06-13 14:00:35 +00:00
|
|
|
];
|
2024-06-15 18:26:05 +00:00
|
|
|
###*** IMPORTANT: Please set your system's hostname here ***###
|
|
|
|
hostName = builtins.abort "Please set the hostName variable in flake.nix";
|
2024-05-01 20:46:28 +00:00
|
|
|
in
|
|
|
|
{
|
2024-06-15 18:26:05 +00:00
|
|
|
nixosConfigurations."${hostName}" = nixpkgs.lib.nixosSystem {
|
2024-06-13 14:00:35 +00:00
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
|
|
|
modules = baseModules ++ [
|
2024-06-15 18:26:05 +00:00
|
|
|
{ networking.hostName = hostName; }
|
2024-06-13 14:00:35 +00:00
|
|
|
./host/configuration.nix
|
2024-06-15 18:26:05 +00:00
|
|
|
|
|
|
|
# NixOS-Hardware
|
|
|
|
# Add your model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix
|
|
|
|
# nixos-hardware.nixosModules.framework-13th-gen-intel
|
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
|
|
|
};
|
|
|
|
}
|