~kaction/config

82255cb3f7b48a97c93ef2d72339d2eb66c31135 — Dmitry Bogatov 2 months ago 95deacd
Add terraform(1) into the universe set
4 files changed, 30 insertions(+), 1 deletions(-)

M flake.lock
M flake.nix
M universe/default.nix
M universe/posixrc/init.sh
M flake.lock => flake.lock +16 -0
@@ 1,5 1,20 @@
{
  "nodes": {
    "future": {
      "locked": {
        "lastModified": 1625865946,
        "narHash": "sha256-0GzAVzSf5DIsCw83oZnw74BzNAcEce2dve+YJdjkaEQ=",
        "rev": "95726968d92a53f9f2836defe19378ef4f48773c",
        "revCount": 301386,
        "type": "git",
        "url": "https://github.com/nixos/nixpkgs"
      },
      "original": {
        "rev": "95726968d92a53f9f2836defe19378ef4f48773c",
        "type": "git",
        "url": "https://github.com/nixos/nixpkgs"
      }
    },
    "mk-passwd": {
      "inputs": {
        "nixpkgs": "nixpkgs"


@@ 84,6 99,7 @@
    },
    "root": {
      "inputs": {
        "future": "future",
        "mk-passwd": "mk-passwd",
        "nix-sys": "nix-sys",
        "nixpkgs": "nixpkgs_3"

M flake.nix => flake.nix +6 -1
@@ 6,13 6,16 @@
{
  description = "Personal flake of ~kaction";
  inputs.nixpkgs.url = "git+https://github.com/nixos/nixpkgs?tag=20.09";
  inputs.future.url =
    "git+https://github.com/nixos/nixpkgs?rev=95726968d92a53f9f2836defe19378ef4f48773c";
  inputs.mk-passwd.url = "git+https://git.sr.ht/~kaction/mk-passwd?tag=0.1.1";
  inputs.nix-sys.url =
    "git+https://git.sr.ht/~kaction/nix-sys?rev=fbc860acdae3c716d50d8844ac52a57ccb76e61e";
  outputs = { self, nixpkgs, mk-passwd, nix-sys }:
  outputs = { self, nixpkgs, mk-passwd, nix-sys, future }:
    let
      system = "x86_64-linux"; # See note [On supported architectures]
      pkgs = import nixpkgs { inherit system; };
      future' = import future { inherit system; };

      # Set of packages provided by nixpkgs with all atrribute names
      # prefixed with "pristine-". Makes writing derivations that need


@@ 64,6 67,8 @@
        in pkgs // pristine // rebuilded // { # nixfmt: sort
          inherit (pkgs.pkgsStatic) execline;
          inherit system;
          inherit (future') terraform;

          Documentation =
            callPackage ./universe/Documentation { inherit nixpkgs; };
          attach-shell = call ./universe/attach-shell;

M universe/default.nix => universe/default.nix +1 -0
@@ 66,6 66,7 @@ buildEnv {
    strace # When things break, and they break all the time.
    surfraw
    tig
    terraform
    tree # Useful to inspect result of Nix derivation build
    trezord
    uenv

M universe/posixrc/init.sh => universe/posixrc/init.sh +7 -0
@@ 2,6 2,13 @@ alias ls='ls --color=auto'
alias cd-root='cd "$(git root)"'
alias gh='GITHUB_TOKEN=`ask https://kaction@github.com` command gh'

terraform() {
	AWS_ACCESS_KEY_ID=`ask https://dbogatov@aws.amazon.com/public` \
	AWS_SECRET_ACCESS_KEY=`ask https://dbogatov@aws.amazon.com/private` \
	AWS_DEFAULT_REGION=us-west-2 \
	command terraform "$@"
}

vidir() {
	if [ $# = 0 ] ; then
		find -maxdepth 1 -not -name .git -and -not -name . | command vidir -