general upgrades and adds adb and ulauncher addon
This commit is contained in:
parent
c0ab3d1517
commit
0b523463f2
@ -92,27 +92,28 @@ symlinks() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
sys_packages_upgrade() {
|
|
||||||
printfe "%s\n" "cyan" "Running NixOS channel update..."
|
|
||||||
sudo nix-channel --update
|
|
||||||
|
|
||||||
printfe "%s\n" "cyan" "Upgrading NixOS packages..."
|
|
||||||
cd $HOME/dotfiles/config/nixos && sudo nixos-rebuild switch --upgrade --flake .#$DOTF_HOSTNAME --impure
|
|
||||||
}
|
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Update packages
|
# Update packages
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
|
|
||||||
sys_packages() {
|
sys_packages() {
|
||||||
printfe "%s\n" "cyan" "Updating system packages..."
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
printfe "%s\n" "cyan" "Updating brew packages..."
|
||||||
brew update
|
brew update
|
||||||
brew upgrade
|
brew upgrade
|
||||||
brew cleanup
|
brew cleanup
|
||||||
else
|
else
|
||||||
if [ -x "$(command -v nixos-version)" ]; then
|
if [ -x "$(command -v nixos-version)" ]; then
|
||||||
cd $HOME/dotfiles/config/nixos && sudo nixos-rebuild switch --flake .#$DOTF_HOSTNAME --impure
|
printfe "%s\n" "cyan" "Updating nix channels..."
|
||||||
|
printfe "%s" "cyan" "System channels: "
|
||||||
|
sudo -i nix-channel --update
|
||||||
|
|
||||||
|
printfe "%s" "cyan" "User channels: "
|
||||||
|
nix-channel --update
|
||||||
|
|
||||||
|
printfe "%s\n" "cyan" "Updating nixos flake..."
|
||||||
|
cd $HOME/dotfiles/config/nixos && nix flake update
|
||||||
|
|
||||||
# Exit if this failed
|
# Exit if this failed
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
@ -121,6 +122,7 @@ sys_packages() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printfe "%s\n" "cyan" "Updating apt packages..."
|
||||||
sudo nala upgrade -y
|
sudo nala upgrade -y
|
||||||
sudo nala autoremove -y --purge
|
sudo nala autoremove -y --purge
|
||||||
fi
|
fi
|
||||||
@ -160,15 +162,8 @@ flatpakpkgs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
homemanager() {
|
homemanager() {
|
||||||
printfe "%s\n" "cyan" "Running Home Manager update..."
|
printfe "%s\n" "cyan" "Updating Home Manager flake..."
|
||||||
|
cd $HOME/dotfiles/config/home-manager && nix flake update
|
||||||
# Due to weirdness delete this file if it exists
|
|
||||||
if [ -f "$HOME/.config/mimeapps.list.backup" ]; then
|
|
||||||
echo "Removing mimeapps.list.backup"
|
|
||||||
rip "$HOME/.config/mimeapps.list.backup"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd $HOME/dotfiles/config/home-manager && NIXPKGS_ALLOW_UNFREE=1 home-manager switch -b backup --flake .#$DOTF_HOSTNAME --impure
|
|
||||||
}
|
}
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
@ -188,9 +183,6 @@ if [ "$#" -eq 0 ]; then
|
|||||||
else
|
else
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case $arg in
|
case $arg in
|
||||||
--nixos-upgrade)
|
|
||||||
sys_packages_upgrade
|
|
||||||
;;
|
|
||||||
--nixos|nixos|nix|nixos-rebuild)
|
--nixos|nixos|nix|nixos-rebuild)
|
||||||
sys_packages
|
sys_packages
|
||||||
;;
|
;;
|
||||||
|
8
bin/actions/upgrade.sh
Executable file
8
bin/actions/upgrade.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||||
|
|
||||||
|
printfe "%s\n" "cyan" "Upgrading NixOS packages..."
|
||||||
|
cd $HOME/dotfiles/config/nixos && sudo nixos-rebuild switch --upgrade --flake .#$DOTF_HOSTNAME --impure
|
||||||
|
|
||||||
|
printfe "%s\n" "cyan" "Upgrading Home Manager packages..."
|
||||||
|
cd $HOME/dotfiles/config/home-manager && NIXPKGS_ALLOW_UNFREE=1 home-manager switch -b backup --flake .#$DOTF_HOSTNAME --impure
|
10
bin/dotf
10
bin/dotf
@ -28,6 +28,15 @@ update() {
|
|||||||
"$update_script" $@
|
"$update_script" $@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
upgrade() {
|
||||||
|
local upgrade_script="$DOTFILES_BIN/actions/upgrade.sh"
|
||||||
|
if [[ ! -x "$upgrade_script" ]]; then
|
||||||
|
printfe "%s\n" "red" "Error: Upgrade script not found or not executable"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
"$upgrade_script" $@
|
||||||
|
}
|
||||||
|
|
||||||
term() {
|
term() {
|
||||||
local term_script="$DOTFILES_BIN/actions/term.sh"
|
local term_script="$DOTFILES_BIN/actions/term.sh"
|
||||||
if [[ ! -x "$term_script" ]]; then
|
if [[ ! -x "$term_script" ]]; then
|
||||||
@ -114,6 +123,7 @@ main() {
|
|||||||
# Parse commands
|
# Parse commands
|
||||||
case "${1:-help}" in
|
case "${1:-help}" in
|
||||||
update) shift; update "$@" ;;
|
update) shift; update "$@" ;;
|
||||||
|
upgrade) shift; upgrade "$@" ;;
|
||||||
help) shift; help "$@" ;;
|
help) shift; help "$@" ;;
|
||||||
term) shift; term "$@" ;;
|
term) shift; term "$@" ;;
|
||||||
secrets) shift; secrets "$@" ;;
|
secrets) shift; secrets "$@" ;;
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
|
||||||
Usage: dotf [OPTIONS] [ARGS]
|
Usage: dotf [OPTIONS] [ARGS]
|
||||||
|
|
||||||
update: Pull latest changes, and update symlinks and configurations.
|
update: Pull latest changes, and update symlinks and configurations
|
||||||
|
Also pulls latest nix channels and updates flakes to latest versions.
|
||||||
|
upgrade: Runs switch, flake variants for nix switch with upgrade and home-manager.
|
||||||
secrets: Encrypt and decrypt secrets.
|
secrets: Encrypt and decrypt secrets.
|
||||||
auto-start: Start a set of pre-defined applications.
|
auto-start: Start a set of pre-defined applications.
|
||||||
term: Shows the welcome message for the terminal.
|
term: Shows the welcome message for the terminal.
|
||||||
|
@ -16,8 +16,8 @@ config:
|
|||||||
mennos-server: ~/dotfiles/config/gitconfig.mennos-server
|
mennos-server: ~/dotfiles/config/gitconfig.mennos-server
|
||||||
mennos-desktop: ~/dotfiles/config/gitconfig.linux
|
mennos-desktop: ~/dotfiles/config/gitconfig.linux
|
||||||
mennos-gamingpc: ~/dotfiles/config/gitconfig.linux
|
mennos-gamingpc: ~/dotfiles/config/gitconfig.linux
|
||||||
|
mennos-laptop: ~/dotfiles/config/gitconfig.linux
|
||||||
homeserver-pc: ~/dotfiles/config/gitconfig.linux
|
homeserver-pc: ~/dotfiles/config/gitconfig.linux
|
||||||
macos: ~/dotfiles/config/gitconfig.macos
|
|
||||||
wsl: ~/dotfiles/config/gitconfig.wsl
|
wsl: ~/dotfiles/config/gitconfig.wsl
|
||||||
target: ~/.gitconfig
|
target: ~/.gitconfig
|
||||||
|
|
||||||
@ -35,11 +35,6 @@ config:
|
|||||||
vscode:
|
vscode:
|
||||||
source: ~/dotfiles/vscode/settings.json
|
source: ~/dotfiles/vscode/settings.json
|
||||||
target: ~/.config/Code/User/settings.json
|
target: ~/.config/Code/User/settings.json
|
||||||
|
|
||||||
# Autostart
|
|
||||||
autostart:
|
|
||||||
source: ~/dotfiles/config/autostart
|
|
||||||
target: ~/.config/autostart
|
|
||||||
|
|
||||||
# SSH config
|
# SSH config
|
||||||
ssh:
|
ssh:
|
||||||
|
12
config/home-manager/flake.lock
generated
12
config/home-manager/flake.lock
generated
@ -23,11 +23,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730327045,
|
"lastModified": 1731797254,
|
||||||
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
|
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
|
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -39,11 +39,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730531603,
|
"lastModified": 1732014248,
|
||||||
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
|
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
|
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
[
|
[
|
||||||
# General packages
|
# General packages
|
||||||
git
|
git
|
||||||
|
onefetch
|
||||||
gnupg
|
gnupg
|
||||||
gh
|
gh
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# GUI Application
|
# GUI Application
|
||||||
## Utilities
|
## Utilities
|
||||||
pkgs-unstable.mission-center # Task Manager like Windows 11
|
mission-center # Task Manager like Windows 11
|
||||||
gnome.gnome-tweaks
|
gnome.gnome-tweaks
|
||||||
pinta # Paint.NET alternative
|
pinta # Paint.NET alternative
|
||||||
bottles # Wine manager
|
bottles # Wine manager
|
||||||
|
@ -108,6 +108,7 @@ in
|
|||||||
# https://ext.ulauncher.io/-/github-tchar-ulauncher-albert-calculate-anything
|
# https://ext.ulauncher.io/-/github-tchar-ulauncher-albert-calculate-anything
|
||||||
# https://ext.ulauncher.io/-/github-isacikgoz-ukill
|
# https://ext.ulauncher.io/-/github-isacikgoz-ukill
|
||||||
# https://ext.ulauncher.io/-/github-iboyperson-ulauncher-system
|
# https://ext.ulauncher.io/-/github-iboyperson-ulauncher-system
|
||||||
|
# https://github.com/IgorVaryvoda/ulauncher-perplexity
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: { ulauncher = prev.ulauncher.override { python3 = pythonWithPackages; }; })
|
(final: prev: { ulauncher = prev.ulauncher.override { python3 = pythonWithPackages; }; })
|
||||||
|
12
config/nixos/flake.lock
generated
12
config/nixos/flake.lock
generated
@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730741070,
|
"lastModified": 1731797254,
|
||||||
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
|
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
|
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -18,11 +18,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1730531603,
|
"lastModified": 1732014248,
|
||||||
"narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=",
|
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d",
|
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
imports = [ ./virtualisation.nix ];
|
imports = [ ./virtualisation.nix ];
|
||||||
|
|
||||||
|
programs.adb.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
yubikey-manager
|
yubikey-manager
|
||||||
trash-cli
|
trash-cli
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"video"
|
"video"
|
||||||
"render"
|
"render"
|
||||||
"users"
|
"users"
|
||||||
|
"adbusers"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
-----BEGIN PGP MESSAGE-----
|
-----BEGIN PGP MESSAGE-----
|
||||||
|
|
||||||
jA0ECQMI71xa/M78CPH/0sABAWePpHsecx8nyyOTGKuQGT2gXkYLPDnYZ+tZRCWX
|
jA0ECQMI1/r+VnIxlUT/0sAKAQjTxJQbnn7OWukMK79HYhm5Rdui20re6P8xvsGt
|
||||||
YTGatN0+/jGc+5aluZfIZxJ7ukR+Fv+0DmdiWLHD/tNZsCvhYv5ULUjqW4uZWxsZ
|
O72UQWPsYQRQOHKXd330WH4mOX6gY/kGzVfXz8MgjNVvHTt01Bycd0HZx3jNmFlc
|
||||||
dnS6AnvYYVKPd8g9RopIh/gKQpEnMWZkD1LQ/xrXByMBS/yn+MZ6cwV33k7lWC3x
|
KLMDyCzxlO1lqD/4u/0UjW4fCMgFH3FMok2FJeudM1GTd+ltwulrx+3aOZWh4taK
|
||||||
qGlpdk9nmmTdEdEW8Jcby1izrNFzrOhMVxmokZ96q3S+/9gzJs9awdNoCqMhG7mR
|
X+HM3XcaDTunk/DMTh8P/zckWOc1Ng6VgFeDYbbiKGNdsZCnxGscnNctAKiVpSFW
|
||||||
7BeCD7ljyg8rvFkQyccrdUOQPQ==
|
IE1Z+RKgEpMa+xLCQfwheJKlX/UwMZVHjAoQ9A==
|
||||||
=blvW
|
=D8Oy
|
||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
|
Loading…
x
Reference in New Issue
Block a user