2022-09-17 16:50:50 +02:00
# My first run with nix. The config is based on Matthias Benaets config and youtube tutorial
# https://github.com/MatthiasBenaets/nixos-config
# https://www.youtube.com/watch?v=AGVXJ-TIv3Y
#
# flake.nix *
# ├─ ./hosts
# │ └─ default.nix
2022-09-16 22:44:43 +02:00
{
2022-09-17 16:50:50 +02:00
description = " K a b b o n e ' s p e r o n a l N i x O S F l a k e c o n f i g " ;
2022-09-16 22:44:43 +02:00
2022-09-18 11:07:22 +02:00
inputs = # All flake references used to build my NixOS setup. These are dependencies.
{
2023-12-09 10:23:27 +01:00
nixpkgs-unstable . 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 " ; # Nix Packages
2024-06-03 18:31:00 +02:00
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 - 2 4 . 0 5 " ;
2024-07-02 22:22:26 +02:00
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 " ;
2023-12-09 10:23:27 +01:00
microvm = {
url = " g i t h u b : a s t r o / m i c r o v m . n i x " ;
inputs . nixpkgs . follows = " n i x p k g s " ;
} ;
2022-09-17 16:50:50 +02:00
2024-01-20 12:02:32 +01:00
impermanence . url = " g i t h u b : n i x - c o m m u n i t y / i m p e r m a n e n c e " ;
2022-09-18 11:07:22 +02:00
home-manager = { # User Package Management
2024-06-03 18:31:00 +02:00
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 / r e l e a s e - 2 4 . 0 5 " ;
2022-09-18 11:07:22 +02:00
inputs . nixpkgs . follows = " n i x p k g s " ;
} ;
2022-09-16 22:44:43 +02:00
2023-12-16 11:58:44 +01:00
home-manager-unstable = { # User Package Management
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 " ;
inputs . nixpkgs . follows = " n i x p k g s - u n s t a b l e " ;
} ;
2022-12-17 20:07:06 +01:00
agenix = {
url = " g i t h u b : r y a n t m / a g e n i x " ;
2023-02-04 08:50:56 +01:00
inputs . nixpkgs . follows = " n i x p k g s " ;
2022-12-17 20:07:06 +01:00
} ;
2023-07-21 22:07:21 +02:00
jovian-nixos = {
2024-10-05 10:32:00 +02:00
url = " g i t h u b : J o v i a n - E x p e r i m e n t s / J o v i a n - N i x O S " ;
inputs . nixpkgs . follows = " n i x p k g s - u n s t a b l e " ;
2023-07-21 22:07:21 +02:00
} ;
2024-02-25 08:09:17 +01:00
lanzaboote = {
2024-10-05 10:32:00 +02:00
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 / m a s t e r " ;
inputs . nixpkgs . follows = " n i x p k g s " ;
} ;
2022-09-17 16:50:50 +02:00
} ;
2024-12-19 13:16:40 +01:00
outputs = inputs @ { self , nixpkgs , nixpkgs-unstable , nixos-hardware , home-manager , home-manager-unstable , agenix , jovian-nixos , microvm , impermanence , lanzaboote , . . . }: # Function that tells my flake which to use and what do what to do with the dependencies.
2024-05-20 10:29:52 +02:00
rec {
nixosConfigurations = ( # NixOS configurations
import ./hosts { # Imports ./hosts/default.nix
inherit ( nixpkgs ) lib ;
2024-12-19 13:16:40 +01:00
inherit inputs nixpkgs nixpkgs-unstable nixos-hardware home-manager home-manager-unstable agenix jovian-nixos microvm impermanence lanzaboote ; # Also inherit home-manager so it does not need to be defined here.
2024-05-20 10:29:52 +02:00
nix . allowedUsers = [ " @ w h e e l " ] ;
security . sudo . execWheelOnly = true ;
}
) ;
2024-06-04 19:01:29 +02:00
hydraJobs = {
" s t e a m d e c k " = nixosConfigurations . steamdeck . config . system . build . toplevel ;
2024-06-17 20:31:44 +02:00
" h a d e s " = nixosConfigurations . hades . config . system . build . toplevel ;
" n a s b a k " = nixosConfigurations . nasbak . config . system . build . toplevel ;
" j u p i t e r " = nixosConfigurations . jupiter . config . system . build . toplevel ;
2024-08-10 06:11:18 +02:00
" l i f e b o o k " = nixosConfigurations . lifebook . config . system . build . toplevel ;
2024-06-17 20:31:44 +02:00
" k a b t o p " = nixosConfigurations . kabtop . config . system . build . toplevel ;
" d m z " = nixosConfigurations . dmz . config . system . build . toplevel ;
2024-06-04 19:01:29 +02:00
} ;
2024-05-05 20:05:19 +02:00
} ;
2024-05-05 20:09:55 +02:00
2024-05-20 10:29:52 +02:00
2022-09-16 22:44:43 +02:00
}