Update Build Config Error

Trying to update config with compartmentalized config files I am receiving an undefined variable ‘pkgs’ error.

Already doubled checked the syntax but did`t found the error. I am using this https://github.com/jluttine/nixos-configuration as reference.

This is the 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, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      # Enable the KDE Desktop Environment.
      ./kde-configuration.nix
    ];

  # Use the systemd-boot EFI boot loader.
  boot.loader.systemd-boot.enable = true;

  # Uses the most recent packages.
  boot.kernelPackages = pkgs.linuxPackages_latest;

  # Supposedly better for the SSD.
  fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];

  # Use the GRUB 2 boot loader.
  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;
  boot.loader.grub.device = "nodev";
  boot.loader.grub.efiSupport = true;
  boot.loader.efi.canTouchEfiVariables = true;
  # Grub menu is painted really slowly on HiDPI, so we lower the
  # resolution. Unfortunately, scaling to 1280x720 (keeping aspect
  # ratio) doesn't seem to work, so we just pick another low one.
  boot.loader.grub.gfxmodeEfi = "1024x768";
  boot.loader.grub.enableCryptodisk = true;
  boot.initrd.luks.devices = {
    "root" = {
    device = "/dev/disk/by-uuid/d83054a8-ef44-4e19-99a9-d498ba6a6d62";
    preLVM = true;
    allowDiscards = true;
    };
  };

  # Networking set-up
  networking.hostName = "T101"; # Define your hostname.
  networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
  networking.nameservers = [ "84.200.69.80" "84.200.70.40" ]; # DNS Watch
  
  # Wi-fi corporate network set-up
  networking.wireless.networks = {
    "walCOR Seguros" = {         # SSID with spaces and/or special characters
    pskRaw = "------------------";
    };
  };

  # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  # Per-interface useDHCP will be mandatory in the future, so this generated config
  # replicates the default behaviour.
  networking.useDHCP = false;
  networking.interfaces.enp1s0.useDHCP = true;
  networking.interfaces.wlp2s0.useDHCP = true;

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

  # Select internationalisation properties.
  i18n.console.font = "Lat2-Terminus16";
  i18n. console.keyMap = "br-abnt2";
  i18n.defaultLocale = "pt_BR.UTF-8";
  
  # Set your time zone.
  time.timeZone = "America/Campo_Grande";

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  # environment.systemPackages = with pkgs; [
  #   wget vim
  # ];

  # 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;

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;

  # Loads GPU drivers on T-101 station.
  nixpkgs.config.allowUnfree = true;
  services.xserver.videoDrivers = [ "intel" "amdgpu" ];

  # Enable the X11 windowing system.
  services.xserver.enable = true;
  services.xserver.layout = "br-abnt2";
  services.xserver.xkbOptions = "eurosign:e";

  # Enable touchpad support.
  services.xserver.libinput.enable = true;

  # 32 bit Open GL support.
   hardware.opengl.driSupport32Bit = true;

  # Fonts Settings.
  fonts.enableFontDir = true;
  fonts.enableGhostscriptFonts = true;
  fonts.fonts = [ pkgs.inconsolata pkgs.unifont pkgs.font-awesome-ttf pkgs.source-code-pro  pkgs.freefont_ttf pkgs.opensans-ttf pkgs.liberation_ttf pkgs.liberationsansnarrow pkgs.ttf_bitstream_vera pkgs.libertine pkgs.ubuntu_font_family pkgs.gentium pkgs.symbola ];

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.walter = {
    isNormalUser = true;
    extraGroups = [ "wheel" "disk" "audio" "video" "networkmanager" "systemd-journal" ]; # Enable ‘sudo’ for the user.
    home = "/home/walter";
    description = "Walter Queiroz";
    uid = 1000;
  };

  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "19.09"; # Did you read the comment?
  
  # Auto upgrade Always ON.
  system.autoUpgrade.enable = true;

  # Enable Tor Browser as Service - Security Reasons.
  services.tor.enable = true;
  services.tor.client.enable = true;
  
  # Enable SmarCard Daemon.
  services.pcscd.enable = true;
  services.pcscd.plugins = [ pkgs.pcsclite pkgs.opensc pkgs.openssl pkgs.pcsctools pkgs.libusb pkgs.ccid pkgs.pcsc-cyberjack ];
  
  # Fundamental core packages
  environment.systemPackages = with pkgs; [
    # Basic command line tools
    bash
    wget
    file
    gksu
    git
    hdf5
    zip
    unzip
    htop
    yle-dl
    youtube-dl
    nix-index
    dnsutils
    whois
    coreutils
    vbetool
    killall
    nethogs
    # Gamin: a file and directory monitoring system
    fam
    # Basic image manipulation and handling stuff
    imagemagick
    ghostscript
    # Text editors
    vim
    xclip  # system clipboard support for vim
    # VPN
    pptp
    openvpn
    # File format conversions
    pandoc
    pdf2svg
    # Screen brightness and temperature
    redshift
    # SSH filesystem
    sshfsFuse
    # Encryption key management
    gnupg
    # Yet another dotfile manager
    yadm
    gnupg1orig
    # Password hash generator
    mkpasswd
    # Android
    jmtpfs
    gphoto2
    libmtp
    mtpfs
    nix-prefetch-git
    # Make NTFS filesystems (e.g., USB drives)
    ntfs3g
    # Encrypted USB sticks etc
    cryptsetup
    # GPG password entry from the terminal
    pinentry
    # GUI for sound control
    pavucontrol
    python3Packages.magic-wormhole
    ];
}

This is the kde-configuration.nix?

  #Open ports for KDE Connect
  { networking.firewall.allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
    networking.firewall.allowedUDPPortRanges = [ { from = 1717; to = 1764; } ];
  }

  # Use Plasma 5
  { services.xserver.desktopManager.plasma5.enable = true;
    services.xserver.desktopManager.default = "plasma5";  #Deprecated
    #services.xserver.displayManager.defaultSession = "plasma5";
  }

  # User packages for graphic environment.
  { environment.systemPackages = with pkgs;
    [ kdeFrameworks.kwallet # Password manager for KDE
      kdeApplications.kwalletmanager
      kwalletcli
      # Allow automatic unlocking of kwallet if the same password. This seems to
      # work without installing kwallet-pam.
      kwallet-pam
      # ssh-add prompts a user for a passphrase using KDE. Not sure if it is used
      # by anything? ssh-add just asks passphrase on the console.
      #ksshaskpass
      # Archives (e.g., tar.gz and zip)
      ark
      # GPG manager for KDE
      kgpg
      # This is needed for graphical dialogs used to enter GPG passphrases
      pinentry-qt
      kdeplasma-addons
      # Screenshots
      kdeApplications.spectacle
      # Bluetooth
      bluedevil
      # Text editor
      kate
      # Torrenting
      ktorrent
      # Connect desktop and phone
      kdeconnect
      # Drop-down terminal
      yakuake
      # Printing and scanning
      kdeApplications.print-manager
      simple-scan
      # Document readers
      okular
      # Browsers
      firefox
      chromium
      tor 
      # Email
      #kmail
      thunderbird
      # Office suit
      libreoffice
      # Photo/image editor
      gwenview
      digikam5
      gimp-with-plugins
      # Media player
      vlc
      # KDE apps
      kdeFrameworks.kconfig
      kdeFrameworks.kconfigwidgets
      konsole
      dolphin
      kdeApplications.dolphin-plugins
    ];
  }

This is the complete error:

[root@T101:~]# sudo nixos-rebuild switch --show-trace
error: while evaluating the attribute 'config' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/lib/eval-config.nix:58:5:
while evaluating the attribute 'config' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:87:25:
while evaluating 'yieldConfig' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:74:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:73:16:
while evaluating 'mergeModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:190:26, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:17:
while evaluating 'mergeModules'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:194:36, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:191:5:
while evaluating 'flip' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:101:16, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:237:6:
while evaluating 'byName' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:217:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:225:21:
while evaluating 'reverseList' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:393:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:38:
while evaluating 'filterModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:93:31, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:51:
while evaluating 'closeModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:101:27, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:62:16:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:29, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:103:50, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:32:
while evaluating 'unifyModuleSyntax' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:118:34, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:109:11:
while evaluating 'applyIfFunction' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:144:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:109:39:
while evaluating 'isFunction' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:296:16, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:144:68:
undefined variable 'pkgs' at /etc/nixos/kde-configuration.nix:13:39
building Nix...
error: while evaluating the attribute 'config' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/lib/eval-config.nix:58:5:
while evaluating the attribute 'config' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:87:25:
while evaluating 'yieldConfig' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:74:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:73:16:
while evaluating 'mergeModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:190:26, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:17:
while evaluating 'mergeModules'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:194:36, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:191:5:
while evaluating 'flip' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:101:16, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:237:6:
while evaluating 'byName' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:217:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:225:21:
while evaluating 'reverseList' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:393:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:38:
while evaluating 'filterModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:93:31, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:51:
while evaluating 'closeModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:101:27, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:62:16:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:29, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:103:50, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:32:
while evaluating 'unifyModuleSyntax' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:118:34, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:109:11:
while evaluating 'applyIfFunction' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:144:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:109:39:
while evaluating 'isFunction' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:296:16, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:144:68:
undefined variable 'pkgs' at /etc/nixos/kde-configuration.nix:13:39
building the system configuration...
error: while evaluating the attribute 'config.system.build.toplevel' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/lib/eval-config.nix:58:5:
while evaluating the attribute 'config' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:87:25:
while evaluating 'yieldConfig' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:74:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:73:16:
while evaluating 'mergeModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:190:26, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:17:
while evaluating 'mergeModules'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:194:36, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:191:5:
while evaluating 'flip' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:101:16, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:237:6:
while evaluating 'byName' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:217:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:225:21:
while evaluating 'reverseList' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:393:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:38:
while evaluating 'filterModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:93:31, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:64:51:
while evaluating 'closeModules' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:101:27, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:62:16:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:29, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:103:50, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:32:
while evaluating 'unifyModuleSyntax' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:118:34, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:109:11:
while evaluating 'applyIfFunction' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:144:29, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:109:39:
while evaluating 'isFunction' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:296:16, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:144:68:
undefined variable 'pkgs' at /etc/nixos/kde-configuration.nix:13:39

It will be wonderful if some one of you guys figure what I am not able to identify.

Thanks.

I think you need to add the above line to kde-configuration.nix as well.

1 Like

unnest options in kde-configurations.nix and add pkgs argument in top:

{ pkgs, ... }: {

  #Open ports for KDE Connect
  networking.firewall.allowedTCPPortRanges = ...
  ...

  # Use Plasma 5
  services.xserver.desktopManager.plasma5.enable = ...
  ...

  # User packages for graphic environment.
  environment.systemPackages = with pkgs; ...
  ...
}

Syntax

{ blabla ...
}
{ foobar ...
}

is invalid in Nix.

1 Like

Hi guys. I am here again. Although your prior suggestions have worked here - BTW Thanks - Now, Adding a user based configuration, I am finding a new problem.

The error is:

[root@T101:/home/walter]# sudo nixos-rebuild switch --show-trace 
building Nix...
building the system configuration...
error: while evaluating the attribute 'config.system.build.toplevel' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:274:5:
while evaluating 'foldr' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:52:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:138:12:
while evaluating 'fold'' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:55:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:59:8:
while evaluating the attribute 'assertions' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:336:9:
while evaluating the option `assertions':
while evaluating the attribute 'isDefined' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:373:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:362:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:456:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:348:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:348:17:
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:415:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:349:62:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:500:14:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:500:14:
while evaluating the attribute 'enable' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:336:9:
while evaluating the option `services.openssh.enable':
while evaluating the attribute 'isDefined' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:373:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:362:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:456:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:348:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:348:17:
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:415:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:349:62:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:500:14:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:500:14:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:500:14:
while evaluating the attribute 'condition' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:500:14:
while evaluating the attribute 'isDefined' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:340:22:
while evaluating the attribute 'isDefined' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:373:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:362:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:456:7:
while evaluating 'byName' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:217:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:233:22:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:218:22, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:218:9:
value is a boolean while a set was expected, at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:219:25

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, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      # Enable the KDE Desktop Environment.
      ./kde-configuration.nix
      ./local-configuration.nix##user.wjjunyor
    ];

  # Use the systemd-boot EFI boot loader.
  boot.loader.systemd-boot.enable = true;

  # Uses the most recent packages.
  boot.kernelPackages = pkgs.linuxPackages_latest;

  # Supposedly better for the SSD.
  fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];

  # Use the GRUB 2 boot loader.
  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;
  boot.loader.grub.device = "nodev";
  boot.loader.grub.efiSupport = true;
  boot.loader.efi.canTouchEfiVariables = true;
  # Grub menu is painted really slowly on HiDPI, so we lower the
  # resolution. Unfortunately, scaling to 1280x720 (keeping aspect
  # ratio) doesn't seem to work, so we just pick another low one.
  boot.loader.grub.gfxmodeEfi = "1024x768";
  boot.loader.grub.enableCryptodisk = true;
  boot.initrd.luks.devices = {
    "root" = {
    device = "/dev/disk/by-uuid/d83054a8-ef44-4e19-99a9-d498ba6a6d62";
    preLVM = true;
    allowDiscards = true;
    };
  };

  # Networking set-up
  networking.hostName = "T101"; # Define your hostname.
  networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
  networking.nameservers = [ "84.200.69.80" "84.200.70.40" ]; # DNS Watch
  
  # Wi-fi corporate network set-up
  networking.wireless.networks = {
    "walCOR Seguros" = {         # SSID with spaces and/or special characters
    pskRaw = "----------------------";
    };
  };

  # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  # Per-interface useDHCP will be mandatory in the future, so this generated config
  # replicates the default behaviour.
  networking.useDHCP = false;
  networking.interfaces.enp1s0.useDHCP = true;
  networking.interfaces.wlp2s0.useDHCP = true;

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

  # Select internationalisation properties.
  i18n.consoleFont = "Lat2-Terminus16";
  i18n.consoleKeyMap = "br-abnt2";
  i18n.defaultLocale = "pt_BR.UTF-8";
  
  # Set your time zone.
  time.timeZone = "America/Campo_Grande";

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  # environment.systemPackages = with pkgs; [
  #   wget vim
  # ];

  # 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;

  # Enable CUPS to print documents.
  services.printing.enable = true;

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;

  # Loads GPU drivers on T-101 station.
  nixpkgs.config.allowUnfree = true;
  services.xserver.videoDrivers = [ "intel" "amdgpu" ];

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

  # Enable touchpad support.
  services.xserver.libinput.enable = true;

  # 32 bit Open GL support.
   hardware.opengl.driSupport32Bit = true;

  # Fonts Settings.
  fonts.enableFontDir = true;
  fonts.enableGhostscriptFonts = true;
  fonts.fonts = [ pkgs.inconsolata pkgs.unifont pkgs.font-awesome-ttf pkgs.source-code-pro  pkgs.freefont_ttf pkgs.opensans-ttf pkgs.liberation_ttf pkgs.liberationsansnarrow pkgs.ttf_bitstream_vera pkgs.libertine pkgs.ubuntu_font_family pkgs.gentium pkgs.symbola ];

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.wjjunyor = {
    isNormalUser = true;
    extraGroups = [ "wheel" "disk" "audio" "video" "networkmanager" "systemd-journal" ]; # Enable ‘sudo’ for the user.
    home = "/home/wjjunyor";
    description = "Walter Queiroz";
    uid = 1000;
  };

  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "19.09"; # Did you read the comment?
  
  # Auto upgrade Always ON.
  system.autoUpgrade.enable = true;

  # Enable Tor Browser as Service - Security Reasons.
  services.tor.enable = true;
  services.tor.client.enable = true;
  
  # Enable SmarCard Daemon.
  services.pcscd.enable = true;
  services.pcscd.plugins = [ pkgs.pcsclite pkgs.opensc pkgs.openssl pkgs.pcsctools pkgs.libusb pkgs.ccid pkgs.pcsc-cyberjack ];
  
  # Fundamental core packages
  environment.systemPackages = with pkgs; [
    # Basic command line tools
    bash
    wget
    file
    gksu
    git
    hdf5
    zip
    unzip
    htop
    yle-dl
    youtube-dl
    nix-index
    dnsutils
    whois
    coreutils
    vbetool
    killall
    nethogs
    # Gamin: a file and directory monitoring system
    fam
    # Basic image manipulation and handling stuff
    imagemagick
    ghostscript
    # Text editors
    vim
    xclip  # system clipboard support for vim
    # VPN
    pptp
    openvpn
    # File format conversions
    pandoc
    pdf2svg
    # Screen brightness and temperature
    redshift
    # SSH filesystem
    sshfsFuse
    # Encryption key management
    gnupg
    # Yet another dotfile manager
    yadm
    gnupg1orig
    # Password hash generator
    mkpasswd
    # Android
    jmtpfs
    gphoto2
    libmtp
    mtpfs
    nix-prefetch-git
    # Make NTFS filesystems (e.g., USB drives)
    ntfs3g
    # Encrypted USB sticks etc
    cryptsetup
    # GPG password entry from the terminal
    pinentry
    # GUI for sound control
    pavucontrol
    python3Packages.magic-wormhole
    ];
}

The imported files in sequence are kde-configuration.nix e local-configuration.nix - I know the problem is in the local-configuration.nix because the but only with the kde-configuration.nix is OK .

This is kde-configuration.nix:

{ pkgs, ... }: {

  #Open ports for KDE Connect
   networking.firewall.allowedTCPPortRanges = [ { from = 1714; to = 1764; } ];
   networking.firewall.allowedUDPPortRanges = [ { from = 1717; to = 1764; } ];
  

  # Use Plasma 5
   services.xserver.desktopManager.plasma5.enable = true;
   services.xserver.desktopManager.default = "plasma5";  #Deprecated
   #services.xserver.displayManager.defaultSession = "plasma5";
   services.xserver.layout = "br";
   services.xserver.xkbVariant = "abnt2";
  

  # User packages for graphic environment.
   environment.systemPackages = with pkgs;
    [ kdeFrameworks.kwallet # Password manager for KDE
      kdeApplications.kwalletmanager
      kwalletcli
      # Allow automatic unlocking of kwallet if the same password. This seems to
      # work without installing kwallet-pam.
      kwallet-pam
      # ssh-add prompts a user for a passphrase using KDE. Not sure if it is used
      # by anything? ssh-add just asks passphrase on the console.
      #ksshaskpass
      # Archives (e.g., tar.gz and zip)
      ark
      # GPG manager for KDE
      kgpg
      # This is needed for graphical dialogs used to enter GPG passphrases
      pinentry
      kdeplasma-addons
      # Screenshots
      kdeApplications.spectacle
      # Bluetooth
      bluedevil
      # Text editor
      kate
      # Drop-down terminal
      yakuake
      # Printing and scanning
      kdeApplications.print-manager
      simple-scan
      # Document readers
      okular
      # Browsers
      firefox
      chromium
      # Email
      #kmail
      thunderbird
      # Office suit
      libreoffice
      # Photo/image editor
      gwenview
      digikam5
      # Media player
      vlc
      # KDE apps
      kdeFrameworks.kconfig
      kdeFrameworks.kconfigwidgets
      kdeFrameworks.kio
      plasma-browser-integration
      konsole
      dolphin
      kdeApplications.dolphin-plugins
      kdeApplications.kio-extras
      kdeApplications.knotes
    ];
  }

And this is the local-configuration.nix:

{ config, lib, options, modulesPath, users, pkgs }:
{
  # hostName = "t101";
  # nixpkgs = "/etc/nixpkgs";
  # grubDevice = "/dev/sda";
  users = with users; [
    (wjjunyor { groups = [ "wheel" "adbusers" ]; })
  ];
  # displayManager = "sddm";
  # desktopEnvironment = "plasm5";
  services = {
    sshd = false;
    emacs = false;
    # bluetooth = {
    #   enable = true;      # Estudar esta parada pois quero BT em meu note 
    # };
    # mailserver = {
    #   enable = false;
    # };
    # mythbackend = true;
    # mythfrontend = true;
    # storj = true;
    # bluray = true;
    # https://github.com/jluttine/CryptOS
    # cryptos = {
    #   enable = false;
    # };
    # https://syncthing.net/
    # syncthing = {
    #   enable = false;
    #   user = "wjjunyor";
    # };
  };
  programs = {
    adb = true;
  };
  environment.systemPackages = with pkgs;
   [ # LaTeX https://en.wikipedia.org/wiki/TeX
     # texlive.combined.scheme-full
     # OpenStreetMap editor
     josm.aarch64-linux
     # 3D modelling
     # blender
     # Zotero client
     #qnotero
     encfs
     # E-books
     fbreader
     calibre
     # RSS reader
     #feedreader
     rssguard
     # Disk usage analysis
     filelight
     qdirstat
     w_scan
     # Photo manager
     shotwell
     # Audio editor
     audacity
     # MPD client
     cantata
     # Panorama stitcher (with raw support)
     hugin
     #dcraw # marked as insecure
     # HDR photography
     luminanceHDR
     #  Photo/Image Editor
     gimp-with-plugins
     # Vector Editor 
     inkscape
     # Torrenting
     ktorrent
     # Browser
     tor-arm.x86_64-linux
     # Instant messaging
     #cutegram
     tdesktop
     qtox
     linphone
     pybitmessage
     riot-web
     # Twitter
     corebird
     # Torrenting
     ktorrent
     # Encryption
     openssl
     # Tool for searching files/binaries from Nix packages
     nix-index
     # Programming
     # emacs
     # gitAndTools.gitflow
     # pgadmin
     # gitAndTools.hub
     # direnv
     # Password manager
     pass
     # Separate tiling window manager
     #i3
     patchelf
     # Mobile SSH replacement
     mosh
     k3b
     dvdplusrwtools
     (python3.withPackages (ps: with ps; [
       numpy
       scipy
       # Python language server for Emacs
       #python-language-server
   ]))
 ];
}

Here’s how you should read error description:

...
while evaluating the option `services.openssh.enable':
...
value is a boolean while a set was expected ....

