From 10a876fcc48b39f14092529c4170a81878eef166 Mon Sep 17 00:00:00 2001 From: Bart van der Braak Date: Wed, 16 Oct 2024 22:27:09 +0200 Subject: [PATCH] Add subdirectories for `macbook` and `tongfang` with config (#4) --- .gitconfig => macbook/.gitconfig | 0 .../.gitignore_global | 0 .zshrc => macbook/.zshrc | 0 .../alacritty}/alacritty.toml | 0 .../karabiner}/karabiner.json | 0 .../kitty}/kitty-themes/themes/Argonaut.conf | 0 {kitty => macbook/kitty}/kitty.conf | 0 {oh-my-posh => macbook/oh-my-posh}/theme.json | 0 {oh-my-posh => macbook/oh-my-posh}/theme.toml | 0 tongfang/.bash_aliases | 3 + tongfang/.bashrc | 3 + tongfang/.gitconfig | 24 ++++++ tongfang/configuration.nix | 75 +++++++++++++++++++ tongfang/flake.nix | 3 + tongfang/symlink.sh | 9 +++ 15 files changed, 117 insertions(+) rename .gitconfig => macbook/.gitconfig (100%) rename .gitignore_global => macbook/.gitignore_global (100%) rename .zshrc => macbook/.zshrc (100%) rename {alacritty => macbook/alacritty}/alacritty.toml (100%) rename {karabiner => macbook/karabiner}/karabiner.json (100%) rename {kitty => macbook/kitty}/kitty-themes/themes/Argonaut.conf (100%) rename {kitty => macbook/kitty}/kitty.conf (100%) rename {oh-my-posh => macbook/oh-my-posh}/theme.json (100%) rename {oh-my-posh => macbook/oh-my-posh}/theme.toml (100%) create mode 100644 tongfang/.bash_aliases create mode 100644 tongfang/.bashrc create mode 100644 tongfang/.gitconfig create mode 100644 tongfang/configuration.nix create mode 100644 tongfang/flake.nix create mode 100755 tongfang/symlink.sh diff --git a/.gitconfig b/macbook/.gitconfig similarity index 100% rename from .gitconfig rename to macbook/.gitconfig diff --git a/.gitignore_global b/macbook/.gitignore_global similarity index 100% rename from .gitignore_global rename to macbook/.gitignore_global diff --git a/.zshrc b/macbook/.zshrc similarity index 100% rename from .zshrc rename to macbook/.zshrc diff --git a/alacritty/alacritty.toml b/macbook/alacritty/alacritty.toml similarity index 100% rename from alacritty/alacritty.toml rename to macbook/alacritty/alacritty.toml diff --git a/karabiner/karabiner.json b/macbook/karabiner/karabiner.json similarity index 100% rename from karabiner/karabiner.json rename to macbook/karabiner/karabiner.json diff --git a/kitty/kitty-themes/themes/Argonaut.conf b/macbook/kitty/kitty-themes/themes/Argonaut.conf similarity index 100% rename from kitty/kitty-themes/themes/Argonaut.conf rename to macbook/kitty/kitty-themes/themes/Argonaut.conf diff --git a/kitty/kitty.conf b/macbook/kitty/kitty.conf similarity index 100% rename from kitty/kitty.conf rename to macbook/kitty/kitty.conf diff --git a/oh-my-posh/theme.json b/macbook/oh-my-posh/theme.json similarity index 100% rename from oh-my-posh/theme.json rename to macbook/oh-my-posh/theme.json diff --git a/oh-my-posh/theme.toml b/macbook/oh-my-posh/theme.toml similarity index 100% rename from oh-my-posh/theme.toml rename to macbook/oh-my-posh/theme.toml diff --git a/tongfang/.bash_aliases b/tongfang/.bash_aliases new file mode 100644 index 0000000..b262e8a --- /dev/null +++ b/tongfang/.bash_aliases @@ -0,0 +1,3 @@ +alias ll='ls -la' +alias lt='ls --human-readable --size -1 -S --classify' +alias nrebuild="nixos-rebuild --flake ~/ --override-input nixpkgs ~/nixpkgs --use-remote-sudo switch" diff --git a/tongfang/.bashrc b/tongfang/.bashrc new file mode 100644 index 0000000..0bfa145 --- /dev/null +++ b/tongfang/.bashrc @@ -0,0 +1,3 @@ +if [ -e $HOME/.bash_aliases ]; then + source $HOME/.bash_aliases +fi diff --git a/tongfang/.gitconfig b/tongfang/.gitconfig new file mode 100644 index 0000000..cbf633c --- /dev/null +++ b/tongfang/.gitconfig @@ -0,0 +1,24 @@ +[user] + name = Bart van der Braak + email = bart@vanderbraak.nl +[alias] + p = push + st = status + ll = log --oneline + last = log -1 HEAD --stat + cm = commit -m + d = diff + gl = config --global -l + aa = add . + pushfwl = push --force-with-lease +[core] + excludesfile = $HOME/.gitignore_global +[init] + defaultBranch = main +[push] + autoSetupRemote = true +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true diff --git a/tongfang/configuration.nix b/tongfang/configuration.nix new file mode 100644 index 0000000..daa00d5 --- /dev/null +++ b/tongfang/configuration.nix @@ -0,0 +1,75 @@ +{ config, pkgs, ... }: + +{ + imports = [ + /etc/nixos/hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "tongfang"; + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Amsterdam"; + + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "nl_NL.UTF-8"; + LC_IDENTIFICATION = "nl_NL.UTF-8"; + LC_MEASUREMENT = "nl_NL.UTF-8"; + LC_MONETARY = "nl_NL.UTF-8"; + LC_NAME = "nl_NL.UTF-8"; + LC_NUMERIC = "nl_NL.UTF-8"; + LC_PAPER = "nl_NL.UTF-8"; + LC_TELEPHONE = "nl_NL.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + services.xserver.enable = false; + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + + services.xserver.xkb = { + layout = "us"; + variant = ""; + }; + + services.printing.enable = false; + hardware.bluetooth.enable = true; + + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + services.xserver.libinput.enable = true; + + users.users.bart = { + isNormalUser = true; + description = "Bart van der Braak"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + kdePackages.kate + codium + git + thunderbird + fastfetch + ]; + }; + + + nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ + inputs.zen-browser.packages."${system}".specific + nvim + wget + ]; + + system.stateVersion = "24.05"; # Did you read the comment? +} diff --git a/tongfang/flake.nix b/tongfang/flake.nix new file mode 100644 index 0000000..01718e9 --- /dev/null +++ b/tongfang/flake.nix @@ -0,0 +1,3 @@ +inputs = { + zen-browser.url = "github:MarceColl/zen-browser-flake"; +} diff --git a/tongfang/symlink.sh b/tongfang/symlink.sh new file mode 100755 index 0000000..b79810f --- /dev/null +++ b/tongfang/symlink.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if cp --version &>/dev/null; then + dotfiles_home="${1:-$(dirname "$(realpath "$0")")}" + cp -rsf "$dotfiles_home"/. $HOME + echo "dotfiles symlinks recursively copied from $dotfiles_home to $HOME." +else + echo "GNU cp required." +fi