diff --git a/devel-nix/flake.nix b/devel-nix/flake.nix deleted file mode 100644 index f0a9848..0000000 --- a/devel-nix/flake.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - description = "A very basic flake"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - flake-utils.url = "github:numtide/flake-utils"; - }; - - outputs = inputs @ { self, flake-utils, nixpkgs, home-manager, ... }: - let - nixpkgsOfSys = system: import nixpkgs { inherit system; }; - in flake-utils.lib.eachDefaultSystem (sys: - { - homeConfigurations.nixos = home-manager.lib.homeManagerConfiguration { - system = sys; - # configuration = import ./home.nix; - modules = [./home.nix]; - pkgs = nixpkgs.legacyPackages.${sys}; - }; - - } - ); -} diff --git a/devel-nix/home.nix b/devel-nix/home.nix deleted file mode 100644 index 32a1e68..0000000 --- a/devel-nix/home.nix +++ /dev/null @@ -1,49 +0,0 @@ -# Helpful website to search for configurations: -# https://mipmip.github.io/home-manager-option-search/ -{ config, pkgs,... }: -{ - home.username = "nixos"; - home.homeDirectory = "/home/nixos"; - home.stateVersion = "22.05"; - home.packages = [pkgs.htop pkgs.wget pkgs.ripgrep]; - - # allow unfree stuffs to be installed - nixpkgs.config.allowUnfree = true; - - # define paths - xdg.enable = true; - programs.home-manager.enable = true; - programs.fzf.enable = true; - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - # I use vim-plug, so I probably don't require packaging - extraConfig = builtins.readFile ../neovim/init.lua; - }; - programs.zsh = { - enable = true; - shellAliases = { - ll = "ls -l"; - nix-rebuild = "sudo nixos-rebuild switch"; - }; - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - }; - }; - programs.git = { - enable = true; - lfs.enable = true; - aliases = { - a="add"; c="commit"; ca="commit --ammend"; cm="commit-m"; - lol="log --graph --decorate --pretty=oneline --abbrev-commit"; - lola="log --grpah --decorate --pretty-oneline --abbrev-commit --all"; - }; - extraConfig = { - merge = {tool="vimdiff"; conflictstyle="diff3";}; - }; - # Why is this no longer valid? - # pull = { rebase=true; }; - }; -} diff --git a/hm-base/flake.lock b/hm-base/flake.lock deleted file mode 100644 index bdcb8f8..0000000 --- a/hm-base/flake.lock +++ /dev/null @@ -1,80 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1667708081, - "narHash": "sha256-FChEy05x4ed/pttjfTeKxjPCnHknMYrUtDyBiYbreT4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "1ef0da321217c6c19b7a30509631c080a19321e5", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1667629849, - "narHash": "sha256-P+v+nDOFWicM4wziFK9S/ajF2lc0N2Rg9p6Y35uMoZI=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "3bacde6273b09a21a8ccfba15586fb165078fb62", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" - } - }, - "utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/devel-nix/flake.lock b/home-nix/flake.lock similarity index 100% rename from devel-nix/flake.lock rename to home-nix/flake.lock diff --git a/hm-base/flake.nix b/home-nix/flake.nix similarity index 94% rename from hm-base/flake.nix rename to home-nix/flake.nix index f2fea67..463d035 100644 --- a/hm-base/flake.nix +++ b/home-nix/flake.nix @@ -15,7 +15,7 @@ in { homeConfigurations.nixos = home-manager.lib.homeManagerConfiguration { inherit pkgs; - modules = [./home.nix]; + modules = [./home.nix]; }; }; } diff --git a/hm-base/home.nix b/home-nix/home.nix similarity index 65% rename from hm-base/home.nix rename to home-nix/home.nix index 225b51a..b9e74ce 100644 --- a/hm-base/home.nix +++ b/home-nix/home.nix @@ -3,10 +3,34 @@ home.username = "nixos"; home.homeDirectory = "/home/nixos"; - home.packages = [pkgs.htop pkgs.ripgrep]; + home.packages = [ + pkgs.htop pkgs.ripgrep pkgs.gcc pkgs.fd pkgs.zk + ]; home.stateVersion = "22.05"; nixpkgs.config.allowUnfree = true; + ## Configs ## + xdg.configFile."nvim/init.lua".text = builtins.readFile ../neovim/init.lua; + xdg.configFile."starship.toml".text = builtins.readFile ../starship/starship.toml; + + ## Programs ## + programs.zoxide = { + enable = true; + enableZshIntegration = true; + }; + programs.tmux = { + enable = true; + shell = "zsh"; + extraConfig = builtins.readFile ../tmux/.tmux.conf; + }; + programs.exa = { + enable = true; + enableAliases = true; + }; + programs.starship = { + enable = true; + enableZshIntegration = true; + }; programs.home-manager.enable = true; programs.fzf.enable = true; programs.neovim = { @@ -18,14 +42,13 @@ # https://github.com/nix-community/home-manager/pull/3287 # extraConfig = builtins.readFile ../neovim/init.lua; }; - xdg.configFile."nvim/init.lua".text = builtins.readFile ../neovim/init.lua; programs.zsh = { enable = true; enableCompletion = true; enableAutosuggestions = true; shellAliases = { - ll = "ls -l"; nix-rebuild = "sudo nixos-rebuild switch"; + hm-switch = "home-manager switch --flake"; }; history = { size = 10000; @@ -40,9 +63,9 @@ enable = true; lfs.enable = true; aliases = { - a="add"; c="commit"; ca="commit --ammend"; cm="commit-m"; + a="add"; c="commit"; ca="commit --ammend"; cm="commit -m"; lol="log --graph --decorate --pretty=oneline --abbrev-commit"; - lola="log --grpah --decorate --pretty-oneline --abbrev-commit --all"; + lola="log --graph --decorate --pretty=oneline --abbrev-commit --all"; }; extraConfig = { merge = {tool="vimdiff"; conflictstyle="diff3";}; diff --git a/neovim/init.lua b/neovim/init.lua index e6aa1b9..baa2d7a 100644 --- a/neovim/init.lua +++ b/neovim/init.lua @@ -281,7 +281,7 @@ require('nvim-treesitter.configs').setup { ensure_installed = { 'tsx', 'toml', 'lua', 'typescript', 'rust', 'go', 'yaml', 'json', 'php', 'css', 'python', 'prisma', 'html', "dockerfile", "c", "cpp", "hcl", "svelte", "astro", - "clojure", "fennel", "bash" + "clojure", "fennel", "bash", "nix" }, sync_install = false, highlight = { enable = true }, diff --git a/starship/starship.toml b/starship/starship.toml new file mode 100644 index 0000000..15a352a --- /dev/null +++ b/starship/starship.toml @@ -0,0 +1,89 @@ +# ~/.config/starship.toml + +[aws] +symbol = " " + +[conda] +symbol = " " + +[dart] +symbol = " " +format = "via [$symbol]($style)" + +[directory] +read_only = " " +truncation_length = 1 + +[docker_context] +symbol = " " + +[elixir] +symbol = " " +format = 'via [$symbol]($style)' + +[elm] +symbol = " " + +[git_branch] +symbol = " " + +[golang] +symbol = " " +format = 'via [$symbol]($style)' + +[hg_branch] +symbol = " " + +[java] +symbol = " " +format = 'via [$symbol]($style)' + +[julia] +symbol = " " + +[memory_usage] +symbol = " " + +[nim] +symbol = " " + +[nix_shell] +symbol = " " + +[nodejs] +symbol = " " +format = 'via [$symbol]($style)' + +[package] +symbol = " " + +[perl] +symbol = " " + +[php] +symbol = " " + +[python] +symbol = " " +format = 'via [$symbol]($style)' + +[ruby] +symbol = " " + +[rust] +format = 'via [$symbol]($style)' + +[scala] +symbol = " " + +[shlvl] +symbol = " " + +[swift] +symbol = "ﯣ " +format = 'via [$symbol]($style)' + +[git_status] +disabled = true + +