Flakes installed but can't be run

Hi I just got my flakes together and wanted to run them from terminal, they are not in the path I’m sending my configuration.nix and flake.nix

this is my configuration.nix:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, zen-browser, burpsuitepro, ... }:
{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      #./nix-security-tool-box.nix    
# ./bluetooth.nix
     # ./dns.nix
     # ./exploits.nix
     # ./forensics.nix
     # ./fuzzers.nix
     # ./host.nix
     # ./information-gathering.nix
     # ./malware.nix  
     # ./misc.nix
     # ./mobile.nix
     # ./network.nix
     # ./password.nix
     # ./port-scanners.nix
     # ./proxies.nix
     # ./services.nix
     # ./traffic.nix
     # ./tunneling.nix 
     # ./voip.nix  
     # ./web.nix
     # ./windows.nix
     # ./wireless.nix  

];

  # Bootloader.
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;

  networking.hostName = "nixos"; # Define your hostname.
  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.

  # Configure network proxy if necessary
  # networking.proxy.default = "http://user:password@proxy:port/";
  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

  # Enable networking
  networking.networkmanager.enable = true;

  # Set your time zone.
  time.timeZone = "Europe/Prague";

  # Select internationalisation properties.
  i18n.defaultLocale = "en_US.UTF-8";

  i18n.extraLocaleSettings = {
    LC_ADDRESS = "cs_CZ.UTF-8";
    LC_IDENTIFICATION = "cs_CZ.UTF-8";
    LC_MEASUREMENT = "cs_CZ.UTF-8";
    LC_MONETARY = "cs_CZ.UTF-8";
    LC_NAME = "cs_CZ.UTF-8";
    LC_NUMERIC = "cs_CZ.UTF-8";
    LC_PAPER = "cs_CZ.UTF-8";
    LC_TELEPHONE = "cs_CZ.UTF-8";
    LC_TIME = "cs_CZ.UTF-8";
  };

  # Enable the X11 windowing system.
  services.xserver.enable = true;

  # Enable the GNOME Desktop Environment.
  services.xserver.displayManager.gdm.enable = true;
  services.xserver.desktopManager.gnome.enable = true;
  services.displayManager.sddm.enable = false;
  services.xserver.windowManager.leftwm.enable = false;
  services.xserver.desktopManager.xfce.enable = true;

  # Configure keymap in X11
# services.xserver = {
#    layout = "sk";
#    xkbVariant = "qwerty";
#  };

  # Configure console keymap
  console.keyMap = "sk-qwerty";

  # Enable CUPS to print documents.
services.printing = {
    enable = true;
    drivers = [ pkgs.cnijfilter2 ];
  
  };

  # Enable sound with pipewire.
  hardware.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    # If you want to use JACK applications, uncomment this
    #jack.enable = true;

    # use the example session manager (no others are packaged yet so this is enabled by default,
    # no need to redefine it in your config for now)
    #media-session.enable = true;
  };

  # Enable touchpad support (enabled default in most desktopManager).
  # services.xserver.libinput.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.perchant = {
    isNormalUser = true;
    description = "Perchant";
    extraGroups = [ "networkmanager" "wheel" ];
    packages = with pkgs; [
    #  thunderbird
    ];
  };


  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;
#auto upgrade
system.autoUpgrade.enable  = true;
system.autoUpgrade.allowReboot  = true;


# List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
   pkgs.vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
   leftwm
   leftwm-theme
   wget
   protonup
   pkgs.spotify
   legcord
   pkgs.steam
   pkgs.brave
   pkgs.mullvad-vpn
   pkgs.kitty
   pkgs.slack
   pkgs.vscode
   pkgs.obs-studio
   pkgs.insomnia
   pkgs.libreoffice-qt-fresh
   pkgs.git
   pkgs.zip
   pkgs.unzip
   pkgs.gnutar
   pkgs.gnome-tweaks
   geeqie
   code-cursor
   pkgs.fastfetch
   pkgs.zsh
   lutris
   bottles
   wineWowPackages.stable
   termius
   pidgin
   piper
   libratbag
   xpipe
   terminator
   #leftw
   rofi
   picom
   feh
   superTuxKart
   xfce.exo
   xfce.xfwm4
   polybar
   jdk21
   dmenu
   clang
   pkgs.gnome-software
   android-studio
   p7zip
   gnomeExtensions.docker
   remnote
   caido
   zap
   neovim
   simplex-chat-desktop
   wpscan
   firefox
   imlib2
   vivaldi
   torrential
   irssi
   firejail
   unrar
   gimp
   chromium
   sqlmap
   remmina
   flameshot
   openvpn
   signal-desktop
   #zen-browser.packages.${pkgs.system}.zen-browser
   zen-browser.packages.${pkgs.system}.zen-browser
   burpsuitepro.packages.${pkgs.system}.burpsuitepro
