Skip to content

Instantly share code, notes, and snippets.

@ghuntley
Last active January 8, 2018 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghuntley/0fa250f0d10adcafdf4238f538b42108 to your computer and use it in GitHub Desktop.
Save ghuntley/0fa250f0d10adcafdf4238f538b42108 to your computer and use it in GitHub Desktop.
$ nix-shell -p nix-info --run nix-info
system: "x86_64-linux", multi-user?: no, version: nix-env (Nix) 1.11.16, nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

Howdy Folks;

Looking to configure https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/security/duosec.nix and it's crashing out with

$ nixos-rebuild test --show-trace
building Nix...
building the system configuration...
error: while evaluating the attribute ‘buildCommand’ of the derivation ‘nixos-system’ at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating the attribute ‘users’ of the derivation ‘etc’ at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/stdenv/generic/make-derivation.nix:98:11:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/etc/etc.nix:23:19, called from undefined position:
while evaluating the attribute ‘user’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:44:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:75:45, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:52:
while evaluating the attribute ‘value’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:312:9:
while evaluating the option `environment.etc.unnamed-26.1.user':
while evaluating the attribute ‘isDefined’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:344:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:333:19, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:333:14:
while evaluating the attribute ‘value._type’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:424:73:
while evaluating the attribute ‘value.content’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:482:14:
while evaluating the attribute ‘default’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/system/etc/etc.nix:112:15:
while evaluating the attribute ‘uid’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:44:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:75:45, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:52:
while evaluating the attribute ‘value’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:312:9:
while evaluating the option `environment.etc.unnamed-26.1.uid':
while evaluating the attribute ‘isDefined’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:344:5:
while evaluating ‘filterOverrides’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:419:21, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:328:18:
while evaluating ‘concatMap’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:425:8:
while evaluating ‘concatMap’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/lists.nix:102:18, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:323:17:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:323:28, called from undefined position:
while evaluating ‘dischargeProperties’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:386:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:324:62:
while evaluating the attribute ‘value’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/modules.nix:216:48:
while evaluating the attribute ‘config.uid’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/security/duosec.nix:28:7:
while evaluating the attribute ‘ids.uids.sshd’ at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/lib/attrsets.nix:199:44:
attribute ‘sshd’ missing, at /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/nixos/modules/security/duosec.nix:28:16

Configuration is as follows

$ cat duosec.nix
{ config, ... }:

{
  security.duosec = {
    ssh.enable = true;
    
    ikey = "redacted";
    skey = "redacted";
    host = "redacted";

    autopush = true;
    prompts = 1;

    motd = true;
  };
}

Looks like this is being caused by the removal of the sshd user back in 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment