75 lines
2.2 KiB
Nix
75 lines
2.2 KiB
Nix
{
|
|
description = "JawZ NixOS flake setup";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
|
|
unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
master.url = "github:nixos/nixpkgs?ref=master";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs, unstable, master, home-manager, sops-nix, ... }@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
lib = nixpkgs.lib // home-manager.lib;
|
|
system = "x86_64-linux";
|
|
makePkgs = repo:
|
|
import repo {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
pkgs = makePkgs nixpkgs;
|
|
pkgsU = makePkgs unstable;
|
|
pkgsM = makePkgs master;
|
|
in {
|
|
inherit lib pkgs;
|
|
formatter = pkgs.alejandra;
|
|
nixosConfigurations = {
|
|
workstation = lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit inputs outputs; };
|
|
modules = [
|
|
./hosts/workstation/configuration.nix
|
|
sops-nix.nixosModules.sops
|
|
({ pkgs, ... }: {
|
|
nixpkgs.overlays =
|
|
[ (import ./overlay.nix { inherit pkgs pkgsU pkgsM; }) ];
|
|
})
|
|
];
|
|
};
|
|
miniserver = lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit inputs outputs; };
|
|
modules = [
|
|
./hosts/miniserver/configuration.nix
|
|
sops-nix.nixosModules.sops
|
|
({ pkgs, ... }: {
|
|
nixpkgs.overlays =
|
|
[ (import ./overlay.nix { inherit pkgs pkgsU pkgsM; }) ];
|
|
})
|
|
];
|
|
};
|
|
server = lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = { inherit inputs outputs; };
|
|
modules = [
|
|
./hosts/server/configuration.nix
|
|
sops-nix.nixosModules.sops
|
|
({ pkgs, ... }: {
|
|
nixpkgs.overlays =
|
|
[ (import ./overlay.nix { inherit pkgs pkgsU pkgsM; }) ];
|
|
})
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|