nixos-config/flake.nix

62 lines
1.7 KiB
Nix

{
description = "Felixalb System flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, unstable, sops-nix, ... }@inputs:
let
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = unstable.legacyPackages.${prev.system};
};
in
{
nixosConfigurations = {
voyager = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
modules = [
# Overlays-module makes "pkgs.unstable" available in configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./hosts/voyager/configuration.nix
sops-nix.nixosModules.sops
];
};
chapel = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
modules = [
./hosts/chapel/configuration.nix
sops-nix.nixosModules.sops
];
};
redshirt = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs;
};
modules = [
./hosts/redshirt/configuration.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
sops-nix.nixosModules.sops
];
};
};
devShells.x86_64-linux = {
default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./shell.nix { };
};
};
}