50 lines
1.5 KiB
Nix
Executable File
50 lines
1.5 KiB
Nix
Executable File
{
|
|
description = "Djai's nixos machines";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest";
|
|
catppuccin.url = "github:catppuccin/nix";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix4nvchad = {
|
|
url = "github:nix-community/nix4nvchad";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ nixpkgs, ... }@inputs:
|
|
let
|
|
mkHost =
|
|
hostname:
|
|
nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
inputs.home-manager.nixosModules.home-manager
|
|
inputs.nix-flatpak.nixosModules.nix-flatpak
|
|
inputs.sops-nix.nixosModules.sops
|
|
inputs.catppuccin.nixosModules.catppuccin
|
|
{ home-manager.sharedModules = [inputs.catppuccin.homeModules.catppuccin];}
|
|
./hosts/${hostname}
|
|
];
|
|
};
|
|
in
|
|
{
|
|
# name configurations after hostnames so `nixos-rebuild --flake .` gets the right one.
|
|
nixosConfigurations = nixpkgs.lib.genAttrs [ "nixbook" "nixpad" "tuxcomp" ] mkHost;
|
|
|
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree.override {
|
|
settings.formatter.nixfmt.excludes = [ "hosts/*/hardware-configuration.nix" ];
|
|
};
|
|
};
|
|
}
|