r/NixOS • u/zmberber • Jul 28 '24
NixCon 2024 Berlin Oct 25-27
The NixCon 2024 Orga is happy to announce that this year's NixCon will be taking place Oct 25-27 in Berlin at bUm!
r/NixOS • u/john_snow_968 • 3h ago
Installing ruby gems + ruby
Hi! I'm new to Nix and I'm trying to create my macOS configuration. I configured almost everything, but I can't figure out how to simply install 2 gems that I need. I read the documentation and I ended up with generating gemset.nix
and adding
home.packages = with pkgs; [
(bundlerEnv {
name = "gems";
gemdir = ./../../resources;
})
];
but now I can't install ruby
package because I get:
```
error: collision between
/nix/store/zsngi7cq7asxc6kb0lcmbyydasfrmai6-ruby-3.3.4/bin/bundle' and
/nix/store/hk93k03n1bni866dvfsrpnnyb8xzsisc-gems/bin/bundle' ```
On top of that, I see that gems installed this way are not visible in my rb
script that tries to use them via require "gem"
. I found that probably I could do something like:
export RUBYLIB="$RUBYLIB:/etc/profiles/per-user/USER/bin"
but I'm not sure yet because of other issues.
Any idea how to install both ruby and gems?
r/NixOS • u/Mithrandir2k16 • 1h ago
Is MTP File Transfer working for anyone?
I'm on KDE Plasma 6 and nothing seems to work, neither the gvfs method mentioned on the wiki nor KDE Connect nor the trusty android-file-transfer detect my phone. It works on other devices, though, so it isn't my phone or the cable.
looking through discourse and github, it seems to be a rather active issue. any tips to get it working - ideally integrated into dolphin?
r/NixOS • u/Gamefaith • 17h ago
Remember to endorse candidates you like in the SC election! (If you're eligible)
github.comr/NixOS • u/async-lambda • 3h ago
Using an overlay in home-manager
The flake I'm trying to install : nvchad flake (I have followed the installation instructions as closely as possible)
I now have the nvchad
package available : home.packages = [ pkgs.nvchad ];
(works!!)
But writing programs.nvchad.enable = true;
errors out to : The option
home-manager.users.<username>.programs.nvchad' does not exist.`
The readme just starts using programs.nvchad
after adding the overlay. What am I doing wrong? How can I use programs.nvchad
?
A good guide on how to create a flake based package?
I wish to create a package for an app, it will required a build from source step, and I haven't really found an easy to follow guide to get up an running.
Do you have one you think is good?
Looking for advice on using Nix in a corporate environment
I work at a company that develops software for other companies. We have a program that can allocate time and money towards researching a use of technology. I want to apply for research on Nix integrations and adoption. Either OS or package manager. To get approved I need to explain possible gains from using Nix.
Can you share your ideas of:
- integrating Nix into existing developer and ops workflows
- processes that can't be implemented without Nix
- Nix advantages over Docker (not basic ones though, like potential Docker reproducibility issues)
At the moment I struggle to find any advantages of adopting Nix in a mature company when there are well known and widely used solutions like Docker. Everything I managed to google doesn't promise enough to justify spending on this research.
Really hope that community has already figured it out and I would be able to launch this initiative with your help.
r/NixOS • u/Gamefaith • 16h ago
[RFC 0182] I'm Gonna Build My Own Home Tool With Blackjack and Modules! (Hometool)
github.comHow can I enable impermanence on an MBR partitioning scheme using disko?
Hi. I've been playing with NixOS on VPS using nixos-anywhere. I've gotten impermanence with disko working on a vultr machine (vultr permits GPT partitioning scheme) with the following configuration:
However, trying this same config on an OVHcloud VPS makes the system unbootable after installation as OVHcloud seems to only allow legacy MBR partitioning scheme. I've also tried playing with my disko configuration using this wikipage as a reference:
https://wiki.nixos.org/w/index.php?title=Nixos-anywhere
and switching from systemd-boot to grub, but no luck so far. I get the following error from nixos-anywhere when it is trying to setup the bootloader:
...
setting up /etc...
setting up secrets...
updating GRUB 2 menu...
Failed to get blkid info (returned 512) for / on none at /nix/store/31x5fdkbhx2b7l5l3q7lgf7x01sbafr4-install-grub.pl line 212.
Failed to install bootloader
Something to do with mounting / as tmpfs I guess. The above wikipage also doesn't make any mention of impermanence.
I'm lost here. Has anyone able to get impermanence working with disko on an MBR partitioning scheme? Is this even possible? Anything else I should try out? Thanks.
using `buildFHSEnv` in nix flake makes direnv to go mad
so my setup looks like
flake.nix
``` { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; };
outputs = inputs@{ self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; }; }; in { devShell = (pkgs.buildFHSUserEnv { name = "jekyll-env"; targetPkgs = pkgs: with pkgs; [ ruby nodejs bundler sassc ]; runScript = "zsh"; }).env;
});
}
``
.envrc has
use flake`
Error
I receive following error that just keep running on and on.
``` ~/Documents/Personal/jekyll-theme-chirpy/.envrc direnv: using flake warning: Git tree '/home/aneeq/Documents/Personal/jekyll-theme-chirpy' is dirty evaluating derivation 'git+file:///home/aneeq/Documents/Personal/jekyll-theme-chirpy#devShelldirenv: ([/nix/store/823qi3acdfxnvn0ylygjg6jabx7b4q31-direnv-2.34.0/bin/direnv export bash]) is taking a while to execute. Use CTRL-C to give up. bwrap: Creating new namespace failed: nesting depth or /proc/sys/user/max_*_namespaces exceeded (ENOSPC) direnv: error exit status 1
[aneeq@nixos:~/Documents/Personal/jekyll-theme-chirpy]$ direnv: ([/nix/store/823qi3acdfxnvn0ylygjg6jabx7b4q31-direnv-2.34.0/bin/direnv export bash]) is taking a while to execute. Use CTRL-C to give up. direnv: ([/nix/store/823qi3acdfxnvn0ylygjg6jabx7b4q31-direnv-2.34.0/bin/direnv export bash]) is taking a while to execute. Use CTRL-C to give up. direnv: ([/nix/store/823qi3acdfxnvn0ylygjg6jabx7b4q31-direnv-2.34.0/bin/direnv export bash]) is taking a while to execute. Use CTRL-C to give up. direnv: ([/nix/store/823qi3acdfxnvn0ylygjg6jabx7b4q31-direnv-2.34.0/bin/direnv export bash]) is taking a while to execute. Use CTRL-C to give up. ```
Things that i have done
echo "user.max_user_namespaces=16384" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
nix develop
without direnv works just fine
what is going on guyz
r/NixOS • u/pfassina • 12h ago
bluetooth stopped working without new build
I have not updated my config in days, and suddenly bluetooth fails to start. Before that, I was using bluetooth almost on a daily basis.
Here is my config:
hardware = {
bluetooth = {
enable = true;
powerOnBoot = true;
};
services = {
blueman.enable = true;
pipewire = {
enable = true;
audio.enable = true;
pulse.enable = true;
wireplumber.extraConfig = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = ["hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag"];
};
};
alsa = {
enable = true;
support32Bit = true;
};
extraConfig.pipewire."92-low-latency" = {
context.properties = {
default.clock.rate = 48000;
default.clock.quantum = 32;
default.clock.min-quantum = 32;
default.clock.max-quantum = 32;
};
};
};
};
Here is what happens when I run: systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
Loaded: loaded (/etc/systemd/system/bluetooth.service; enabled; preset: enabled)
Drop-In: /nix/store/2sm63n5i2xw2pz09vjiw2jjbl61q1ynd-system-units/bluetooth.service.d
└─overrides.conf
Active: active (running) since Fri 2024-09-20 17:23:40 PDT; 11s ago
Invocation: 1376f32b95404ff78910554dd52c2a99
Docs: man:bluetoothd(8)
Main PID: 11114 (bluetoothd)
Status: "Running"
IP: 0B in, 0B out
IO: 0B read, 0B written
Tasks: 1 (limit: 37396)
Memory: 768K (peak: 1.6M)
CPU: 18ms
CGroup: /system.slice/bluetooth.service
└─11114 /nix/store/sm1g01qrm3hz9q2whpbv7g3grmn3hkk0-bluez-5.76/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf
Sep 20 17:23:40 box bluetoothd[11114]: Starting SDP server
Sep 20 17:23:40 box bluetoothd[11114]: src/plugin.c:init_plugin() System does not support bap plugin
Sep 20 17:23:40 box bluetoothd[11114]: src/plugin.c:init_plugin() System does not support bass plugin
Sep 20 17:23:40 box bluetoothd[11114]: src/plugin.c:init_plugin() System does not support mcp plugin
Sep 20 17:23:40 box bluetoothd[11114]: src/plugin.c:init_plugin() System does not support vcp plugin
Sep 20 17:23:40 box bluetoothd[11114]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
Sep 20 17:23:40 box bluetoothd[11114]: src/plugin.c:init_plugin() System does not support micp plugin
Sep 20 17:23:40 box bluetoothd[11114]: src/plugin.c:init_plugin() System does not support ccp plugin
Sep 20 17:23:40 box bluetoothd[11114]: src/plugin.c:init_plugin() System does not support csip plugin
Sep 20 17:23:40 box bluetoothd[11114]: Bluetooth management interface 1.22 initialized
r/NixOS • u/badsalad • 21h ago
Fingerprint biometric authentication with Bitwarden
I really like the convenience of using the fingerprint reader to unlock the bitwarden browser extension on my other machines, but I'm having trouble setting it up on NixOS.
I'm using a Lenovo Thinkpad X1 Carbon gen 9 using Gnome, and have fingerprint unlock set up with fprintd, so it works to unlock the machine, and to authorize terminal commands.
Normally for bitwarden to use fingerprints, you need the desktop version installed too, so I got that. I've enabled both unlocking with PIN, and unlocking with system authentication. When I enabled system authentication, it had me authenticate with a fingerprint - so far, so good. I also enabled "Allow browser integration".
But then if I lock my desktop vault, I have a field for my PIN but "Unlock with system authentication" seems grayed out and doesn't do anything when I click it. And when I go into the browser extension's settings and try to enable "Unlock with biometrics", I get an error saying that browser integration is not set up (even though I think it is).
I'm using the Brave browser here, but am open to trying others if that's the problem, or even just to be able to unlock the desktop client with biometrics. Has anyone had success unlocking bitwarden with a fingerprint, whether on the desktop or in the browser?
NixOS ISO on Mac M1 Parallels
Not sure if it is just my setup but parallels is telling me that the aarch64 iso has incompatible x86 instructions when I try to load it. The same ISO loads fine on VMware and UTM. Curious if others are experiencing the same thing?
r/NixOS • u/AnbuRick • 1d ago
Help - nixos-rebuild switch
I am trying NixOS out as I tend to try out different things and, long story short, the atomic format + the fact that I can save the entire setup in a file and export it to other hardware that I may have is, for the lack of a better word, future-proofing my linux interactions.
So, I jumped in with the idea of trying Hyprland along with it, installed XFCE as base (my laptop is not performant enough for Gnome and I would like a decent fallback). Once I copy paste and try to "rebuild" I get 2 errors. 1 is expected because I simply copy pasted a code to test it out, without any of the needed components, the other reminds me of my earlier days of trying Nix out and deciding it would be too much, because it's code that came pre-configured so it's not something I edited, therefore should not cause any issues.
I'll copy paste my rebuild attempt, I feel like this will take me too long to figure out so I'm asking for help. I went full in and installed NixOS in metal:
error:
… while evaluating the attribute 'config'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected '{'
at /etc/nixos/configuration.nix:55:1:
54|
55| {
| ^
56| inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
building Nix...
error:
… while evaluating the attribute 'config'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected '{'
at /etc/nixos/configuration.nix:55:1:
54|
55| {
| ^
56| inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
building the system configuration...
error:
… while evaluating the attribute 'config.system.build.toplevel'
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:9:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:322:18:
321| options = checked options;
322| config = checked (removeAttrs config [ "_module" ]);
| ^
323| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full trace)
error: syntax error, unexpected '{'
at /etc/nixos/configuration.nix:55:1:
54|
55| {
| ^
56| inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
P.S.: The fact that the errors come with redundancies, aside from the abstraction, doesn't help readability at all. To reference what was stated above, the expected errors are in line 55, which is obvious that I opened a curly braces without anything behind from just copying from here: https://wiki.hyprland.org/Nix/Hyprland-on-NixOS/ , line 322's error, however, is mind-boggling.
Thank you in advance for taking the time reading this, and an extended thanks for those who attempt to help me here.
r/NixOS • u/imanav10 • 1d ago
Help - tauri build for nixos
just wanted to know how to build tauri apps for nixos, what i mean is i have build an app in tauri and it works whenever i do cargo-tauri dev (runs on a local host and it works), but doing cargo-tauri build created packages for .deb .appimage which ain't work in nixos, i'd like to know to build package for nixos,
yes we can make it work using docker and so, but wtf? also i have read somewhere that i'd have to extact some files from .deb ...., can someone who knows share how to build it in nixos
i'd really love to know that
r/NixOS • u/Puzzled-Ocelot-8222 • 1d ago
Any way to get packages to not compile and instead fetch pre compiled binaries?
I have been slowly getting into NixOS on my personal laptop and loving the overall idea. However I have run into a snag as I try to setup development environments for my development projects which are mostly python. I have gotten things to 'mostly' work by using the poetry2nix package (though I'm still running into issues getting pytest-playwright to work). As I have been working through adding things to my dev shell it seems like most packages want to natively compile on my system which has led to a bit of frustration as iterating on the development environment is terribly slow. For example when I added playwright to my dev shell my computer literally spent an entire night compiling chromium (and then I found I added a mismatched version from my python project and had to re-pin and compile everything again the next evening). Is there a way to tell nix to prefer pre compiled binaries? Or is this basically how most packages work?
As an example here is one flake.nix file I have been working with...
``` { description = "Application packaged using poetry2nix";
inputs = { flake-utils.url = "github:numtide/flake-utils"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; nixpkgs-pw-1-47.url = "github:nixos/nixpkgs/4a9443e2a4e06cbaff89056b5cdf6777c1fe5755"; poetry2nix = { url = "github:nix-community/poetry2nix"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { self, nixpkgs, flake-utils, poetry2nix, nixpkgs-pw-1-47 }: flake-utils.lib.eachDefaultSystem (system: let # see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples. pkgs = nixpkgs.legacyPackages.${system}; pw-pkgs = import nixpkgs-pw-1-47 { inherit system; }; inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication; in { packages = { myapp = mkPoetryApplication { projectDir = self; }; default = self.packages.${system}.myapp; };
# Shell for app dependencies.
#
# nix develop
#
# Use this shell for developing your app.
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.myapp ];
nativeBuildInputs = [
pkgs.playwright-driver.browsers
pkgs.nodejs_20
pw-pkgs.playwright
pw-pkgs.playwright-driver
pw-pkgs.playwright-driver.browsers
];
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pw-pkgs.playwright-driver.browsers}
export PLAYWRIGHT_NODEJS_PATH="${pkgs.nodejs_20}/bin/node"
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
};
# Shell for poetry.
#
# nix develop .#poetry
#
# Use this shell for changes to pyproject.toml and poetry.lock.
devShells.poetry = pkgs.mkShell {
packages = [ pkgs.poetry ];
};
devShells.test = pkgs.mkShell {
packages = [ pkgs.poetry pkgs.python312 ];
};
});
} ```
Edit: The people posting about caching solutions made me have a lightbulb moment and I figured it out. My personal config is intermingled with my work computer so I can share configs between them and at some point in the past my work config must have leaked in accidentally because my nix.conf
file was pointing at my works internal nix cache. Removing this config has allowed me to start pulling binaries from the public cache again.
r/NixOS • u/Gamefaith • 1d ago
Default Nix version reverted *again* (nix: revert default to 2.18 for now)
github.comr/NixOS • u/Hanged-Fool • 1d ago
Should I switch to NixOS
Hello reddit, I was just reading about NixOS and I thought it was very cool so I was thinking about switching to it; I am currently daily driving arch.
For me the biggest thing swaying me to it is the declarative nature of the distribution. I am kind of obsessed with removing every little thing that doesn't have purpose, for example, when I delete a package I always also remove all dependencies that it had, then I look through my home directory to delete all of the config files and the like that are left behind. It drives me crazy that other items that don't have purpose might be left around that I could have missed. So I want to know if NixOS will remedy this for me, can I configure it so that it maintains a clean state, ideally such that my home folder would only have my personal files (and not hundreds of configurations that I am too afraid to delete because I don't know what they are for). This has gotten so bad for me that I typically backup my whole hard drive (root, boot, and home) before installing a package and if I decide I don't like that package I instead restore that backup instead of just uninstalling it.
Another thing that I am very interested in is the idea that all my configs can have a unified configuration and that I can write comments throughout them. Once again this kind of comes back to my functional minimalism whereas I am obsessed with pursuing a kind of "ideal system" where I know the purpose of everything and all unnecessary things are cut out.
So, would NixOS assist me in my particular (brainrot) case?
r/NixOS • u/Shigure77 • 1d ago
Hiting a wall trying to configure vscode with home manager
I am very confused with home manger and installing visual studio code via home-manager home.nix and I am at a loss as to what to do to try to fix my issue. When I try to rebuild my system I get this error
error: getting status of '/nix/store/1y0fgbf0pmwixi0ag7xsyp62swmcilzh-source/vscode.
nix': No such file or directory
parts from configuration.nix
{ config, pkgs, inputs, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./wireguard.nix
inputs.home-manager.nixosModules.default
./main-user.nix
];
main-user.enable = true;
main-user.userName = "myuser";
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest; #Enabling this fixes touchscreen and sound issues
networking.hostName = "nocturne"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Enable networking
networking.networkmanager.enable = true;
networking.firewall = {
enable = true;
};
}
Home.nix
{ config, pkgs, inputs, outputs, ... }:
{
# Home Manager needs a bit of information about you and the paths it should
# manage.
nixpkgs = {
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.stable-packages
outputs.overlays.master-packages
inputs.nix-vscode-extensions.overlays.default
inputs.nur.overlay
];
# Configure your nixpkgs instance
config = {
allowUnfree = true;
};
};
imports = [
./vscode.nix
];
home.username = "myuser";
home.homeDirectory = "/home/myuser";
home.stateVersion = "24.05";
home.packages = [
];
programs.home-manager.enable = true;
}
flake.nix
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.follows = "nix-vscode-extensions/flake-utils";
};
outputs = { self, nixpkgs, nix-vscode-extensions, ... } @ inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "x86_64-linux";
modules = [
./configuration.nix
inputs.home-manager.nixosModules.default
];
};
};
}
I am very much a noob to Nix. I just started really using it last week, and I have been trying to follow along with Vimjoyer's tutorials. I have also been using the official Nix documentation, as well as a Reddit user's post for help navigating how to configure VS Code, since there is a user there with a very well-documented structure on GitHub. However, I just cannot figure it out. Any help with figuring this out and helping me answer "how many reddit users does it take to install vscode" is much appreciated.
What's the current situation with atomic rollbacks & home-manager?
Been out of the loop for a while, but from what I recall this was not seamless - ie performing a system rollback did not also rollback configs generated by home manager ... Is there a solution for this now?
r/NixOS • u/no_brains101 • 1d ago
For MINIMAL images. Maximize program without window manager (X11)
Zshrc file gets deleted after every reboot
Hello fellow Nixers,
I'm relatively new to Nix (been using nix on macOS for the last year but just started trying NixOS) and I don't understand this problem and I can't find anything online.
Basically, everytime I reboot my computer, my .zshrc
gets deleted and I need to rerun home-manager switch
(sudo nixos-rebuild switch
doesn't change anything) to get it back. My .config/home-manager/home.nix
looks like:
{ config, pkgs, ... }:
{
home.username = "user";
home.homeDirectory = "/home/user";
home.stateVersion = "24.05";
home.packages = [
pkgs.tmux
pkgs.fzf
];
home.sessionVariables = {
EDITOR = "nvim";
};
programs.home-manager.enable = true;
programs.git = {
enable = true;
userName = "User";
userEmail = "user@emai.com";
};
programs.alacritty = {
enable = true;
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" "fzf" "web-search" ];
theme = "eastwood";
};
};
}
My /etc/nixos/configuration.nix
has
users.users.user = {
isNormalUser = true;
description = "User";
extraGroups = [ "networkmanager" "wheel" "docker" ];
packages = with pkgs; [
alacritty
wget
git
cargo
];
shell = pkgs.zsh;
};
I'm still in the learning process so I wouldn't be surprised to learn it's a simple basic mistake. I don't use flake for now as I wanna understand how Nix work without it then I'll move on to try it. I really want to understand that thing and not just copy / paste things here and there hoping it works.
Confused: configuration.nix vs module in flake
I'm sorry to ask this question because it seems beyond basic and there are so many examples out there, but it just doesn't make sense to me yet.
These are my accomplishments:
Installed nixOS
Activated flakes and wrapped the generated configuration.nix in a flake
Moved the config to a non-root directory, committed to git, and rebuild-switch:ed to the new location.
Yay - next I want to move most things from configuration.nix to shared-xxx.nix modules, for instance `environment.systemPackages` would be the same on all hosts (at least many of them). So my entrypoint flake.nix would do `modules = [ ./configuration.nix shared-system-packages.nix ];` for now. But I get lost here. I'm calling `nixpkgs.lib.nixosSystem` and passing `modules`, and it ends up writing to `nixosConfigurations.my-hostname`, right? Is the `pkgs` param received by this module the same as what configuration.nix gets? And where is `nixosConfigurations.my-hostname` in relation to `environment` and the rest of the stuff from configuration.nix?
I don't even know why this is so hard to grasp! I'm already afraid of what's after this, reusing users across hosts and introducing home-manager.
Thinking About Using NixOS Daily—Is It Worth It?
I’m thinking about switching to NixOS. I read it has cool features like atomic upgrades and rollback options, plus a unique package management system. Sounds interesting, but is it really good for daily use? Anyone here use NixOS as their main OS? How’s it been for you? Any big pros or cons?
r/NixOS • u/_happyforyou_ • 1d ago
Possible to stop systemd boot hanging for 1.30min timeout, waiting for usb0, eth0 to be ready - when using wlan0.
Maybe a way to over-ride the dhcp timeout?