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 = " A i r e s ' s y s t e m F l a k e " ;
inputs = {
# Configure nixpkgs
nixpkgs . url = " g i t h u b : N i x O S / n i x p k g s / n i x o s - u n s t a b l e " ;
# For SecureBoot support
lanzaboote . url = " g i t h u b : n i x - c o m m u n i t y / l a n z a b o o t e / v 0 . 3 . 0 " ;
# For Flatpak support
nix-flatpak . url = " g i t h u b : g m o d e n a / n i x - f l a t p a k / v 0 . 3 . 0 " ; # Use github:gmodena/nix-flatpak/?ref=<tag> to change release version, nix-flatpak/<commit> to reference a specific commit, or remove to track main (unstable).
# Hardware configurations
nixos-hardware . url = " g i t h u b : N i x O S / n i x o s - h a r d w a r e / m a s t e r " ;
# Home-manager
home-manager = {
url = " g i t h u b : n i x - c o m m u n i t y / h o m e - m a n a g e r / m a s t e r " ;
inputs . nixpkgs . follows = " n i x p k g s " ; # Use system packages list where available
} ;
} ;
outputs = inputs @ { self , nixpkgs , lanzaboote , nix-flatpak , home-manager , nixos-hardware , . . . }:
let
inherit ( self ) outputs ;
2024-03-02 17:58:30 +00:00
inherit ( nixpkgs ) lib ;
2024-02-29 14:53:34 +00:00
systems = [ " x 8 6 _ 6 4 - l i n u x " " a a r c h 6 4 - l i n u x " ] ;
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 = " h o m e - m a n a g e r - b a c k u p " ;
} ;
}
] ;
} ;
in {
nixosConfigurations = {
Dimaga = nixpkgs . lib . nixosSystem {
system = " x 8 6 _ 6 4 - l i n u x " ;
modules = defaultModules . base ++ [
./hosts/Dimaga
] ;
} ;
Haven = nixpkgs . lib . nixosSystem {
system = " x 8 6 _ 6 4 - l i n u x " ;
modules = defaultModules . base ++ [
./hosts/Haven
] ;
} ;
2024-03-04 15:57:41 +00:00
Pihole = nixpkgs . lib . nixosSystem {
2024-02-29 14:53:34 +00:00
system = " a a r c h 6 4 - l i n u x " ;
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 = " x 8 6 _ 6 4 - l i n u x " ;
modules = defaultModules . base ++ [
./hosts/Shura
] ;
} ;
} ;
} ;
}