mirror of
https://github.com/morten-olsen/nixos-config.git
synced 2026-02-08 00:36:27 +01:00
flake.lock: Update
Flake lock file updates:
• Updated input 'home-manager':
'github:nix-community/home-manager/d9b88b43524db1591fb3d9410a21428198d75d49' (2023-09-13)
→ 'github:nix-community/home-manager/408ba13188ff9ce309fa2bdd2f81287d79773b00' (2023-09-20)
• Updated input 'home-manager/nixpkgs':
'github:NixOS/nixpkgs/3a2786eea085f040a66ecde1bc3ddc7099f6dbeb' (2023-09-11)
→ 'github:NixOS/nixpkgs/970a59bd19eff3752ce552935687100c46e820a5' (2023-09-17)
• Updated input 'nixos-hardware':
'github:NixOS/nixos-hardware/570256327eb6ca6f7bebe8d93af49459092a0c43' (2023-09-14)
→ 'github:NixOS/nixos-hardware/cb4dc98f776ddb6af165e6f06b2902efe31ca67a' (2023-09-19)
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/ace5093e36ab1e95cb9463863491bee90d5a4183' (2023-09-15)
→ 'github:NixOS/nixpkgs/5ba549eafcf3e33405e5f66decd1a72356632b96' (2023-09-19)
• Updated input 'nur':
'github:nix-community/NUR/9b70f21fd41d3b96580e7ca4a3d1c29e87bdab36' (2023-09-15)
→ 'github:nix-community/NUR/41797d553c8bc067fa3db0681db940b135590ab5' (2023-09-21)
This commit is contained in:
30
flake.lock
generated
30
flake.lock
generated
@@ -5,11 +5,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694643239,
|
"lastModified": 1695224363,
|
||||||
"narHash": "sha256-pv2k/5FvyirDE8g4TNehzwZ0T4UOMMmqWSQnM/luRtE=",
|
"narHash": "sha256-+hfjJLUMck5G92RVFDZA7LWkR3kOxs5zQ7RPW9t3eM8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d9b88b43524db1591fb3d9410a21428198d75d49",
|
"rev": "408ba13188ff9ce309fa2bdd2f81287d79773b00",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694710316,
|
"lastModified": 1695109627,
|
||||||
"narHash": "sha256-uRh46iIC86D8BD1wCDA5gRrt+hslUXiD0kx/UjnjBcs=",
|
"narHash": "sha256-4rpyoVzmunIG6xWA/EonnSSqC69bDBzciFi6SjBze/0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "570256327eb6ca6f7bebe8d93af49459092a0c43",
|
"rev": "cb4dc98f776ddb6af165e6f06b2902efe31ca67a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -35,11 +35,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694422566,
|
"lastModified": 1694959747,
|
||||||
"narHash": "sha256-lHJ+A9esOz9vln/3CJG23FV6Wd2OoOFbDeEs4cMGMqc=",
|
"narHash": "sha256-CXQ2MuledDVlVM5dLC4pB41cFlBWxRw4tCBsFrq3cRk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb",
|
"rev": "970a59bd19eff3752ce552935687100c46e820a5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -51,11 +51,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694767346,
|
"lastModified": 1695145219,
|
||||||
"narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=",
|
"narHash": "sha256-Eoe9IHbvmo5wEDeJXKFOpKUwxYJIOxKUesounVccNYk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ace5093e36ab1e95cb9463863491bee90d5a4183",
|
"rev": "5ba549eafcf3e33405e5f66decd1a72356632b96",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -67,11 +67,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694814340,
|
"lastModified": 1695329094,
|
||||||
"narHash": "sha256-eo9444JGI/G9jZF+X3xmS5TMRuIT4VYPKyZQ11iF65Q=",
|
"narHash": "sha256-IQSMk3jr38WwEV9VvcipUELaqmSpE97XO0KEzLgbOqM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "9b70f21fd41d3b96580e7ca4a3d1c29e87bdab36",
|
"rev": "41797d553c8bc067fa3db0681db940b135590ab5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
31
os.sh
31
os.sh
@@ -1,4 +1,13 @@
|
|||||||
|
|
||||||
|
function help() {
|
||||||
|
echo "Usage: $0 {apply|upgrade|init} [name]"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
help
|
||||||
|
fi
|
||||||
|
|
||||||
ACTION=$1; shift
|
ACTION=$1; shift
|
||||||
LOCATION=$PWD
|
LOCATION=$PWD
|
||||||
|
|
||||||
@@ -14,6 +23,8 @@ function apply() {
|
|||||||
function upgrade() {
|
function upgrade() {
|
||||||
if git -C "$LOCATION" diff-index --quiet HEAD --; then
|
if git -C "$LOCATION" diff-index --quiet HEAD --; then
|
||||||
nix flake update --commit-lock-file "$LOCATION"
|
nix flake update --commit-lock-file "$LOCATION"
|
||||||
|
apply $1
|
||||||
|
cleanup
|
||||||
else
|
else
|
||||||
echo "Error: git working tree is dirty"
|
echo "Error: git working tree is dirty"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -21,18 +32,32 @@ function upgrade() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
amount=${1:-"7d"}
|
||||||
|
nix-env --delete-generations "$amount"
|
||||||
nix-collect-garbage -d
|
nix-collect-garbage -d
|
||||||
nixos-store --optimise
|
nix-store --optimise
|
||||||
|
nix-store --verify --check-contents --repair
|
||||||
|
}
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
mkdir -p "$LOCATION"
|
||||||
|
git clone "https://github.com/morten-olsen/home-server.git" "$LOCATION"
|
||||||
}
|
}
|
||||||
|
|
||||||
case $ACTION in
|
case $ACTION in
|
||||||
|
init)
|
||||||
|
init $1
|
||||||
|
;;
|
||||||
apply)
|
apply)
|
||||||
apply $1
|
apply $1
|
||||||
;;
|
;;
|
||||||
upgrade)
|
upgrade)
|
||||||
upgrade $1
|
upgrade $1
|
||||||
;;
|
;;
|
||||||
|
cleanup)
|
||||||
|
cleanup $1
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {apply}"
|
help
|
||||||
exit 1
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
Reference in New Issue
Block a user