ComradeKhoumrag

joined 1 year ago
MODERATOR OF
[–] [email protected] 2 points 1 month ago (1 children)

Running the game on NixOS and hasn't crashed once, it's never been this smooth. Been waiting 10 years for the project to be in this buggy version of an alpha.

[–] [email protected] 4 points 1 month ago

The math looks perfectly fine. But when people phrase "half of a quarter" I think they have (1/2)*(1/4) in mind, instead of 0.25/0.5

[–] [email protected] 2 points 1 month ago

I want to see this post that got removed now

[–] [email protected] 7 points 1 month ago* (last edited 1 month ago)

There are plenty of natural particles colliders, such as black holes or very dense stars, that are way more powerful than our engineered particle colliders, which (observationally) don't create black holes around them

[–] [email protected] 6 points 2 months ago

It's a common tactic of narcissists to elicit empathy

[–] [email protected] 2 points 2 months ago

Software engineering is usually distinct from programming in that it isn't about the logic behind programming, but about the project management that all software projects typically have in common.

Besides agile methodology, a lot of software engineering involves creating reproducible environments. While NixOS doesn't provide anything that much different from tools like Ansible,

NixOS follows a functional/declarative design paradigm, functional/declarative design paradigms communicate similar logic for solving the same problem. It's a restrictive paradigm. Consider how javascript is not restrictive, as in, you can code with any design paradigm in javascript, and how it's ugly for that.

I also think functional paradigms mirror the natural language closer than imperative paradigms. That's subjective, but I would still argue Math is a logical language that is a subset of the natural language, and since functions in programming represent a process of doing something, functions make for natural verbs. Meaning, understanding the naming convention for the functions, is a natural naming convention for when I communicate with other software engineers, even when I'm not asking about making configurable/reproducible systems in NixOS

Or when I look at how to config things like firewall, ssh, vpn servers, user group permissions... it's a minimalist description that I could communicate to other people configuring even on a debian server

So, it's hard because it's restrictive, but if you're willing to put up with a learning curve, you get a language agnostic framework for describing computing environments, more or less. Then there's more advanced stuff with nix flakes, which still doesn't make sense to me functionally/linguistically, but I'm starting to see the value in parallel package management and the precision in reproducibility they provide by requiring sha256 git commits

[–] [email protected] 3 points 2 months ago* (last edited 2 months ago) (1 children)

Yea it's definitely a jungle haha, it also seems they're changing things up a bit with where the most recent docs might be hosted

https://search.nixos.org/

so, if you searched for vscode in that link, then click the "NixOS Configuration" button, you can see

  environment.systemPackages = [
    pkgs.vscode
  ];

or if you're using the with convention to factor out the pkgs object/contextual keyword(not sure if that's the right name)

  environment.systemPackages = with pkgs; [
    vscode
  ];

for zsh, just having this in your configuration.nix should work https://nixos.wiki/wiki/Command_Shell

programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;

Again, these values should be inserted after the function definition of your configuration.nix

{ config, pkgs, ...}:
{
   # Things get inserted here typically
   imports = [ ./hardware-configuration.nix];
   environment.systemPackages = [pkgs.vscode];
}

for example.

Something I've noticed from developing on nix, When the headaches of nix appear, the solution might be harder, but I usually end up with a better solution than what I was going for before. Some examples:

  • My resume is compiled in Latex. I tried the pdflatex package in nix but it gave rendering issues. Then the nix community recommended tectonic and i'm getting better compilation times, logging, clean up...

  • PIP is a garbage package manager, and it's garbageness sometimes makes native python development a headache in nixos. However, using poetry2nix, not only could I define development environments, it was also ready for packaging on PIP

Sometimes you might want to separate some parts of your configuration away from your global system config at /etc/nixos/configuration.nix. That's nix-shell, nix-develop, nix-build, and flakes are for. I'm not a pro at flakes yet, but I think I got the gist, here's an example of when I wish I could have used a flake:

I use discord but discord itself is garbage. Vesktop is a better 3rd party client for discord. Unfortunately, I had to remove it from my configuration.nix the last few weeks because one of its dependencies wasn't packaged right, causing my entire system to not build. If I had used a flake, I could have isolated that dependency from the rest of my build, while still tracking its integration with my system. I believe this could have allowed me to update the rest of my system, while still defining the errenous app as part of my system. Flakes are supposed to be more reproducible as well, since they require sha256 git commits, whereas other package managers only ask for a subjective version number

