2019-12-03 05:18:30 +00:00
|
|
|
{
|
2024-01-06 09:46:10 +00:00
|
|
|
description = "Momo infra in nix";
|
2019-12-05 05:36:36 +00:00
|
|
|
|
2022-02-02 03:15:24 +00:00
|
|
|
nixConfig.extra-experimental-features = "nix-command flakes";
|
2021-07-16 21:09:26 +00:00
|
|
|
|
2020-08-02 04:08:41 +00:00
|
|
|
inputs = {
|
2022-04-09 14:40:03 +00:00
|
|
|
# Track channels with commits tested and built by hydra
|
2024-01-06 09:46:10 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
|
|
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2022-11-07 10:24:59 +00:00
|
|
|
flake-compat.url = "github:edolstra/flake-compat";
|
|
|
|
flake-compat.flake = false;
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2024-01-06 09:46:10 +00:00
|
|
|
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
|
|
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2024-01-06 09:46:10 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2024-01-06 09:46:10 +00:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
nixos-flake.url = "github:srid/nixos-flake";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2024-01-06 09:46:10 +00:00
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
|
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
deploy-rs.inputs.flake-compat.follows = "flake-compat";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2021-05-13 17:35:23 +00:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
2024-01-06 09:46:10 +00:00
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
agenix.inputs.darwin.follows = "nix-darwin";
|
|
|
|
agenix.inputs.home-manager.follows = "home-manager";
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2021-03-02 03:30:47 +00:00
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
2023-05-31 18:59:02 +00:00
|
|
|
|
2023-07-17 20:40:52 +00:00
|
|
|
erpnext.url = "git+https://git.pub.solar/axeman/erpnext-nix?ref=main";
|
2024-01-06 09:46:10 +00:00
|
|
|
erpnext.inputs.nixpkgs.follows = "nixpkgs";
|
2023-07-17 20:40:52 +00:00
|
|
|
erpnext.inputs.agenix.follows = "agenix";
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
|
|
|
|
2024-01-06 16:30:35 +00:00
|
|
|
outputs = inputs @ {self, ...}:
|
|
|
|
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
2024-01-06 09:46:10 +00:00
|
|
|
debug = true;
|
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
2022-01-31 16:47:45 +00:00
|
|
|
];
|
2022-11-20 22:28:23 +00:00
|
|
|
|
2024-01-06 09:46:10 +00:00
|
|
|
imports = [
|
|
|
|
inputs.nixos-flake.flakeModule
|
|
|
|
./lib
|
|
|
|
./modules
|
|
|
|
./hosts
|
|
|
|
./users
|
|
|
|
./overlays
|
|
|
|
];
|
2021-07-16 21:01:25 +00:00
|
|
|
|
2024-01-06 16:30:35 +00:00
|
|
|
perSystem = args @ {
|
|
|
|
system,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2024-01-06 09:46:10 +00:00
|
|
|
_module.args = {
|
|
|
|
inherit inputs;
|
|
|
|
pkgs = import inputs.nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [
|
|
|
|
inputs.agenix.overlays.default
|
2023-07-17 20:40:52 +00:00
|
|
|
];
|
|
|
|
};
|
2024-01-06 16:30:35 +00:00
|
|
|
unstable = import inputs.unstable {inherit system;};
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
2023-03-06 23:48:42 +00:00
|
|
|
|
2024-01-06 09:46:10 +00:00
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
deploy-rs
|
2024-01-07 14:44:06 +00:00
|
|
|
drone-cli
|
2024-01-06 09:46:10 +00:00
|
|
|
nixpkgs-fmt
|
|
|
|
agenix
|
|
|
|
cachix
|
|
|
|
editorconfig-checker
|
|
|
|
nodePackages.prettier
|
|
|
|
nvfetcher
|
|
|
|
shellcheck
|
|
|
|
shfmt
|
2024-01-06 16:27:47 +00:00
|
|
|
alejandra
|
2024-01-06 09:46:10 +00:00
|
|
|
treefmt
|
|
|
|
nixos-generators
|
|
|
|
];
|
2021-04-22 03:44:15 +00:00
|
|
|
};
|
2022-11-20 22:28:23 +00:00
|
|
|
};
|
2021-07-16 21:01:25 +00:00
|
|
|
|
2024-01-06 09:46:10 +00:00
|
|
|
flake = {
|
2024-01-08 22:53:06 +00:00
|
|
|
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
|
2024-01-06 09:46:10 +00:00
|
|
|
pioneer-momo-koeln = {
|
|
|
|
hostname = "80.244.242.4";
|
|
|
|
sshUser = "barkeeper";
|
2023-01-29 01:40:14 +00:00
|
|
|
};
|
2023-03-06 23:48:42 +00:00
|
|
|
};
|
|
|
|
};
|
2022-08-13 20:35:43 +00:00
|
|
|
};
|
2019-12-03 05:18:30 +00:00
|
|
|
}
|