fixup all kinds of bugs

This commit is contained in:
steveej 2022-01-09 21:50:41 +01:00
parent 02bb843015
commit acc37c64f9
10 changed files with 45 additions and 31 deletions

View file

@ -20,6 +20,7 @@ _get_nix_path versionsPath:
_device recipe dir +moreargs="": _device recipe dir +moreargs="":
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex set -ex
unset NIX_PATH
source $(just -v _get_nix_path {{invocation_directory()}}/{{dir}}/versions.nix) source $(just -v _get_nix_path {{invocation_directory()}}/{{dir}}/versions.nix)
$(set -x; nix-build --no-link --show-trace $(dirname {{dir}})/default.nix -A recipes.{{recipe}} --argstr dir {{dir}} {{moreargs}}) $(set -x; nix-build --no-link --show-trace $(dirname {{dir}})/default.nix -A recipes.{{recipe}} --argstr dir {{dir}} {{moreargs}})

View file

@ -10,14 +10,14 @@ let
inherit name; inherit name;
inherit (channelVersion) url ref rev; inherit (channelVersion) url ref rev;
}; };
nixPath = builtins.foldl' (path: elemName: nixPath = builtins.concatStringsSep ":" (builtins.map (elemName:
let let
elem = builtins.getAttr elemName channelVersions; elem = builtins.getAttr elemName channelVersions;
elemPath = (mkChannelSource elemName); elemPath = (mkChannelSource elemName);
suffix = if builtins.hasAttr "suffix" elem then elem.suffix else ""; suffix = if builtins.hasAttr "suffix" elem then elem.suffix else "";
in in
path + ":" + builtins.concatStringsSep "=" [ elemName elemPath ] + suffix builtins.concatStringsSep "=" [ elemName elemPath ] + suffix
) "" (builtins.attrNames channelVersions); ) (builtins.attrNames channelVersions));
pkgs = import (mkChannelSource "nixpkgs") {}; pkgs = import (mkChannelSource "nixpkgs") {};
in in

View file

@ -3,22 +3,14 @@
}: }:
let let
unstablepkgs = import <channels-nixos-unstable> {};
in { in {
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
}; };
nixpkgs.config = {
pidgin = {
openssl = true;
gnutls = true;
};
};
programs.neovim = { programs.neovim = {
enable = true; enable = false;
extraPython3Packages = (ps: with ps; [ ]); extraPython3Packages = (ps: with ps; [ ]);
@ -134,6 +126,6 @@ in {
# misc syntax support # misc syntax support
vim-bazel maktaba vim-bazel maktaba
]) ])
; ;
}; };
} }

View file

@ -469,7 +469,7 @@ in
enable = true; enable = true;
extensions = [] extensions = []
++ packagedExtensions ++ packagedExtensions
# ++ marketPlaceExtensions # ++ marketPlaceExtensions
; ;
}; };
} }

View file

@ -53,6 +53,7 @@ in rec {
sudo -E $SHELL <<EOF sudo -E $SHELL <<EOF
# 'having $system set breaks nixos-install' # 'having $system set breaks nixos-install'
unset system unset system
echo $NIX_PATH
nixos-install --max-jobs 5 --cores 4 --no-root-passwd --root ${mntRootVol}/nixos nixos-install --max-jobs 5 --cores 4 --no-root-passwd --root ${mntRootVol}/nixos
EOF EOF
''; '';

View file

@ -1,8 +1,8 @@
let let
nixpkgs = { nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-21.05"; ref = "nixos-21.11";
rev = "5de44c15758465f8ddf84d541ba300b48e56eda4"; rev = "00acdb2aa817048fbe1f91ece18fe7de09762531";
}; };
in in
@ -12,19 +12,25 @@ in
suffix = "/nixos"; suffix = "/nixos";
}; };
"channels-nixos-stable" = nixpkgs; "channels-nixos-stable" = nixpkgs;
# "channels-nixos-21.05" = {
# url = "https://github.com/NixOS/nixpkgs/";
# ref = "nixos-21.05";
# rev = "88579effa7e88c25087faf6de6388d0cd1738dc0";
# };
"channels-nixos-unstable" = { "channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable"; ref = "nixos-unstable";
rev = "fbfb79400a08bf754e32b4d4fc3f7d8f8055cf94"; rev = "ff377a78794d412a35245e05428c8f95fef3951f";
}; };
"nixpkgs-master" = { "nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "master"; ref = "master";
rev = "7e529086a7ce588380178733a42ff2a293ac080c"; rev = "a85f163c46f4315df772946796a6527069789bc7";
}; };
"home-manager-module" = { "home-manager-module" = {
url = "https://github.com/nix-community/home-manager"; url = "https://github.com/nix-community/home-manager";
ref = "release-21.05"; ref = "release-21.11";
rev = "148d85ee8303444fb0116943787aa0b1b25f94df"; rev = "697cc8c68ed6a606296efbbe9614c32537078756";
}; };
} }

