profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ElvishJerricco/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

ekmett/free 138

free monads

ElvishJerricco/cross-nixos-aarch64 18

Cross compile minimal NixOS to aarch64

ElvishJerricco/nix-cabal-stack-skeleton 15

Skeleton project that builds with any of the three major build tools.

ElvishJerricco/MTGBuilder 5

Automatically builds magic decks

ElvishJerricco/meteor-subs-cache 3

A Meteor package for caching subscriptions.

issue commentinput-output-hk/plutus

QuickCheck generated action list length is affected by delay slots number

This seems to be due to the lastSlot limit in ModelState: https://github.com/input-output-hk/plutus/blob/d87e2eb1c37b995af2c56c5197a68dc02ced2633/plutus-contract/src/Plutus/Contract/Test/ContractModel.hs#L522-L526

Using propRunActionsWithOptions, you can configure that. But just using arbitrary, you'll ultimately end up using this instance: https://github.com/input-output-hk/plutus/blob/d87e2eb1c37b995af2c56c5197a68dc02ced2633/quickcheck-dynamic/src/Test/QuickCheck/StateModel.hs#L113-L115

Since that just uses initialState, it'll always use 125.

By using wait/delay 120, you're breaking the precondition of ModelState: https://github.com/input-output-hk/plutus/blob/d87e2eb1c37b995af2c56c5197a68dc02ced2633/plutus-contract/src/Plutus/Contract/Test/ContractModel.hs#L530-L531

Eggham

comment created time in 21 days

pull request commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

Would it be too aggressive to factor out all the parts of nixos/modules/system/boot/systemd.nix that are relevant to both initrd and stage 2 into a separate file? Because certainly not all of it is relevant, and dotting the whole systemd.nix file with mkIfs seems confusing and error prone.

ElvishJerricco

