mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-26 15:12:14 +00:00
sync
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
{ lib, pkgs, config, modulesPath, ... }:
|
||||
{
|
||||
{ lib, pkgs, config, modulesPath, ... }: {
|
||||
|
||||
# nixpkgs.overlays = overlays;
|
||||
# Enable nix flakes
|
||||
@@ -23,48 +22,46 @@
|
||||
# docker-desktop.enable = true;
|
||||
};
|
||||
|
||||
mymods = {
|
||||
user_sstent.enable = true;
|
||||
};
|
||||
mymods = { user_sstent.enable = true; };
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.secrets.example_key = {};
|
||||
sops.secrets.example_key = { };
|
||||
|
||||
environment.systemPackages =
|
||||
[ pkgs.socat
|
||||
pkgs.npiperelay
|
||||
#pkgs.wsl-ssh-agent-relay
|
||||
];
|
||||
environment.systemPackages = [
|
||||
pkgs.socat
|
||||
pkgs.npiperelay
|
||||
#pkgs.wsl-ssh-agent-relay
|
||||
];
|
||||
|
||||
|
||||
nixpkgs.config.packageOverrides = pkgs: with pkgs; rec {
|
||||
nixpkgs.config.packageOverrides = pkgs:
|
||||
with pkgs; rec {
|
||||
npiperelay = callPackage ../../pkgs/npiperelay { };
|
||||
#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 = {
|
||||
ExecStart = "${pkgs.writeShellScript "start-proxy" ''
|
||||
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
|
||||
''}";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
Install = { 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";
|
||||
unitConfig = {
|
||||
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";
|
||||
ConditionPathIsSymbolicLink = "/dev/shm";
|
||||
ConditionPathIsMountPoint = "/run/shm";
|
||||
|
||||
Reference in New Issue
Block a user