dotfiles/flake.nix

59 lines
1.8 KiB
Nix
Raw Normal View History

2022-09-18 19:42:30 +00:00
{
description = "My Nix Configuration";
inputs = {
2022-09-25 18:01:06 +00:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2023-03-12 03:59:11 +00:00
2023-07-09 15:24:54 +00:00
# Fixes #133
# See: https://github.com/gytis-ivaskevicius/flake-utils-plus/issues/133
flake-utils-plus.url = github:ravensiris/flake-utils-plus?ref=ravensiris/fix-devshell-legacy-packages;
home-manager.url = "github:nix-community/home-manager/master";
2022-09-18 19:42:30 +00:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-03-12 03:59:11 +00:00
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
2023-03-12 03:59:11 +00:00
snowfall-lib.url = "github:snowfallorg/lib";
snowfall-lib.inputs.nixpkgs.follows = "nixpkgs";
2023-07-09 15:24:54 +00:00
snowfall-lib.inputs.flake-utils-plus.follows = "flake-utils-plus";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
2023-07-09 15:24:54 +00:00
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "home-manager";
agenix.inputs.darwin.follows = "";
2023-03-12 03:59:11 +00:00
};
2022-09-18 19:42:30 +00:00
2023-03-12 03:59:11 +00:00
outputs = inputs: let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
2022-09-18 19:42:30 +00:00
};
2023-03-12 03:59:11 +00:00
in
lib.mkFlake {
overlay-package-namespace = "aa";
channels-config.allowUnfree = true;
systems.modules = with inputs; [
home-manager.nixosModules.home-manager
2023-07-09 15:24:54 +00:00
agenix.nixosModules.default
2023-03-12 03:59:11 +00:00
];
deploy.nodes.node = {
hostname = "node";
profiles.system = {
user = "root";
sshUser = "alejandro";
path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos inputs.self.nixosConfigurations.node;
2023-07-09 15:24:54 +00:00
sshOpts = ["-A"];
2023-03-12 03:59:11 +00:00
};
2022-09-18 19:42:30 +00:00
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
2022-09-18 19:42:30 +00:00
};
}