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 = {
|
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-16 16:52:46 +00:00
|
|
|
###*** IMPORTANT: Please set your system's hostname here ***###
|
2024-06-16 18:53:33 +00:00
|
|
|
hostName = builtins.abort "Please set the 'hostName' variable in flake.nix";
|
2024-06-16 16:52:46 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
What kind of system are you running NixOS on?
|
|
|
|
If you're not sure, leave this as the default.
|
|
|
|
|
|
|
|
Options are:
|
|
|
|
x86_64-linux - (Default) 64-bit PCs.
|
|
|
|
aarch64-linux - 64-bit ARM PCs.
|
|
|
|
x86_64-darwin - Intel Macs.
|
|
|
|
aarch64-darwin - M-series Macs.
|
|
|
|
*/
|
|
|
|
platform = "x86_64-linux";
|
2024-06-13 14:00:35 +00:00
|
|
|
|
|
|
|
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-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-16 16:52:46 +00:00
|
|
|
{
|
|
|
|
networking.hostName = hostName;
|
|
|
|
nixpkgs.hostPlatform = platform;
|
|
|
|
}
|
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
|
|
|
|
2024-06-16 16:52:46 +00:00
|
|
|
formatter.${platform} = nixpkgs.legacyPackages.${platform}.nixfmt-rfc-style;
|
2024-05-01 20:46:28 +00:00
|
|
|
};
|
|
|
|
}
|