mirror of
https://github.com/0x1d/nix.git
synced 2025-12-14 22:02:25 +01:00
Add command to update release channel
This commit is contained in:
19
ctl.sh
19
ctl.sh
@@ -7,6 +7,7 @@
|
|||||||
##
|
##
|
||||||
## test Rebuild and test OS without new generation
|
## test Rebuild and test OS without new generation
|
||||||
## rebuild Rebuild OS and create new generation
|
## rebuild Rebuild OS and create new generation
|
||||||
|
## channel Set release channel
|
||||||
## upgrade Upgrade channels and rebuild OS
|
## upgrade Upgrade channels and rebuild OS
|
||||||
## changes Show changes between generations
|
## changes Show changes between generations
|
||||||
## gc Garbage collect old generations
|
## gc Garbage collect old generations
|
||||||
@@ -54,6 +55,14 @@ function os {
|
|||||||
sudo nix-channel --update
|
sudo nix-channel --update
|
||||||
sudo nixos-rebuild --upgrade --flake ./os#${1} switch
|
sudo nixos-rebuild --upgrade --flake ./os#${1} switch
|
||||||
}
|
}
|
||||||
|
function channel {
|
||||||
|
sudo nix-channel --list
|
||||||
|
if [ -n "${1}" ]; then
|
||||||
|
echo "Set channel to ${1}"
|
||||||
|
sudo nix-channel --remove nixos
|
||||||
|
sudo nix-channel --add https://nixos.org/channels/nixos-${1} nixos
|
||||||
|
fi
|
||||||
|
}
|
||||||
function changes {
|
function changes {
|
||||||
nix profile diff-closures --profile /nix/var/nix/profiles/system
|
nix profile diff-closures --profile /nix/var/nix/profiles/system
|
||||||
}
|
}
|
||||||
@@ -99,13 +108,13 @@ function shell {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function repl {
|
function repl {
|
||||||
info
|
info
|
||||||
echo -e "\n${REDBOLD}Enter command...${EC}"
|
echo -e "\n${REDBOLD}Enter command...${EC}"
|
||||||
read -p '~> ';
|
read -p '~> '
|
||||||
clear
|
clear
|
||||||
./ctl.sh ${REPLY}
|
./ctl.sh ${REPLY}
|
||||||
read -p "Press any key to continue."
|
read -p "Press any key to continue."
|
||||||
repl
|
repl
|
||||||
}
|
}
|
||||||
|
|
||||||
${@:-info}
|
${@:-info}
|
||||||
|
|||||||
@@ -11,4 +11,8 @@
|
|||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"electron-24.8.6"
|
||||||
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
6
os/flake.lock
generated
6
os/flake.lock
generated
@@ -23,11 +23,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1688109178,
|
"lastModified": 1704290814,
|
||||||
"narHash": "sha256-BSdeYp331G4b1yc7GIRgAnfUyaktW2nl7k0C577Tttk=",
|
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b72aa95f7f096382bff3aea5f8fde645bca07422",
|
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -37,6 +37,8 @@
|
|||||||
hunspell
|
hunspell
|
||||||
hunspellDicts.de_CH
|
hunspellDicts.de_CH
|
||||||
imagemagick
|
imagemagick
|
||||||
|
ledger-live-desktop
|
||||||
|
solana-cli
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
Reference in New Issue
Block a user