sept rice
This commit is contained in:
parent
89ab499605
commit
66ba28aaf3
12 changed files with 572 additions and 293 deletions
129
flake.nix
129
flake.nix
|
|
@ -23,9 +23,11 @@
|
|||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
# nvim = {
|
||||
# url = "github:iofq/nvim.nix";
|
||||
# };
|
||||
nvim = {
|
||||
url = "github:iofq/nvim.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "path:/home/e/dev/nvim.nix";
|
||||
};
|
||||
deploy-rs = {
|
||||
url = "github:serokell/deploy-rs";
|
||||
|
|
@ -35,65 +37,82 @@
|
|||
url = "github:nix-community/nh";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
jj = {
|
||||
url = "github:jj-vcs/jj";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
|
||||
};
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
...
|
||||
} @ inputs: let
|
||||
attrs = {
|
||||
username = "e";
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
inputs.neovim-nightly-overlay.overlays.default
|
||||
inputs.nvim.overlays.default
|
||||
inputs.nh.overlays.default
|
||||
];
|
||||
};
|
||||
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;};
|
||||
homeConfigurations = import ./home-manager {inherit inputs pkgs attrs;};
|
||||
checks = {
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = inputs.self;
|
||||
hooks = {
|
||||
treefmt.enable = true;
|
||||
treefmt.package = treefmtEval.${system}.config.build.wrapper;
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
attrs = {
|
||||
username = "e";
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
inputs.neovim-nightly-overlay.overlays.default
|
||||
inputs.nvim.overlays.default
|
||||
inputs.nh.overlays.default
|
||||
(old: new: {
|
||||
jujutsu = inputs.jj.packages.${system}.jujutsu;
|
||||
})
|
||||
];
|
||||
};
|
||||
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
|
||||
;
|
||||
};
|
||||
homeConfigurations = import ./home-manager { inherit inputs pkgs attrs; };
|
||||
checks = {
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
src = inputs.self;
|
||||
hooks = {
|
||||
treefmt.enable = true;
|
||||
treefmt.package = treefmtEval.${system}.config.build.wrapper;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
deploy.nodes = {
|
||||
consensus = {
|
||||
hostname = "consensus";
|
||||
sshUser = "root";
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = inputs.deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.consensus;
|
||||
deploy.nodes = {
|
||||
consensus = {
|
||||
hostname = "consensus";
|
||||
sshUser = "e";
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = inputs.deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.consensus;
|
||||
};
|
||||
};
|
||||
};
|
||||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
inherit (self.checks.pre-commit-check) shellHook;
|
||||
buildInputs = [
|
||||
pkgs.home-manager
|
||||
pkgs.git
|
||||
pkgs.ssh-to-age
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.deploy-rs
|
||||
treefmtEval.${system}.config.build.wrapper
|
||||
];
|
||||
};
|
||||
};
|
||||
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
inherit (self.checks.pre-commit-check) shellHook;
|
||||
buildInputs = [
|
||||
pkgs.home-manager
|
||||
pkgs.git
|
||||
pkgs.ssh-to-age
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.deploy-rs
|
||||
treefmtEval.${system}.config.build.wrapper
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue