101
15
submitted 11 months ago by ruffsl@programming.dev to c/nix@programming.dev
102
4
submitted 11 months ago* (last edited 11 months ago) by ruffsl@programming.dev to c/nix@programming.dev

Related discussion:

Related blog posts:

103
4
submitted 11 months ago by ruffsl@programming.dev to c/nix@programming.dev
104
15
submitted 11 months ago by ruffsl@programming.dev to c/nix@programming.dev
105
6
submitted 11 months ago by ruffsl@programming.dev to c/nix@programming.dev

Fair criticism, although the larger discussion thread this garnered earlier this year was an interesting read. Over +300 comments:

106
21
submitted 11 months ago by ruffsl@programming.dev to c/nix@programming.dev
107
15
submitted 11 months ago by ruffsl@programming.dev to c/nix@programming.dev
108
9
submitted 1 year ago by nyanbinary@lemmy.ml to c/nix@programming.dev
109
29
submitted 1 year ago* (last edited 1 year ago) by ruffsl@programming.dev to c/nix@programming.dev

This is a quick and painless tutorial on how to install and configure NixOS from Scratch. It involves starting off with Home manager and Flakes before even rebuilding your system.

I thought the example using builtins.mapAttrs with create_symlink for xdg.configFile was cleverly simple.

110
16
submitted 1 year ago* (last edited 1 year ago) by ruffsl@programming.dev to c/nix@programming.dev

As a developer I often need to run code I cannot trust, especially dependencies from NodeJS and Python projects, on my dev machine. In order to protect my system from potentially malicious code, I built NixWrap, an adhoc sandboxing tool for NixOS.

NixWrap wraps bubblewrap (oh dear), running it with convenient defaults and offering easy to use command line flags to toggle custom options. An invocation to NixWrap is typically way shorter than the bubblewrap equivalent.

E.g. npm install can be wrapped with wrap -n npm install to gain network access and write access to the current working directory.

111
10

Any suggested changes since this was published a year prior?

112
9
113
10

Any notable advance in this regard as compared to when the original article was published in 2015?

114
16
submitted 1 year ago* (last edited 1 year ago) by ruffsl@programming.dev to c/nix@programming.dev
115
7

I recently reinstalled my nixos (long story). but for some reason, tailscale refuses to install. when i reinstalled, i just copied over my configuration.nix to replace the default one from the install (not sure if that is part of the problem?). or maybe its just broken right now, and i need to wait it out?

...

ok tailscale.com/net/tstun 0.034s

ok tailscale.com/packages/deb 0.028s

--- FAIL: TestGetList (0.00s)

portlist_test.go:19: seek /proc/net/tcp: illegal seek

--- FAIL: TestIgnoreLocallyBoundPorts (0.00s)

portlist_test.go:40: seek /proc/net/tcp: illegal seek

--- FAIL: TestPoller (0.00s)

portlist_test.go:61: seek /proc/net/tcp: illegal seek

FAIL

FAIL tailscale.com/portlist 0.016s

FAIL

error: builder for '/nix/store/18r5bq5bx8n79mgpv69mnfjq8w7z05b0-tailscale-1.82.5.drv' failed with exit code 1

error: 1 dependencies of derivation '/nix/store/pd0225japsibj036hgfzj48q960wx8k4-system-generators.drv' failed to build

error: 1 dependencies of derivation '/nix/store/572pg1xc24wdd01v7cyvvrdijn7qb20y-system-path.drv' failed to build

error: 1 dependencies of derivation '/nix/store/hln81111gkd51fzm7napkb40wd3rx9ig-nixos-system-wwt-25.05.809261.7c815e513adb.drv' failed to build

116
30

It does not require root, user namespaces support or disabling SELinux, but it relies on proot and other hacks instead. It uses a fork of Termux-the-terminal-emulator app, but has no relation to Termux-the-distro.

117
8
118
42
119
10
submitted 1 year ago* (last edited 1 year ago) by Novocirab@feddit.org to c/nix@programming.dev

I'm on a fresh installation with KDE. Kate is available, but what's the best way to get (n)vim up and running, or better yet, Helix? (I'm new to Nix. I do have a good amount of Linux experience though.)

120
18
121
4

Hi, I'm currently using a script to update my various NixOS hosts from a central machine, using the nh utility (https://github.com/nix-community/nh). By default, the command nh os switch . -H "..." --target-host "..." outputs the dependency graph of the build, as well as all the build logs. I like the dependency graph, however the build logs tend to push the diff result of the previous builds off of the terminal screen, so I have to watch the whole time in case I miss it. I've tried using the --no-nom flag, however this removed the dependency graph also. Is there a way in bash of selectively suppressing the build logs but not the dependency graph? Or is this an issue to raise with the project itself? The full bash script I'm using is shown below:

#!/usr/bin/env bash
# From: https://discourse.nixos.org/t/deploy-nixos-configurations-on-other-machines/22940/8

hosts=($(echo `nix eval .#nixosConfigurations --apply 'pkgs: builtins.concatStringsSep " " (builtins.attrNames pkgs)'` | xargs ))
skip=(
    "..."
)

rsa_key="$HOME/.config/sops-nix/secrets/keys/nixos-deploy-key"
export NIX_SSHOPTS="-t -i $rsa_key"

for host in "${hosts[@]}"
do
    # Check if the host is in the skip list
    if [[ " ${skip[*]} " =~ " ${host} " ]];then
        continue
    fi

    fqdn="$host"
    echo " ### $fqdn ### "
    echo

    initDir=($(ssh -i $rsa_key $host "readlink /run/current-system"))

    # Build config and list changes
    nh os switch . -H "$host" --target-host "deploy@$fqdn"

    ssh -i $rsa_key $host "nvd diff $initDir /run/current-system"
    echo
done

Any help is greatly appreciated, thanks!

122
7
GnuPG and gpg-agent on NixOS (tsawyer87.github.io)
submitted 1 year ago by cm0002@lemmy.world to c/nix@programming.dev
123
2

For those who prefer to have a reference or need assistance troubleshooting, the accompanying GitHub repository, nix-intro-examples, includes the full project and all intermediate steps, captured through commits.

124
20
125
11

I have a folder with some cool nixos configurations that i ripgrep through when im looking for inspiration on how to do things.
Anyone got recommendations for configs where people do cool stuff? Feel free to drop your configs as well, its just fun to look at other people's systems!

PS: I know this is generic, but i think im looking for answers of all kinds so that works
Also here is my config since im asking

view more: ‹ prev next ›

Nix / NixOS

2851 readers
1 users here now

Main links

Videos

founded 3 years ago
MODERATORS