nixos-config/flake.nix

55 lines
1.4 KiB
Nix
Raw Normal View History

2021-09-24 06:09:20 +02:00
{
description = "my krops file";
inputs = {
2021-09-25 11:07:09 +02:00
secrets = {
url = "path:/home/palo/dev/secrets";
flake = false;
};
sops-nix.url = "github:Mic92/sops-nix";
2021-09-24 06:09:20 +02:00
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nix-doom-emacs = {
url = "github:vlaci/nix-doom-emacs";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-21.05";
inputs.nixpkgs.follows = "nixpkgs";
};
krops = {
url = "github:Mic92/krops";
inputs.flake-utils.follows = "flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
2021-09-25 11:07:09 +02:00
outputs = { self, sops-nix, nixpkgs, home-manager, krops, flake-utils
, nix-doom-emacs, nixpkgs-unstable, secrets, ... }:
2021-09-24 06:09:20 +02:00
(flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
writeCommand = krops.packages.${system}.writeCommand;
in {
# deploy like this:
# nix run ".#deploy.sterni"
apps.deploy = pkgs.callPackage ./krops.nix {
2021-09-25 11:07:09 +02:00
inherit writeCommand secrets;
2021-09-24 06:09:20 +02:00
lib = krops.lib;
};
})) // {
nixosConfigurations = import ./configurations.nix {
nixosSystem = nixpkgs.lib.nixosSystem;
2021-09-24 06:23:07 +02:00
inherit home-manager nixpkgs-unstable;
2021-09-24 06:09:20 +02:00
};
};
}