From f97df79d23db9529e2eabadcebde4db1f3e1b01f Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Fri, 1 Mar 2024 09:56:02 -0300 Subject: [PATCH] electra: install awscli, awscli-console, drush declaratively --- flake.lock | 85 +++++++++++++++++++++++------ flake.nix | 1 + home/misterio/electra.nix | 8 ++- home/misterio/features/cli/fish.nix | 3 +- 4 files changed, 78 insertions(+), 19 deletions(-) diff --git a/flake.lock b/flake.lock index 49869f87..e86dcdc7 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,24 @@ { "nodes": { + "awscli-console": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1709229530, + "narHash": "sha256-+raEESP9n/mv+mfPZ7Ia1Srn2lTo/NtloV6SqcXOYwQ=", + "owner": "misterio77", + "repo": "awscli-console", + "rev": "4cad65fffcfc0cf547c448c805fe1d980315da31", + "type": "github" + }, + "original": { + "owner": "misterio77", + "repo": "awscli-console", + "type": "github" + } + }, "base16-schemes": { "flake": false, "locked": { @@ -51,7 +70,7 @@ }, "disconic": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay" }, "locked": { @@ -182,7 +201,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1681202837, @@ -215,7 +234,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1681202837, @@ -272,7 +291,7 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2", + "systems": "systems_3", "wlroots": "wlroots", "xdph": "xdph" }, @@ -505,11 +524,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1686331006, - "narHash": "sha256-hElRDWUNG655aqF0awu+h5cmDN+I/dQcChRt2tGuGGU=", + "lastModified": 1704290814, + "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85bcb95aa83be667e562e781e9d186c57a07d757", + "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", "type": "github" }, "original": { @@ -553,6 +572,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1686331006, + "narHash": "sha256-hElRDWUNG655aqF0awu+h5cmDN+I/dQcChRt2tGuGGU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "85bcb95aa83be667e562e781e9d186c57a07d757", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1707863367, "narHash": "sha256-LdBbCSSP7VHaHA4KXcPGKqkvsowT2+7W4jlEHJj6rPg=", @@ -568,7 +603,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1701263465, "narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=", @@ -584,7 +619,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1701539137, "narHash": "sha256-nVO/5QYpf1GwjvtpXhyxx5M3U/WN0MwBro4Lsk+9mL0=", @@ -600,7 +635,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1670543317, "narHash": "sha256-4mMR56rtxKr+Gwz399jFr4i76SQZxsLWxxyfQlPXRm0=", @@ -618,7 +653,7 @@ }, "paste-misterio-me": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1701655110, @@ -636,6 +671,7 @@ }, "root": { "inputs": { + "awscli-console": "awscli-console", "disconic": "disconic", "firefly": "firefly", "firefox-addons": "firefox-addons", @@ -650,7 +686,7 @@ "nix-gaming": "nix-gaming", "nix-minecraft": "nix-minecraft", "nixos-mailserver": "nixos-mailserver", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "paste-misterio-me": "paste-misterio-me", "sops-nix": "sops-nix", "website": "website", @@ -718,6 +754,21 @@ } }, "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -732,7 +783,7 @@ "type": "github" } }, - "systems_3": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -747,7 +798,7 @@ "type": "github" } }, - "systems_4": { + "systems_5": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -779,8 +830,8 @@ }, "website": { "inputs": { - "nixpkgs": "nixpkgs_4", - "systems": "systems_4" + "nixpkgs": "nixpkgs_5", + "systems": "systems_5" }, "locked": { "lastModified": 1701796877, @@ -847,7 +898,7 @@ }, "yrmos": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1697654110, diff --git a/flake.nix b/flake.nix index 6ea82e84..5a3cc04e 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ website.url = "github:misterio77/website"; paste-misterio-me.url = "github:misterio77/paste.misterio.me"; yrmos.url = "github:misterio77/yrmos"; + awscli-console.url = "github:misterio77/awscli-console"; }; outputs = { self, nixpkgs, home-manager, ... }@inputs: diff --git a/home/misterio/electra.nix b/home/misterio/electra.nix index a370d210..271e0a9d 100644 --- a/home/misterio/electra.nix +++ b/home/misterio/electra.nix @@ -1,4 +1,4 @@ -{ inputs, outputs, lib, ... }: let +{ inputs, outputs, lib, pkgs, ... }: let inherit (inputs.nix-colors) colorSchemes; in { imports = [ @@ -32,4 +32,10 @@ in { ]; # programs.git.userEmail = "gabriel@zoocha.com"; + + home.packages = [ + pkgs.drush + pkgs.inputs.awscli-console.default + ]; + programs.awscli.enable = true; } diff --git a/home/misterio/features/cli/fish.nix b/home/misterio/features/cli/fish.nix index 80cf23b1..cd65517f 100644 --- a/home/misterio/features/cli/fish.nix +++ b/home/misterio/features/cli/fish.nix @@ -11,6 +11,7 @@ let hasNeomutt = config.programs.neomutt.enable; hasShellColor = config.programs.shellcolor.enable; hasKitty = config.programs.kitty.enable; + hasAwsCli = config.programs.awscli.enable; shellcolor = "${pkgs.shellcolord}/bin/shellcolor"; in { @@ -52,7 +53,7 @@ in cik = mkIf hasKitty "clone-in-kitty --type os-window"; ck = cik; - aws-switch = ''eval "export AWS_PROFILE=$(aws configure list-profiles | fzf --height=6)"''; + aws-switch = mkIf hasAwsCli "export AWS_PROFILE=(aws configure list-profiles | fzf)"; awssw = aws-switch; }; shellAliases = {