From 4bb33c67ebe9b169dd247b1b8a3df7b44d869c27 Mon Sep 17 00:00:00 2001 From: Cy Pokhrel Date: Fri, 8 Nov 2024 08:19:02 -0500 Subject: [PATCH] revert nix stuff (again) --- .gitmodules | 4 ++++ README.md | 2 +- conf.yml | 23 +++++++++++++++++++++++ dotbot | 1 + flake.lock | 48 ------------------------------------------------ flake.nix | 23 ----------------------- home.nix | 41 ----------------------------------------- install | 15 +++++++++++++++ result | 1 - zshrc | 2 -- 10 files changed, 44 insertions(+), 116 deletions(-) create mode 100644 conf.yml create mode 160000 dotbot delete mode 100644 flake.lock delete mode 100644 flake.nix delete mode 100644 home.nix create mode 100755 install delete mode 120000 result diff --git a/.gitmodules b/.gitmodules index e69de29..1af14d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "dotbot"] + path = dotbot + url = https://github.com/anishathalye/dotbot + ignore = dirty diff --git a/README.md b/README.md index f00ece4..6944002 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -this is my dotfiles managed with [home-manager](https://nix-community.github.io/home-manager/). +this is my dotfiles managed with [dotbot](https://github.com/anishathalye/dotbot/). you should be able to replicate it with just `./install`. diff --git a/conf.yml b/conf.yml new file mode 100644 index 0000000..e44f6d9 --- /dev/null +++ b/conf.yml @@ -0,0 +1,23 @@ +- defaults: + link: + relink: true + create: true + +- clean: ['~'] + +- link: + ~/.config/tmux: + ~/.config/nvim: + ~/.config/sway: + ~/.config/kitty: + ~/.config/aerc: + ~/.config/mako: + ~/.config/git: + ~/.config/waybar: + ~/.config/i3status-rust: + ~/.config/rofi: + ~/.zshrc: + ~/.p10k.zsh: + +- shell: + - [git submodule update --init --recursive, installing submodules] diff --git a/dotbot b/dotbot new file mode 160000 index 0000000..7202065 --- /dev/null +++ b/dotbot @@ -0,0 +1 @@ +Subproject commit 720206578a8daf1e7167200e73e314fc4b8af52e diff --git a/flake.lock b/flake.lock deleted file mode 100644 index c9c4de9..0000000 --- a/flake.lock +++ /dev/null @@ -1,48 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index d138954..0000000 --- a/flake.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - description = "Home Manager configuration of yt"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { nixpkgs, home-manager, ... }: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in { - homeConfigurations."yt" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - - modules = [ ./home.nix ]; - }; - }; -} diff --git a/home.nix b/home.nix deleted file mode 100644 index bf75aae..0000000 --- a/home.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, pkgs, ... }: - -{ - home.username = "yt"; - home.homeDirectory = "/home/yt"; - home.stateVersion = "24.05"; - - home.packages = [ - pkgs.neovim - pkgs.fzf - pkgs.eza - pkgs.gnupg - pkgs.go - pkgs.pass - pkgs.zsh - pkgs.delta - pkgs.borgbackup - pkgs.rclone - ]; - - home.file = { - ".zshrc".source = ./zshrc; - ".p10k.zsh".source = ./p10k.zsh; - ".config/sway".source = ./sway; - ".config/nvim".source = ./nvim; - ".config/aerc".source = ./aerc; - ".config/git".source = ./git; - ".config/i3status-rust".source = ./i3status-rust; - ".config/kitty".source = ./kitty; - ".config/mako".source = ./mako; - ".config/rofi".source = ./rofi; - ".config/tmux".source = ./tmux; - ".config/waybar".source = ./waybar; - }; - - home.sessionVariables = { - EDITOR = "nvim"; - }; - - programs.home-manager.enable = true; -} diff --git a/install b/install new file mode 100755 index 0000000..a01cf8e --- /dev/null +++ b/install @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -e + +CONFIG="conf.yml" +DOTBOT_DIR="dotbot" + +DOTBOT_BIN="bin/dotbot" +BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +cd "${BASEDIR}" +git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive +git submodule update --init --recursive "${DOTBOT_DIR}" + +"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}" diff --git a/result b/result deleted file mode 120000 index 17e62b3..0000000 --- a/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/jrh65nv8ziax01kw3qpz4k4mk7nia3c9-home-manager-generation \ No newline at end of file diff --git a/zshrc b/zshrc index a907611..b1af505 100644 --- a/zshrc +++ b/zshrc @@ -1,5 +1,3 @@ -source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" - # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below.