@@ -1,36 +1,5 @@
|
||||
{ user, home }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
in
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# FIXME: https://github.com/nix-community/NixOS-WSL/issues/375
|
||||
# FIXME: https://github.com/Mic92/sops-nix/issues/687
|
||||
# FIXME: https://github.com/microsoft/WSL/issues/8842
|
||||
# FIXME: https://github.com/microsoft/WSL/issues/10205
|
||||
# Fuck Microsoft.
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ config.users.users.${user}.name ];
|
||||
commands = [
|
||||
{
|
||||
command = "${systemctl} restart user@${toString config.users.users.${user}.uid}.service";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "${systemctl} restart user@${toString config.users.users.${user}.uid}";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
users.users.${user}.shell = pkgs.writeShellApplication {
|
||||
name = "wsl-zsh";
|
||||
runtimeInputs = with pkgs; [ systemd ];
|
||||
text = builtins.readFile ./wsl-zsh.sh;
|
||||
passthru.shellPath = "/bin/wsl-zsh";
|
||||
};
|
||||
|
||||
home-manager.users.${user}.home.packages = with pkgs; [ wsl-wl-clipboard ];
|
||||
}
|
||||
|
Reference in New Issue
Block a user