2024-05-03 21:32:27 +00:00
|
|
|
# Based on the Auxolotl template: https://github.com/auxolotl/templates
|
2024-02-29 14:53:34 +00:00
|
|
|
# For info on Flakes, see: https://nixos-and-flakes.thiscute.world/nixos-with-flakes/nixos-with-flakes-enabled
|
|
|
|
{
|
|
|
|
description = "Aires' system Flake";
|
|
|
|
|
|
|
|
inputs = {
|
2024-03-19 22:44:33 +00:00
|
|
|
# Track base packages against Nix unstable
|
2024-02-29 14:53:34 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
|
2024-03-19 22:44:33 +00:00
|
|
|
# SecureBoot support
|
2024-02-29 14:53:34 +00:00
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.3.0";
|
|
|
|
|
2024-03-19 22:44:33 +00:00
|
|
|
# Flatpak support
|
2024-04-15 16:00:08 +00:00
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/v0.4.1";
|
2024-02-29 14:53:34 +00:00
|
|
|
|
|
|
|
# Hardware configurations
|
2024-05-04 02:36:50 +00:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
|
2024-02-29 14:53:34 +00:00
|
|
|
# Home-manager
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list where available
|
|
|
|
};
|
2024-03-30 06:29:37 +00:00
|
|
|
|
|
|
|
# TODO: Add Disko - https://github.com/nix-community/disko
|
2024-02-29 14:53:34 +00:00
|
|
|
};
|
|
|
|
|
2024-05-04 14:40:10 +00:00
|
|
|
outputs = inputs@{ self, nixpkgs, lanzaboote, nix-flatpak, home-manager, nixos-hardware, ... }:
|
2024-02-29 14:53:34 +00:00
|
|
|
let
|
2024-05-03 21:32:27 +00:00
|
|
|
forAllSystems = function:
|
|
|
|
nixpkgs.lib.genAttrs [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
] (system: function nixpkgs.legacyPackages.${system});
|
|
|
|
config.allowUnfree = true;
|
2024-02-29 14:53:34 +00:00
|
|
|
|
|
|
|
# Define shared modules and imports
|
|
|
|
defaultModules = {
|
|
|
|
base = [
|
|
|
|
{ _module.args = { inherit inputs; }; }
|
2024-05-03 21:32:27 +00:00
|
|
|
./hosts/default.nix
|
2024-02-29 14:53:34 +00:00
|
|
|
lanzaboote.nixosModules.lanzaboote
|
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
|
|
home-manager.nixosModules.home-manager {
|
|
|
|
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 shown below.
|
|
|
|
*/
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
backupFileExtension = "home-manager-backup";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in {
|
2024-05-03 21:32:27 +00:00
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
2024-02-29 14:53:34 +00:00
|
|
|
nixosConfigurations = {
|
2024-05-03 21:32:27 +00:00
|
|
|
|
2024-02-29 14:53:34 +00:00
|
|
|
Dimaga = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
2024-04-07 00:15:58 +00:00
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
2024-02-29 14:53:34 +00:00
|
|
|
./hosts/Dimaga
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Haven = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
2024-04-10 19:25:22 +00:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
2024-02-29 14:53:34 +00:00
|
|
|
./hosts/Haven
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-04-28 00:19:59 +00:00
|
|
|
Khanda = nixpkgs.lib.nixosSystem {
|
2024-04-23 18:46:17 +00:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
2024-04-28 15:54:53 +00:00
|
|
|
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
2024-04-23 18:46:17 +00:00
|
|
|
./hosts/Khanda
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-03-04 15:57:41 +00:00
|
|
|
Pihole = nixpkgs.lib.nixosSystem {
|
2024-02-29 14:53:34 +00:00
|
|
|
system = "aarch64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
2024-03-04 15:57:41 +00:00
|
|
|
nixos-hardware.nixosModules.raspberry-pi-4
|
2024-02-29 14:53:34 +00:00
|
|
|
./hosts/Pihole
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Shura = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
2024-04-10 19:25:22 +00:00
|
|
|
nixos-hardware.nixosModules.lenovo-legion-16arha7
|
2024-02-29 14:53:34 +00:00
|
|
|
./hosts/Shura
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
2024-04-10 19:25:22 +00:00
|
|
|
|