This commit is contained in:
Your Name
2023-02-20 03:30:16 +00:00
parent 324f60cd94
commit 2ae1f8eb4f
5 changed files with 131 additions and 14 deletions

54
flake.lock generated
View File

@@ -81,6 +81,37 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -138,6 +169,28 @@
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1676381420,
"narHash": "sha256-aDRnfGrk/xi7zkuterN78p8/wdM5Iy6vz74uqd/JFWw=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "4640199aeafcbb63cfbe8318bdf06f4402134f66",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1676569297,
@@ -160,6 +213,7 @@
"deploy-rs": "deploy-rs",
"home-manager": "home-manager",
"nixos-generators": "nixos-generators",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs"
}
},

43
hosts/wsl2/flake.lock generated Normal file
View File

@@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1676721149,
"narHash": "sha256-mN2EpTGxxVNnFZLoLWRwh6f7UWhXy4qE+wO2CZyrXps=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5f4e07deb7c44f27d498f8df9c5f34750acf52d2",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

33
hosts/wsl2/flake.nix Normal file
View File

@@ -0,0 +1,33 @@
{
description =
"npiperelay";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
defaultPackage = pkgs.symlinkJoin {
name = "npiperealy-0.1";
paths = builtins.attrValues
self.packages.${system};
};
packages.npiperelay = pkgs.stdenvNoCC.mkDerivation {
name = "npiperelay";
src = pkgs.fetchurl {
url = "https://github.com/rupor-github/wsl-ssh-agent/releases/download/v1.6.3/wsl-ssh-agent.zip";
sha256 = "sha256-A1ykYteoNZi6QACkYHSxa1hY55GfqgClIFZFX2GuLMU=";
};
phases = ["installPhase" "patchPhase"];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/npiperelay.exe
chmod +x $out/bin/npiperelay.exe
'';
meta = { description = "npipe"; };
};
});
}

View File

@@ -1,14 +0,0 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
name = "npiperelay";
src = pkgs.fetchurl {
url = "https://github.com/rupor-github/wsl-ssh-agent/releases/download/v1.6.3/wsl-ssh-agent.zip";
sha256 = "39e6765a6836484707c26f3372561380b1e619492dc91bf8ebeec37aaee8f3d7";
};
phases = ["installPhase" "patchPhase"];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/npiperelay.exe
chmod +x $out/bin/npiperelay.exe
'';
}

1
hosts/wsl2/result Symbolic link
View File

@@ -0,0 +1 @@
/nix/store/ga8wddim12rk83xfji4f0llqxyv900gc-npiperealy-0.1