Cleanup main repository
create simple dotfiles setup
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 370 KiB |
@@ -1,187 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="535"
|
|
||||||
height="535"
|
|
||||||
viewBox="0 0 501.56251 501.56249"
|
|
||||||
id="svg2"
|
|
||||||
version="1.1"
|
|
||||||
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
|
||||||
sodipodi:docname="nix-snowflake-colours.svg"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
||||||
<defs
|
|
||||||
id="defs4">
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient5562">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#699ad7;stop-opacity:1"
|
|
||||||
offset="0"
|
|
||||||
id="stop5564" />
|
|
||||||
<stop
|
|
||||||
id="stop5566"
|
|
||||||
offset="0.24345198"
|
|
||||||
style="stop-color:#7eb1dd;stop-opacity:1" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#7ebae4;stop-opacity:1"
|
|
||||||
offset="1"
|
|
||||||
id="stop5568" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
id="linearGradient5053">
|
|
||||||
<stop
|
|
||||||
style="stop-color:#415e9a;stop-opacity:1"
|
|
||||||
offset="0"
|
|
||||||
id="stop5055" />
|
|
||||||
<stop
|
|
||||||
id="stop5057"
|
|
||||||
offset="0.23168644"
|
|
||||||
style="stop-color:#4a6baf;stop-opacity:1" />
|
|
||||||
<stop
|
|
||||||
style="stop-color:#5277c3;stop-opacity:1"
|
|
||||||
offset="1"
|
|
||||||
id="stop5059" />
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient5562"
|
|
||||||
id="linearGradient4328"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(70.650339,-1055.1511)"
|
|
||||||
x1="200.59668"
|
|
||||||
y1="351.41116"
|
|
||||||
x2="290.08701"
|
|
||||||
y2="506.18814" />
|
|
||||||
<linearGradient
|
|
||||||
inkscape:collect="always"
|
|
||||||
xlink:href="#linearGradient5053"
|
|
||||||
id="linearGradient4330"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
gradientTransform="translate(864.69589,-1491.3405)"
|
|
||||||
x1="-584.19934"
|
|
||||||
y1="782.33563"
|
|
||||||
x2="-496.29703"
|
|
||||||
y2="937.71399" />
|
|
||||||
</defs>
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="base"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1.0"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:zoom="0.70904368"
|
|
||||||
inkscape:cx="99.429699"
|
|
||||||
inkscape:cy="195.33352"
|
|
||||||
inkscape:document-units="px"
|
|
||||||
inkscape:current-layer="layer3"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1050"
|
|
||||||
inkscape:window-x="1920"
|
|
||||||
inkscape:window-y="30"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:snap-global="true"
|
|
||||||
fit-margin-top="0"
|
|
||||||
fit-margin-left="0"
|
|
||||||
fit-margin-right="0"
|
|
||||||
fit-margin-bottom="0"
|
|
||||||
inkscape:showpageshadow="2"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#d1d1d1" />
|
|
||||||
<metadata
|
|
||||||
id="metadata7">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<g
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer3"
|
|
||||||
inkscape:label="gradient-logo"
|
|
||||||
style="display:inline;opacity:1"
|
|
||||||
transform="translate(-156.41121,933.30685)">
|
|
||||||
<g
|
|
||||||
id="g2"
|
|
||||||
transform="matrix(0.99994059,0,0,0.99994059,-0.06321798,33.188377)"
|
|
||||||
style="stroke-width:1.00006">
|
|
||||||
<path
|
|
||||||
sodipodi:nodetypes="cccccccccc"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
id="path3336-6"
|
|
||||||
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8257 z"
|
|
||||||
style="opacity:1;fill:url(#linearGradient4328);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
|
||||||
<use
|
|
||||||
height="100%"
|
|
||||||
width="100%"
|
|
||||||
transform="rotate(60,407.11155,-715.78724)"
|
|
||||||
id="use3439-6"
|
|
||||||
inkscape:transform-center-y="151.59082"
|
|
||||||
inkscape:transform-center-x="124.43045"
|
|
||||||
xlink:href="#path3336-6"
|
|
||||||
y="0"
|
|
||||||
x="0"
|
|
||||||
style="stroke-width:1.00006" />
|
|
||||||
<use
|
|
||||||
height="100%"
|
|
||||||
width="100%"
|
|
||||||
transform="rotate(-60,407.31177,-715.70016)"
|
|
||||||
id="use3445-0"
|
|
||||||
inkscape:transform-center-y="75.573958"
|
|
||||||
inkscape:transform-center-x="-168.20651"
|
|
||||||
xlink:href="#path3336-6"
|
|
||||||
y="0"
|
|
||||||
x="0"
|
|
||||||
style="stroke-width:1.00006" />
|
|
||||||
<use
|
|
||||||
height="100%"
|
|
||||||
width="100%"
|
|
||||||
transform="rotate(180,407.41868,-715.7565)"
|
|
||||||
id="use3449-5"
|
|
||||||
inkscape:transform-center-y="-139.94592"
|
|
||||||
inkscape:transform-center-x="59.669705"
|
|
||||||
xlink:href="#path3336-6"
|
|
||||||
y="0"
|
|
||||||
x="0"
|
|
||||||
style="stroke-width:1.00006" />
|
|
||||||
<path
|
|
||||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4330);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
|
||||||
d="m 309.54892,-710.38827 122.19683,211.67512 -56.15706,0.5268 -32.6236,-56.8692 -32.85645,56.5653 -27.90237,-0.011 -14.29086,-24.6896 46.81047,-80.4901 -33.22946,-57.8256 z"
|
|
||||||
id="path4260-0"
|
|
||||||
inkscape:connector-curvature="0"
|
|
||||||
sodipodi:nodetypes="cccccccccc" />
|
|
||||||
<use
|
|
||||||
height="100%"
|
|
||||||
width="100%"
|
|
||||||
transform="rotate(120,407.33916,-716.08356)"
|
|
||||||
id="use4354-5"
|
|
||||||
xlink:href="#path4260-0"
|
|
||||||
y="0"
|
|
||||||
x="0"
|
|
||||||
style="display:inline;stroke-width:1.00006" />
|
|
||||||
<use
|
|
||||||
height="100%"
|
|
||||||
width="100%"
|
|
||||||
transform="rotate(-120,407.28823,-715.86995)"
|
|
||||||
id="use4362-2"
|
|
||||||
xlink:href="#path4260-0"
|
|
||||||
y="0"
|
|
||||||
x="0"
|
|
||||||
style="display:inline;stroke-width:1.00006" />
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 6.4 KiB |
108
install.sh
108
install.sh
@@ -1,68 +1,62 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Dependencies
|
# Colors
|
||||||
export NIXPKGS_ALLOW_UNFREE=1
|
RED='\033[0;31m'
|
||||||
if [ $(pwd) != "$HOME/dotfiles" ]; then
|
GREEN='\033[0;32m'
|
||||||
cd $HOME
|
YELLOW='\033[0;33m'
|
||||||
git clone https://github.com/TrudeEH/dotfiles --depth 1
|
BLUE='\033[0;34m'
|
||||||
cd dotfiles
|
NC='\033[0m' # No Color
|
||||||
fi
|
|
||||||
|
|
||||||
if ! nix --version &>/dev/null; then
|
|
||||||
echo "[E] Nix not found."
|
|
||||||
echo "[+] Installing the Nix package manager..."
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
|
||||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
||||||
echo "[I] Installed Nix."
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "####################"
|
echo "####################"
|
||||||
echo "# Trude's Dotfiles #"
|
echo "# Trude's Dotfiles #"
|
||||||
echo "####################"
|
echo "####################"
|
||||||
echo
|
echo
|
||||||
echo "1) Set up Generic System"
|
|
||||||
echo "2) Set up NixOS"
|
|
||||||
echo "3) Set up macOS"
|
|
||||||
echo
|
|
||||||
read -p "> " main_menu
|
|
||||||
|
|
||||||
case $main_menu in
|
echo -e "${YELLOW}[+] Updating distro...${NC}"
|
||||||
1)
|
sudo apt update
|
||||||
# Install Home-manager
|
|
||||||
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
|
||||||
nix-channel --update
|
|
||||||
mkdir -p $HOME/.pre-nix-backup/
|
|
||||||
mv $HOME/.bashrc $HOME/.profile $HOME/.pre-nix-backup/
|
|
||||||
nix-shell '<home-manager>' -A install
|
|
||||||
|
|
||||||
# Apply config
|
# Check if git is installed
|
||||||
mkdir -p $HOME/.config/home-manager
|
if ! git --version &>/dev/null; then
|
||||||
rm $HOME/.config/home-manager/home.nix
|
echo -e "${YELLOW}[+] Installing GIT...${NC}"
|
||||||
cp ./nix/home.nix $HOME/.config/home-manager/home.nix
|
sudo apt install -y git
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
home-manager switch -b backup
|
echo -e "${RED}[E] Error installing GIT. Exiting...${NC}"
|
||||||
;;
|
exit 1
|
||||||
2)
|
fi
|
||||||
sudo cp -rf ./nix/nixos/* /etc/nixos/
|
else
|
||||||
sudo cp -f ./nix/home.nix /etc/nixos/
|
echo -e "${GREEN}[I] GIT is already installed.${NC}"
|
||||||
sudo nixos-rebuild switch --flake /etc/nixos#default
|
fi
|
||||||
;;
|
|
||||||
3)
|
# Clone Dotfiles if not already present
|
||||||
mkdir -p ~/.config/nix-darwin/
|
cd $HOME/dotfiles
|
||||||
cp -rf ./nix/macOS/* ~/.config/nix-darwin/
|
if [ $(pwd) != "$HOME/dotfiles" ]; then
|
||||||
cp -f ./nix/home.nix ~/.config/nix-darwin/
|
echo -e "${YELLOW}[+] Cloning Dotfiles repository...${NC}"
|
||||||
|
git clone https://github.com/TrudeEH/dotfiles --depth 1
|
||||||
if [[ $(uname -m) == "x86_64" ]]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Intel mac detected."
|
echo -e "${RED}[E] Error cloning Dotfiles repository. Exiting...${NC}"
|
||||||
nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake ~/.config/nix-darwin#x86
|
exit 2
|
||||||
else
|
fi
|
||||||
echo "Apple silicon detected."
|
cd dotfiles
|
||||||
nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake ~/.config/nix-darwin#default
|
echo -e "${GREEN}[I] Dotfiles repository cloned successfully.${NC}"
|
||||||
|
else
|
||||||
|
echo -e "${GREEN}[I] Dotfiles repository already present.${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Copy files
|
||||||
|
echo -e "${YELLOW}[+] Installing Dotfiles...${NC}"
|
||||||
|
cp -r $HOME/dotfiles/home/. $HOME
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "${RED}[E] Error copying Dotfiles.${NC}"
|
||||||
|
else
|
||||||
|
echo -e "${GREEN}[I] Dotfiles installed successfully.${NC}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load Dconf (GNOME settings)
|
||||||
|
echo -e "${YELLOW}[+] Loading Dconf settings...${NC}"
|
||||||
|
dconf load / <$HOME/dotfiles/dconf-settings.ini
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo -e "${RED}[E] Error loading Dconf settings.${NC}"
|
||||||
|
else
|
||||||
|
echo -e "${GREEN}[I] Dconf settings loaded successfully.${NC}"
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Invalid option selected."
|
|
||||||
return 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
let
|
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
|
|
||||||
pkgs = import nixpkgs { config = {}; overlays = []; };
|
|
||||||
in
|
|
||||||
|
|
||||||
pkgs.mkShellNoCC {
|
|
||||||
packages = with pkgs; [
|
|
||||||
quickemu
|
|
||||||
];
|
|
||||||
|
|
||||||
shellHook = ''
|
|
||||||
mkdir -p macos-vm
|
|
||||||
cd macos-vm
|
|
||||||
if [ ! -d "macos-sonoma" ]; then
|
|
||||||
quickget macos sonoma
|
|
||||||
fi
|
|
||||||
quickemu --vm macos-sonoma.conf
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
742
nix/home.nix
742
nix/home.nix
@@ -1,742 +0,0 @@
|
|||||||
# man home-configuration.nix
|
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf optionals;
|
|
||||||
inherit (pkgs.stdenv) isLinux isDarwin; #GNOME on Linux
|
|
||||||
userName = "trude";
|
|
||||||
isDesktop = true; # Disable for servers and WSL
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# =======================================================================
|
|
||||||
# ----------------------- HOME & INSTALLED PACKAGES ---------------------
|
|
||||||
# =======================================================================
|
|
||||||
|
|
||||||
home.username = userName;
|
|
||||||
home.homeDirectory = if isLinux then "/home/${userName}" else "/Users/${userName}";
|
|
||||||
home.stateVersion = "24.05";
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
gh unzip fastfetch
|
|
||||||
|
|
||||||
# Override nerdfont to install JetBrains only.
|
|
||||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
|
||||||
|
|
||||||
# Shell Scripts
|
|
||||||
(writeShellScriptBin "extract" ''
|
|
||||||
if [ -f $1 ]; then
|
|
||||||
case $1 in
|
|
||||||
*.tar.bz2) tar xjf $1 ;;
|
|
||||||
*.tar.gz) tar xzf $1 ;;
|
|
||||||
*.bz2) bunzip2 $1 ;;
|
|
||||||
*.rar) unrar e $1 ;;
|
|
||||||
*.gz) gunzip $1 ;;
|
|
||||||
*.tar) tar xf $1 ;;
|
|
||||||
*.tbz2) tar xjf $1 ;;
|
|
||||||
*.tgz) tar xzf $1 ;;
|
|
||||||
*.zip) unzip $1 ;;
|
|
||||||
*.Z) uncompress $1 ;;
|
|
||||||
*.7z) 7z x $1 ;;
|
|
||||||
*) echo "'$1' cannot be extracted via extract()" ;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
echo "'$1' is not a valid file"
|
|
||||||
fi
|
|
||||||
'')
|
|
||||||
|
|
||||||
(writeShellScriptBin "pushall" ''
|
|
||||||
if [[ -z "$1" ]]; then
|
|
||||||
echo "Usage: pushall \"commit message\""
|
|
||||||
else
|
|
||||||
git pull
|
|
||||||
git diff
|
|
||||||
read -p "Press ENTER to continue..."
|
|
||||||
git add -A
|
|
||||||
git commit -m "$@"
|
|
||||||
git push
|
|
||||||
fi
|
|
||||||
'')
|
|
||||||
|
|
||||||
(writeShellScriptBin "update" ''
|
|
||||||
nix-channel --update
|
|
||||||
if command -v nixos-rebuild 2>&1 >/dev/null; then
|
|
||||||
sudo nixos-rebuild switch --recreate-lock-file --flake /etc/nixos#default
|
|
||||||
elif command -v darwin-rebuild 2>&1 >/dev/null; then
|
|
||||||
sudo softwareupdate -i -a
|
|
||||||
nix run nix-darwin -- switch --recreate-lock-file --flake ~/.config/nix-darwin#default
|
|
||||||
else
|
|
||||||
home-manager -b backup switch
|
|
||||||
fi
|
|
||||||
'')
|
|
||||||
]
|
|
||||||
# Desktop-only apps
|
|
||||||
++ optionals isDesktop [google-chrome]
|
|
||||||
# Linux-only apps
|
|
||||||
++ optionals (isDesktop && isLinux) [newsflash eyedropper gnome-terminal epiphany gnome-podcasts impression gnome-boxes adw-gtk3 gnomeExtensions.vitals gnomeExtensions.appindicator gnomeExtensions.caffeine gnomeExtensions.search-light]
|
|
||||||
# macOS-only apps
|
|
||||||
++ optionals (isDesktop && isDarwin) [net-news-wire raycast iina discord];
|
|
||||||
|
|
||||||
home.file = {
|
|
||||||
".config/nixpkgs/config.nix".text = "{ allowUnfree = true; }";
|
|
||||||
} // (if isLinux then {
|
|
||||||
# Cursor theme fix (Linux)
|
|
||||||
".icons/default".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic"; # Set file content as another file
|
|
||||||
} else {});
|
|
||||||
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "code";
|
|
||||||
};
|
|
||||||
|
|
||||||
# =====================================================
|
|
||||||
# -------------------- LINUX --------------------------
|
|
||||||
# =====================================================
|
|
||||||
gtk = mkIf isLinux {
|
|
||||||
enable = true;
|
|
||||||
cursorTheme = {
|
|
||||||
name = "Bibata-Modern-Classic";
|
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
size = 22;
|
|
||||||
};
|
|
||||||
|
|
||||||
# iconTheme = {
|
|
||||||
# name = "Papirus";
|
|
||||||
# package = pkgs.papirus-icon-theme;
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
|
|
||||||
dconf.settings = with lib.hm.gvariant; mkIf isLinux {
|
|
||||||
"org/gnome/Console" = {
|
|
||||||
theme = "auto";
|
|
||||||
use-system-font = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/calculator" = {
|
|
||||||
accuracy = 9;
|
|
||||||
angle-units = "degrees";
|
|
||||||
base = 10;
|
|
||||||
button-mode = "programming";
|
|
||||||
number-format = "automatic";
|
|
||||||
show-thousands = false;
|
|
||||||
show-zeroes = false;
|
|
||||||
source-currency = "";
|
|
||||||
source-units = "degree";
|
|
||||||
target-currency = "";
|
|
||||||
target-units = "radian";
|
|
||||||
word-size = 64;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/a11y/interface" = {
|
|
||||||
high-contrast = false;
|
|
||||||
show-status-shapes = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/background" = {
|
|
||||||
color-shading-type = "solid";
|
|
||||||
picture-options = "zoom";
|
|
||||||
picture-uri = "file:///run/current-system/sw/share/backgrounds/gnome/blobs-l.svg";
|
|
||||||
picture-uri-dark = "file:///run/current-system/sw/share/backgrounds/gnome/blobs-d.svg";
|
|
||||||
primary-color = "#241f31";
|
|
||||||
secondary-color = "#000000";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/calendar" = {
|
|
||||||
show-weekdate = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/datetime" = {
|
|
||||||
automatic-timezone = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/input-sources" = {
|
|
||||||
current = mkUint32 0;
|
|
||||||
mru-sources = [ (mkTuple [ "xkb" "pt" ]) (mkTuple [ "xkb" "pt" ]) ];
|
|
||||||
sources = [ (mkTuple [ "xkb" "pt" ]) ];
|
|
||||||
xkb-options = [ "caps:ctrl_modifier" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/interface" = {
|
|
||||||
clock-format = "12h";
|
|
||||||
clock-show-seconds = false;
|
|
||||||
clock-show-weekday = true;
|
|
||||||
color-scheme = "prefer-dark";
|
|
||||||
enable-animations = true;
|
|
||||||
font-antialiasing = "grayscale";
|
|
||||||
font-hinting = "slight";
|
|
||||||
gtk-theme = "adw-gtk3-dark";
|
|
||||||
locate-pointer = false;
|
|
||||||
monospace-font-name = "JetBrainsMono Nerd Font 11";
|
|
||||||
overlay-scrolling = true;
|
|
||||||
toolkit-accessibility = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/peripherals/touchpad" = {
|
|
||||||
two-finger-scrolling-enabled = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/privacy" = {
|
|
||||||
old-files-age = mkUint32 30;
|
|
||||||
recent-files-max-age = 30;
|
|
||||||
remove-old-temp-files = true;
|
|
||||||
remove-old-trash-files = true;
|
|
||||||
report-technical-problems = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/screensaver" = {
|
|
||||||
color-shading-type = "solid";
|
|
||||||
picture-options = "zoom";
|
|
||||||
picture-uri = "file:///usr/share/backgrounds/gnome/blobs-l.svg";
|
|
||||||
primary-color = "#241f31";
|
|
||||||
secondary-color = "#000000";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/search-providers" = {
|
|
||||||
enabled = [ "org.gnome.Weather.desktop" ];
|
|
||||||
sort-order = [ "org.gnome.Contacts.desktop" "org.gnome.Documents.desktop" "org.gnome.Nautilus.desktop" "org.gnome.Calculator.desktop" "org.gnome.seahorse.Application.desktop" "org.gnome.Characters.desktop" "org.gnome.clocks.desktop" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/session" = {
|
|
||||||
idle-delay = mkUint32 300;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/sound" = {
|
|
||||||
event-sounds = true;
|
|
||||||
theme-name = "__custom";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/preferences" = {
|
|
||||||
button-layout = "appmenu:minimize,close";
|
|
||||||
resize-with-right-button = true;
|
|
||||||
visual-bell = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/epiphany" = { # GNOME Web
|
|
||||||
homepage-url = "about:newtab";
|
|
||||||
start-in-incognito-mode = false;
|
|
||||||
restore-session-policy = "always";
|
|
||||||
use-google-search-suggestions = false;
|
|
||||||
default-search-engine = "StartPage";
|
|
||||||
|
|
||||||
search-engine-providers = with lib.hm.gvariant; [
|
|
||||||
[
|
|
||||||
(mkDictionaryEntry["url" (mkVariant "https://duckduckgo.com/?q=%s&t=epiphany")])
|
|
||||||
(mkDictionaryEntry["bang" (mkVariant "!d")])
|
|
||||||
(mkDictionaryEntry["name" (mkVariant "DuckDuckGo")])
|
|
||||||
]
|
|
||||||
[
|
|
||||||
(mkDictionaryEntry["url" (mkVariant "https://www.google.com/search?q=%s")])
|
|
||||||
(mkDictionaryEntry["bang" (mkVariant "!g")])
|
|
||||||
(mkDictionaryEntry["name" (mkVariant "Google")])
|
|
||||||
]
|
|
||||||
[
|
|
||||||
(mkDictionaryEntry["url" (mkVariant "https://search.nixos.org/packages?channel=23.11&from=0&size=50&sort=relevance&type=packages&query=%s")])
|
|
||||||
(mkDictionaryEntry["bang" (mkVariant "!np")])
|
|
||||||
(mkDictionaryEntry["name" (mkVariant "Nix Packages")])
|
|
||||||
]
|
|
||||||
[
|
|
||||||
(mkDictionaryEntry["url" (mkVariant "https://www.startpage.com/search?q=%s")])
|
|
||||||
(mkDictionaryEntry["bang" (mkVariant "!s")])
|
|
||||||
(mkDictionaryEntry["name" (mkVariant "StartPage")])
|
|
||||||
]
|
|
||||||
];
|
|
||||||
|
|
||||||
content-filters = [
|
|
||||||
"https://easylist-downloads.adblockplus.org/easylist_min_content_blocker.json"
|
|
||||||
"https://better.fyi/blockerList.json"
|
|
||||||
"https://github.com/AdguardTeam/BlockYouTubeAdsShortcut/blob/master/index.js"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/epiphany/web" = {
|
|
||||||
show-developer-actions = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/evince/default" = {
|
|
||||||
continuous = true;
|
|
||||||
dual-page = false;
|
|
||||||
dual-page-odd-left = true;
|
|
||||||
enable-spellchecking = true;
|
|
||||||
inverted-colors = false;
|
|
||||||
show-sidebar = true;
|
|
||||||
sidebar-page = "thumbnails";
|
|
||||||
sidebar-size = 132;
|
|
||||||
sizing-mode = "automatic";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/evolution-data-server" = {
|
|
||||||
migrated = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/mutter" = {
|
|
||||||
center-new-windows = true;
|
|
||||||
edge-tiling = true;
|
|
||||||
experimental-features = [ "scale-monitor-framebuffer" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/mutter/keybindings" = {
|
|
||||||
toggle-tiled-left = [];
|
|
||||||
toggle-tiled-right = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/nautilus/icon-view" = {
|
|
||||||
default-zoom-level = "small";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/nautilus/preferences" = {
|
|
||||||
default-folder-viewer = "icon-view";
|
|
||||||
migrated-gtk-settings = true;
|
|
||||||
search-filter-time-type = "last_modified";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/color" = {
|
|
||||||
night-light-enabled = true;
|
|
||||||
night-light-temperature = mkUint32 2410;
|
|
||||||
sleep-inactive-ac-timeout = 3600;
|
|
||||||
sleep-inactive-ac-type = "nothing";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/power" = {
|
|
||||||
power-button-action = "interactive";
|
|
||||||
sleep-inactive-ac-type = "nothing";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell" = {
|
|
||||||
enabled-extensions = [ "caffeine@patapon.info" "appindicatorsupport@rgcjonas.gmail.com" "Vitals@CoreCoding.com" "gtk4-ding@smedius.gitlab.com" "blur-my-shell@aunetx" "search-light@icedman.github.com" ];
|
|
||||||
favorite-apps = [];
|
|
||||||
last-selected-power-profile = "performance";
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/dash-to-dock" = {
|
|
||||||
dash-max-icon-size = 34;
|
|
||||||
dock-fixed = false;
|
|
||||||
dock-position = "BOTTOM";
|
|
||||||
extend-height = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/ding" = {
|
|
||||||
check-x11wayland = true;
|
|
||||||
icon-size = "small";
|
|
||||||
show-home = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/vitals" = {
|
|
||||||
fixed-widths = false;
|
|
||||||
hot-sensors = [ "_memory_usage_" "_processor_usage_" "__temperature_max__" ];
|
|
||||||
icon-style = 1;
|
|
||||||
use-higher-precision = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/extensions/search-light" = {
|
|
||||||
background-color = mkTuple [ 0.1411764770746231 0.1411764770746231 0.1411764770746231 1.0 ];
|
|
||||||
blur-background=false;
|
|
||||||
border-radius=5.7443946188340806;
|
|
||||||
border-thickness=0;
|
|
||||||
currency-converter=true;
|
|
||||||
entry-font-size=1;
|
|
||||||
scale-height=0.10000000000000001;
|
|
||||||
scale-width=0.10000000000000001;
|
|
||||||
unit-converter=true;
|
|
||||||
window-effect=0;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/shell/world-clocks" = {
|
|
||||||
locations = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/system/location" = {
|
|
||||||
enabled = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9" = {
|
|
||||||
background-color = "rgb(0,0,0)";
|
|
||||||
backspace-binding = "auto";
|
|
||||||
exit-action = "hold";
|
|
||||||
font = "JetBrainsMono Nerd Font 12";
|
|
||||||
foreground-color = "rgb(208,207,204)";
|
|
||||||
use-system-font = false;
|
|
||||||
use-theme-colors = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Default browser
|
|
||||||
xdg.mimeApps = mkIf isLinux {
|
|
||||||
enable = true;
|
|
||||||
defaultApplications = {
|
|
||||||
"text/html" = "org.gnome.Epiphany.desktop";
|
|
||||||
"x-scheme-handler/http" = "google-chrome.desktop";
|
|
||||||
"x-scheme-handler/https" = "google-chrome.desktop";
|
|
||||||
"x-scheme-handler/about" = "google-chrome.desktop";
|
|
||||||
"x-scheme-handler/unknown" = "google-chrome.desktop";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# ===========================================================
|
|
||||||
# -------------------- Independent --------------------------
|
|
||||||
# ===========================================================
|
|
||||||
|
|
||||||
# Autostart services on boot
|
|
||||||
services = {
|
|
||||||
gnome-keyring.enable = isLinux;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
home-manager.enable = true;
|
|
||||||
|
|
||||||
firefox = {
|
|
||||||
enable = false;
|
|
||||||
policies = {
|
|
||||||
DisableTelemetry = true;
|
|
||||||
DisableFirefoxStudies = true;
|
|
||||||
DontCheckDefaultBrowser = true;
|
|
||||||
DisablePocket = true;
|
|
||||||
SearchBar = "unified";
|
|
||||||
|
|
||||||
Preferences = {
|
|
||||||
# Privacy settings
|
|
||||||
"extensions.pocket.enabled" = false;
|
|
||||||
"browser.topsites.contile.enabled" = false;
|
|
||||||
"browser.newtabpage.activity-stream.showSponsored" = false;
|
|
||||||
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
|
||||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
ExtensionSettings = {
|
|
||||||
"uBlock0@raymondhill.net" = {
|
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
"jid1-MnnxcxisBPnSXQ@jetpack" = {
|
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
|
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles.default = {
|
|
||||||
id = 0;
|
|
||||||
name = "TrudeEH";
|
|
||||||
isDefault = true;
|
|
||||||
settings = {
|
|
||||||
"browser.startup.homepage" = "about:newtab";
|
|
||||||
"browser.search.defaultenginename" = "DuckDuckGo";
|
|
||||||
"browser.search.order.1" = "DuckDuckGo";
|
|
||||||
"general.smoothScroll" = true;
|
|
||||||
"browser.disableResetPrompt" = true;
|
|
||||||
"browser.download.panel.shown" = true;
|
|
||||||
"browser.download.useDownloadDir" = false;
|
|
||||||
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
|
||||||
"browser.shell.checkDefaultBrowser" = false;
|
|
||||||
"browser.shell.defaultBrowserCheckCount" = 1;
|
|
||||||
"dom.security.https_only_mode" = true;
|
|
||||||
"identity.fxaccounts.enabled" = false;
|
|
||||||
"privacy.trackingprotection.enabled" = true;
|
|
||||||
"signon.rememberSignons" = false;
|
|
||||||
};
|
|
||||||
search = {
|
|
||||||
force = true;
|
|
||||||
default = "Startpage";
|
|
||||||
order = [ "Startpage" "DuckDuckGo" "Google" ];
|
|
||||||
engines = {
|
|
||||||
"Startpage" = {
|
|
||||||
urls = [{
|
|
||||||
template = "https://www.startpage.com/do/search?query={searchTerms}";
|
|
||||||
}];
|
|
||||||
definedAliases = [ "@s" ];
|
|
||||||
};
|
|
||||||
"Nix Packages" = {
|
|
||||||
urls = [{
|
|
||||||
template = "https://search.nixos.org/packages";
|
|
||||||
params = [
|
|
||||||
{ name = "type"; value = "packages"; }
|
|
||||||
{ name = "query"; value = "{searchTerms}"; }
|
|
||||||
];
|
|
||||||
}];
|
|
||||||
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
|
||||||
definedAliases = [ "@np" ];
|
|
||||||
};
|
|
||||||
"NixOS Wiki" = {
|
|
||||||
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
|
|
||||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
|
||||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
|
||||||
definedAliases = [ "@nw" ];
|
|
||||||
};
|
|
||||||
"Bing".metaData.hidden = true;
|
|
||||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
|
||||||
};
|
|
||||||
};
|
|
||||||
bookmarks = [
|
|
||||||
{
|
|
||||||
name = "Toolbar";
|
|
||||||
toolbar = true;
|
|
||||||
bookmarks = [
|
|
||||||
{
|
|
||||||
name = "YouTube";
|
|
||||||
url = "https://www.youtube.com/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Arch Linux";
|
|
||||||
tags = [ "news" "wiki" "arch" ];
|
|
||||||
url = "https://archlinux.org/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "NixOS Discourse";
|
|
||||||
tags = [ "wiki" "nix" ];
|
|
||||||
url = "https://discourse.nixos.org/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "GitHub";
|
|
||||||
url = "https://github.com/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "WOL";
|
|
||||||
url = "https://wol.jw.org/pt-PT/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Rust Book";
|
|
||||||
url = "https://doc.rust-lang.org/stable/book/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Rust by example";
|
|
||||||
url = "https://doc.rust-lang.org/stable/rust-by-example/";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Rustlings";
|
|
||||||
url = "https://github.com/rust-lang/rustlings/";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
neovim = {
|
|
||||||
enable = true;
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
vimdiffAlias = true;
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
|
||||||
nvim-treesitter.withAllGrammars
|
|
||||||
];
|
|
||||||
# Use the Nix package search engine to find
|
|
||||||
# even more plugins : https://search.nixos.org/packages
|
|
||||||
};
|
|
||||||
|
|
||||||
tmux = {
|
|
||||||
enable = true;
|
|
||||||
aggressiveResize = true;
|
|
||||||
baseIndex = 1;
|
|
||||||
disableConfirmationPrompt = true;
|
|
||||||
escapeTime = 250;
|
|
||||||
keyMode = "vi";
|
|
||||||
mouse = true;
|
|
||||||
plugins = with pkgs; [ tmuxPlugins.cpu ];
|
|
||||||
prefix = "C-s";
|
|
||||||
terminal = "tmux-256color";
|
|
||||||
shell = if isLinux then "${pkgs.zsh}/bin/zsh" else "/bin/zsh";
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
bind-key C command-prompt -p "Name of new window: " "new-window -n '%%'"
|
|
||||||
|
|
||||||
# hjkl pane traversal
|
|
||||||
bind-key h select-pane -L
|
|
||||||
bind-key j select-pane -D
|
|
||||||
bind-key k select-pane -U
|
|
||||||
bind-key l select-pane -R
|
|
||||||
|
|
||||||
# easy reload config
|
|
||||||
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded."
|
|
||||||
|
|
||||||
# set window split
|
|
||||||
bind-key v split-window -h -c "#{pane_current_path}"
|
|
||||||
bind-key b split-window -v -c "#{pane_current_path}"
|
|
||||||
|
|
||||||
# Styling
|
|
||||||
set-option -g status-position top
|
|
||||||
set -g mode-style "fg=black,bg=orange"
|
|
||||||
set-option -g pane-border-style fg=colour236
|
|
||||||
set-option -g pane-active-border-style fg=orange
|
|
||||||
set-window-option -g window-status-current-style fg=orange,bg=default,bright
|
|
||||||
set-window-option -g window-status-style fg=colour244,bg=default
|
|
||||||
set-window-option -g clock-mode-colour orange
|
|
||||||
set-option -g status-style "bg=default,fg=white"
|
|
||||||
set-option -g status-left ""
|
|
||||||
set-option -g status-right '[Session: #S] [CPU: #{cpu_fg_color}#{cpu_percentage}#[default]] [RAM: #{ram_fg_color}#{ram_percentage}#[default]] %d#[dim]/#[default]%m#[dim]/#[default]%Y %I:%M#[dim]%P#[default]'
|
|
||||||
set -g status-interval 1
|
|
||||||
set -g status-right-length 60
|
|
||||||
|
|
||||||
set -g @cpu_high_fg_color "#[fg=#FF0000]"
|
|
||||||
set -g @ram_high_fg_color "#[fg=#FF0000]"
|
|
||||||
run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "TrudeEH";
|
|
||||||
userEmail = "ehtrude@gmail.com";
|
|
||||||
aliases = {
|
|
||||||
a = "add";
|
|
||||||
c = "commit";
|
|
||||||
ca = "commit --amend";
|
|
||||||
can = "commit --amend --no-edit";
|
|
||||||
cl = "clone";
|
|
||||||
cm = "commit -m";
|
|
||||||
co = "checkout";
|
|
||||||
cp = "cherry-pick";
|
|
||||||
cpx = "cherry-pick -x";
|
|
||||||
d = "diff";
|
|
||||||
f = "fetch";
|
|
||||||
fo = "fetch origin";
|
|
||||||
fu = "fetch upstream";
|
|
||||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
|
||||||
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
|
||||||
pl = "pull";
|
|
||||||
pr = "pull -r";
|
|
||||||
ps = "push";
|
|
||||||
psf = "push -f";
|
|
||||||
rb = "rebase";
|
|
||||||
rbi = "rebase -i";
|
|
||||||
r = "remote";
|
|
||||||
ra = "remote add";
|
|
||||||
rr = "remote rm";
|
|
||||||
rv = "remote -v";
|
|
||||||
rs = "remote show";
|
|
||||||
st = "status";
|
|
||||||
};
|
|
||||||
extraConfig = {
|
|
||||||
pull = {
|
|
||||||
rebase=true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
starship = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
settings = {
|
|
||||||
add_newline = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
bash = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
shellAliases = {
|
|
||||||
l = "ls -alh";
|
|
||||||
ls = "ls --color=auto";
|
|
||||||
ll = "ls -lhi";
|
|
||||||
grep = "grep --color=auto";
|
|
||||||
ta = "tmux attach";
|
|
||||||
t = "tmux";
|
|
||||||
v = "nvim";
|
|
||||||
cpp = "rsync -ah --progress";
|
|
||||||
code = "codium --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
|
||||||
neofetch = "fastfetch";
|
|
||||||
sudo = "sudo -i";
|
|
||||||
ns = "nix-shell";
|
|
||||||
};
|
|
||||||
initExtra = "set completion-ignore-case On";
|
|
||||||
bashrcExtra = ''
|
|
||||||
set -o vi
|
|
||||||
export EDITOR="code";
|
|
||||||
export PS1="\n[\[\e[37m\]\u\[\e[0m\]@\[\e[37;2m\]\h\[\e[0m\]] \[\e[1m\]\w \[\e[0;2m\]J:\[\e[0m\]\j\n\$ ";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
|
|
||||||
shellAliases = {
|
|
||||||
l = "ls -alh";
|
|
||||||
ls = "ls --color=auto";
|
|
||||||
ll = "ls -lhi";
|
|
||||||
grep = "grep --color=auto";
|
|
||||||
ta = "tmux attach";
|
|
||||||
t = "tmux";
|
|
||||||
v = "nvim";
|
|
||||||
cpp = "rsync -ah --progress";
|
|
||||||
code = "codium --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
|
||||||
neofetch = "fastfetch";
|
|
||||||
sudo = "sudo -i";
|
|
||||||
ns = "nix-shell";
|
|
||||||
};
|
|
||||||
|
|
||||||
initExtra = ''
|
|
||||||
# Case-insensitive completion
|
|
||||||
autoload -Uz compinit && compinit
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
|
||||||
|
|
||||||
set -o vi
|
|
||||||
export EDITOR="nvim";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
vscode = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.vscodium;
|
|
||||||
enableUpdateCheck = false;
|
|
||||||
enableExtensionUpdateCheck = false;
|
|
||||||
mutableExtensionsDir = false;
|
|
||||||
|
|
||||||
# Extensions
|
|
||||||
extensions = (with pkgs.vscode-extensions; [
|
|
||||||
esbenp.prettier-vscode
|
|
||||||
ms-vscode-remote.remote-ssh
|
|
||||||
mhutchie.git-graph
|
|
||||||
pkief.material-icon-theme
|
|
||||||
oderwat.indent-rainbow
|
|
||||||
jnoortheen.nix-ide
|
|
||||||
ritwickdey.liveserver
|
|
||||||
github.vscode-pull-request-github
|
|
||||||
arrterian.nix-env-selector
|
|
||||||
llvm-vs-code-extensions.vscode-clangd
|
|
||||||
formulahendry.code-runner
|
|
||||||
]);
|
|
||||||
|
|
||||||
# Settings
|
|
||||||
userSettings = {
|
|
||||||
# General
|
|
||||||
"editor.fontSize" = 14;
|
|
||||||
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace', monospace";
|
|
||||||
"terminal.integrated.fontSize" = 12;
|
|
||||||
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font', 'monospace', monospace";
|
|
||||||
"window.zoomLevel" = 0.1;
|
|
||||||
"editor.multiCursorModifier" = "ctrlCmd";
|
|
||||||
"workbench.startupEditor" = "none";
|
|
||||||
"explorer.compactFolders" = false;
|
|
||||||
"workbench.tree.indent" = 12;
|
|
||||||
# Whitespace
|
|
||||||
"files.trimTrailingWhitespace" = true;
|
|
||||||
"files.trimFinalNewlines" = true;
|
|
||||||
"files.insertFinalNewline" = true;
|
|
||||||
"diffEditor.ignoreTrimWhitespace" = false;
|
|
||||||
# Git
|
|
||||||
"git.enableCommitSigning" = false;
|
|
||||||
"git.enableSmartCommit" = true;
|
|
||||||
"git.confirmSync" = false;
|
|
||||||
"git.autofetch" = true;
|
|
||||||
# Styling
|
|
||||||
"window.autoDetectColorScheme" = true;
|
|
||||||
"workbench.iconTheme" = "material-icon-theme";
|
|
||||||
"material-icon-theme.activeIconPack" = "none";
|
|
||||||
"material-icon-theme.folders.theme" = "classic";
|
|
||||||
"editor.fontLigatures" = true;
|
|
||||||
"window.commandCenter" = true;
|
|
||||||
"editor.renderLineHighlight" = "none";
|
|
||||||
# Other
|
|
||||||
"telemetry.telemetryLevel" = "off";
|
|
||||||
"update.showReleaseNotes" = false;
|
|
||||||
"window.titleBarStyle" = "custom";
|
|
||||||
"explorer.confirmDelete" = false;
|
|
||||||
"explorer.confirmDragAndDrop" = false;
|
|
||||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,169 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Darwin system flake";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
||||||
|
|
||||||
nix-darwin = {
|
|
||||||
url = "github:LnL7/nix-darwin";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Fix an issue where home-manager apps are not indexed on Spotlight
|
|
||||||
mac-app-util = {
|
|
||||||
url = "github:hraban/mac-app-util";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, mac-app-util }:
|
|
||||||
let
|
|
||||||
configuration = { pkgs, config, ... }: {
|
|
||||||
services.nix-daemon.enable = true;
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
|
||||||
system.stateVersion = 5;
|
|
||||||
|
|
||||||
users.users.trude = {
|
|
||||||
name = "trude";
|
|
||||||
home = "/Users/trude";
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = {inherit inputs;};
|
|
||||||
backupFileExtension = "backup";
|
|
||||||
users = {
|
|
||||||
"trude" = import ./home.nix;
|
|
||||||
};
|
|
||||||
sharedModules = [
|
|
||||||
mac-app-util.homeManagerModules.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [];
|
|
||||||
|
|
||||||
security.pam.enableSudoTouchIdAuth = true;
|
|
||||||
|
|
||||||
system.defaults = {
|
|
||||||
# https://daiderd.com/nix-darwin/manual/index.html
|
|
||||||
|
|
||||||
ActivityMonitor = {
|
|
||||||
IconType = 5;
|
|
||||||
SortColumn = "CPUUsage";
|
|
||||||
SortDirection = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
NSGlobalDomain = {
|
|
||||||
AppleICUForce24HourTime = false;
|
|
||||||
AppleInterfaceStyle = "Dark";
|
|
||||||
AppleScrollerPagingBehavior = true;
|
|
||||||
AppleShowAllExtensions = true;
|
|
||||||
AppleShowAllFiles = true;
|
|
||||||
NSDocumentSaveNewDocumentsToCloud = false;
|
|
||||||
NSWindowShouldDragOnGesture = true;
|
|
||||||
KeyRepeat = 2;
|
|
||||||
"com.apple.mouse.tapBehavior" = 1; #Tap to click on mouse.
|
|
||||||
"com.apple.swipescrolldirection" = false; #Normal scrolling.
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
WindowManager = {
|
|
||||||
EnableStandardClickToShowDesktop = true;
|
|
||||||
StandardHideDesktopIcons = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
alf = {
|
|
||||||
globalstate = 1; #Firewall
|
|
||||||
stealthenabled = 1; #Drop incoming ping requests
|
|
||||||
};
|
|
||||||
|
|
||||||
dock = {
|
|
||||||
autohide = false;
|
|
||||||
autohide-delay = 0.0;
|
|
||||||
autohide-time-modifier = 0.5; #Dock autohide animation speed
|
|
||||||
expose-animation-duration = 0.5; #Mission Control animation speed
|
|
||||||
minimize-to-application = true; #Minimize windows into their application icon
|
|
||||||
|
|
||||||
persistent-apps = [ #Dock apps
|
|
||||||
];
|
|
||||||
|
|
||||||
persistent-others = [ #Dock folders
|
|
||||||
"/Users/trude/Downloads"
|
|
||||||
];
|
|
||||||
|
|
||||||
show-recents = false; #Dock show recent apps
|
|
||||||
showhidden = true;
|
|
||||||
static-only = false; #Show only open apps in dock
|
|
||||||
tilesize = 48; #Dock icon size
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
finder = {
|
|
||||||
AppleShowAllExtensions = true;
|
|
||||||
AppleShowAllFiles = true;
|
|
||||||
FXDefaultSearchScope = "SCcf"; #Search defaults to current folder
|
|
||||||
FXEnableExtensionChangeWarning = false;
|
|
||||||
FXPreferredViewStyle = "Nlsv"; #Default to list view
|
|
||||||
ShowPathbar = true;
|
|
||||||
ShowStatusBar = true;
|
|
||||||
_FXSortFoldersFirst = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
loginwindow.GuestEnabled = false;
|
|
||||||
|
|
||||||
menuExtraClock = {
|
|
||||||
Show24Hour = false;
|
|
||||||
ShowAMPM = true;
|
|
||||||
ShowDayOfMonth = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
screencapture.disable-shadow = false;
|
|
||||||
screensaver.askForPassword = true;
|
|
||||||
|
|
||||||
trackpad.Clicking = true; #Tap to click
|
|
||||||
trackpad.Dragging = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.keyboard = {
|
|
||||||
enableKeyMapping = true;
|
|
||||||
remapCapsLockToControl = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
intel = { pkgs, config, ... }: {
|
|
||||||
nixpkgs.hostPlatform = "x86_64-darwin";
|
|
||||||
};
|
|
||||||
|
|
||||||
apple-silicon = { pkgs, config, ... }: {
|
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# Build darwin flake using:
|
|
||||||
# $ nix run nix-darwin -- switch --flake ~/.config/nix-darwin
|
|
||||||
darwinConfigurations.default = nix-darwin.lib.darwinSystem {
|
|
||||||
modules = [
|
|
||||||
configuration
|
|
||||||
apple-silicon
|
|
||||||
inputs.mac-app-util.darwinModules.default
|
|
||||||
inputs.home-manager.darwinModules.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
darwinConfigurations.x86 = nix-darwin.lib.darwinSystem {
|
|
||||||
modules = [
|
|
||||||
configuration
|
|
||||||
intel
|
|
||||||
inputs.mac-app-util.darwinModules.default
|
|
||||||
inputs.home-manager.darwinModules.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
darwinPackages = self.darwinConfigurations.default.pkgs;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Nixos config flake";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs:
|
|
||||||
let
|
|
||||||
configuration = { lib, config, pkgs, inputs, ... }: {
|
|
||||||
nix.settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
};
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
environment = {
|
|
||||||
systemPackages = with pkgs; [ ];
|
|
||||||
shells = with pkgs; [ zsh ];
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
|
||||||
defaultUserShell = pkgs.zsh;
|
|
||||||
users.trude = {
|
|
||||||
isNormalUser = true;
|
|
||||||
initialPassword = "trude";
|
|
||||||
description = "TrudeEH";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
programs.steam.enable = true; #Home-manager steam installation crashes...
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = {inherit inputs;};
|
|
||||||
backupFileExtension = "backup";
|
|
||||||
users = {
|
|
||||||
"trude" = import ./home.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "trudeDev";
|
|
||||||
networkmanager.enable = true;
|
|
||||||
#firewall.allowedTCPPorts = [ ... ];
|
|
||||||
#firewall.allowedUDPPorts = [ ... ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.gdm.enable = true;
|
|
||||||
desktopManager.gnome.enable = true;
|
|
||||||
xkb = {
|
|
||||||
layout = "pt";
|
|
||||||
variant = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
printing.enable = true;
|
|
||||||
pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
#jack.enable = true;
|
|
||||||
};
|
|
||||||
#openssh.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
virtualisation.libvirtd.enable = true;
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
loader.systemd-boot.enable = true;
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
supportedFilesystems = ["ntfs"];
|
|
||||||
};
|
|
||||||
|
|
||||||
time.timeZone = "Europe/Lisbon";
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "pt_PT.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "pt_PT.UTF-8";
|
|
||||||
LC_MEASUREMENT = "pt_PT.UTF-8";
|
|
||||||
LC_MONETARY = "pt_PT.UTF-8";
|
|
||||||
LC_NAME = "pt_PT.UTF-8";
|
|
||||||
LC_NUMERIC = "pt_PT.UTF-8";
|
|
||||||
LC_PAPER = "pt_PT.UTF-8";
|
|
||||||
LC_TELEPHONE = "pt_PT.UTF-8";
|
|
||||||
LC_TIME = "pt_PT.UTF-8";
|
|
||||||
};
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# Build darwin flake using:
|
|
||||||
# $ sudo nixos-rebuild switch --flake /etc/nixos#default
|
|
||||||
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {inherit inputs;};
|
|
||||||
modules = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
configuration
|
|
||||||
inputs.home-manager.nixosModules.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
1
tempCodeRunnerFile.sh
Normal file
1
tempCodeRunnerFile.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Filter out any property that has a space above it as is not a header. headers start with '['
|
||||||
Reference in New Issue
Block a user