gigalint everything
This commit is contained in:
parent
2ce46f1cf5
commit
d4c31f8fd1
39 changed files with 499 additions and 398 deletions
113
flake.nix
113
flake.nix
|
|
@ -4,8 +4,14 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
deploy-rs = {
|
||||
url = "github:serokell/deploy-rs";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
pre-commit-hooks = {
|
||||
url = "github:cachix/pre-commit-hooks.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -23,13 +29,25 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.foundry-nix.url = "github:shazow/foundry.nix";
|
||||
};
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
microvm = {
|
||||
url = "github:astro/microvm.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs = { self, nixpkgs, home-manager, nixos-hardware, nvim, ethereum-nix, deploy-rs, ... } @inputs:
|
||||
let
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nvim,
|
||||
ethereum-nix,
|
||||
deploy-rs,
|
||||
systems,
|
||||
...
|
||||
} @ inputs: let
|
||||
attrs = {
|
||||
username = "e";
|
||||
};
|
||||
|
|
@ -38,57 +56,52 @@
|
|||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
(final: _prev: {
|
||||
inherit (inputs.nvim.packages.${final.system}) full;
|
||||
inherit (inputs.tfa.packages.${final.system}) twofa;
|
||||
})
|
||||
];
|
||||
};
|
||||
eachSystem = f: nixpkgs.lib.genAttrs (import systems) (system: f nixpkgs.legacyPackages.${system});
|
||||
treefmtEval = eachSystem (pkgs: inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix);
|
||||
in {
|
||||
nixosConfigurations = (
|
||||
import ./nixos { inherit inputs pkgs attrs system ethereum-nix; }
|
||||
);
|
||||
homeConfigurations = (
|
||||
import ./home-manager { inherit inputs pkgs attrs; }
|
||||
);
|
||||
deploy.nodes = {
|
||||
htz = {
|
||||
hostname = "htz";
|
||||
sshUser = "root";
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.htz;
|
||||
};
|
||||
};
|
||||
racknerd = {
|
||||
hostname = "racknerd";
|
||||
sshUser = "e";
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.rknrd;
|
||||
};
|
||||
};
|
||||
};
|
||||
checks = {
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
typos.enable = true;
|
||||
alejandra.enable = true;
|
||||
deadnix.enable = true;
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.nix
|
||||
pkgs.home-manager
|
||||
pkgs.git
|
||||
deploy-rs.packages.${system}.deploy-rs
|
||||
];
|
||||
nixosConfigurations = import ./nixos {inherit inputs pkgs attrs system ethereum-nix;};
|
||||
homeConfigurations = import ./home-manager {inherit inputs pkgs attrs;};
|
||||
deploy.nodes = {
|
||||
htz = {
|
||||
hostname = "htz";
|
||||
sshUser = "root";
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.htz;
|
||||
};
|
||||
};
|
||||
}
|
||||
racknerd = {
|
||||
hostname = "racknerd";
|
||||
sshUser = "e";
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.rknrd;
|
||||
};
|
||||
};
|
||||
};
|
||||
checks = {
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks.treefmt.enable = true;
|
||||
hooks.treefmt.package = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
};
|
||||
};
|
||||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
pkgs.nix
|
||||
pkgs.home-manager
|
||||
pkgs.git
|
||||
deploy-rs.packages.${system}.deploy-rs
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue