• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. How to install Firefox Nightly on NixOS

      I had a bit of free time tonight and decided to write a short blog post detailing my solution for installing Firefox Nightly on NixOS, since this was the only solution I came across that actually...

      I had a bit of free time tonight and decided to write a short blog post detailing my solution for installing Firefox Nightly on NixOS, since this was the only solution I came across that actually worked and was not ridiculously complicated.

      I wrote this in about an hour and I was (and am) quite tired, so please forgive (but still point out) any mistakes or possible improvements. Hopefully my solution ends up being useful for you.

      Finally, to spare everyone from having to look at my "blog", here is the text of the post copied onto Tildes:


      Like some other Linux distributions, NixOS supports the use of overlays.

      I am actually not very familiar with how overlays work on NixOS. So, for the sake of simplicity, we will just think of them as being similar to PPAs on Ubuntu. Except, instead of being a custom repository of downloadable packages, NixOS overlays are more like scripts that instruct the package manager on how to download and build additional packages (or just about anything, really).

      You might be wondering why you cannot just download the official Firefox Nightly release straight from Mozilla, extract it, and use that.

      Indeed, that is how I have always installed Firefox Nightly on other Linux distributions (it even automatically updates itself!), but I was unable to get it working on NixOS, hence the overlay. (You might have better luck though.)

      Thankfully for us, the overlay we are going to use is actually maintained by Mozilla:

      Located in this repository is a firefox-overlay.nix file, which is what we will use to fetch our Firefox Nightly binary. Go ahead and clone this repository onto your computer.

      Once you have cloned the repository, you will need to make a couple of edits to your configuration.nix file in /etc/nixos/.

      First, you will need to add the line nixpkgs.config.allowUnfree = true; if you want to use the binary Firefox packages and avoid having to compile them yourself (which I do not recommend doing, unless you have beefy hardware and a lot of free time).

      (The binary packages are considered "unfree" because of the Firefox trademark.)

      Second, you will need to add another line to your configuration.nix file that declares the firefox-overlay.nix file, from the repository you cloned, as an overlay. That can be accomplished with this line:

      nixpkgs.overlays = [ (import /path/to/firefox-overlay.nix) ];

      Finally, assuming you have done everything correctly, the last thing you will need to do is add a line declaring a Firefox package to install. Since this blog post is about installing Firefox Nightly, we'll add this line to our systemPackages list, alongside the rest of our system packages:

      latest.firefox-nightly-bin

      In the end, your configuration.nix file should end up with three new lines:


        nixpkgs.overlays = [ (import /etc/nixos/firefox-overlay.nix) ];
        nixpkgs.config.allowUnfree = true;
        environment.systemPackages = with pkgs; [
      	  latest.firefox-nightly-bin
        ];
      

      (I symlink my firefox-overlay.nix file to /etc/nixos/, but you can put it just about wherever you want. )

      And that should be it! Just run a nixos-rebuild command to bring your system in-sync with your configuration.nix file and Firefox Nightly should then be installed and usable.


      Shout out to the anonymous, deleted GitHub user who posted a comment on one of the overlay repository's issues. This was a very simple, very elegant solution. Unfortunately, it took me a long time to find this solution and I ran into quite a few people who were doing the same thing, but with vastly more complex configurations.

      9 votes
    2. How to handle encrypted text fields?

      So, I have about fifteen years of web development experience mainly with classic ASP. Interestingly I never had a client who required any type of encryption other than some very low-level...

      So, I have about fifteen years of web development experience mainly with classic ASP. Interestingly I never had a client who required any type of encryption other than some very low-level username/password logins for administrative backends.

      What I am working on, as a pet project for my friends and family, is a private/direct messaging system that I will write with Go. To be clear, this is not a messaging service like WhatsApp nor Signal. It will be similar to the private/direct messaging that you see here at Tildes or Reddit.

      It is important to my friends and family that messages we write to each other be private and secure.

      Thus, how would I go about encrypting the messages so that if someone were to get into the server and acquire the database, they wouldn’t be able to read them?

      EDIT: At some point I will make the code available through GitLab.

      8 votes
    3. Fortnightly Programming Q&A Thread

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.

      Don't forget to format your code using the triple backticks or tildes:

      Here is my schema:
      
      ```sql
      CREATE TABLE article_to_warehouse (
        article_id   INTEGER
      , warehouse_id INTEGER
      )
      ;
      ```
      
      How do I add a `UNIQUE` constraint?
      
      10 votes
    4. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      10 votes
    5. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      19 votes
    6. [RESOLVED] Is there a way for me to access the contents of my password protected zip file?

      At least one year ago I password protected a zip file. I'm not sure how I either lost or did not save the password with my password manager. Any help would be greatly appreciated. It's stored on...

      At least one year ago I password protected a zip file. I'm not sure how I either lost or did not save the password with my password manager.

      Any help would be greatly appreciated. It's stored on my desktop macOS 10.15.3.

      EDIT: I was able to determine what the zip file contained. Turns out that it was tax/bank information that I was able to find online. Thanks for all the help!

      9 votes
    7. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      10 votes
    8. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      17 votes