i.e., everything else is cruft.

So, problematic option is services.openssh.enable. But you don’t have this option enabled! However, if you check options doc for this option: https://nixos.org/nixos/options.html#services.openssh.enable
you’ll find out that services.sshd.enable is aliased to that.

And you have services.sshd = false; in your config. It expects services.sshd to be an attrset with single option .enable, but you assign a boolean instead. This explains error value is a boolean while a set was expected

Makes sense?

Thanks for the tip. I was lost with error messages.

This is the final local-configuration.nix:

{ config, lib, options, modulesPath, users, pkgs, environment }: 

{
  # hostName = "t101";
  # nixpkgs = "/etc/nixpkgs";
  # grubDevice = "/dev/sda";

  # Specific services to be enables for this user. 
  services.blueman.enable = true;      # Estudar esta parada pois quero BT em meu note 
  # Enable Tor Browser as Service - Security Reasons.
  services.tor.enable = true;
  services.tor.client.enable = true;
    
  # Specific programs to be enables for this user.
  programs.adb.enable = true;
  
  # Specific pacckaghes for graphic environment fot this user+
  environment.systemPackages = with pkgs;
   [ encfs
     # E-books
     fbreader
     calibre
     # RSS reader
     #feedreader
     rssguard
     # Disk usage analysis
     filelight
     qdirstat
     w_scan
     # Photo manager
     shotwell
     # Audio editor
     audacity
     # MPD client
     cantata
     # Panorama stitcher (with raw support)
     hugin
     #dcraw # marked as insecure
     # HDR photography
     luminanceHDR
     #  Photo/Image Editor
     gimp-with-plugins
     # Vector Editor 
     inkscape
     # Torrenting
     ktorrent
     # Browser
     tor
     # Instant messaging
     #cutegram
     tdesktop
     qtox
     linphone
     pybitmessage
     riot-web
     # Twitter
     cawbird
     # Encryption
     openssl
     # Tool for searching files/binaries from Nix packages
     nix-index
     # Password manager
     pass
     # Separate tiling window manager
     #i3
     patchelf
     # Mobile SSH replacement
     mosh
     k3b
     dvdplusrwtools
   ];
}