comment created time in 23 days

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

 in  {   inherit (eval) pkgs config options;+  inherit vmConfig;

It's not technically required, so yea I can remove it from this PR. I do find it tremendously useful to have in nixos/default.nix though, FWIW.

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

pull request commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

@andir I'm working on a re-tooling of this to address some of the things you mentioned, in particular separating this out into an alternative initrd, as opposed to a total replacement. I'll also check out if reusing the existing systemd module is a good idea (though I worry that it won't play nicely with the fact that the new initrd doesn't implicitly include the entire closure).

ElvishJerricco

comment created time in 23 days

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

 let   # mounting `/`, like `/` on a loopback).   fileSystems = filter utils.fsNeededForBoot config.system.build.fileSystems; -  # A utility for enumerating the shared-library dependencies of a program-  findLibs = pkgs.buildPackages.callPackage ./find-libs.nix {};-   extraUnitsObjects = map (u: { object = u; }) (builtins.attrValues config.boot.initrd.extraUnits     ++ lib.concatLists (lib.mapAttrsToList (_: builtins.attrValues) config.boot.initrd.unitOverrides));   systemdUnits = pkgs.callPackage ./systemd-units.nix {     inherit systemd;     inherit (config.boot.initrd) extraUnits unitOverrides;+    systemdPackages = config.boot.initrd.systemd.packages;   };    fstab = pkgs.writeText "fstab" (lib.concatMapStringsSep "\n"     ({ fsType, mountPoint, device, options, ... }:       "${device} /sysroot${mountPoint} ${fsType} ${lib.concatStringsSep "," options}") fileSystems); +  groups = [

udev warned about non-existent groups in the journal, so I threw these in, in hopes they'd fix whatever I was debugging at the time. I don't think they're necessary at all, and can probably be removed.

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

 runCommand "systemd-units" { } ''   set -euo pipefail   mkdir $out-  (cd ${systemd}/example/systemd; find . -type f) | while read -r f; do+  (cd ${systemd}/example/systemd; find . -type f -o -type l) | while read -r f; do     mkdir -p $out/$(dirname "$f")-    cp "${systemd}/example/systemd/$f" "$out/$f"+    cp -d "${systemd}/example/systemd/$f" "$out/$f"   done -  # TODO: I believe much of this can be fixed by using -type l and cp -d above,-  # but that brings a lot more units with a lot more problems.   mkdir $out/system/initrd.target.wants-  ln -s ../systemd-udevd.service $out/system/initrd.target.wants/systemd-udevd.service-  ln -s ../systemd-modules-load.service $out/system/initrd.target.wants/systemd-modules-load.service-  ln -s ../systemd-journald.service $out/system/initrd.target.wants/systemd-journald.service-  ln -s ../systemd-ask-password-console.service $out/system/initrd.target.wants/systemd-ask-password-console.service-  ln -s ../systemd-vconsole-setup.service $out/system/initrd.target.wants/systemd-vconsole-setup.service-  ln -s ../systemd-udev-settle.service $out/system/initrd.target.wants/systemd-udev-settle.service-  ln -s ../systemd-udev-trigger.service $out/system/initrd.target.wants/systemd-udev-trigger.service-  mkdir $out/system/sysinit.target.wants-  ln -s ../cryptsetup.target $out/system/sysinit.target.wants    # For some reason, running 'udevadm info --cleanup-db' in initrd causes   # LUKS devices to get SYSTEMD_READY=0 in stage 2 (but not other devices)   # which prevents LUKS encrypted file systems from being mounted in stage 2.   rm $out/system/initrd-udevadm-cleanup-db.service +  ln -s ../plymouth-start.service $out/system/initrd.target.wants/plymouth-start.service++  rm $out/system/proc-sys-fs-binfmt_misc.automount

These services were simply the ones that created errors during boot. I didn't spend much time trying to figure out why they caused errors.

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

 in       {         symlink = "/etc/modules-load.d/nixos.conf";         object = pkgs.writeText "nixos.conf"-          (lib.concatStringsSep "\n" (config.boot.initrd.availableKernelModules ++ config.boot.initrd.kernelModules));+          (lib.concatStringsSep "\n" config.boot.initrd.kernelModules);

No, including availableKernelModules was a mistake in my code in the first place. NixOS has never auto-loaded those; they're there for the kernel to request to be loaded if needed.

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

 in             noCheck = true; # fsck fails on a r/o filesystem           };       });+    boot.initrd.extraUnits."rw-store.service" = lib.mkIf cfg.writableStore (pkgs.writeText "rw-store.service" ''

I thought about this, but I wasn't 100% sure if that would be too much. I'll look into it...

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

+{ writeShellScriptBin, patchelf }:

find-libs gets removed in a later commit. The rust program handles that work now.

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

+{ rustPlatform }:

TIL, will do.

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

Pull request review commentNixOS/nixpkgs

[WIP]: initrd: Use systemd

+use std::collections::{HashSet, VecDeque};

Agreed

ElvishJerricco

comment created time in 23 days

PullRequestReviewEvent

issue commentmuennich/physlock

Switch off screen after timeout

@jluttine For me, this just blanks the screen but leaves it powered on. It never enters a powersave mode

cig0

comment created time in 23 days

Pull request review commentNixOS/nixpkgs

nixos/amazonImageZfs: init

+# Note: This is a private API, internal to NixOS. Its interface is subject+# to change without notice.+#+# The result of this builder is two disk images:+#+#  * `boot` - a small disk formatted with FAT to be used for /boot. FAT is+#    chosen to support EFI.+#  * `root` - a larger disk with a zpool taking the entire disk.+#+# This two-disk approach is taken to satisfy ZFS's requirements for+# autoexpand.+#+# # Why doesn't autoexpand work with ZFS in a partition?+#+# When ZFS owns the whole disk doesn’t really use a partition: it has+# a marker partition at the start and a marker partition at the end of+# the disk.+#+# If ZFS is constrained to a partition, ZFS leaves expanding the partition+# up to the user. Obviously, the user may not choose to do so.+#+# Once the user expands the partition, calling zpool online -e expands the+# vdev to use the whole partition. It doesn’t happen automatically+# presumably because zed doesn’t get an event saying it’s partition grew,+# whereas it can and does get an event saying the whole disk it is on is+# now larger.+{ lib+, pkgs+, # The NixOS configuration to be installed onto the disk image.+  config++, # size of the FAT boot disk, in megabytes.+  bootSize ? 1024++, # The size of the root disk, in megabytes.+  rootSize ? 2048++, # The name of the ZFS pool+  rootPoolName ? "tank"++, # zpool properties+  rootPoolProperties ? {+    autoexpand = "on";+  }+, # pool-wide filesystem properties+  rootPoolFilesystemProperties ? {+    acltype = "posixacl";+    atime = "off";+    compression = "on";+    mountpoint = "legacy";+    xattr = "sa";+  }++, # datasets, with per-attribute options:+  # mount: (optional) mount point in the VM+  # properties: (optional) ZFS properties on the dataset, like filesystemProperties+  # Notes:+  # 1. datasets will be created from shorter to longer names as a simple topo-sort+  # 2. you should define a root's dataset's mount for `/`+  datasets ? { }++, # The files and directories to be placed in the target file system.+  # This is a list of attribute sets {source, target} where `source'+  # is the file system object (regular file or directory) to be+  # grafted in the file system at path `target'.+  contents ? []++, # The initial NixOS configuration file to be copied to+  # /etc/nixos/configuration.nix. This configuration will be embedded+  # inside a configuration which includes the described ZFS fileSystems.+  configFile ? null++, # Shell code executed after the VM has finished.+  postVM ? ""++, name ? "nixos-disk-image"++, # Disk image format, one of qcow2, qcow2-compressed, vdi, vpc, raw.+  format ? "raw"++, # Include a copy of Nixpkgs in the disk image+  includeChannel ? true+}:+let+  formatOpt = if format == "qcow2-compressed" then "qcow2" else format;++  compress = lib.optionalString (format == "qcow2-compressed") "-c";++  filenameSuffix = "." + {+    qcow2 = "qcow2";+    vdi = "vdi";+    vpc = "vhd";+    raw = "img";+  }.${formatOpt} or formatOpt;+  bootFilename = "nixos.boot${filenameSuffix}";+  rootFilename = "nixos.root${filenameSuffix}";++  # FIXME: merge with channel.nix / make-channel.nix.+  channelSources =+    let+      nixpkgs = lib.cleanSource pkgs.path;+    in+      pkgs.runCommand "nixos-${config.system.nixos.version}" {} ''+        mkdir -p $out+        cp -prd ${nixpkgs.outPath} $out/nixos+        chmod -R u+w $out/nixos+        if [ ! -e $out/nixos/nixpkgs ]; then+          ln -s . $out/nixos/nixpkgs+        fi+        rm -rf $out/nixos/.git+        echo -n ${config.system.nixos.versionSuffix} > $out/nixos/.version-suffix+      '';++  closureInfo = pkgs.closureInfo {+    rootPaths = [ config.system.build.toplevel ]+    ++ (lib.optional includeChannel channelSources);+  };++  modulesTree = pkgs.aggregateModules+    (with config.boot.kernelPackages; [ kernel zfs ]);++  tools = lib.makeBinPath (+    with pkgs; [+      config.system.build.nixos-enter+      config.system.build.nixos-install+      dosfstools+      e2fsprogs+      gptfdisk+      nix+      parted+      utillinux+      zfs+    ]+  );++  stringifyProperties = prefix: properties: lib.concatStringsSep " \\\n" (+    lib.mapAttrsToList+      (+        property: value: "${prefix} ${lib.escapeShellArg property}=${lib.escapeShellArg value}"+      )+      properties+  );++  featuresToProperties = features:+    lib.listToAttrs+      (builtins.map (feature: {+        name = "feature@${feature}";+        value = "enabled";+      }) features);++  createDatasets =+    let+      datasetlist = lib.mapAttrsToList lib.nameValuePair datasets;+      sorted = lib.sort (left: right: (lib.stringLength left.name) < (lib.stringLength right.name)) datasetlist;+      cmd = { name, value }:+        let+          properties = stringifyProperties "-o" (value.properties or {});+        in+          "zfs create -p ${properties} ${name}";+    in+      lib.concatMapStringsSep "\n" cmd sorted;++  mountDatasets =+    let+      datasetlist = lib.mapAttrsToList lib.nameValuePair datasets;+      mounts = lib.filter ({ value, ... }: value ? "mount") datasetlist;+      sorted = lib.sort (left: right: (lib.stringLength left.value.mount) < (lib.stringLength right.value.mount)) datasetlist;

Was this line meant to refer to mounts rather than datasetlist?

grahamc

comment created time in a month

PullRequestReviewEvent

pull request commentobsidiansystems/nix-thunk

Bump to nixos-21.05

@ali-abrar Is there a reason this can't be merged?

ElvishJerricco

comment created time in a month

push eventobsidiansystems/nix-thunk

Will Fancher

commit sha 9ec8016c6a421c5c810573ebbef559164bb17d47

Bump to nixos-21.05 Enables building on aarch64

view details

push time in a month

pull request commentobsidiansystems/nix-thunk

Bump to nixos-21.05

It's possible we can get rid of some of those overrides in haskellPackages, but I didn't test any of that. Should we?

ElvishJerricco

comment created time in a month

PR opened obsidiansystems/nix-thunk

Bump to nixos-21.05

Enables building on aarch64

+20 -1

0 comment

4 changed files

pr created time in a month

create barnchobsidiansystems/nix-thunk

branch : bump-nixos-21.05

created branch time in a month

PR opened obsidiansystems/nix-thunk

Bump the cryptonite version bound.

This fixes haskellPackages.nix-thunk on nixos-unstable.

+1 -1

0 comment

1 changed file

pr created time in a month

create barnchobsidiansystems/nix-thunk

branch : bump-cryptonite

created branch time in a month

issue commentNixOS/nixpkgs

nixos-install fails with getting attributes of path /nix/store/...: No such file or directory

Yep, the issue only happens if you attempt to copy a fixed output derivation from a substituter into a chroot store. It's kind of rare but very unpleasant for people who try to do this thing that should work during installation.

Artturin

comment created time in 2 months