rix101/flake.nix

204 lines
4.3 KiB
Nix
Raw Normal View History

{
description = "reo101's NixOS, nix-on-droid and nix-darwin configs";
inputs = {
# Nixpkgs
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
# Nix on Droid
nix-on-droid = {
url = "github:t184256/nix-on-droid/release-23.05";
# url = "github:t184256/nix-on-droid/master";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# Nix Darwin
nix-darwin = {
url = "github:lnl7/nix-darwin/master";
2023-07-13 13:33:01 +02:00
inputs.nixpkgs.follows = "nixpkgs";
};
2023-11-17 14:58:59 +01:00
mac-app-util = {
url = "github:hraban/mac-app-util";
};
# Home Manager
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat = {
url = "github:inclyc/flake-compat";
flake = false;
};
nix-monitored = {
url = "github:ners/nix-monitored";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = {
url = "github:ryantm/agenix";
inputs = {
nixpkgs.follows = "nixpkgs";
darwin.follows = "nix-darwin";
home-manager.follows = "home-manager";
};
};
agenix-rekey = {
url = "github:oddlama/agenix-rekey";
inputs.nixpkgs.follows = "nixpkgs";
};
ragenix = {
url = "github:yaxitech/ragenix";
};
2023-03-23 07:17:20 +01:00
# Nix User Repository
nur = {
url = "github:nix-community/NUR";
};
spicetify-nix = {
url = "github:the-argus/spicetify-nix";
};
hardware = {
url = "github:nixos/nixos-hardware";
};
nix-colors = {
url = "github:misterio77/nix-colors";
};
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
zig-overlay = {
url = "github:mitchellh/zig-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-11-21 14:36:23 +01:00
zls-overlay = {
url = "github:zigtools/zls";
inputs.nixpkgs.follows = "nixpkgs";
2023-07-13 13:33:01 +02:00
inputs.zig-overlay.follows = "zig-overlay";
2022-11-21 14:36:23 +01:00
};
wired = {
url = "github:Toqozz/wired-notify";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2022-11-25 13:53:13 +01:00
outputs =
{ self
, nixpkgs
, nix-on-droid
, nix-darwin
2023-11-17 14:58:59 +01:00
, mac-app-util
2022-11-25 13:53:13 +01:00
, home-manager
, nix-monitored
, disko
, deploy-rs
, agenix
, agenix-rekey
, ragenix
2023-07-25 09:29:36 +02:00
, nur
, spicetify-nix
, hardware
, nix-colors
2022-11-25 13:53:13 +01:00
, neovim-nightly-overlay
, zig-overlay
, zls-overlay
, wired
2022-11-25 13:53:13 +01:00
, ...
} @ inputs:
let
inherit (self) outputs;
util = import ./util { inherit inputs outputs; };
2023-07-25 09:29:36 +02:00
in
{
inherit self;
# Packages (`nix build`)
packages = util.forEachPkgs (pkgs:
import ./pkgs { inherit pkgs; }
);
# Apps (`nix run`)
apps = util.forEachPkgs (pkgs:
2023-02-19 12:54:02 +01:00
import ./apps { inherit pkgs; }
);
# Dev Shells (`nix develop`)
devShells = util.forEachPkgs (pkgs:
import ./shells { inherit pkgs inputs outputs; }
);
# Formatter
formatter = util.forEachPkgs (pkgs:
pkgs.nixpkgs-fmt
);
# Templates
2023-07-25 09:29:36 +02:00
templates = import ./templates {
inherit inputs outputs;
};
# Overlays
2023-07-25 09:29:36 +02:00
overlays = import ./overlays {
inherit inputs outputs;
};
# Machines
inherit (util)
machines
homeManagerMachines
nixDarwinMachines
nixOnDroidMachines
nixosMachines;
# Modules
inherit (util)
nixosModules
nixOnDroidModules
nixDarwinModules
homeManagerModules;
# Configurations
nixosConfigurations = util.autoNixosConfigurations;
nixOnDroidConfigurations = util.autoNixOnDroidConfigurations;
darwinConfigurations = util.autoDarwinConfigurations;
homeConfigurations = util.autoHomeConfigurations;
# Secrets
agenix-rekey = agenix-rekey.configure {
userFlake = self;
nodes = {
inherit (self.nixosConfigurations) jeeves;
};
};
# Deploy.rs nodes
deploy.nodes = util.deploy.autoNodes;
checks = util.autoChecks;
};
}