101 lines
2.6 KiB
Nix
101 lines
2.6 KiB
Nix
|
{
|
||
|
description = "Momo infra in nix";
|
||
|
|
||
|
nixConfig.extra-experimental-features = "nix-command flakes";
|
||
|
|
||
|
inputs = {
|
||
|
# Track channels with commits tested and built by hydra
|
||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
|
||
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||
|
|
||
|
flake-compat.url = "github:edolstra/flake-compat";
|
||
|
flake-compat.flake = false;
|
||
|
|
||
|
nix-darwin.url = "github:lnl7/nix-darwin/master";
|
||
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
|
||
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
|
||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||
|
nixos-flake.url = "github:srid/nixos-flake";
|
||
|
|
||
|
deploy-rs.url = "github:serokell/deploy-rs";
|
||
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
deploy-rs.inputs.flake-compat.follows = "flake-compat";
|
||
|
|
||
|
agenix.url = "github:ryantm/agenix";
|
||
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
agenix.inputs.darwin.follows = "nix-darwin";
|
||
|
agenix.inputs.home-manager.follows = "home-manager";
|
||
|
|
||
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||
|
|
||
|
erpnext.url = "git+https://git.pub.solar/axeman/erpnext-nix?ref=main";
|
||
|
erpnext.inputs.nixpkgs.follows = "nixpkgs";
|
||
|
erpnext.inputs.agenix.follows = "agenix";
|
||
|
};
|
||
|
|
||
|
outputs = inputs @ {self, ...}:
|
||
|
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||
|
debug = true;
|
||
|
systems = [
|
||
|
"x86_64-linux"
|
||
|
];
|
||
|
|
||
|
imports = [
|
||
|
inputs.nixos-flake.flakeModule
|
||
|
./lib
|
||
|
./modules
|
||
|
./hosts
|
||
|
./users
|
||
|
./overlays
|
||
|
];
|
||
|
|
||
|
perSystem = args @ {
|
||
|
system,
|
||
|
pkgs,
|
||
|
config,
|
||
|
...
|
||
|
}: {
|
||
|
_module.args = {
|
||
|
inherit inputs;
|
||
|
pkgs = import inputs.nixpkgs {
|
||
|
inherit system;
|
||
|
overlays = [
|
||
|
inputs.agenix.overlays.default
|
||
|
];
|
||
|
};
|
||
|
unstable = import inputs.unstable {inherit system;};
|
||
|
};
|
||
|
|
||
|
devShells.default = pkgs.mkShell {
|
||
|
buildInputs = with pkgs; [
|
||
|
deploy-rs
|
||
|
drone-cli
|
||
|
nixpkgs-fmt
|
||
|
agenix
|
||
|
cachix
|
||
|
editorconfig-checker
|
||
|
nodePackages.prettier
|
||
|
nvfetcher
|
||
|
shellcheck
|
||
|
shfmt
|
||
|
alejandra
|
||
|
treefmt
|
||
|
nixos-generators
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
|
||
|
flake = {
|
||
|
deploy.nodes = self.lib.deploy.mkDeployNodes self.nixosConfigurations {
|
||
|
pioneer-momo-koeln = {
|
||
|
hostname = "80.244.242.4";
|
||
|
sshUser = "barkeeper";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|