Switch to using dotfiles
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
let configDir = ../config;
|
||||
in
|
||||
{
|
||||
home.file = {
|
||||
".config/hypr".source = "${configDir}/hypr";
|
||||
".config/swayidle".source = "${configDir}/swayidle";
|
||||
".config/swaylock".source = "${configDir}/swaylock";
|
||||
".config/wlogout".source = "${configDir}/wlogout";
|
||||
".config/waybar".source = "${configDir}/waybar";
|
||||
".config/wofi".source = "${configDir}/wofi";
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./gtk.nix
|
||||
./shell.nix
|
||||
./config.nix
|
||||
./packages.nix
|
||||
./programs.nix
|
||||
./environment.nix
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
let
|
||||
userName = "chris";
|
||||
email = "stofflees@gmail.com";
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = userName;
|
||||
userEmail = email;
|
||||
};
|
||||
}
|
||||
@@ -1,37 +1,38 @@
|
||||
{ pkgs, pkgs-unstable, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.jetbrains.rider
|
||||
pkgs.go
|
||||
pkgs.lua
|
||||
# pkgs.nodejs_22
|
||||
pkgs.nodePackages.pnpm
|
||||
(pkgs.python3.withPackages (python-pkgs: [
|
||||
home.packages = with pkgs; [
|
||||
jetbrains.rider
|
||||
go
|
||||
lua
|
||||
nodePackages.pnpm
|
||||
(python3.withPackages (python-pkgs: [
|
||||
python-pkgs.pip
|
||||
python-pkgs.requests
|
||||
]))
|
||||
pkgs.rustup
|
||||
pkgs.zig
|
||||
pkgs.obsidian
|
||||
pkgs.thunderbird
|
||||
pkgs.libreoffice-qt
|
||||
pkgs.hunspell
|
||||
pkgs.blueberry
|
||||
pkgs.telegram-desktop
|
||||
pkgs.steam
|
||||
pkgs.steam-run
|
||||
pkgs.yuzu-mainline
|
||||
(pkgs.lutris.override {
|
||||
rustup
|
||||
zig
|
||||
obsidian
|
||||
thunderbird
|
||||
libreoffice-qt
|
||||
hunspell
|
||||
blueberry
|
||||
telegram-desktop
|
||||
steam
|
||||
steam-run
|
||||
yuzu-mainline
|
||||
(lutris.override {
|
||||
extraPkgs = pkgs: [
|
||||
pkgs.wineWowPackages.stable
|
||||
pkgs.winetricks
|
||||
wineWowPackages.stable
|
||||
winetricks
|
||||
];
|
||||
})
|
||||
pkgs.viewnior
|
||||
viewnior
|
||||
pkgs-unstable.hyprshot
|
||||
pkgs.catppuccin-cursors.macchiatoBlue
|
||||
pkgs.catppuccin-gtk
|
||||
pkgs.papirus-folders
|
||||
catppuccin-cursors.macchiatoBlue
|
||||
catppuccin-gtk
|
||||
papirus-folders
|
||||
git
|
||||
curl
|
||||
];
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
profiles.chris = {
|
||||
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
|
||||
darkreader
|
||||
i-dont-care-about-cookies
|
||||
ublock-origin
|
||||
i-dont-care-about-cookies
|
||||
ublock-origin
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
43
home/user/scripts.nix
Normal file
43
home/user/scripts.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.activation.setupDotfiles = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
DOTFILES_DIR="$HOME/.config/dotfiles"
|
||||
|
||||
if [ ! -d "$DOTFILES_DIR/.git" ]; then
|
||||
if [[ -v DRY_RUN ]]; then
|
||||
echo "Dry run: Would bootstrap dotfiles from labs.scarif.space"
|
||||
else
|
||||
echo "Dotfiles not found. Running bootstrap script..."
|
||||
|
||||
# Setup a temporary workspace
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
|
||||
# Clone the repo (using the public URL for the initial pull)
|
||||
${pkgs.git}/bin/git clone -b main https://labs.scarif.space/chris/dotfiles.git "$TEMP_DIR"
|
||||
|
||||
# Copy files to HOME
|
||||
${pkgs.coreutils}/bin/cp -rfT "$TEMP_DIR" "$HOME"
|
||||
|
||||
# Initialize the separate git directory
|
||||
${pkgs.mkdirp}/bin/mkdir -p "$DOTFILES_DIR"
|
||||
cd "$HOME"
|
||||
${pkgs.git}/bin/git init --separate-git-dir "$DOTFILES_DIR/.git" "$HOME"
|
||||
|
||||
# Update submodules
|
||||
${pkgs.git}/bin/git submodule set-url ".config/nvim" https://labs.scarif.space/chris/nvim.git
|
||||
${pkgs.git}/bin/git submodule update --init
|
||||
|
||||
# Set URLs back to SSH
|
||||
${pkgs.git}/bin/git submodule set-url ".config/nvim" git@labs.scarif.space:chris/nvim.git
|
||||
${pkgs.git}/bin/git remote set-url origin git@labs.scarif.space:chris/dotfiles.git
|
||||
|
||||
# Clean up
|
||||
${pkgs.coreutils}/bin/rm -rf "$TEMP_DIR"
|
||||
${pkgs.coreutils}/bin/rm -f "$HOME/.git"
|
||||
|
||||
echo "Dotfiles bootstrapped successfully."
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
myAliases = {
|
||||
docker-compose = "podman-compose";
|
||||
cat = "bat";
|
||||
ls = "eza --icons=always";
|
||||
fullClean = ''
|
||||
nix-collect-garbage --delete-old
|
||||
|
||||
sudo nix-collect-garbage -d
|
||||
|
||||
sudo /run/current-system/bin/switch-to-configuration boot
|
||||
'';
|
||||
rebuild = "sudo nixos-rebuild switch --flake ~/.dotfiles/";
|
||||
fullRebuild = "sudo nixos-rebuild switch --flake ~/.dotfiles/ && home-manager switch --flake ~/dotfiles/ -b backup";
|
||||
homeRebuild = "home-manager switch --flake ~/.dotfiles/ -b backup";
|
||||
};
|
||||
in
|
||||
{
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
# initExtra = ''
|
||||
# eval "${zoxide init --cmd cd zsh)" &&
|
||||
# '';
|
||||
shellAliases = myAliases;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user