update nixos configuration before switching to arch

chromebook
Alex 2022-07-01 11:08:49 -05:00
parent 905bc12266
commit ad45372145
9 changed files with 61 additions and 25 deletions

View File

@ -46,11 +46,18 @@ alias yd='youtube-dl'
alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME' alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
note() { note() {
NOTEFILE="$HOME/docs/notes" NOTEFILE="$HOME/.cache/notes"
if [ "$#" -lt 1 ]; then if [ "$#" -lt 1 ]; then
cat "$NOTEFILE" cat "$NOTEFILE"
elif [ "$1" = "-e" ]; then elif [ "$1" = "-e" ]; then
$EDITOR "$NOTEFILE" $EDITOR "$NOTEFILE"
elif [ "$1" = "-h" ]; then
echo " usage: note this is a note"
echo " the line: \"this is a note\" is stored as a line in the file $NOTEFILE"
echo ""
echo " run this without arguments to view the contents of $NOTEFILE"
echo " -e -> edit note file with \$EDITOR"
echo " -h -> print this help menu"
else else
echo "$@" >> "$NOTEFILE" echo "$@" >> "$NOTEFILE"
fi fi

View File

@ -12,6 +12,9 @@ call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-fugitive' Plug 'tpope/vim-fugitive'
Plug 'dense-analysis/ale' Plug 'dense-analysis/ale'
Plug 'chriskempson/base16-vim' Plug 'chriskempson/base16-vim'
"language support
Plug 'tbastos/vim-lua'
call plug#end() call plug#end()
"enable ale completion "enable ale completion

View File

@ -1,21 +1,20 @@
HDDA
.cfg .cfg
.cache .cache
.steam .steam
.var .var
.pki .pki
scripts
wallpapers
.ghc .ghc
.stack .stack
.trash .trash
.config .nix-defexpr
.nix-profile
.factorio
.googleearth
.luarocks
.minecraft
.shared-ringdb
.local/share .local/share
.local/bin .local/bin
.local/inits
.local/installers
.local/scripts
.local/src
.local/state .local/state
.local/README.md .local/README.md
.local/LICENSE .local/LICENSE

View File

@ -21,17 +21,12 @@
# accidentally delete configuration.nix. # accidentally delete configuration.nix.
system.copySystemConfiguration = true; system.copySystemConfiguration = true;
#enable nonfree packages
nixpkgs.config.allowUnfree = true;
#enable automatic updates
system.autoUpgrade.enable = true;
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "gabriel"; # Define your hostname. networking.hostName = "bismarck"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
#networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. #networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
@ -85,6 +80,18 @@
]; ];
}; };
security.sudo.extraRules = [{
runAs = "root";
groups = [ "wheel" ];
commands = [{
command = "/run/current-system/sw/bin/poweroff";
options = [ "NOPASSWD" ];
} {
command = "/run/current-system/sw/bin/reboot";
options = [ "NOPASSWD" ];
}];
}];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
programs.mtr.enable = true; programs.mtr.enable = true;
@ -137,6 +144,14 @@
git git
shellcheck shellcheck
jq jq
monero-cli
bc
gnome.zenity
cura
udisks2
udiskie
python3
python3.pkgs.pip
]; ];
#enable flatpak #enable flatpak

View File

@ -1,5 +1,8 @@
{ config, pkgs, lib, ... }: { { config, pkgs, lib, ... }: {
#enable nonfree packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
lutris lutris
radeontop radeontop
@ -8,6 +11,15 @@
#add 32bit support for graphics #add 32bit support for graphics
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
#nixpkgs.config.packageOverrides = pkgs: {
# steam = pkgs.steam.override {
# extraPkgs = pkgs: with pkgs; [
# libgdiplus
# libpng
# ];
# };
#};
programs.steam = { programs.steam = {
enable = false; enable = false;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play

View File

@ -2,9 +2,8 @@
BACKUP_LOC="/media/SEAGATE/HOME_BACKUP/" BACKUP_LOC="/media/SEAGATE/HOME_BACKUP/"
DIR="$HOME/" DIR="$HOME/"
EXCLUDE_CONF="$HOME/.config/rsync-exclude.conf" EXCLUDE_CONF="$HOME/.config/rsync-exclude.conf"
INCLUDE_CONF="$HOME/.config/rsync-include.conf"
EXCL_INCL="--exclude-from=$EXCLUDE_CONF --include-from=$INCLUDE_CONF" EXCL_INCL="--exclude-from=$EXCLUDE_CONF"
if [ "$1" = "-r" ]; then if [ "$1" = "-r" ]; then
notify-send "backup.sh" "restoring from backup" notify-send "backup.sh" "restoring from backup"

View File

@ -72,8 +72,8 @@ help () {
echo " -e [ file ] => extract input file to a subdirectory of the files name" echo " -e [ file ] => extract input file to a subdirectory of the files name"
} }
#get all input except first 2 chars as input for compress/extract #get all input except first argument, if first argument has a '-' and save in ARGS
ARGS="$( echo "$@" | sed '0,/^../{s/^..//}' )" ARGS="$( echo "$@" | sed 's/^-.* //g' )"
if [ "$1" = "-c" ]; then if [ "$1" = "-c" ]; then
compress "$ARGS" compress "$ARGS"

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
help() { help() {
echo "\$1 -> file to update or compare against" echo "\$1 -> file to update or compare against"

View File

@ -60,11 +60,12 @@ export PATH="$HOME/.local/scripts:$PATH"
export MANPATH="$MANPATH:/usr/local/man/" export MANPATH="$MANPATH:/usr/local/man/"
export PATH="/opt/rocm/bin:$PATH" #add to path if installing rocm for amd
export PATH="/opt/rocm/hip/bin:$PATH" #export PATH="/opt/rocm/bin:$PATH"
export PATH="/opt/rocm/opencl/bin:$PATH" #export PATH="/opt/rocm/hip/bin:$PATH"
export PATH="/opt/rocm/rocfft/bin:$PATH" #export PATH="/opt/rocm/opencl/bin:$PATH"
export PATH="/opt/rocm/rocfft/bin:$PATH" #export PATH="/opt/rocm/rocfft/bin:$PATH"
#export PATH="/opt/rocm/rocfft/bin:$PATH"
#fix arduino ide issues #fix arduino ide issues