mirror of
https://github.com/nix-community/nixos-anywhere.git
synced 2024-08-16 20:00:36 +03:00
add flake for nixos-remote
This commit is contained in:
parent
f4235fead3
commit
26258d1b24
27
flake.lock
Normal file
27
flake.lock
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1670559856,
|
||||
"narHash": "sha256-xUkgQRFqE6HIFQXs9SIXMZiXcLaH2415UR6w/FnsgcY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6bc6f77cb171a74001033d94f17f49043a9f1804",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
21
flake.nix
Normal file
21
flake.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
description = "Install nixos everywhere via ssh";
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
outputs = { self, 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;
|
||||
});
|
||||
};
|
||||
}
|
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