:metal:t4:

I am reorganizing my configs for better compartmentalization and I am stuck on the following error. Maybe I am not seeing what i’ve misses:

wjjunyor@T101:~]$ sudo nixos-rebuild --upgrade switch --show-trace 
unpacking channels...
building Nix...
building the system configuration...
error: while evaluating the attribute 'activationScript' of the derivation 'nixos-system-T101-20.09pre222244.22a3bf9fb9e' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:95:5:
while evaluating the attribute 'system.activationScripts.script' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:68:9:
while evaluating 'textClosureMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:70:35, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:89:18:
while evaluating 'id' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:14:5, called from undefined position:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:9:5:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:77:38:
while evaluating the attribute 'sources' of the derivation 'etc' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:12:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:20:20, called from undefined position:
while evaluating the attribute 'source' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:383:9:
while evaluating the option `environment.etc.dbus-1.source':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:415:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:12:
while evaluating 'check' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:251:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:22:
while evaluating the attribute 'serviceDirectories' of the derivation 'dbus-1' at /nix/store/aiayyn58fpdnlq2lv47fp4fx4c1xkmbd-nixos-20.09pre222244.22a3bf9fb9e/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:263:14, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:428:27:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:17, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:12:
while evaluating 'check' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:251:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:22:
while evaluating the attribute 'passAsFile' of the derivation 'system-path' at /nix/store/aiayyn58fpdnlq2lv47fp4fx4c1xkmbd-nixos-20.09pre222244.22a3bf9fb9e/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'environment.systemPackages' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:84:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:383:9:
while evaluating the option `environment.systemPackages':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:415:5:
while evaluating 'merge' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:262:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:417:59:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:263:35, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:29, called from undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:265:23, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/lists.nix:116:32:
while evaluating the attribute 'optionalValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:427:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:409:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:508:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:395:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:395:17:
while evaluating definitions from `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/config/pulseaudio.nix':
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:467:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:396:137:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:269:40:
while evaluating the attribute 'package.override' at undefined position:
attribute 'override' missing, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/config/pulseaudio.nix:15:23

This package/module is set-up on configuration.nix, and some other stuff on the wjjunyor-configuration.nix

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, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      # Enable the KDE Desktop Environment.
      ./user-configuration.nix
      ./local-configuration.nix
      ./wjjunyor-configuration.nix
      ./x-configuration.nix
    ];

  # Use the systemd-boot EFI boot loader.
  boot.loader.systemd-boot.enable = true;

  # Uses the most recent packages.
  boot.kernelPackages = pkgs.linuxPackages_latest;

  # Supposedly better for the SSD.
  fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];

  # Use the GRUB 2 boot loader.
  boot.loader.grub.enable = true;
  boot.loader.grub.version = 2;
  boot.loader.grub.device = "nodev";
  boot.loader.grub.efiSupport = true;
  boot.loader.efi.canTouchEfiVariables = true;
  # Grub menu is painted really slowly on HiDPI, so we lower the
  # resolution. Unfortunately, scaling to 1280x720 (keeping aspect
  # ratio) doesn't seem to work, so we just pick another low one.
  boot.loader.grub.gfxmodeEfi = "1024x768";
  boot.loader.grub.enableCryptodisk = true;
  boot.initrd.luks.devices = {
    "root" = {
    device = "/dev/disk/by-uuid/d83054a8-ef44-4e19-99a9-d498ba6a6d62";
    preLVM = true;
    allowDiscards = true;
    };
  };

  # Networking set-up
  networking.hostName = "T101"; # Define your hostname.
  networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
  networking.nameservers = [ "84.200.69.80" "84.200.70.40" ]; # CloudFlare / DNS Watch
  
  # Wi-fi corporate network set-up
  networking.wireless.networks = {
    "walCOR Seguros" = {         # SSID with spaces and/or special characters
    pskRaw = "WIFIHASH";
    };
  };

  # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  # Per-interface useDHCP will be mandatory in the future, so this generated config
  # replicates the default behaviour.
  networking.useDHCP = false;
  networking.interfaces.enp1s0.useDHCP = true;
  networking.interfaces.wlp2s0.useDHCP = true;

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

  # Select internationalisation properties.
  console.font = "Lat2-Terminus32";
  console.keyMap = "br-abnt2";
  i18n.defaultLocale = "pt_BR.UTF-8";
  
  # Set your time zone.
  time.timeZone = "America/Campo_Grande";

  # 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 CUPS to print documents.
  services.printing.enable = true;

  # Team Viewer Listener
  services.teamviewer.enable = true;

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;
  

  # Loads GPU drivers on T-101 station.
  nixpkgs.config.allowUnfree = true;
  services.xserver.videoDrivers = [ "intel" "amdgpu" ];

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

  # Enable touchpad support.
  services.xserver.libinput.enable = true;

  # 32 bit Open GL support.
   hardware.opengl.driSupport32Bit = true;

  # Fonts Settings.
  fonts.enableFontDir = true;
  fonts.enableGhostscriptFonts = true;
  fonts.fonts = [ pkgs.inconsolata pkgs.unifont pkgs.font-awesome-ttf pkgs.source-code-pro  pkgs.freefont_ttf pkgs.opensans-ttf pkgs.liberation_ttf pkgs.liberationsansnarrow pkgs.ttf_bitstream_vera pkgs.libertine pkgs.ubuntu_font_family pkgs.gentium pkgs.symbola ];

  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "20.09"; # Did you read the comment?
  
  # Auto upgrade Always ON.
  system.autoUpgrade.enable = true;

  # Enable SmarCard Daemon.
  services.pcscd.enable = true;
  services.pcscd.plugins = [ pkgs.pcsclite pkgs.opensc pkgs.openssl pkgs.pcsctools pkgs.libusb pkgs.libusb1 pkgs.ccid pkgs.chrome-token-signing ]; #pkgs.pcsc-cyberjack ];
  
  # Fundamental core packages
  environment.systemPackages = with pkgs; [
    # Basic command line tools
    bash
    wget
    file
    gksu
    git
    hdf5
    zip
    unzip
    htop
    yle-dl
    youtube-dl
    nix-index
    dnsutils
    whois
    coreutils
    vbetool
    killall
    nethogs
    unrar
    # Gamin: a file and directory monitoring system
    fam
    # Basic image manipulation and handling stuff
    imagemagick
    ghostscript
    # Text editors
    vim
    xclip  # system clipboard support for vim
    # VPN
    pptp
    openvpn
    # File format conversions
    pandoc
    pdf2svg
    # Screen brightness and temperature
    redshift
    # SSH filesystem
    sshfsFuse
    # Yet another dotfile manager
    yadm
    # Password hash generator
    mkpasswd
    # Android
    jmtpfs
    gphoto2
    libmtp
    mtpfs
    nix-prefetch-git
    # Make NTFS filesystems (e.g., USB drives)
    ntfs3g
    # GUI for sound control
    pavucontrol
    python3Packages.magic-wormhole   
    # Bluetooth Support
    bluez
    bluezFull
    bluez-tools
    # Suporte SegFy e TI
    teamviewer
    ];
}

wjjunyor-configuration.nix

{ config, lib, options, modulesPath, users, pkgs, environment }: 

{
  # Specific services to be enables for this user. 
  services.openssh.enable = true;
  services.tor.client.enable = true;
  services.tor.client.transparentProxy.enable =  true;
  # services.blueman.enable = true;      # Estudar esta parada pois quero BT em meu note 

  # Specific programs for this user
  programs.adb.enable = true;

  # Specific hardware setings for this user
  hardware.bluetooth.enable = true;
  hardware.bluetooth.powerOnBoot = true;
  hardware.pulseaudio.package = [ pkgs.pulseaudioFull];
  hardware.pulseaudio.extraModules = [ pkgs.pulseaudio-modules-bt ];

  # Specific packages for graphic environment for this user
  environment.systemPackages = with pkgs;
   [ gimp-with-plugins #  Photo/Image Editor
     # Vector Editor 
     inkscape
     # Torrenting
     ktorrent
     # Browsers Suport 
     # firefox-wayland 
     firefox
     # firefox-beta-bin
     # Instant messaging
     # cutegram
     tdesktop
     riot-web
     riot-desktop
     # Encryption
     openssl
     encfs
     # Encrypted USB sticks etc
     cryptsetup
     # GPG password entry from the terminal
     pinentry
     # Encryption key management
     gnupg
     gnupg1orig
     # Tool for searching files/binaries from Nix packages
     nix-index
     # Mobile device connect 
     kdeconnect
     # Para o WebSigner Certsign
     glibc
     # Chrome and Firefox extension for signing with your eID on the web
     chrome-token-signing
     # SmartCard Apps 
     acsccid
     # Network - For T101 only
     networkmanager
     # SU
     kdesu
     # ZOOM Meeting - Tirar depois de usar essa coisa unsafe da porra
     zoom-us
     # E-books
     fbreader
     calibre
     # Browser
     tor-arm
     tor                            # PARA PRODUÇÃO DEIXAR O TOR E OS FIREFOX SOMENTE PARA OS USUÁRIOS wjjunyor e caroles.melo
     tor-browser-bundle-bin         # Erro Download
     # Instant messaging
     #cutegram
     # For Whatsapp Bridging on Riot
     mautrix-whatsapp 
     # FTP Client
     filezilla
     # Password manager
     keepass-keeagent
     keepass
     # Separate tiling window manager
     #i3
     patchelf
     # JOGOS DA QUARENTENA
     libGL
     discord
     minecraft
     # Mobile SSH replacement
     mosh
     k3b
   ];
}

Thanks.

 hardware.pulseaudio.package = pkgs.pulseaudioFull;

package doesn’t exepect a list

1 Like