Files
nixos/flake.nix
T

104 lines
2.5 KiB
Nix
Raw Normal View History

2022-04-17 22:29:13 -05:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
description = "Greg's machines!";
inputs = {
agenix.url = "github:ryantm/agenix";
2023-06-20 19:28:14 -05:00
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixunstable";
};
2023-03-06 23:31:58 -06:00
flake-utils.url = "github:numtide/flake-utils";
2023-05-11 09:32:05 -05:00
hm = {
2023-12-11 15:20:57 -06:00
url = "github:nix-community/home-manager/release-23.11";
2023-06-20 11:52:10 -05:00
inputs.nixpkgs.follows = "nixstable";
2022-04-18 11:38:06 -05:00
};
2023-11-03 10:06:32 -05:00
hmunstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixstable";
};
2023-06-20 19:28:14 -05:00
nixneovim.url = "github:NixNeovim/NixNeovim";
nix23_05.url = "github:NixOS/nixpkgs/nixos-23.05";
2023-12-11 15:20:57 -06:00
nixstable.url = "github:nixos/nixpkgs/nixos-23.11";
2023-06-20 19:28:14 -05:00
nixunstable.url = "github:nixos/nixpkgs/nixos-unstable";
nurpkgs.url = "github:nix-community/NUR";
2022-12-28 15:39:44 -06:00
wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixunstable";
};
2022-04-17 22:29:13 -05:00
};
2023-06-20 19:28:14 -05:00
outputs = {
agenix,
darwin,
flake-utils,
hm,
2023-11-03 10:06:32 -05:00
hmunstable,
2023-06-20 19:28:14 -05:00
nixneovim,
nix23_05,
2023-06-20 19:28:14 -05:00
nixstable,
nixunstable,
nurpkgs,
wsl,
self,
...}@inputs:
2022-04-17 22:29:13 -05:00
let
2024-01-20 23:31:07 -06:00
pkg-sets = final: prev: {
unstable = import inputs.nixunstable { system = final.system; inherit overlays; };
nix23_05 = import inputs.nix23_05 { system = final.system; inherit overlays; };
};
2022-05-04 13:52:38 -05:00
local_overlay = import ./overlays;
2022-09-09 14:19:12 -05:00
overlays = [
2023-06-20 11:00:12 -05:00
agenix.overlays.default
2023-05-03 04:53:37 +00:00
pkg-sets
2022-09-09 14:19:12 -05:00
local_overlay
2023-06-20 19:28:14 -05:00
nixneovim.overlays.default
2022-09-09 14:19:12 -05:00
nurpkgs.overlay
2022-09-06 11:41:09 -05:00
];
2022-04-17 22:29:13 -05:00
in {
checks = {
x86_64-linux = {
unstable = self.nixosConfigurations.jude.config.system.build.toplevel;
stable = self.nixosConfigurations.linode.config.system.build.toplevel;
};
};
2023-06-20 19:28:14 -05:00
nixosConfigurations = (import ./hosts { inherit inputs overlays; });
2022-04-21 12:42:42 +00:00
2023-06-20 19:28:14 -05:00
darwinConfigurations = (import ./darwin { inherit inputs overlays; });
2022-09-06 11:41:09 -05:00
2023-11-01 14:14:50 -05:00
homeConfigurations = (import ./home { inherit inputs overlays; });
devShells = (flake-utils.lib.eachSystemMap flake-utils.lib.allSystems (system: let
2023-06-28 23:10:07 -05:00
pkgs = import nixunstable { inherit system overlays; };
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
bashInteractive
curl
git
gnutar
gzip
inject
tmux
vim
xonsh
];
};
2023-06-28 23:10:07 -05:00
}));
2023-05-11 09:32:05 -05:00
overlays = { default = local_overlay; };
packages = {
x86_64-linux = rec {
default = iso;
iso = self.nixosConfigurations.iso.config.system.build.isoImage;
iso-beta = self.nixosConfigurations.iso.config.system.build.isoImage;
};
2024-01-20 23:31:07 -06:00
};
2022-04-17 22:29:13 -05:00
};
}