#(pkgs.burpsuite.override { proEdition = true; })
];

#Enabling Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
#environment.systemPackages = with pkgs; import ./packages.nix { inherit pkgs; };

#qbittorent

#leftwm

#vmware
#virtualisation.vmware.host.enable =  true;

#Burpsuite Profesional Edition
programs.java.enable = true;   # sets $JAVA_HOME for every user

#mullvad VPN
services.mullvad-vpn.enable = true;
services.mullvad-vpn.package = pkgs.mullvad-vpn;
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
programs.steam = {
  enable = true;
  remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
  dedicatedServer.openFirewall = true; # Open ports in the firewall for Source 
};

#virtualbox
  virtualisation.virtualbox.host.enable = true;
  users.extraGroups.vboxusers.members = [ "perchant" ];
  virtualisation.virtualbox.guest.dragAndDrop = true;
  virtualisation.virtualbox.host.enableKvm = true;
  virtualisation.virtualbox.host.addNetworkInterface = false;
  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.mtr.enable = true;
  # programs.gnupg.agent = {
  #   enable = true;
  #   enableSSHSupport = true;
  # };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  # services.openssh.enable = true;

  # Open ports in the firewall.
  # networking.firewall.allowedTCPPorts = [ ... ];
  # networking.firewall.allowedUDPPorts = [ ... ];
  # Or disable the firewall altogether.
  # networking.firewall.enable = false;

  # This value determines the NixOS release from which the default
  # settings for stateful data, like file locations and database versions
  # on your system were taken. It‘s perfectly fine and recommended to leave
  # this value at the release version of the first install of this system.
  # Before changing this value read the documentation for this option
  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html  ).
  system.stateVersion = "24.05"; # Did you read the comment?

}

this is my flake.nix:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
    zen-browser.url = "github:MarceColl/zen-browser-flake";
    burpsuitepro = {
      type = "github";
      owner = "xiv3r";
      repo = "Burpsuite-Professional";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs = { self, nixpkgs, zen-browser, burpsuitepro }: {
    # replace 'nixos' with your hostname here.
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
      specialArgs = { inherit zen-browser burpsuitepro; }; 
      system = "x86_64-linux";
      modules = [ ./configuration.nix ];
    };
  };
}

I have no idea how to fix these issues…

also here is the error code when ran:

  … while calling the 'head' builtin
         at /nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/lib/attrsets.nix:1534:13:
         1533|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1534|             head values
             |             ^
         1535|           else

       … while evaluating the attribute 'value'
         at /nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/lib/modules.nix:1083:7:
         1082|     // {
         1083|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1084|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/activation/activatable-system.nix':

       … while evaluating the option `system.activationScripts.etc.text':

       … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/etc/etc-activation.nix':

       … while evaluating definitions from `/nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/nixos/modules/system/etc/etc.nix':

       … while evaluating the option `environment.etc.dbus-1.source':

       … while evaluating the option `environment.systemPackages':

       … while evaluating definitions from `/nix/store/3kg8g2s522zqy96nr4hy5zhaq24qag3i-source/configuration.nix':

       … while evaluating the module argument `zen-browser' in "/nix/store/3kg8g2s522zqy96nr4hy5zhaq24qag3i-source/configuration.nix":

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'zen-browser' missing
       at /nix/store/5jrv34dcsm9zjl666ann69sw5k4rv30w-source/lib/modules.nix:652:66:
          651|       extraArgs = mapAttrs (
          652|         name: _: addErrorContext (context name) (args.${name} or config._module.args.${name})
             |                                                                  ^
          653|       ) (functionArgs f);

And what command are you running?
Try nixos-rebuild build --flake FLAKEPATH (FLAKEPATH should be the location/directory that contains your flake.nix)

1 Like

The documentation of the flake states that you need to use either of those:

inputs.zen-browser.packages."${system}".default
inputs.zen-browser.packages."${system}".specific
inputs.zen-browser.packages."${system}".generic
1 Like