There's a lot to learn with nix but even if I don't stick with it long term I feel like It's making me a smarter software engineer since a declarative/functional paradigm tends to match the natural language more. It also is the most restrictive design paradigm, which means it's brief but so simple it can be hard to understand as a consequence. Since it's so restrictive, it's also a subset of all other paradigms. You declare what you want, ideally, you don't have to set anything up. I never had an easier time getting cuda drivers for ML Training setup than on NixOS because of this

Something I enjoyed doing, was setting up my user profile to let me ssh in only with whitelisted ssh keys, as well as setting up a systemd script to handle some start up routines on my OS. I think that can be a gentle introduction to how you can configure other parts of your operating system. I'm going to try and set up a CI/CD/CT pipeline with it next I believe

Edit: The next thing I need to do as well, is consolidate my user configs with the home manager functionality. I use a KVantum Theme engine on top of plasma, and while those apps are installed in my system, the configuration of which theme to automatically load should be integrated with the text config aspects of nixos. Currently, I "Imperatively" configured those by "Opening the app and clicking", which will get erased/not be reproducible if I ever rebuild my nixos on a new computer

Another funny thing with functional programming... sometimes the fix is as simple as

sound.enable = true;

Even though I had pipewire enabled as a service and everything, that one line needed to be there haha

[–] [email protected] 4 points 2 months ago

I've been using Wayland on plasma 5 for a year or so now, and it looks like the recent Nvidia driver has merged, so it should be getting even better any minute now.

I've used it for streaming on Linux with pipewire, overall no complaints.

[–] [email protected] 3 points 2 months ago

Had me in the first half ngl

[–] [email protected] 2 points 2 months ago (3 children)

I'm using NixOS partly as a dev machine, but mostly for consumer OS stuff like gaming, YouTube, social media...

What are you trying to use it for? From the consumer perspective, I feel like modifying configuration.nix would be the majority of what I need. It's like ninite if you've used that to setup a Windows machine, but it can be preloaded on your OS and you can configure everything, not just which programs are installed

If you're trying to setup dev environments, I think what gets weird is how many ways there are to do similar things, like nix develop, nix build, nix shell...

[–] [email protected] 1 points 2 months ago

Thank you 🥹

[–] [email protected] 3 points 2 months ago (4 children)

I block individuals. I think it can be good to expose myself to the eastern narrative a little since I'm only experiencing a western narrative. As well as eastern shitpost's since I subscribe to 4chan

 

I want to start a new project, and I want to try to handle all the reproducibility / "containerization" in nix instead of dockerfiles. I see some examples online but I think they're including more uncommon procedures and/or don't do things the "nix" way.

What's the right way to manage a simple python project? Should I just make a derivation.nix for use in nix-shell -p and have the ephemeral shell be my container? Can/should I do it with nix flakes instead? What would a simple nix flake look like that:

pulls an initial python repo from github

possibly executes whatever build instructions might be included

extends other system packages or other versions of the same python package,

has local area network access,

and GPU access

 

I see you can delete everything older than some period of time, but what if I want some older than a year? Or should it be interpreted that: whatever build configuration was used, it is tested thoroughly at that point, and it would be better to rebuild from a nix configuration stored on git?

 

Edit: my issues came from copying source .nix configurations for the pig manager, not configurations that I would include on my computer. Finding how to include what where was much easier with search.nixos.org

Hi, I've finally cleansed my system of windows and switched fully into nix. I want to learn this OS the right way, but have ran into some noob troubles. Any help would be greatly appreciated. Ideally, these changes are things I would include in my configuration.nix

  • How to install electrum wallet on nixos? I found this default.nix for electrum and thought it would be as easy as nix-build default.nix but was mistaken. It says " cannot evaluate a function that has an argument without a value ('fetchurl') Nix attempted to evaluate a function as a top level expression" but on a later line that value is inputted to the function (if I understand right)

src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; sha256 = "sha256-BxxC1xVKToUjgBo4mEeK9Tdhbd/+doHcTTJsXDtaELg="; };

  • How to install KVantum Theme Manager? I was following this guide and tried to add gcc/g++ and the x11 package dependencies but I get undefined variables for the x11 libraries. Some recommend using stdenv.mkDerivations but I haven't used that much nix before so I'm not certain if I should be going down that rabbit hole
 

I'll start: I (wrongly) used the card mom said was for emergencies for the original Kickstarter. Since then I've gotten a degree, started my career, partnered in a startup, and moved down and across the country a couple times as well.

 

Seems like all the scaling upgrades mentioned in the previous roadmap are about done (segwit, lightning network, taproot, schnorr signatures...)

I guess drivechain would be nice to see, but I haven't heard of any updates on that project in a while. Are there any other plans to look forward to?

 

Would be very nice to have after the initial hurdles of app development are wrapped up

view more: next ›