nix/flake.nix

74 lines
3.9 KiB
Nix
Raw Normal View History

2023-09-28 14:08:07 +02:00
{
description = "NixOS System Config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
# nixpkgs-wayland - Wayland-specific packages not in nixpkgs
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
# home-manager - Dotfile mnagement
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# lanzaboote - Secureboot Configuration
lanzaboote.url = "github:nix-community/lanzaboote";
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
# nur - Nix User Repository - user-submitted / maintained packages
nur.url = "github:nix-community/NUR";
# sops-nix - Secret Management with SOPS using GPG Keys
sops-nix.url = "github:Mic92/sops-nix";
# doom-emacs - The Doom Emacs distribution`
doom-emacs.url = "github:nix-community/nix-doom-emacs";
# nixos-hardware - Hardware Configurations
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# nixos-generators - Automated Image / ISO Creation
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
# disko - Declarative Disk Partitioning
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
2023-09-29 12:18:14 +02:00
# Firefox theme, for "Gradience" GTK Theming
firefox-gnome-theme.url = "github:rafaelmardojai/firefox-gnome-theme";
firefox-gnome-theme.flake = false;
2023-09-28 14:08:07 +02:00
};
outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, ... } @inputs:
let
inherit (self) outputs;
stateVersion = "unstable";
2023-12-01 05:20:00 +01:00
hmStateVersion = "24.05";
2023-09-28 14:08:07 +02:00
libx = import ./lib { inherit inputs outputs stateVersion hmStateVersion; };
in {
nixosConfigurations = {
2023-10-11 09:55:22 +02:00
# Virtual
2023-11-26 03:51:14 +01:00
osaka-vultr-01 = libx.mkHost { hostname = "osaka-vultr-01"; type = "small";};
2023-10-09 10:47:55 +02:00
nixos-vm-01 = libx.mkHost { hostname = "nixos-vm-01"; };
2023-10-11 09:55:22 +02:00
# Physical
2023-11-26 06:02:35 +01:00
framework-server = libx.mkHost { hostname = "framework-server"; };
2023-11-25 11:04:12 +01:00
nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; desktop = "gnome"; gpu = "nvidia"; };
nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; theme = "green"; };
2023-11-25 07:17:29 +01: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-09-28 14:08:07 +02:00
};
homeConfigurations = {
2023-10-11 09:55:22 +02:00
# Virtual
"albert@osaka-vultr-01" = libx.mkHome { hostname = "osaka-vultr-01"; };
2023-10-09 10:47:55 +02:00
"albert@nixos-vm-01" = libx.mkHome { hostname = "nixos-vm-01"; };
2023-10-11 09:55:22 +02:00
# Physical
2023-11-25 07:17:29 +01:00
"albert@framework-server" = libx.mkHome { hostname = "framework-server"; };
2023-11-25 11:04:12 +01:00
"albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; };
2023-11-25 07:17:29 +01:00
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "green"; };
"albert@nixos-rpi4-01" = libx.mkHome { hostname = "nixos-rpi4-01"; platform = "aarch64-linux"; };
"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-28 14:08:07 +02:00
};
imageConfigurations = {
2023-10-09 10:47:55 +02:00
nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; platform = "aarch64-linux"; };
2023-09-28 14:08:07 +02:00
nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; };
2023-09-30 07:13:26 +02:00
nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; };
2023-09-28 14:08:07 +02:00
};
# Devshell for bootstrapping; acessible via 'nix develop'
devShells = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./shell.nix { inherit pkgs sops-nix; }
);
};
}