nix/flake.nix

67 lines
3.3 KiB
Nix
Raw Normal View History

2023-08-23 07:30:15 +02:00
{
description = "NixOS System Config";
inputs = {
2023-08-25 12:07:54 +02:00
nixpkgs.url = "nixpkgs/nixos-unstable";
2023-09-20 12:44:43 +02:00
# nixpkgs-wayland - Wayland-specific packages not in nixpkgs
2023-08-27 12:35:58 +02:00
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
2023-09-20 12:44:43 +02:00
# home-manager - Dotfile mnagement
2023-08-25 12:07:54 +02:00
home-manager.url = "github:nix-community/home-manager/master";
2023-08-23 07:30:15 +02:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-09-20 12:44:43 +02:00
# lanzaboote - Secureboot Configuration
2023-08-25 12:07:54 +02:00
lanzaboote.url = "github:nix-community/lanzaboote";
2023-08-23 07:30:15 +02:00
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
2023-09-20 12:44:43 +02:00
# nur - Nix User Repository - user-submitted / maintained packages
2023-08-25 12:07:54 +02:00
nur.url = "github:nix-community/NUR";
2023-09-20 12:44:43 +02:00
# sops-nix - Secret Management with SOPS using GPG Keys
2023-08-25 12:07:54 +02:00
sops-nix.url = "github:Mic92/sops-nix";
2023-09-20 12:44:43 +02:00
# doom-emacs - The Doom Emacs distribution
2023-08-25 12:07:54 +02:00
doom-emacs.url = "github:nix-community/nix-doom-emacs";
2023-09-20 12:44:43 +02:00
# nixos-hardware - Hardware Configurations
2023-09-18 12:09:51 +02:00
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
2023-09-20 12:44:43 +02:00
# nixos-generators - Automated Image / ISO Creation
2023-09-19 14:20:08 +02:00
nixos-generators.url = "github:nix-community/nixos-generators";
2023-09-19 14:19:46 +02:00
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
2023-09-20 12:44:43 +02:00
# disko - Automated Disk Partitioning
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
};
2023-09-19 14:18:59 +02:00
outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, ... } @inputs:
let
2023-08-23 07:30:15 +02:00
inherit (self) outputs;
stateVersion = "unstable";
2023-08-24 13:52:02 +02:00
hmStateVersion = "23.11";
2023-08-23 14:41:07 +02:00
libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; };
in {
nixosConfigurations = {
2023-09-17 10:13:54 +02:00
# Virtual Machines
nixos-vm-01 = libx.mkHost { hostname = "nixos-vm-01"; };
# Physical Machines
2023-09-16 14:21:45 +02:00
nixos-laptop = libx.mkHost { hostname = "nixos-laptop"; desktop = "hyprland"; gpu = "intel"; theme = "gruvbox"; };
2023-09-18 12:09:51 +02:00
nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "intel"; theme = "gruvbox"; };
2023-09-16 14:21:45 +02:00
nixos-rpi4-01 = libx.mkHost { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; };
nixos-rpi4-02 = libx.mkHost { hostname = "nixos-rpi4-02"; platform = "aarch64-linux"; };
nixos-rpi4-03 = libx.mkHost { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; };
2023-08-23 07:30:15 +02:00
};
2023-09-19 14:13:53 +02:00
2023-08-23 15:38:35 +02:00
homeConfigurations = {
2023-09-17 10:13:54 +02:00
# Virtual Machines
2023-09-17 12:50:53 +02:00
"albert@nixos-vm-01" = libx.mkHome { hostname = "nixos-vm-01"; };
2023-09-17 10:13:54 +02:00
# Physical Machines
2023-09-16 14:21:45 +02:00
"albert@nixos-laptop" = libx.mkHome { hostname = "nixos-laptop"; desktop = "hyprland"; theme = "gruvbox"; };
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "gruvbox"; };
"albert@nixos-rpi4-01" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; };
2023-09-17 14:15:44 +02:00
"albert@nixos-rpi4-02" = libx.mkHome { hostname = "nixos-rpi4-02"; platform = "aarch64-linux"; };
"albert@nixos-rpi4-03" = libx.mkHome { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; };
2023-09-16 14:21:45 +02:00
};
2023-09-19 01:03:21 +02:00
imageConfigurations = {
2023-09-19 03:19:31 +02:00
nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; format = "sd-aarch64"; };
2023-09-19 01:03:21 +02:00
};
2023-09-19 13:37:21 +02:00
2023-09-20 11:52:00 +02:00
# Devshell for bootstrapping; acessible via 'nix develop'
2023-09-19 10:49:01 +02:00
devShells = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
2023-09-19 14:13:53 +02:00
in import ./shell.nix { inherit pkgs sops-nix; }
2023-09-19 10:49:01 +02:00
);
2023-08-23 07:30:15 +02:00
};
2023-09-19 10:39:24 +02:00
}