Skip Navigation

User banner
Nix / NixOS

Members
0
Posts
52
Created
3 yr. ago

Maybe it's time somebody just made a flakes fork to end its endless "experimental" status

Flakes is reaching 10 years of age and is not any closer to being "stable". Nix maintainers can't seem to just drop the cojones on the table and say "it's stable now and it will be versioned, so some old flakes may break if they don't update". What could the community do to implement an external, versioned, flakes solution? Which features would be necessary to have parity with flakes and/or even improve them?

How do you guys harden your systems or make them more privacy oriented?

The responses don't have to be strictly NixOS or Linux specific as I expect the general process to be very similar.

I never hardened a system before so I'm not sure what things I should be focusing on and what solutions are out there. I'm hearing a lot good on SELinux and apparmour but but those sadly aren't supported on NixOS. Recently I set up adguard home with somewhat strict blocklists and SearxNG to take control over my web searches. In the coming days I intend to set up wireguard and a VPN in my config and I also have some firefox extensions for blocking ads, trackers, JS, port scanning, etc. but it all feels surface level and I don't know where to take things from there. What are you guys doing with your setups?

Usually I prefer to never ask questions and look things up myself but reddit will soon block everything with a login wall and that's where I get most info from so I'm finally giving it a shot. :p

Genuinely cannot install NixOS on a VPS

I've recently bought a VPS from Contabo in order to host my own Nextcloud instance (and maybe vaultwarden and abby later). It's my first time ever using a VPS but I've figured NixOS would be great to host those thanks to the reproducibility and modules, and I've been using NixOS on my desktop so I figured it wouldn't so hard right ? right ??? Well turns out it IS hard, I've been trying to install NixOS on my VPS using nixos-anywhere and using this template. The config works but the install seems to fail all the time ? It should output Done when it successfully finished the install, but instead it outputs this:

 
+ partprobe /dev/sda
+ udevadm trigger --subsystem-match=block
+ udevadm settle --timeout 120
+ device=/dev/disk/by-partlabel/disk-disk1-ESP
+ extraArgs=()
+ declare -a extraArgs
+ format=vfat
+ mountOptions=('defaults')
+ declare -a mountOptions
+ mountpoint=/boot
+ type=filesystem
+ grep -q TYPE=
+ blkid /dev/disk/by-partlabel/disk-disk1-ESP
+ mkfs.vfat /dev/disk/by-partlabel/disk-disk1-ESP
mkfs.fat 4.2 (2021-01-31)
mkfs.vfat: unable to open /dev/disk/by-partlabel/disk-disk1-ESP: No such file or directory
+ rm -rf /tmp/tmp.1dADBpsCkQ
Connection to 185.174.255.56 closed.

I was running the install like so: nix run nixpkgs#nixos-anywhere -- --flake .#generic --generate-hardware-config nixos-generate-config ./hardware-configuration.nix root@<address> And I can confirm it's broken cuz when I try to ssh into the VPS afterward it just never let's me connect. But that's not all, it actually did work TWICE and I was able to ssh into the server, but it then I noticed it just didn't have any network access, couldn't pull a git repo or even ping an address, and so couldn't rebuild my config in the VPS. Idk how to fix that either, I imagine this could be related to the nextwork config but I'm not sure For example:

 command
$ ping nixos.org
ping: nixos.org: Name or service not known

I tried all I could find online but nothing really worked, so idk what to do from here Here's a link to the config I'm using: https://codeberg.org/claymorwan/nixos-VPS EDIT: I've managed to fix both of those issue it seems, but my nextcloud instance still isn't reachable. I did create an A record in my domain's DNS pointing to my VPS' ip address and I belive I've opened the correct ports in the config so idk what's wrong here image Nextcloud does start correctly too according to the service

 
Nov 10 20:29:37 nixos systemd[1]: Starting nextcloud-setup.service...
Nov 10 20:29:41 nixos nextcloud-setup-start[683]: No upgrade required.
Nov 10 20:29:41 nixos nextcloud-setup-start[683]: Note: This command triggers the upgrade actions associated with a new version. The new version's updated source files must be deployed in advance.
Nov 10 20:29:41 nixos nextcloud-setup-start[683]: See the upgrade documentation: https://docs.nextcloud.com/server/35/go.php?to=admin-update for more information.
Nov 10 20:29:42 nixos nextcloud-setup-start[687]: System config value trusted_domains deleted
Nov 10 20:29:42 nixos nextcloud-setup-start[691]: calendar already enabled
Nov 10 20:29:42 nixos nextcloud-setup-start[691]: tasks already enabled
Nov 10 20:29:43 nixos nextcloud-setup-start[695]: System config value trusted_domains => 0 set to string nextcloud.deadf.org
Nov 10 20:29:43 nixos systemd[1]: nextcloud-setup.service: Deactivated successfully.
Nov 10 20:29:43 nixos systemd[1]: Finished nextcloud-setup.service.
Nov 10 20:29:43 nixos systemd[1]: nextcloud-setup.service: Consumed 3.423s CPU time over 5.718s wall clock time, 129.1M memory peak, 145.3M read from disk, 8K written to disk.

Developing and packaging Linux apps on NixOS - TisVlay

