nixcfg/flake.nix

123 lines
3.1 KiB
Nix
Raw Normal View History

2024-02-29 17:06:55 -05:00
{
2024-03-13 14:17:21 -04:00
description = "Aly's NixOS flake.";
2024-02-29 17:06:55 -05:00
inputs = {
2024-06-22 23:38:24 -04:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
agenix = {
inputs.nixpkgs.follows = "nixpkgs";
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/release-24.05";
};
2024-06-22 23:38:24 -04:00
iio-hyprland = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:JeanSchoeller/iio-hyprland";
};
nixhw = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:alyraffauf/nixhw";
};
2024-07-06 19:58:17 -04:00
nur.url = "github:nix-community/NUR";
raffauflabs = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:alyraffauf/raffauflabs";
};
};
2024-02-29 17:06:55 -05:00
nixConfig = {
accept-flake-config = true;
2024-07-08 17:54:12 -04:00
extra-substituters = [
"https://alyraffauf.cachix.org"
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
2024-07-08 17:54:12 -04:00
"alyraffauf.cachix.org-1:GQVrRGfjTtkPGS8M6y7Ik0z4zLt77O0N25ynv2gWzDM="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
outputs = {self, ...}: let
forDefaultSystems = self.inputs.nixpkgs.lib.genAttrs [
"aarch64-linux"
2024-07-07 23:06:17 -04:00
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
2024-07-07 23:06:17 -04:00
];
forLinuxSystems = self.inputs.nixpkgs.lib.genAttrs [
2024-07-07 23:06:17 -04:00
"aarch64-linux"
"x86_64-linux"
2024-07-07 23:06:17 -04:00
];
forAllHosts = self.inputs.nixpkgs.lib.genAttrs [
2024-07-07 23:06:17 -04:00
"fallarbor"
"lavaridge"
"mauville"
"petalburg"
"rustboro"
];
in {
formatter = forDefaultSystems (system: self.inputs.nixpkgs.legacyPackages.${system}.alejandra);
2024-07-07 23:06:17 -04:00
packages = forLinuxSystems (system: {
default = self.inputs.nixpkgs.legacyPackages."${system}".writeShellApplication {
name = "clean-install";
text = ./flake/clean-install.sh;
};
2024-07-07 23:06:17 -04:00
});
2024-05-25 19:48:54 -04:00
homeManagerModules = {
default = import ./homeManagerModules self;
aly = import ./homes/aly self;
dustin = import ./homes/dustin self;
morgan = import ./homes/morgan self;
};
2024-07-07 19:17:35 -04:00
nixosModules = {
base = import ./baseModules self;
nixos = import ./nixosModules self;
users = import ./userModules self;
2024-07-07 19:17:35 -04:00
};
2024-07-07 23:06:17 -04:00
nixosConfigurations = forAllHosts (
host:
self.inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit self;};
2024-07-07 23:06:17 -04:00
modules = [
./hosts/${host}
self.inputs.agenix.nixosModules.default
self.inputs.disko.nixosModules.disko
self.inputs.home-manager.nixosModules.home-manager
2024-07-07 23:06:17 -04:00
self.nixosModules.base
self.nixosModules.nixos
self.nixosModules.users
{
home-manager = {
backupFileExtension = "backup";
extraSpecialArgs = {inherit self;};
2024-07-07 23:06:17 -04:00
useGlobalPkgs = true;
useUserPackages = true;
};
}
];
}
);
2024-04-07 22:16:33 -04:00
};
}