update.sh -a flag
This commit is contained in:
parent
1ae0876f24
commit
a3022ddf1b
3 changed files with 66 additions and 45 deletions
6
flake.lock
generated
6
flake.lock
generated
|
@ -8,11 +8,11 @@
|
|||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689941025,
|
||||
"narHash": "sha256-m2EC7dvTnxK0pTUsD+phMvPp2O8DmW+bGUL0UefIQIA=",
|
||||
"lastModified": 1690221957,
|
||||
"narHash": "sha256-L3dFV5r9zBToDYxQdlkJCQ6T1iqtFIqkeovS2r7Udl0=",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"rev": "ff78ecd88b5e8c15b274c71560f68ab431eeb94f",
|
||||
"rev": "9fb94a348179ee0074beeac2dce2d30f18588e4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
89
nix/home-manager/flake.lock
generated
89
nix/home-manager/flake.lock
generated
|
@ -76,11 +76,11 @@
|
|||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -118,11 +118,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689891262,
|
||||
"narHash": "sha256-Pc4wDczbdgd6QXKJIXprgxe7L9AVDsoAkMnvm5vmpUU=",
|
||||
"lastModified": 1690269402,
|
||||
"narHash": "sha256-SybA24IOGigiHfcTB5eBge4UZQI6a0z8Ah+EzD17tdk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ee5673246de0254186e469935909e821b8f4ec15",
|
||||
"rev": "0306d5ed7e9d1662b55ec0d08afc73d4cb5eadca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -186,6 +186,29 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixneovim",
|
||||
"nixneovimplugins",
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688870561,
|
||||
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-index-database": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -193,11 +216,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689479461,
|
||||
"narHash": "sha256-Ak+PTYdmfOQEmcOsOEnrwqdP0HP20PLraRwpjSAzSeE=",
|
||||
"lastModified": 1690083300,
|
||||
"narHash": "sha256-xnUtWO/5TuuHkIpmzMXGvHJqS06FSVADnAZ4bvqO4Zo=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "22fa44b7f14684d184733fb26a628f3878ff7aaf",
|
||||
"rev": "c1e6fc40dd5c0d16940bc012421268b94e404b0b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -221,11 +244,11 @@
|
|||
"nmt": "nmt"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689862877,
|
||||
"narHash": "sha256-0vArJ5uVEdGzl61u5RSu4MbWqpFjySV679RumpEB1jo=",
|
||||
"lastModified": 1690121915,
|
||||
"narHash": "sha256-mvWuOWD1EpxaZctGSnDgPuXHAtTQZ5HL2wicCqQtnXM=",
|
||||
"owner": "nixneovim",
|
||||
"repo": "nixneovim",
|
||||
"rev": "64ca3e071695fbdb2780a42d70f147ccb804b019",
|
||||
"rev": "27b8d112919edd010904f4b9c9935964c102570b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -247,11 +270,11 @@
|
|||
"poetry2nix": "poetry2nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689849962,
|
||||
"narHash": "sha256-6Y28NRAKzXl0o2CFJDRhJtm1SZGsb8gSaOK26D8AtMk=",
|
||||
"lastModified": 1690121857,
|
||||
"narHash": "sha256-kHdYv8cJ4jtcJd6wcvzJsJpgho9FBFYpf+JwvS7mVGM=",
|
||||
"owner": "nixneovim",
|
||||
"repo": "nixneovimplugins",
|
||||
"rev": "14c6568f49b41a08d02fab22c7ca3e065cae235d",
|
||||
"rev": "a300de1f2217e9693048ea361d7059e833819f64",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -310,26 +333,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1682243003,
|
||||
"narHash": "sha256-3B162/r0TtiU+/qUN4pWrd6BDRiQyfRJGHVbyVGPTTM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c767200ef42f9b79e184d53454b13e0ab6ddb641",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1689850295,
|
||||
"narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=",
|
||||
"lastModified": 1690179384,
|
||||
"narHash": "sha256-+arbgqFTAtoeKtepW9wCnA0njCOyoiDFyl0Q0SBSOtE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0",
|
||||
"rev": "b12803b6d90e2e583429bb79b859ca53c348b39a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -374,14 +382,19 @@
|
|||
"poetry2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"nixneovim",
|
||||
"nixneovimplugins",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682132397,
|
||||
"narHash": "sha256-NbIdSrx3Y1NioEEvoaOTETNTpq6m6bfoxmEt/C8GLAQ=",
|
||||
"lastModified": 1689849924,
|
||||
"narHash": "sha256-d259Z2S7CS7Na04qQNQ6LYQILuI7cf4Rpe76qc4mz40=",
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"rev": "e2d2c7a31485aeb801fa85da2d0fa103dd5112ef",
|
||||
"rev": "1d7eda9336f336392d24e9602be5cb9be7ae405c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -424,7 +437,7 @@
|
|||
"home-manager": "home-manager",
|
||||
"nix-index-database": "nix-index-database",
|
||||
"nixneovim": "nixneovim",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
|
|
@ -5,10 +5,14 @@ do_devenv() {
|
|||
nix flake update
|
||||
popd || return
|
||||
}
|
||||
do_home_manager() {
|
||||
update_home_manager() {
|
||||
pushd ./home-manager || return
|
||||
printf "Updating \033[38;5;87mhome-manager\033[0m\n"
|
||||
nix flake update
|
||||
popd || return
|
||||
}
|
||||
apply_home_manager() {
|
||||
pushd ./home-manager || return
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
home-manager switch --flake ".#aarch64-darwin-acicchetti"
|
||||
else
|
||||
|
@ -18,16 +22,20 @@ do_home_manager() {
|
|||
}
|
||||
|
||||
OPTIND=1
|
||||
while getopts dh opt; do
|
||||
while getopts dha opt; do
|
||||
case $opt in
|
||||
a)
|
||||
apply_home_manager
|
||||
;;
|
||||
d)
|
||||
do_devenv
|
||||
;;
|
||||
h)
|
||||
do_home_manager
|
||||
update_home_manager
|
||||
apply_home_manager
|
||||
;;
|
||||
*)
|
||||
"Ignoring unknown option. Please only pass -h or -d"
|
||||
"Ignoring unknown option. Please only pass -a, -d, or -h"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue