vendion

u/vendion@lemmy.ml
5 posts · 11 comments

Recent posts

Recent comments

on IT'S HAPPENING · c/chevron7 · 2 pts · 257d

Not if they wait long enough to buy it second hand, well at least not their purchase. Just a matter of how long they would be willing to wait.

Okay, hopefully someone here can point out where I am going wrong with setting up my dev shell the way I want. I am currently using direnv and nix-direnv to manage the dev shell, and I found this blog post which shows a way to start and stop MySQL/Mariadb but I am having some weird issues with it.

Currently my flake looks like this:

{
  description = "A basic flake with a shell";
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";

  outputs = { nixpkgs, flake-utils, ... }@inputs:
    flake-utils.lib.eachDefaultSystem (system:
      let
        pkgs = nixpkgs.legacyPackages.${system};
      in
      {
        devShells.default = pkgs.mkShell {
          packages = with pkgs; [
            bashInteractive
            php
          ];

          buildInputs = [ pkgs.mariadb ];

          shellHook = ''
          export MYSQL_BASEDIR=${pkgs.mariadb}
          export MYSQL_HOME=$PWD/.direnv/mysql
          export MYSQL_DATADIR=$MYSQL_HOME/data
          export MYSQL_UNIX_PORT=$MYSQL_HOME/mysql.sock
          export MYSQL_PID_FILE=$MYSQL_HOME/mysql.pid
          alias mysql='mysql -u root'

          if [[ ! -d $MYSQL_HOME ]]; then
            mariadb-install-db --auth-root-authentication-method=normal \
              --datadir="$MYSQL_DATADIR" --basedir="$MYSQL_BASEDIR" \
              --pid-file="$MYSQL_PID_FILE"
          fi

          mariadbd --datadir=$MYSQL_DATADIR --pid-file=$MYSQL_PID_FILE \
            --socket=$MYSQL_UNIX_PORT --tmpdir='/tmp' 2>/dev/null &
          MYSQL_PID=$!
          '';
        };
      });
}

When I run it like this mariadbd starts just fine, but doesn't get backgrounded dispite the & making that shell session useless which is not what I want as I have to spawn a second shell just to do anything.

Even weirder is when I add the finish() function and the call to trap like in the blog post then mariadbd doesn't start (or starts and immedently gets killed).

Okay, that's good to know. I just wanted to make sure that if I had something like MariaDB or Postgres get installed with nix-shell that I wouldn't lose everything thus having to set everything back up next time I start the shell again.

I'm currently using Xmonad on my main Arch system, before that was Herbstluftwm. Occasionally I boot up KDE to check on how it's coming along or when i'm feeling nostalgic for what helped get me into Linux many years ago.

on *Permanently Deleted* · c/protonmail · 1 pts · 3y

It's nice to see that it's finally out of the closed beta, but for me it seems to be lacking in a lot of ways. I make use of identies in BitWarden, have CC data there, and use their CLI app. Hopefully Proton plans to build on Pass to help out compete with other password managers quickly.

Plus side another privacy focused security tool from someone who knows what they are doing is always welcome.