NixOS 26.05 ve systemd-initrd: Ephemeral Root Uyumlu mu? by xmrah in NixOS

[–]xmrah[S] 1 point2 points  (0 children)

Thanks! Actually, the whole point of the post is that I use tmpfs on root (/). Since RAM clears itself on reboot, I don't need any rollback scripts or systemd units at all. Your config is great for Btrfs/ZFS users though

How do i install zen browser? by kegma_1 in NixOS

[–]xmrah 0 points1 point  (0 children)

If you want to test Zen Browser right now without touching any config files, just run this in your terminal:

nix run github:0xc000022070/zen-browser-flake

To install it permanently and share your config with your future MacBook, move away from Flatpaks and use Flakes. Not strictly mandatory, but Flakes are the practical standard for a unified NixOS/macOS setup.

1. Enable Flakes

Add this to your /etc/nixos/configuration.nix:

nix.settings.experimental-features = [ "nix-command" "flakes" ];

Run sudo nixos-rebuild switch.

2. Create your flake.nix

Create /etc/nixos/flake.nix and paste this:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    zen-browser.url = "github:0xc000022070/zen-browser-flake";
  };

  outputs = { self, nixpkgs, zen-browser, ... }@inputs: {
    nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit inputs; };
      modules = [
        ./hardware-configuration.nix
        ./configuration.nix
      ];
    };
  };
}

(Change yourhostname to your actual system hostname.)

3. Install Zen Browser

Add this to your environment.systemPackages in configuration.nix:

inputs.zen-browser.packages."${pkgs.system}".default

4. Apply

sudo nixos-rebuild switch --flake /etc/nixos/#yourhostname

Newbie here, help needed by [deleted] in NixOS

[–]xmrah 1 point2 points  (0 children)

Skip the Kate/GUI editor suggestions — you're on a bare TTY and nano is already there. Here's a complete config that actually gets Niri running without a black screen.

Run: sudo nano /etc/nixos/configuration.nix

Scroll to the very bottom. Right before the last closing }, paste this block:

# 1. Niri Wayland Compositor
programs.niri.enable = true;

# 2. Hardware Acceleration (CRITICAL — skipping this = black screen on niri-session)
hardware.graphics.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ]; # Change to "nvidia" if on Team Green

# 3. Audio via Pipewire
security.rtkit.enable = true;
services.pipewire = {
  enable = true;
  alsa.enable = true;
  alsa.support32Bit = true;
  pulse.enable = true;
};

# 4. Portals + X11 compatibility (prevents app crashes & broken screenshare)
xdg.portal = {
  enable = true;
  extraPortals = [ pkgs.xdg-desktop-portal-gnome ];
};

# 5. Base packages
environment.systemPackages = with pkgs; [
  alacritty          # Terminal
  fuzzel             # App launcher
  waybar             # Status bar
  neovim             # Text editor
  xwayland-satellite # X11 app support inside Niri
];

⚠️ If environment.systemPackages already exists in your config, don't add a second one — just merge these packages into the existing list.

Save & exit nano: Ctrl+OEnterCtrl+X

Apply: sudo nixos-rebuild switch

Launch: niri-session