nixos-config/flake.nix

119 lines
3.3 KiB
Nix
Raw Normal View History

2024-04-08 20:32:17 +02:00
{
2024-04-13 15:58:42 +02:00
description = "My NixOS config";
2024-04-08 20:32:17 +02:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
2024-04-17 22:28:27 +02:00
stable.url = "github:nixos/nixpkgs/nixos-24.05";
2024-06-24 10:16:41 +02:00
# unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2024-04-23 17:29:48 +02:00
# home-manager-unstable = {
2024-05-30 20:34:42 +02:00
# url = "github:nix-community/home-manager";
# inputs.nixpkgs.follows = "unstable";
# };
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "stable";
2024-04-23 17:29:48 +02:00
};
2024-04-26 15:06:55 +02:00
tildefriends.url = "git+https://dev.tildefriends.net/cory/tildefriends?ref=main";
vedirect-reader.url = "git+https://gitea.com/tasiaiso/vedirect-reader";
2024-05-06 13:10:44 +02:00
# nixos-conf-editor.url = "github:snowfallorg/nixos-conf-editor";
# nix-software-center.url = "github:snowfallorg/nix-software-center";
2024-08-06 18:44:43 +02:00
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "stable";
};
2024-04-08 20:32:17 +02:00
};
outputs = {
self,
nixpkgs,
2024-04-13 15:58:42 +02:00
stable,
2024-06-24 10:16:41 +02:00
# unstable,
# home-manager-unstable,
home-manager,
vedirect-reader,
2024-05-06 13:10:44 +02:00
# nixos-conf-editor,
# nix-software-center,
tildefriends,
2024-08-06 18:44:43 +02:00
agenix,
2024-04-08 20:32:17 +02:00
...
} @ inputs: let
inherit (self) outputs;
2024-04-17 22:28:27 +02:00
2024-04-08 20:32:17 +02:00
# Supported systems for your flake packages, shell, etc.
systems = [
"aarch64-linux"
"x86_64-linux"
];
2024-04-17 22:28:27 +02:00
2024-04-08 20:32:17 +02:00
# This is a function that generates an attribute by calling a function you
# pass to it, with each system as an argument
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
# Your custom packages
# Accessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
2024-04-17 22:28:27 +02:00
2024-04-08 20:32:17 +02:00
# 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;};
2024-04-17 22:28:27 +02:00
2024-04-08 20:32:17 +02:00
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# NixOS configuration entrypoint
# Available through 'nixos-rebuild build --flake .#phoenix'
2024-06-06 15:50:43 +02:00
# or nixos-rebuild switch --flake .#$(cat /etc/hostname)
2024-04-08 20:32:17 +02:00
nixosConfigurations = {
phoenix = stable.lib.nixosSystem {
2024-04-13 18:50:51 +02:00
system = "x86_64-linux";
2024-04-08 20:32:17 +02:00
specialArgs = {inherit inputs outputs;};
modules = [
./hosts/phoenix/configuration.nix
];
};
theseus = stable.lib.nixosSystem {
2024-04-13 18:50:51 +02:00
system = "x86_64-linux";
2024-04-11 13:16:26 +02:00
specialArgs = {inherit inputs outputs;};
modules = [
2024-04-18 21:10:13 +02:00
./hosts/theseus/configuration.nix
2024-04-11 13:16:26 +02:00
];
};
2024-04-13 15:58:42 +02:00
stuff = stable.lib.nixosSystem {
2024-04-13 18:50:51 +02:00
system = "x86_64-linux";
2024-04-08 20:32:17 +02:00
specialArgs = {inherit inputs outputs;};
modules = [
./hosts/stuff/configuration.nix
];
};
2024-04-13 12:30:26 +02:00
2024-04-13 15:58:42 +02:00
enry = stable.lib.nixosSystem {
2024-04-13 18:50:51 +02:00
system = "aarch64-linux";
2024-04-13 12:30:26 +02:00
specialArgs = {inherit inputs outputs;};
modules = [
./hosts/enry/configuration.nix
];
};
2024-04-18 21:10:13 +02:00
yaseen = stable.lib.nixosSystem {
2024-06-01 00:29:03 +02:00
system = "x86_64-linux";
2024-04-18 21:10:13 +02:00
specialArgs = {inherit inputs outputs;};
modules = [
2024-04-29 14:31:33 +02:00
./hosts/yaseen/configuration.nix
2024-04-18 21:10:13 +02:00
];
};
2024-04-08 20:32:17 +02:00
};
};
}