Hello,
I’m trying to build a nixos usb stick that only contains firefox running in cage.
The goal is to have firefox pointed at a specific url so that it can work like a kiosk.
I have the following nix
{ pkgs, ... }: {
imports = [
<nixpkgs/nixos/modules/profiles/image-based-appliance.nix>
];
boot.initrd.includeDefaultModules = false;
boot.initrd.kernelModules = [ "ext4" ];
system.stateVersion = "24.11";
disabledModules = [
<nixpkgs/nixos/modules/profiles/all-hardware.nix>
<nixpkgs/nixos/modules/profiles/base.nix>
];
environment.defaultPackages = [ ];
environment.systemPackages = with pkgs; [ firefox cage ];
services.xserver = { enable = true; };
services = {
displayManager.sddm.enable = true;
libinput.enable = true; # for touchpad support on many laptops
};
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
console.keyMap = "uk";
users.users.root.initialHashedPassword = "";
systemd.services.cage-firefox = {
description = "Run Cage with Firefox";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart = "${pkgs.cage}/bin/cage ${pkgs.firefox}/bin/firefox";
Restart = "always";
Environment = "XDG_RUNTIME_DIR=/run/user/1000";
};
};
}
I use the following command to build
nixos-generate -f raw -o result/ -c configuration.nix
and i get the following error in build
error: builder for '/nix/store/rk8jc4kh6rw8z1sbcnqms3ybvxbajwfq-nixos-disk-image.drv' failed with exit code 127
Any help would be much appreciated, i’ve been trying for a couple days now and just about to give up.