Hey folks, for about 10 months or so been working on a hobby project just to get more practice in Linux application packaging, the Rust ecosystem/utilities, and software development on Nix and NixOS (as well as solve some personal pain points in using a HDMI TVs and projectors with PCs). I'm posting here as while the project isn't still fully stable, it's daily drivable and fully documented, and I feel other Nix users aren't too shy of beta software. While the pedantic app code may not be much to write home about, I'd be curious here on feedback of my nix packing approach, use of flakes for development and distribution, dev shell setup, and systemd services & permissions. The app itself follows more of a distributed pub/sub architecture (my background is in robotics and cyber-physical system design, not desktop software), so converging on IPC and middle-ware libraries I've been meaning to experiment while keeping the installable setup self contained was a balance. I've also adopted Cachix into the release pipeline (sparing my poor laptop and RPi from building the arm binaries with every release), but would be interested in finding other (Rust?) projects making use of Nix in CI for development to learn from, as that remains a large gap in GitHub Actions setup that is still imperatively Ubuntu based. Links to the rendered docs and source repo (NixOS install instruction included if you'd like to try it). • https://tisvlay.readthedocs.io/en/latest/ • https://github.com/TisVlay/TisVlay Cheers

tisvlay.readthedocs.io

hyprland alternatives

soooo i'm new to nix and nixos and i want to switch from gnome to hyprland. however there is a reallly steep learning curve for both and in the meantime i am looking for a working out of the box flake or configuration repo that i can just add to my configs as a starter to get hyprland up and running. is that a thing? thanks!

edit: thanks everyone for enlightening me about hyprland's bad origins, let's reframe it to - any hyprland alternative that aren't Nazi adjacent?

A little help building cuprate

Hey guys, i could use some help. I am trying to build cuprate: https://github.com/Cuprate/cuprate/ with the instructions found in https://github.com/Cuprate/cuprate/pull/728/changes/48ee1bb9ed2dc3a0d7b53f66bb48f6273c964a26 It builds fine, but when attempting to run it i get

 
[nix-shell:~/build/cuprate/cuprate/target/release]$ ./cuprated -h

./cuprated: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory


[nix-shell:~/build/cuprate/cuprate/target/release]$

st360-lcd-linux: I made a Linux app for my Thermaltake cooler's LCD

I made a tool to use the 7-inch screen on my Thermaltake ST360 Ultra ARGB Sync from Linux. The project is here: https://gitlab.com/vangel3/st360-lcd-linux You can mirror a monitor onto the LCD, change brightness and rotation, or save an image, video or boot animation to the panel's flash. Saved media keeps playing without the app running. There's a PyQt6 desktop app with a media library and a preview where you can drag sensor widgets into place. It can show things like CPU/GPU temperature, load, RAM and fan speeds, depending on what sensors your system exposes. The protocol docs are in the repo too; framing builds on Minecube Studio's work. It's free software under GPL-3.0-or-later. I've only tested my own ST360 on Wayland, so I can't promise support for other Thermaltake screens or X11 yet. There are build instructions and a Nix flake. I'd like to hear from other owners who try it, particularly if installation trips you up or a sensor doesn't show up.

gitlab.com

am I on nixos-unstable?

new to nixos. I have found a flake.nix file on the internet which I used to build my system. in that flake file I found the following line:

 
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    antigravity-nix = {
      url = "github:jacopone/antigravity-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { self, nixpkgs, antigravity-nix, ... }: {
    nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
	./configuration.nix
	./hardware-configuration.nix
        {
          environment.systemPackages = [
            antigravity-nix.packages.x86_64-linux.default # Base App
            antigravity-nix.packages.x86_64-linux.google-antigravity-ide # IDE
            antigravity-nix.packages.x86_64-linux.google-antigravity-cli # CLI
          ];
        }
      ];
    };
  };
}

if I understood correctly the flake also has outputs variable in the attribute set and it's returning nixpkgs whose url is set to the unstable. does it mean I am running unstable version of nixos? Thanks in advance!

fzakaria/nixpkgs-multiverse: Any version of any nixpkgs package, from one flake input

github.com

auto reboot at 9am?

ive got a surface tablet at work running nixos. it mostly is used to view security cameras. the machine is fairly low spec and bogs itself down after a coupke days, so id like it to auto reboot at 9am. i work a late shift and often don't leave til around 2am. i guess we don't use cron anymore? i really don't understand how the systemd timers work... the wiki doesnt really give great details...

systemd.timers."autoreboot" = { wantedBy = [ "timers.target" ];

 
timerConfig = {

  OnCalendar="*-*-* 9:00:00";                                     Unit = "autoreboot.service";

};

}; systemd.services."autoreboot" = { script = ''

 
set -eu

${pkgs.coreutils}/run/current-system/sw/bin/reboot

''; serviceConfig = {

 
Type = "oneshot";

User = "root";

}; };

the systemd target seems to be created, but it reports as dead when i check it... any advice?

NixOS on reMarkable Pro Paper Move (possibly others)

Fair warning, I used Claude for a lot of the details. Architecturally, it's my design. ——— Got NixOS running on my reMarkable Pro Paper Move (codename: chiappa) because when I got this tiny tablet, it was with the goal of replacing my iPad Mini (which I mainly used to read books on anyway) and wanting to use something that ran Linux (I use NixOS on every other machine I touch except my Phone...). Finally got around to (helping Claude) port NixOS though so now, besides having my config live alongside the rest of my machines, I can boot right into KOReader and not play silly games with Xochitl everytime I reboot. Plus, being my own NixOS config, I can (WIP/testing) load/use other applications with ease. The details and how to set it up are mostly in the NixOS flake/associated repo over here: https://github.com/gitman-101111/remarkable-nixos If you want to use the e-ink bridge/associated tools to port to another OS of your choice (I tried and succeeded in porting to PostmarketOS but they have a strict no generative AI policy), you can use this repo (which the flake also references): https://github.com/gitman-101111/chiappa All the hardware works with KOReader with some minor patching. Feel free to play around with different configurations, etc. Details on the setup and specifics are in the repos. Lastly, I wouldn't recommend this to people unfamiliar with NixOS or at least some Linux experience. There's a lot of information here on how to essentially brick your device lol. Be careful out there! :)