| 21 Feb 2023 |
Arson Copperflame | Could we just find out what executable PID 1 currently is? | 09:11:46 |
Sandro 🐧 | In reply to @k900:0upti.me Anyway found a script that automates the dance: https://github.com/okibcn/wslcompact you need to have full hyperv installed and run this in powershell started as admin
wsl.exe –shutdown
optimize-vhd -Path C:\Users\User\NixOS\ext4.vhdx -Mode full
| 11:57:54 |
K900 | That doesn't quite do it | 11:58:06 |
K900 | It will release discarded blocks, but the blocks are too big | 11:58:22 |
Sandro 🐧 | and that can only be fixed by copying it into a new image? | 12:02:05 |
Sandro 🐧 | btw what did you do with rsync? | 12:02:11 |
K900 | Basically, create a new VHD out of band, wsl --mount --vhd it, rsync the rootfs onto it, wsl --shutdown, move new VHD over old VHD | 12:02:46 |
| 23 Feb 2023 |
| mart-w joined the room. | 18:43:39 |
| 24 Feb 2023 |
| peterldowns joined the room. | 21:09:17 |
| 27 Feb 2023 |
| Cynthia changed their display name from houstdav000 to Cynthia. | 17:53:19 |
| 1 Mar 2023 |
Sandro 🐧 | Shouldn't lib.mkAfter move $PATH to the end here https://github.com/nix-community/NixOS-WSL/blob/4640199aeafcbb63cfbe8318bdf06f4402134f66/modules/wsl-distro.nix#L202 ? | 16:29:54 |
Sandro 🐧 | I am trying to move /run/current-system/sw/bin before and WSL PATHs to work around a potential bug in envfs | 16:30:31 |
| 3 Mar 2023 |
| Teo (he/they) joined the room. | 18:54:34 |
| 5 Mar 2023 |
| ~ajhalili2006 [ ctrl-c.club / sr.ht / vern.cc ] joined the room. | 01:37:17 |
| 6 Mar 2023 |
Sandro 🐧 | Something about the sudo wrapper changed and it is broken for me. | 13:21:13 |
Sandro 🐧 | I suspect that the permissions are wrong:
▶ ls -lah /run/wrappers/bin/sudo
.r-s--x--- root wheel 17 KB Mon Mar 6 14:19:11 2023 /run/wrappers/bin/sudo
| 13:21:33 |
Sandro 🐧 | groups are fine
▶ id
uid=1000(sandro) gid=100(users) groups=100(users),1(wheel)
| 13:22:04 |
Sandro 🐧 | 🤦 | 13:22:25 |
Sandro 🐧 | I was testing PATH ordering last week and that messes it up | 13:23:23 |
| Emil Nikolov joined the room. | 15:40:39 |
| 7 Mar 2023 |
| Rowan Molony joined the room. | 17:25:23 |
henrik-ch | I am trying to get gpg working for my user on nixos wsl.
I have the following in my configuration.nix:
{ pkgs, config, modulesPath, ... }:
let
#nixvim = import (builtins.fetchGit {
# url = "https://github.com/pta2002/nixvim";
#});
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
#nixvim.nixosModules.nixvim
nixos-wsl.nixosModules.wsl
<home-manager/nixos>
];
wsl = {
enable = true;
nativeSystemd = true;
wslConf.automount.root = "/mnt";
defaultUser = "nixos";
startMenuLaunchers = true;
# Enable native Docker support
# docker-native.enable = true;
# Enable integration with Docker Desktop (needs to be installed)
# docker-desktop.enable = true;
};
# Enable nix flakes
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
#programs.nixvim.enable = true;
users.users.i97henka = {
isNormalUser = true;
extraGroups = [ "wheel"];
};
home-manager.users.i97henka = { pkgs, ... }: {
home.stateVersion = "22.11";
home.packages = [ pkgs.jq pkgs.ripgrep pkgs.gh ];
programs.bash = {
enable = true;
shellAliases = {
ll = "ls -l";
".." = "cd ..";
gst = "git status";
glo = "git log --oneline";
gfa = "git fetch --all";
ggfl = "git push --force-with-lease";
};
};
programs.git.enable = true;
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.fzf.enable = true;
programs.bat.enable = true;
programs.gpg.enable = true;
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
};
};
environment.systemPackages = with pkgs; [
bat
git
vim
];
system.stateVersion = "22.11";
}
I have added programs.gpg.enable = true; but it didn't improve things.
I have seen this discourse thread: https://discourse.nixos.org/t/cant-get-gnupg-to-work-no-pinentry/15373
but I am not sure how to apply it to my configuration.nix - I only added gpg in the home manager part - but maybe it should be in a different part?
| 17:38:01 |
K900 | What exactly is not working? | 17:39:10 |
henrik-ch | Thank you for chatting back K900 . This is the command and the error:
gpg --symmetric --cipher-algo AES256 file_with_secrets.env
gpg: problem with the agent: No pinentry
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of 'file_with_secrets.env' failed: Operation cancelled
| 17:40:38 |
K900 | Maybe use the NixOS setting instead of the home-manager one? | 17:41:42 |