nix-config/flake.nix
Oliver Davies 22264fb82e
All checks were successful
/ check (push) Successful in 1m11s
Refactor inputs
Move them to each host's configuration.nix file and keep flake.nix
shorter and cleaner.
2025-06-01 15:13:20 +01:00

128 lines
2.8 KiB
Nix

{
inputs = {
agenix.url = "github:ryantm/agenix";
disko = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/disko";
};
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager/master";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
};
outputs =
{ nixpkgs, self, ... }@inputs:
let
inherit (self) outputs;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
username = "opdavies";
specialArgs = {
inherit
inputs
outputs
self
system
username
;
};
inherit (pkgs) mkShell;
in
{
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
just
lua-language-server
lua54Packages.luacheck
nixd
];
};
packages.${system} = {
default = mkShell { buildInputs = with pkgs; [ just ]; };
};
formatter.${system} = pkgs.nixfmt-rfc-style;
overlays = import ./overlays { inherit inputs; };
homeManagerModules.default = import ./modules/home-manager;
nixosModules.default = import ./modules/nixos;
nixosConfigurations = {
lemp11 = nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
hostname = "lemp11";
stateVersion = "22.11";
};
modules = [
./hosts/lemp11/configuration.nix
];
};
nixedo = nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
hostname = "nixedo";
stateVersion = "24.11";
};
modules = [
./hosts/nixedo/configuration.nix
];
};
t480 = nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
hostname = "t480";
stateVersion = "22.11";
};
modules = [
./hosts/t480/configuration.nix
];
};
t490 = nixpkgs.lib.nixosSystem {
specialArgs = specialArgs // {
hostname = "t490";
stateVersion = "22.11";
};
modules = [
./hosts/t490/configuration.nix
];
};
PW05CH3L = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = specialArgs // {
hostname = "PW05CH3L";
stateVersion = "22.11";
};
modules = [
./hosts/PW05CH3L/configuration.nix
];
};
};
};
}