View file

@ -3,6 +3,7 @@ set -xe
INFILE="${1:?Please set arg1 to INFILE}" INFILE="${1:?Please set arg1 to INFILE}"
OUTFILE="${2:?Please set arg2 to OUTFILE}" OUTFILE="${2:?Please set arg2 to OUTFILE}"
# sha256-1fm94N2Y9ptXVN6ni0nJyPRK+nsvoeliqBcFyjlaTH4= # sha256-1fm94N2Y9ptXVN6ni0nJyPRK+nsvoeliqBcFyjlaTH4=
hash=$(nix-build ${INFILE} --arg pkgs 'import <channels-nixos-stable> {}' --arg config 'null' 2>&1 | rg -o 'got.*(sha256-.{44})' -r '$1') # sha256:0zjcb8wwl18pm1ifk89gggx4mx68r54qp9yyaibrpxlqvphbvyfm
hash=$(nix-build ${INFILE} --arg pkgs 'import <channels-nixos-stable> {}' --arg config 'null' 2>&1 | rg -o 'got.*(sha256[:-].+)$' -r '$1')
sed -E "s/0{52}/${hash}/" ${INFILE} > ${OUTFILE} sed -E "s/0{52}/${hash}/" ${INFILE} > ${OUTFILE}

View file

@ -1,8 +1,8 @@
let let
nixpkgs = { nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-20.09"; ref = "nixos-21.11";
rev = "51aaa3fa1b69559456f9bd4968bd5b179a784f67"; rev = "00acdb2aa817048fbe1f91ece18fe7de09762531";
}; };
in in
@ -12,19 +12,25 @@ in
suffix = "/nixos"; suffix = "/nixos";
}; };
"channels-nixos-stable" = nixpkgs; "channels-nixos-stable" = nixpkgs;
# "channels-nixos-21.05" = {
# url = "https://github.com/NixOS/nixpkgs/";
# ref = "nixos-21.05";
# rev = "88579effa7e88c25087faf6de6388d0cd1738dc0";
# };
"channels-nixos-unstable" = { "channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable"; ref = "nixos-unstable";
rev = "24c9b05ac53e422f1af81a156f1fd58499eb27fb"; rev = "ff377a78794d412a35245e05428c8f95fef3951f";
}; };
"nixpkgs-master" = { "nixpkgs-master" = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "master"; ref = "master";
rev = "3312e1c3ba80506c435876f016d7b3888f297c4e"; rev = "2ac65dd85b7fbe81b88e3c2a80d351aba4c4a9d8";
}; };
"home-manager-module" = { "home-manager-module" = {
url = "https://github.com/nix-community/home-manager"; url = "https://github.com/nix-community/home-manager";
ref = "release-20.09"; ref = "release-21.11";
rev = "7339784e07217ed0232e08d1ea33b610c94657d8"; rev = "697cc8c68ed6a606296efbbe9614c32537078756";
}; };
} }

View file

@ -1,8 +1,8 @@
let let
nixpkgs = { nixpkgs = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-21.05"; ref = "nixos-21.11";
rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.05 | awk '{ print $1 }' | tr -d '\n' -%>"; rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
}; };
in in
@ -12,6 +12,12 @@ in
suffix = "/nixos"; suffix = "/nixos";
}; };
"channels-nixos-stable" = nixpkgs; "channels-nixos-stable" = nixpkgs;
# "channels-nixos-21.05" = {
# url = "https://github.com/NixOS/nixpkgs/";
# ref = "nixos-21.05";
# rev = "<% git ls-remote https://github.com/nixos/nixpkgs nixos-21.05 | awk '{ print $1 }' | tr -d '\n' -%>";
# };
"channels-nixos-unstable" = { "channels-nixos-unstable" = {
url = "https://github.com/NixOS/nixpkgs/"; url = "https://github.com/NixOS/nixpkgs/";
ref = "nixos-unstable"; ref = "nixos-unstable";
@ -24,7 +30,7 @@ in
}; };
"home-manager-module" = { "home-manager-module" = {
url = "https://github.com/nix-community/home-manager"; url = "https://github.com/nix-community/home-manager";
ref = "release-21.05"; ref = "release-21.11";
rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-21.05 | awk '{ print $1 }' | tr -d '\n' -%>"; rev = "<% git ls-remote https://github.com/nix-community/home-manager.git release-21.11 | awk '{ print $1 }' | tr -d '\n' -%>";
}; };
} }

View file

@ -15,6 +15,7 @@ stdenv.mkDerivation {
vcsh vcsh
gnupg gnupg
git git
nixUnstable
vncdo vncdo
tesseract tesseract