mirror of
https://github.com/sstent/vmimages.git
synced 2026-03-06 21:16:07 +00:00
sync
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{ lib, pkgs, config, modulesPath, ... }:
|
{ lib, pkgs, config, modulesPath, ... }: {
|
||||||
{
|
|
||||||
|
|
||||||
# nixpkgs.overlays = overlays;
|
# nixpkgs.overlays = overlays;
|
||||||
# Enable nix flakes
|
# Enable nix flakes
|
||||||
@@ -23,48 +22,46 @@
|
|||||||
# docker-desktop.enable = true;
|
# docker-desktop.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
mymods = {
|
mymods = { user_sstent.enable = true; };
|
||||||
user_sstent.enable = true;
|
|
||||||
};
|
|
||||||
sops.defaultSopsFile = ./secrets.yaml;
|
sops.defaultSopsFile = ./secrets.yaml;
|
||||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||||
sops.secrets.example_key = {};
|
sops.secrets.example_key = { };
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages = [
|
||||||
[ pkgs.socat
|
pkgs.socat
|
||||||
pkgs.npiperelay
|
pkgs.npiperelay
|
||||||
#pkgs.wsl-ssh-agent-relay
|
#pkgs.wsl-ssh-agent-relay
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.packageOverrides = pkgs:
|
||||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; rec {
|
with pkgs; rec {
|
||||||
npiperelay = callPackage ../../pkgs/npiperelay { };
|
npiperelay = callPackage ../../pkgs/npiperelay { };
|
||||||
#wsl-ssh-agent-relay = callPackage ../../pkgs/wsl-ssh-agent-relay { };
|
#wsl-ssh-agent-relay = callPackage ../../pkgs/wsl-ssh-agent-relay { };
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
systemd.user.services.ssh-proxy = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
Unit = {
|
|
||||||
Description = "WSL Proxy";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.ssh-proxy = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
Unit = { Description = "WSL Proxy"; };
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${pkgs.writeShellScript "start-proxy" ''
|
ExecStart = "${pkgs.writeShellScript "start-proxy" ''
|
||||||
rm -f /tmp/.ssh-sock
|
rm -f /tmp/.ssh-sock
|
||||||
setsid ${pkgs.socat}/bin/socat UNIX-LISTEN:/tmp/.ssh-sock,fork EXEC:"/mnt/c/ProgramData/chocolatey/bin/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
|
setsid ${pkgs.socat}/bin/socat UNIX-LISTEN:/tmp/.ssh-sock,fork EXEC:"/mnt/c/ProgramData/chocolatey/bin/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
|
||||||
''}";
|
''}";
|
||||||
};
|
};
|
||||||
Install = {
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
WantedBy = [ "default.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.nixs-wsl-systemd-fix = {
|
systemd.services.nixs-wsl-systemd-fix = {
|
||||||
description = "Fix the /dev/shm symlink to be a mount";
|
description = "Fix the /dev/shm symlink to be a mount";
|
||||||
unitConfig = {
|
unitConfig = {
|
||||||
DefaultDependencies = "no";
|
DefaultDependencies = "no";
|
||||||
Before = [ "sysinit.target" "systemd-tmpfiles-setup-dev.service" "systemd-tmpfiles-setup.service" "systemd-sysctl.service" ];
|
Before = [
|
||||||
|
"sysinit.target"
|
||||||
|
"systemd-tmpfiles-setup-dev.service"
|
||||||
|
"systemd-tmpfiles-setup.service"
|
||||||
|
"systemd-sysctl.service"
|
||||||
|
];
|
||||||
ConditionPathExists = "/dev/shm";
|
ConditionPathExists = "/dev/shm";
|
||||||
ConditionPathIsSymbolicLink = "/dev/shm";
|
ConditionPathIsSymbolicLink = "/dev/shm";
|
||||||
ConditionPathIsMountPoint = "/run/shm";
|
ConditionPathIsMountPoint = "/run/shm";
|
||||||
|
|||||||
Reference in New Issue
Block a user