nixos/flake.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

2023-07-05 22:32:26 +04:00
# load stuff
{
description = "horrible dotfiles for amazing distro";
inputs = {
2023-08-06 03:07:15 +04:00
# nixpkgs
2023-07-05 22:32:26 +04:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
2023-08-06 03:07:15 +04:00
# unstable for a few packages
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2023-07-05 22:32:26 +04:00
home-manager.url = "github:nix-community/home-manager/release-23.05";
2023-07-06 01:53:58 +04:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-08-03 18:35:30 +04:00
# TODO(sako):: add agenix or sops-nix
# https://github.com/ryantm/agenix#install-via-flakes
# https://github.com/Mic92/sops-nix
2023-07-05 22:32:26 +04:00
};
2023-07-07 03:16:34 +04:00
outputs = { self, nixpkgs, home-manager, ...}@inputs:
2023-07-07 03:06:45 +04:00
let
inherit (self) outputs;
2023-07-27 21:59:50 +04:00
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
];
2023-07-07 03:06:45 +04:00
in
rec {
# custom packages
packages = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
2023-07-07 03:16:34 +04:00
in import ./packages { inherit pkgs; }
2023-07-07 03:06:45 +04:00
);
# dev shell for bootstrap
devShells = forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in import ./shell.nix { inherit pkgs; }
2023-07-27 21:59:50 +04:00
);
2023-07-07 03:06:45 +04:00
# overlays here
2023-07-22 03:47:09 +04:00
overlays = import ./overlays { inherit inputs; };
2023-07-07 03:06:45 +04:00
# modules :D
nixosModules = import ./modules;
2023-07-05 22:32:26 +04:00
nixosConfigurations = {
2023-07-06 02:02:21 +04:00
sakotop = nixpkgs.lib.nixosSystem {
2023-07-07 03:06:45 +04:00
specialArgs = { inherit inputs outputs; };
modules = [
2023-07-27 03:19:53 +04:00
./default.nix
2023-07-07 03:06:45 +04:00
./hosts/sakotop/configuration.nix
];
2023-07-05 22:32:26 +04:00
};
2023-07-26 12:06:37 +04:00
sakopc = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
2023-07-27 03:19:53 +04:00
./default.nix
2023-07-26 12:06:37 +04:00
./hosts/sakopc/configuration.nix
];
};
2023-07-05 22:32:26 +04:00
};
2023-07-07 03:06:45 +04:00
2023-07-05 22:32:26 +04:00
};
}