mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-09-11 08:35:24 +03:00
add flake for nixos-remote
This commit is contained in:
parent
5ff6a4fe33
commit
35d51df963
14
flake.lock
14
flake.lock
@ -23,16 +23,18 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1670525689,
|
"lastModified": 1670559856,
|
||||||
"narHash": "sha256-YIjGzxrRQa5LYO0zlnH/ardcwXsRgsnHe3TkGkvCxbc=",
|
"narHash": "sha256-xUkgQRFqE6HIFQXs9SIXMZiXcLaH2415UR6w/FnsgcY=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f21f11aa2a02cb78651c6d57546c7d7541f9240c",
|
"rev": "6bc6f77cb171a74001033d94f17f49043a9f1804",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "nixos",
|
||||||
"type": "indirect"
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
|
17
flake.nix
17
flake.nix
@ -1,11 +1,24 @@
|
|||||||
{
|
{
|
||||||
description = "A universal nixos installer, just needs ssh access to the target system";
|
description = "A universal nixos installer, just needs ssh access to the target system";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "nixpkgs";
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
inputs.disko.url = "github:nix-community/disko/master";
|
inputs.disko.url = "github:nix-community/disko/master";
|
||||||
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, disko, ... }: {
|
outputs = { self, disko, nixpkgs, ... }: let
|
||||||
|
supportedSystems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
in {
|
||||||
|
packages = forAllSystems (system: let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in {
|
||||||
|
nixos-remote = pkgs.callPackage ./package.nix {};
|
||||||
|
default = self.packages.${system}.nixos-remote;
|
||||||
|
});
|
||||||
checks.x86_64-linux = let
|
checks.x86_64-linux = let
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
in {
|
in {
|
||||||
|
8
package.nix
Normal file
8
package.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ stdenvNoCC }:
|
||||||
|
stdenvNoCC.mkDerivation {
|
||||||
|
name = "nixos-remote";
|
||||||
|
src = ./.;
|
||||||
|
installPhase = ''
|
||||||
|
install -D -m755 nixos-remote $out/bin/nixos-remote
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user