2024-02-29 09:53:34 -05: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 18:44:33 -04:00
|
|
|
# Track base packages against Nix unstable
|
2024-02-29 09:53:34 -05:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
|
2024-03-19 18:44:33 -04:00
|
|
|
# SecureBoot support
|
2024-02-29 09:53:34 -05:00
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.3.0";
|
|
|
|
|
2024-03-19 18:44:33 -04:00
|
|
|
# Flatpak support
|
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/v0.3.0";
|
2024-02-29 09:53:34 -05:00
|
|
|
|
|
|
|
# Hardware configurations
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
|
|
|
|
# Home-manager
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list where available
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = inputs@{ self, nixpkgs, lanzaboote, nix-flatpak, home-manager, nixos-hardware, ... }:
|
|
|
|
let
|
|
|
|
inherit (self) outputs;
|
2024-03-02 12:58:30 -05:00
|
|
|
inherit (nixpkgs) lib;
|
2024-02-29 09:53:34 -05:00
|
|
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
forEachSystem = f: lib.genAttrs systems (sys: f pkgsFor.${sys});
|
|
|
|
pkgsFor = lib.genAttrs systems (system: import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
});
|
|
|
|
|
|
|
|
# Define shared modules and imports
|
|
|
|
defaultModules = {
|
|
|
|
base = [
|
|
|
|
{ _module.args = { inherit inputs; }; }
|
|
|
|
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 {
|
|
|
|
nixosConfigurations = {
|
|
|
|
Dimaga = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
|
|
|
./hosts/Dimaga
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Haven = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
|
|
|
./hosts/Haven
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-03-04 10:57:41 -05:00
|
|
|
Pihole = nixpkgs.lib.nixosSystem {
|
2024-02-29 09:53:34 -05:00
|
|
|
system = "aarch64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
2024-03-04 10:57:41 -05:00
|
|
|
nixos-hardware.nixosModules.raspberry-pi-4
|
2024-02-29 09:53:34 -05:00
|
|
|
./hosts/Pihole
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Shura = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules.base ++ [
|
|
|
|
./hosts/Shura
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|