It's based, I think it works best on servers but I use it for desktops as well. Configure your entire system or home directory declaratively using a unified DSL. No packages share dependencies unless they are set to use the exact same version, verified by hash, so no dependency hell. Has atomic updates and rollbacks too, Nix paired with BTRFS snapshots is basically indestructible. Be warned though, the documentation sucks and there's a concerning amount of trannies.
Imagine only ever having to set up your PC once, and any subsequent rebuilds just involve cloning a config file and applying it. That includes everything from disk layout through to which Firefox add-ons you want to use.
>new version of package installed >it overrides /etc/mypackage.conf
doesn't happen on NixOS since every configurations are regenerated from scratch just like how you install your OS for the first time
No reply... no option left other than to assume that all nixiggers are moronic and like to feel proud of themselves for reinventing the wheel.
1 month ago
Anonymous
no wheels reinvented, since you don't write any code, just config
on Arch, you have to write install.sh to partition, to create users, etc
and install.sh doesn't work on second run
1 month ago
SpiritualFreedomFighter
#!/bin/sh
if [ "$(ls -A /home)" ]; then
./install.sh
else
pacman -Syu <package_name>
fi
1 month ago
SpiritualFreedomFighter
Oh shit, I wrote it the wrong way around because I'm a moron. But you catch my drift.
1 month ago
SpiritualFreedomFighter
if ! [ "$(ls -A /home)" ]; then ...
1 month ago
Anonymous
having /home/user doesn't mean the user has been created
it has to do with /etc /passwd and whatnot
but then again Arch wasn't designed for declarative approach, so you still have to manually write your bash script
and when you decided to modify your OS, you rewrite your install.sh
on NixOS you don't write any script, just declare some variables, that's it
and there's a possibility your install.sh might interfere with your package manager, or package manager service, because your distro wasn't designed for declarative approach
another point is your install.sh does not install the exact same package versions, you run it on different time, it will install different package versions, so it doesn't recreate the exact replica of your system, because Arch is bleeding edge, you run pacman -S package on different day it will give you different version
1 month ago
Anonymous
>on NixOS you don't write any script, just declare some variables, that's it
TBtbh if I recall correctly, the NixOS configuration does result in a bash-and-perl monstrosity (the activation script) to set it up on boot/switch. But at least you're guaranteed the script will set it up exactly the same way with exact same packages each time, so there's that.
1 month ago
Anonymous
>upgrade a package >has to audit new /etc/mypackage.conf
I've used Debian, so I knew
1 month ago
Anonymous
>cp ./config/* /etc/
That doesn't copy your config, that just adds the new default config. With nixos you get both, a new valid config, with whatever changes you required
pure operating system means programs that you install do not affect the behavior of other programs, as in not being detected as dependencies or existing by other programs unless explicitly stated in the build script
declarative operating system means the entire OS can be regenerated from zero, so you always have a fresh new install OS everytime you regenerate, unlike normal distros like Debian where removing some packages might still leave unused dependencies
You know that xkcd comic about spending dozens of hours automating your project? NixOS turns your machine into that, complete with a meme language that only NixOS uses
>new version of package installed >it overrides /etc/mypackage.conf
doesn't happen on NixOS since every configurations are regenerated from scratch just like how you install your OS for the first time
If you're still developing it you can run nix develop. And run the build command in the shell it creates.
1 month ago
Anonymous
damn its like going back to windows
1 month ago
Anonymous
Yeah, nope: >be normal linux >install your libs system-wide >it just compiles >probably breaks in a year or two when you come back to it
vs >create nix file listing libs you need, pkg-config and compiler >enter nix shell >it just compiles >probably still works when you come back to it in a year or two
vs >be windows >how the frick I install packages >where the frick I put headers and libs >how the frick do I even tell compiler to link this shit >??? >give up, ragequit, install arch
First two options are infinitely better than windows. And for me, the nix option is better than the normal linux option - but YMMV, might be not worth the modest effort to set it up if you're doing a lot of one-off things.
1 month ago
Anonymous
there is kinda way too much shit in tje development work to warrant an entirely new file that you need to learn your way around dont you think?
1 month ago
Anonymous
Well, like I said - YMMV. My mind is all over the place, so it appreciates this kind of "executable specification" of what the application needs (or how I configured my OS), so I don't need to remember what exactly I have to do get the project compile on a different machine. It's also good for making sure there's less "sorry, works on my machine" issues because, say, somebody for whatever reason has a different compiler version, so native extensions for your $SCRIPTING_LANGUAGE don't build properly - I really appreciated that when my $JOB decided to boy M1 appleshit too early and I could easily patch my stuff with nix while lmaoing at others having issues. But yes, you're generally right that it is an investment - even if a fairly modest one for just providing tools to compile stuff (you may or may not be interested for a simplified layer over nix provided by https://devenv.sh/, to make the investmen even smaller) - I guess it's just my autistic brain thinks it's a worthwhile one for what it gives. I guess a more sane person just sets up stuff once and never thinks about it again until it breaks, then curses a lot, resolves the issue and stops thinking about it until the next time.
Thank you for coming to my ted talk.
1 month ago
Anonymous
Here's an example of how it works
These days with the pine64 arm devices, tow boot is recommended to boot Linux isos. Older devices came with uboot.
The dude that made tow boot doesn't put up binaries on his GitHub page, instead he has a monorepo of all the tow boot packages and has instructions on how to build the installer isos yourself with the nix package manager. All you need to do is git clone the repo and type nix-build -A uboot[device] and a result directory with the binary will be created for you to write to an sd card with dd. Its cross compiled to aarch64 already and ready to go.
>more freedom >no restriction >anime waifu as mascot >development team knows what IQfy wants since we are always here looking for feedback
What more could you ask? Just read the ebook to figure out
How come? Just add hyprland to your config and declare your windowManager lol:
windowManager.hyprland = {
enable = true;
extraPackages = with pkgs; [
//your extra pkgs such as polybar etc
];
};
Then you just: >logout >tty >username >password >hyprland >RET >???? >profit
At least RTFM
Also enable wayland
{pkgs, ...}:
{
programs.hyprland = {
# Install the packages from nixpkgs
enable = true;
# Whether to enable XWayland
xwayland.enable = true;
};
# ...
}
Do not forget to enable pam: security.pam.services.swaylock = {};
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
Enable hyprland:
programs.hyprland.enable = true; >but it crashes
How? Does it shows any error message? Are you trying to launch it via sddm or tty?
1 month ago
Anonymous
im doing it through tty. Why do people say that the only thing I have to do is to do that what I did but its not really it?
also the wiki version I couldnt even get nix to work. It pushes error code that I cannot read
1 month ago
Anonymous
and i dont need swaylock. I dont even use it right now on my arch
it just crashes and the errors are meaningless shit
1 month ago
Anonymous
>the errors are meaningless shit
I might be shit for you if you don't know what it means.
I literally tried hyprland yesterday and it worked just fine with the configuration I posted above, I think that something else might be off with your desktop and that's why I was asking for you to post the errors here.
1 month ago
Anonymous
I havent configured copy pasting and I am already annoyed with this level of lying when neither of the wikis provide a solution that just works and videos I saw had people say you only need these. Its annoying
first of even with nixos-rebuild switch its complainign about xserver.xkbVariant being depcerated despite me not even defining it (this is after somewhere someone told me to go unstable). Its also complaining about services.xserver.layout being depricated
Hyprland itself goes to LOG created a bezier curve, baked 255 points, mem usge bla bla bla
and then aborst with
aborted (created core-file)reate_with_drm_fd() failed!me_error' .so: cannot open shared object file: No such file or director
1 month ago
Anonymous
and i dont need swaylock. I dont even use it right now on my arch
it just crashes and the errors are meaningless shit
im doing it through tty. Why do people say that the only thing I have to do is to do that what I did but its not really it?
also the wiki version I couldnt even get nix to work. It pushes error code that I cannot read
hyprland site just says
# configuration.nix
{pkgs, ...}: {
programs.hyprland.enable = true;
}
and it does install it but it crashes
just booted up qemu/kvm with base install (Gnome installer to no DE) on nixos and I already got filtered with installing hyprland
ngmi
1 month ago
Anonymous
and before anyone claims otherwise
the source of that error is not related to xserver. its the same damn error anyway, it didnt change after going unstable
1 month ago
Anonymous
[...]
[...]
[...]
[...]
ngmi
and before anyone claims otherwise
the source of that error is not related to xserver. its the same damn error anyway, it didnt change after going unstable
>if a package works on one machine, it works on another
nixos is literally lying when a base install hyprland doesnt work
1 month ago
Anonymous
the fricking audacity to lie on the installation screen
1 month ago
Anonymous
so its complaining about wlroots huh
Looks like a PEBKAC you'd have on ant barebones system - you are trying to run something requiring DRM without graphical acceleration. I haven't ever used NixOS in a VM, so can't be sure if it'll work, but try something like this:
```
services.xserver.videoDrivers = lib.mkForce [ "vmware" "virtualbox" "modesetting" ];
```
(to get `lib` in scope, put it in parameter destructing on the first line)
INB4 MUH DOCS DON'T MENTION IT - fair, they should, but NixOS docs suck donkey balls compared to Arch.
1 month ago
Anonymous
nix doesnt like that. It doesnt recongize what lib is
they cannot say that their packages just work everywhere if it becomes like this
1 month ago
Anonymous
nvm I might be moronic let me try again
1 month ago
Anonymous
welp nix accepted that but it didnt fix the issue
1 month ago
Anonymous
Sorry, wish I could help - I'm fairly positive it has to do something with the DRM and displays drivers, but I never used NixOS in VM, so not sure how tonresolve this.
It says you can set `WLR_RENDERER_ALLOW_SOFTWARE`, so you could try setting it with `environment.sessionVariables.WLR_RENDERER_ALLOW_SOFTWARE = "true";` and see if it gets wlroots to frick off like a troony it is. But if that doesn't help I'm out of ideas, sorry.
1 month ago
Anonymous
didnt work. Same issue
1 month ago
Anonymous
Welp, can't suggest any other thing to try without testing the issue myself and can't right now. Might do that later if thread's still up.
for me it`s:
1. ability to have both latest packages and stable branch packages at the same time
2. ability to have several versions of the same package at the same time
3. much more efficient than snapshots, every config takes a few hundred KBs
4. can play around it in a VM and when you install it with flakes on a real machine it will be exactly like the VM
It`s like Arch but for people with brains. The only downside is that you need internet to roll back to a previous config, while snapshots don`t need that.
>vaxry >home manager
Well, I do not use any of those shit. I just add the pkgs name on my configuration.nix file, rebuild and it just works. Maybe that's why the other anon simply can't get shit to work on his machine. Too much goyslop for the system to handle
1 month ago
Anonymous
nta but home manager is cool because you can declare stuff like dconf settings, about:config stuff for firefox.
it’s a configuration for dotfiles.
It will become more and more popular. There is surging popularity of Nix at the moment, because companies and small commercial projects are starting to see how much hassle and resources it can save. The words "reproducible" and "reliable" go a long way in these circles. In my case I'm planning to migrate to Nix, because I find it easier and more clear than most other distros if we put aside the initial learning curve. It's not a silver bullet to all linux problems, but it's upsides are significantly more than it's downsides.
It's nice to run but the documentation is a fricking mess. Had to fumble around with ChatGPT to get a project I use running because the documentation was just that unhelpful.
stop making these dumbass threads
stop backseating jannying
why do you keep making this fricking dumb thread? seriously
you are not gonna become a janny dude unless you are on HRT
ill need about tree fiddy
it's free homie
It's based, I think it works best on servers but I use it for desktops as well. Configure your entire system or home directory declaratively using a unified DSL. No packages share dependencies unless they are set to use the exact same version, verified by hash, so no dependency hell. Has atomic updates and rollbacks too, Nix paired with BTRFS snapshots is basically indestructible. Be warned though, the documentation sucks and there's a concerning amount of trannies.
>based
>troony tier OS
Hola Gabriel Gonzalez
buy an ad
Imagine only ever having to set up your PC once, and any subsequent rebuilds just involve cloning a config file and applying it. That includes everything from disk layout through to which Firefox add-ons you want to use.
What's stopping me from doing this with a bash script on Debian/Arch/Alpine? Firefox add-ons can be done by git cloning a profile directory.
>new version of package installed
>it overrides /etc/mypackage.conf
doesn't happen on NixOS since every configurations are regenerated from scratch just like how you install your OS for the first time
>install packages
>git clone config repo
>cp ./config/* /etc/
?
No reply... no option left other than to assume that all nixiggers are moronic and like to feel proud of themselves for reinventing the wheel.
no wheels reinvented, since you don't write any code, just config
on Arch, you have to write install.sh to partition, to create users, etc
and install.sh doesn't work on second run
#!/bin/sh
if [ "$(ls -A /home)" ]; then
./install.sh
else
pacman -Syu <package_name>
fi
Oh shit, I wrote it the wrong way around because I'm a moron. But you catch my drift.
if ! [ "$(ls -A /home)" ]; then ...
having /home/user doesn't mean the user has been created
it has to do with /etc /passwd and whatnot
but then again Arch wasn't designed for declarative approach, so you still have to manually write your bash script
and when you decided to modify your OS, you rewrite your install.sh
on NixOS you don't write any script, just declare some variables, that's it
and there's a possibility your install.sh might interfere with your package manager, or package manager service, because your distro wasn't designed for declarative approach
another point is your install.sh does not install the exact same package versions, you run it on different time, it will install different package versions, so it doesn't recreate the exact replica of your system, because Arch is bleeding edge, you run pacman -S package on different day it will give you different version
>on NixOS you don't write any script, just declare some variables, that's it
TBtbh if I recall correctly, the NixOS configuration does result in a bash-and-perl monstrosity (the activation script) to set it up on boot/switch. But at least you're guaranteed the script will set it up exactly the same way with exact same packages each time, so there's that.
>upgrade a package
>has to audit new /etc/mypackage.conf
I've used Debian, so I knew
>cp ./config/* /etc/
That doesn't copy your config, that just adds the new default config. With nixos you get both, a new valid config, with whatever changes you required
It's a good fit for you, given you're a moron who makes threads asking which distro to use.
pure operating system means programs that you install do not affect the behavior of other programs, as in not being detected as dependencies or existing by other programs unless explicitly stated in the build script
declarative operating system means the entire OS can be regenerated from zero, so you always have a fresh new install OS everytime you regenerate, unlike normal distros like Debian where removing some packages might still leave unused dependencies
You know that xkcd comic about spending dozens of hours automating your project? NixOS turns your machine into that, complete with a meme language that only NixOS uses
once the automation code is done, you need not configure your OS no morr
guix
Just install Ubuntu LTS and never think about distros ever again.
the blackpill
oh anon, you gullible idiot. Why should I sell it to you when it's FREE?
Arch but even more time wasted
how the frick do you run your own shit in nixos when you cannot just make install?
Define it in a package
There's modules for pretty much every build system and language.
seems like pain when I cannot code anything without making it a package
If you're still developing it you can run nix develop. And run the build command in the shell it creates.
damn its like going back to windows
Yeah, nope:
>be normal linux
>install your libs system-wide
>it just compiles
>probably breaks in a year or two when you come back to it
vs
>create nix file listing libs you need, pkg-config and compiler
>enter nix shell
>it just compiles
>probably still works when you come back to it in a year or two
vs
>be windows
>how the frick I install packages
>where the frick I put headers and libs
>how the frick do I even tell compiler to link this shit
>???
>give up, ragequit, install arch
First two options are infinitely better than windows. And for me, the nix option is better than the normal linux option - but YMMV, might be not worth the modest effort to set it up if you're doing a lot of one-off things.
there is kinda way too much shit in tje development work to warrant an entirely new file that you need to learn your way around dont you think?
Well, like I said - YMMV. My mind is all over the place, so it appreciates this kind of "executable specification" of what the application needs (or how I configured my OS), so I don't need to remember what exactly I have to do get the project compile on a different machine. It's also good for making sure there's less "sorry, works on my machine" issues because, say, somebody for whatever reason has a different compiler version, so native extensions for your $SCRIPTING_LANGUAGE don't build properly - I really appreciated that when my $JOB decided to boy M1 appleshit too early and I could easily patch my stuff with nix while lmaoing at others having issues. But yes, you're generally right that it is an investment - even if a fairly modest one for just providing tools to compile stuff (you may or may not be interested for a simplified layer over nix provided by https://devenv.sh/, to make the investmen even smaller) - I guess it's just my autistic brain thinks it's a worthwhile one for what it gives. I guess a more sane person just sets up stuff once and never thinks about it again until it breaks, then curses a lot, resolves the issue and stops thinking about it until the next time.
Thank you for coming to my ted talk.
Here's an example of how it works
These days with the pine64 arm devices, tow boot is recommended to boot Linux isos. Older devices came with uboot.
The dude that made tow boot doesn't put up binaries on his GitHub page, instead he has a monorepo of all the tow boot packages and has instructions on how to build the installer isos yourself with the nix package manager. All you need to do is git clone the repo and type nix-build -A uboot[device] and a result directory with the binary will be created for you to write to an sd card with dd. Its cross compiled to aarch64 already and ready to go.
>more freedom
>no restriction
>anime waifu as mascot
>development team knows what IQfy wants since we are always here looking for feedback
What more could you ask? Just read the ebook to figure out
t. Member of NixOS development team
Although it can't help you reproduce your DNA, Nix allows you to reproduce your environment in a simple config.
just booted up qemu/kvm with base install (Gnome installer to no DE) on nixos and I already got filtered with installing hyprland
How come? Just add hyprland to your config and declare your windowManager lol:
windowManager.hyprland = {
enable = true;
extraPackages = with pkgs; [
//your extra pkgs such as polybar etc
];
};
Then you just:
>logout
>tty
>username
>password
>hyprland
>RET
>????
>profit
At least RTFM
hyprland site just says
# configuration.nix
{pkgs, ...}: {
programs.hyprland.enable = true;
}
and it does install it but it crashes
Also enable wayland
{pkgs, ...}:
{
programs.hyprland = {
# Install the packages from nixpkgs
enable = true;
# Whether to enable XWayland
xwayland.enable = true;
};
# ...
}
Do not forget to enable pam: security.pam.services.swaylock = {};
systemd = {
user.services.polkit-gnome-authentication-agent-1 = {
description = "polkit-gnome-authentication-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
Enable hyprland:
programs.hyprland.enable = true;
>but it crashes
How? Does it shows any error message? Are you trying to launch it via sddm or tty?
im doing it through tty. Why do people say that the only thing I have to do is to do that what I did but its not really it?
also the wiki version I couldnt even get nix to work. It pushes error code that I cannot read
and i dont need swaylock. I dont even use it right now on my arch
it just crashes and the errors are meaningless shit
>the errors are meaningless shit
I might be shit for you if you don't know what it means.
I literally tried hyprland yesterday and it worked just fine with the configuration I posted above, I think that something else might be off with your desktop and that's why I was asking for you to post the errors here.
I havent configured copy pasting and I am already annoyed with this level of lying when neither of the wikis provide a solution that just works and videos I saw had people say you only need these. Its annoying
first of even with nixos-rebuild switch its complainign about xserver.xkbVariant being depcerated despite me not even defining it (this is after somewhere someone told me to go unstable). Its also complaining about services.xserver.layout being depricated
Hyprland itself goes to LOG created a bezier curve, baked 255 points, mem usge bla bla bla
and then aborst with
aborted (created core-file)reate_with_drm_fd() failed!me_error' .so: cannot open shared object file: No such file or director
ngmi
and before anyone claims otherwise
the source of that error is not related to xserver. its the same damn error anyway, it didnt change after going unstable
>if a package works on one machine, it works on another
nixos is literally lying when a base install hyprland doesnt work
the fricking audacity to lie on the installation screen
Looks like a PEBKAC you'd have on ant barebones system - you are trying to run something requiring DRM without graphical acceleration. I haven't ever used NixOS in a VM, so can't be sure if it'll work, but try something like this:
```
services.xserver.videoDrivers = lib.mkForce [ "vmware" "virtualbox" "modesetting" ];
```
(to get `lib` in scope, put it in parameter destructing on the first line)
INB4 MUH DOCS DON'T MENTION IT - fair, they should, but NixOS docs suck donkey balls compared to Arch.
nix doesnt like that. It doesnt recongize what lib is
they cannot say that their packages just work everywhere if it becomes like this
nvm I might be moronic let me try again
welp nix accepted that but it didnt fix the issue
Sorry, wish I could help - I'm fairly positive it has to do something with the DRM and displays drivers, but I never used NixOS in VM, so not sure how tonresolve this.
It says you can set `WLR_RENDERER_ALLOW_SOFTWARE`, so you could try setting it with `environment.sessionVariables.WLR_RENDERER_ALLOW_SOFTWARE = "true";` and see if it gets wlroots to frick off like a troony it is. But if that doesn't help I'm out of ideas, sorry.
didnt work. Same issue
Welp, can't suggest any other thing to try without testing the issue myself and can't right now. Might do that later if thread's still up.
I assume you restarted the VM?
y no luck there either
Hyprland doesn't work in vm
I tested it in Arch VM two days ago and it worked but was slow. Archinstall scripts did a better job than nixos
It's an operating system.
It can be used in cold weather hence the snowflake icon
Also...nix
for me it`s:
1. ability to have both latest packages and stable branch packages at the same time
2. ability to have several versions of the same package at the same time
3. much more efficient than snapshots, every config takes a few hundred KBs
4. can play around it in a VM and when you install it with flakes on a real machine it will be exactly like the VM
It`s like Arch but for people with brains. The only downside is that you need internet to roll back to a previous config, while snapshots don`t need that.
so its complaining about wlroots huh
>mixing aur packages with nixpkgs
Holy mother of God...
nah, that's just vaxry thinking he's a funny little shit
>vaxry
>home manager
Well, I do not use any of those shit. I just add the pkgs name on my configuration.nix file, rebuild and it just works. Maybe that's why the other anon simply can't get shit to work on his machine. Too much goyslop for the system to handle
nta but home manager is cool because you can declare stuff like dconf settings, about:config stuff for firefox.
it’s a configuration for dotfiles.
i love nixos so much you guys.
overcomplicated, pointless tinkertroony OS
snowflake logo make me smoil
It will become more and more popular. There is surging popularity of Nix at the moment, because companies and small commercial projects are starting to see how much hassle and resources it can save. The words "reproducible" and "reliable" go a long way in these circles. In my case I'm planning to migrate to Nix, because I find it easier and more clear than most other distros if we put aside the initial learning curve. It's not a silver bullet to all linux problems, but it's upsides are significantly more than it's downsides.
It's nice to run but the documentation is a fricking mess. Had to fumble around with ChatGPT to get a project I use running because the documentation was just that unhelpful.
should I daily nixos instead of debian?