From 2ae1f8eb4f5a28bb374ad3180d8541440cc06097 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 20 Feb 2023 03:30:16 +0000 Subject: [PATCH] snyc --- flake.lock | 54 +++++++++++++++++++++++++++++++++++++++ hosts/wsl2/flake.lock | 43 +++++++++++++++++++++++++++++++ hosts/wsl2/flake.nix | 33 ++++++++++++++++++++++++ hosts/wsl2/npiperelay.nix | 14 ---------- hosts/wsl2/result | 1 + 5 files changed, 131 insertions(+), 14 deletions(-) create mode 100644 hosts/wsl2/flake.lock create mode 100644 hosts/wsl2/flake.nix delete mode 100644 hosts/wsl2/npiperelay.nix create mode 120000 hosts/wsl2/result diff --git a/flake.lock b/flake.lock index 221bff7..6b49a9f 100644 --- a/flake.lock +++ b/flake.lock @@ -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" } }, diff --git a/hosts/wsl2/flake.lock b/hosts/wsl2/flake.lock new file mode 100644 index 0000000..6f5f869 --- /dev/null +++ b/hosts/wsl2/flake.lock @@ -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 +} diff --git a/hosts/wsl2/flake.nix b/hosts/wsl2/flake.nix new file mode 100644 index 0000000..f5ff58d --- /dev/null +++ b/hosts/wsl2/flake.nix @@ -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"; }; + }; + }); +} diff --git a/hosts/wsl2/npiperelay.nix b/hosts/wsl2/npiperelay.nix deleted file mode 100644 index dbc9056..0000000 --- a/hosts/wsl2/npiperelay.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ pkgs ? import {} }: -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 - ''; -} \ No newline at end of file diff --git a/hosts/wsl2/result b/hosts/wsl2/result new file mode 120000 index 0000000..76ea116 --- /dev/null +++ b/hosts/wsl2/result @@ -0,0 +1 @@ +/nix/store/ga8wddim12rk83xfji4f0llqxyv900gc-npiperealy-0.1 \ No newline at end of file