[-] Oinks 2 points 2 days ago* (last edited 2 days ago)

just swapped it to remove the ${pkgs.coreutils} but i suspect thats not right either

Just /run/current-system/sw/bin/reboot actually would work, although it relies on your system closure containing a reboot binary. That's a reasonably safe assumption to make on a NixOS system, but you might not want to do this with other packages.

the path i used was the output of which reboot

The reason that doesn't work is that the structure of packages and the structure of a NixOS fiile system are different. Consider this:

$ ls -l $(readlink $(type -P reboot))
lrwxrwxrwx 33 root root 9  1. Jan 1970  /nix/store/axx9bvf0dmah41f39ds9xdkds1lsz6z9-systemd-261/bin/reboot -> systemctl

So the systemd package in the nix store has a bin subdirectory containing its binaries. However:

$ ls -l /bin/reboot
ls: cannot access '/bin/reboot': No such file or directory
$ ls -l /bin/*
lrwxrwxrwx 1 root root 74 Aug  1 06:31 /bin/sh -> /nix/store/dddwfz7nph37q3cjky9lhpy9kb90rrrx-bash-interactive-5.3p15/bin/sh

NixOS doesn't, at least not really (/bin/sh must exist because the system syscall uses it). Instead binaries for "installed" packages (the technical term would be "packages which are part of the system closure") are symlinked to /run/current-system/sw/bin:

$ type -P reboot
/run/current-system/sw/bin/reboot
$ ls -l /run/current-system/sw/bin/reboot
lrwxrwxrwx 9 root root 66  1. Jan 1970  /run/current-system/sw/bin/reboot -> /nix/store/axx9bvf0dmah41f39ds9xdkds1lsz6z9-systemd-261/bin/reboot

More accurately, building a NixOS system creates a sort of meta-package that contains a link farm to all installed binaries in the sw/bin directory, and that meta-package is symlinked to /run/current-system at activation/boot. (Not all package contents are symlinked into this meta-package, also see the NixOS option environment.pathsToLink.)

Putting that together with what string interpolation of packages does... well, you kinda just have to look at/know the contents of the package you are referring to:

$ nix repl
Nix 2.34.8
Type :? for help.
nix-repl> pkgs = import <nixpkgs> { }

nix-repl> "${pkgs.systemd}/bin/reboot"
"/nix/store/axx9bvf0dmah41f39ds9xdkds1lsz6z9-systemd-261/bin/reboot"

nix-repl> "${pkgs.systemd}/run/current-system/sw/bin/reboot"
"/nix/store/axx9bvf0dmah41f39ds9xdkds1lsz6z9-systemd-261/run/current-system/sw/bin/reboot"

One of these paths exists, the other doesn't.

Side note: You're looking at the old and mostly abandoned wiki, don't use that. There's an official wiki which is better. This particular article happens to be the same in both, but the old wiki also has tons of outdated and terrible articles like For Beginners or NixOS Woke Invasion.

[-] Oinks 6 points 2 days ago

For installed packages, you can use readlink:

$ readlink $(type -P reboot)
/nix/store/axx9bvf0dmah41f39ds9xdkds1lsz6z9-systemd-261/bin/reboot

The NixOS search can also search for binaries. It seems that busybox also provides a reboot which I guess might be useful for weird systemd-less deployments?

If you want to search for any file across all packages, there's also nix-index, which scrapes Hydra for output files and builds a database which you can then query with nix-locate.

[-] Oinks 23 points 1 month ago* (last edited 1 month ago)

I'm sorry but what are you talking about? How is this random GNOME extension related to DHH (who does not even use GNOME if that isn't obvious)? How does that relationship poison the concept of scrolling window management? Is Drew DeVault a fascist because he made Sway which works vaguely similar to Hyprland, which was made by a fascist?

[-] Oinks 26 points 4 months ago

Auf der einen Seite stehe das staatliche Interesse an effektiver Strafverfolgung, auf der anderen das Eigentumsrecht des Betroffenen – einschließlich des fortschreitenden Wertverlusts der Geräte. Entscheidend war, dass es über 2,5 Jahre keine ernsthafte Auswertung gegeben hatte. Und das, obwohl es sich überschaubare 56 GB handelte, es keine Verschlüsselung gab, die PINs bekannt waren und die Daten bereits gesichert.

Was für ein Saftladen. Erinnert mich an XKCD 538, nur umgekehrt.

[-] Oinks 55 points 8 months ago* (last edited 8 months ago)

All of the 5 people who use (non-ESR) Firefox on their 2002 Pentium 4s will certainly be very unhappy about this.

[-] Oinks 88 points 8 months ago

In defense of the author and their education... They're Brazilian so English probably isn't their native language, and their history education was almost certainly in Portuguese. I don't think it's necessarily an indictment of their education that they weren't taught about the English translation of a German phrase, and I don't think it's reasonable to apply the same standards of subtext awareness to native and non-native speakers either.

[-] Oinks 23 points 10 months ago* (last edited 10 months ago)

Nu's find builtin isn't a GNU find repacement. I think what you actually want is ls piped into where:

ls **/* | where type == file

