feat: set up deploy-rs
This commit is contained in:
parent
5f329f550e
commit
b2bb30a24d
54
flake.lock
54
flake.lock
|
@ -20,6 +20,44 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"deploy-rs": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648475189,
|
||||||
|
"narHash": "sha256-gAGAS6IagwoUr1B0ohE3iR6sZ8hP4LSqzYLC8Mq3WGU=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"rev": "83e0c78291cd08cb827ba0d553ad9158ae5a95c3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648199409,
|
||||||
|
"narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "64a525ee38886ab9028e6f61790de0832aa3ef03",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1649676176,
|
"lastModified": 1649676176,
|
||||||
|
@ -162,6 +200,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"deploy-rs": "deploy-rs",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
|
@ -171,6 +210,21 @@
|
||||||
"nvim-kitty-navigator": "nvim-kitty-navigator",
|
"nvim-kitty-navigator": "nvim-kitty-navigator",
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648297722,
|
||||||
|
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
27
flake.nix
27
flake.nix
|
@ -19,6 +19,11 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inputs.deploy-rs = {
|
||||||
|
url = "github:serokell/deploy-rs";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
inputs.pre-commit-hooks = {
|
inputs.pre-commit-hooks = {
|
||||||
url = "github:cachix/pre-commit-hooks.nix";
|
url = "github:cachix/pre-commit-hooks.nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -31,7 +36,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixos-hardware, flake-utils, home-manager, nur
|
outputs = { self, nixpkgs, nixos-hardware, flake-utils, home-manager, nur
|
||||||
, agenix, pre-commit-hooks, nvim-kitty-navigator, nixpkgs-glslls }@inputs:
|
, agenix, deploy-rs, pre-commit-hooks, nvim-kitty-navigator, nixpkgs-glslls
|
||||||
|
}@inputs:
|
||||||
let
|
let
|
||||||
overlays = {
|
overlays = {
|
||||||
neovim = self: super:
|
neovim = self: super:
|
||||||
|
@ -112,8 +118,10 @@
|
||||||
samba.file = ./secrets/samba.age;
|
samba.file = ./secrets/samba.age;
|
||||||
smtp.file = ./secrets/smtp.age;
|
smtp.file = ./secrets/smtp.age;
|
||||||
};
|
};
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs; [
|
||||||
[ agenix.defaultPackage.x86_64-linux ];
|
agenix.defaultPackage.x86_64-linux
|
||||||
|
deploy-rs.defaultPackage.x86_64-linux
|
||||||
|
];
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -179,6 +187,19 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deploy.nodes.felix-rpi4 = {
|
||||||
|
hostname = "192.168.1.234";
|
||||||
|
profiles.system = {
|
||||||
|
user = "felschr";
|
||||||
|
path = deploy-rs.lib.aarch64-linux.activate.nixos
|
||||||
|
self.nixosConfigurations.felix-rpi4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# TODO `nix flake check` fails atm which causes this to fail, too
|
||||||
|
checks = builtins.mapAttrs
|
||||||
|
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||||
|
|
||||||
} // flake-utils.lib.eachDefaultSystem (system:
|
} // flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix.trustedUsers = [ "@wheel" ];
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
substituters = [ "https://hydra.iohk.io" "https://shajra.cachix.org" ];
|
substituters = [ "https://hydra.iohk.io" "https://shajra.cachix.org" ];
|
||||||
|
|
Loading…
Reference in a new issue