nix/flake.nix

97 lines
3.1 KiB
Nix
Raw Normal View History

2023-09-04 11:40:30 -05:00
{
inputs = {
2023-10-03 11:52:44 -05:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-10-03 12:13:30 -05:00
# TODO: avoid my manual workaround of `nix profile install helix#helix --priority 4`
2023-10-03 11:52:44 -05:00
helix.url = "github:helix-editor/helix/75c0a5ceb32d8a503915a93ccc1b64c8ad1cba8b";
2023-09-18 09:02:00 -05:00
disko.url = "github:nix-community/disko/master";
sops-nix.url = "github:Mic92/sops-nix";
2023-10-03 11:52:44 -05:00
# TODO: do I really need this in the root of my flake if _only_ beefcake uses it?
api-lyte-dev.url = "git+ssh://gitea@git.lyte.dev/lytedev/api.lyte.dev.git";
# TODO: hardware.url = "github:nixos/nixos-hardware"; # might be useful for laptops
2023-09-14 21:20:27 -05:00
# TODO: hyprland.url = "github:hyprwm/Hyprland";
2023-10-03 11:52:44 -05:00
# TODO: nix-colors.url = "github:misterio77/nix-colors";
2023-09-04 11:40:30 -05:00
};
2023-10-03 11:52:44 -05:00
outputs = {
self,
nixpkgs,
home-manager,
...
} @ inputs: let
inherit (self) outputs;
systems = [
"aarch64-linux"
# "i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
dragon = nixpkgs.lib.nixosSystem {
2023-10-03 12:13:30 -05:00
specialArgs = {
inherit inputs outputs;
flake = self;
};
2023-10-03 11:52:44 -05:00
modules = [
./nixos/dragon
];
};
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"daniel@lyte.dev" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
2023-10-03 12:13:30 -05:00
modules = [./home];
2023-10-03 11:52:44 -05:00
};
"daniel.flanagan@hq.bill.com" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
extraSpecialArgs = {inherit inputs outputs;};
2023-10-03 12:13:30 -05:00
modules = [./home];
2023-10-03 11:52:44 -05:00
};
};
2023-10-03 10:28:12 -05:00
# TODO: darwin for work?
# TODO: nixos ISO?
2023-10-03 11:52:44 -05:00
# Disk partition schemes and functions
2023-10-03 12:13:30 -05:00
diskoConfigurations = import ./disko;
2023-09-04 11:40:30 -05:00
};
}