I do question the choice to alias a well-known program with a builtin that does something entirely different. You can also use ^find to avoid calling the builtin. I would've expected \find (bash-like) or command find (fish-like) to work as well, but alas...

[-] Oinks 28 points 1 year ago* (last edited 1 year ago)

Many people who don't know what they're talking about in this thread. No, used memory does not include cached memory. You can confirm this trivially by running free -m and adding up the numbers (used + cached + free = total). Used memory can not be reclaimed until the process holding it frees it or dies. Not all cached memory can be reclaimed either, which is why the kernel reports an estimate of available memory. That's the number that really matters, because aside from some edges cases that's the number that determines whether you're out of memory or not.

Anyway the fact that you can't run Linux with 16GB is weird and indicates that some software you are using has a RAM leak (a Firefox extension perhaps?). Firefox will use memory if it's there but it's designed to cope with low memory as well, it just unloads tabs quicker so you have to reload often. There are also extensions that make tab unloading more aggressive, maybe that would help - especially if there's memory pressure from other processes too.

[-] Oinks 48 points 1 year ago* (last edited 1 year ago)

Insightful article. I have to confess I never realized the accessibility situation was this bad.

I also want to highlight this excerpt from the comments:

Making things accessible isn't hard technically. But it requires coordination and people to care about it enough to work on it at the expense of other features. If [I] developed an application on a team and said I had 'one security guy that works on that stuff as long as it doesn't interfere with the rest of our work' I'd be dragged over the coals and have my project forked by the public.

But with accessibility? There's really no sense of priority or urgency despite it being broken for years and not putting much effort in to fixing it.

[-] Oinks 25 points 1 year ago

Try launching Steam from the terminal so you have a chance at seeing an actual error message, at least for the crashing games.

It might be the kernel as the other comment says since the 9070 is pretty new. If it works without issues on something like Fedora or OpenSUSE TW then that was probably the issue.

[-] Oinks 22 points 1 year ago* (last edited 1 year ago)

I am very sorry to remind everyone about the existence of Visual Basic, but it has:

  • VbCrLf
  • VbNewLine
  • ControlChars.CrLf
  • ControlChars.NewLine
  • Environment.NewLine
  • Chr(13) & Chr(10)

And I know what you're asking: Yes, of course all of them have subtly different behavior, and some of them only work in VB.NET and not in classic VB or VBA.

The only thing you can rely on is that "\r\n" doesn't work.

[-] Oinks 31 points 2 years ago* (last edited 2 years ago)

To be fair this also happened to Eagle Dynamics, developer of DCS, the other "realistic" flight sim that players take far too seriously. Except there it was a Dev that got arrested in Georgia and extradited to the US...

view more: next ›

Oinks

joined 3 years ago