diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..685f70e --- /dev/null +++ b/flake.lock @@ -0,0 +1,82 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712759992, + "narHash": "sha256-2APpO3ZW4idlgtlb8hB04u/rmIcKA8O7pYqxF66xbNY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "31357486b0ef6f4e161e002b6893eeb4fafc3ca9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1712608508, + "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..09d6b25 --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + description = "Configuration of my systems"; + + inputs = { + # Specify the source of Home Manager and Nixpkgs. + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { nixpkgs, home-manager, flake-utils, ... }: { + homeConfigurations."yadunut@yadunut-mbp" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.aarch64-darwin; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ ./yadunut-mbp/home.nix ./modules/zsh.nix ./modules/neovim.nix ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + }; + }; +} diff --git a/modules/neovim.nix b/modules/neovim.nix new file mode 100644 index 0000000..8ca626e --- /dev/null +++ b/modules/neovim.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: +{ + programs.neovim = { + enable = true; + defaultEditor = true; + # extraLuaConfig = '' ''; + # extraPackages = [ ]; + }; +} diff --git a/modules/zsh.nix b/modules/zsh.nix new file mode 100644 index 0000000..0503e7c --- /dev/null +++ b/modules/zsh.nix @@ -0,0 +1,38 @@ +{ config, pkgs, ... }: +{ + + home.packages = [ + pkgs.zsh-completions + ]; + programs.zsh = { + enable = true; + prezto = { + enable = true; + editor.keymap = "vi"; + editor.dotExpansion = true; + pmodules = [ + "environment" + "terminal" + "utility" + "directory" + "editor" + "history" + "syntax-highlighting" + "history-substring-search" + "autosuggestions" + "completion" + ]; + }; + shellAliases = { + lg = "lazygit"; + cat = "bat"; + diff = "delta"; + s = "kitty +kitten ssh"; + }; + }; + + programs.starship = { + enable = true; + enableZshIntegration = true; + }; +} diff --git a/yadunut-mbp/brewfile b/yadunut-mbp/brewfile deleted file mode 100644 index 8af7a29..0000000 --- a/yadunut-mbp/brewfile +++ /dev/null @@ -1,58 +0,0 @@ -beancount -binutils -coq -dive -efm-langserver -entr -eza -fava -fd -fzf -gh -git -git-delta -git-lfs -gmime -hashicorp/tap/nomad -hashicorp/tap/nomad-pack -hashicorp/tap/packer -hashicorp/tap/vault -hashicorp/tap/waypoint -jq -lazygit -libev -libgccjit -libmagic -libpq -lsusb -neovim -ninja -opam -openssh -pigz -pinentry-mac -postgresql@15 -qemu -ripgrep -rust-analyzer -sleepwatcher -starship -tectonic -tesseract -texlab -tio -tmux -tokei -typst -vips -volta -watch -watchman -wget -xapian -yq -zellij -zls -zoxide -zsh-completions -zsync diff --git a/yadunut-mbp/flake.nix b/yadunut-mbp/flake.nix deleted file mode 100644 index 89f8064..0000000 --- a/yadunut-mbp/flake.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - description = "Home Manager configuration of yadunut"; - - inputs = { - # Specify the source of Home Manager and Nixpkgs. - 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 = "aarch64-darwin"; - pkgs = nixpkgs.legacyPackages.${system}; - in { - homeConfigurations."yadunut" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - - # Specify your home configuration modules here, for example, - # the path to your home.nix. - modules = [ ./home.nix ]; - - # Optionally use extraSpecialArgs - # to pass through arguments to home.nix - }; - }; -} diff --git a/yadunut-mbp/home.nix b/yadunut-mbp/home.nix index 6cdbc75..b3162e9 100644 --- a/yadunut-mbp/home.nix +++ b/yadunut-mbp/home.nix @@ -18,11 +18,22 @@ # The home.packages option allows you to install Nix packages into your # environment. home.packages = [ + pkgs.bat + pkgs.beancount + pkgs.coq + pkgs.delta + # pkgs.dive + pkgs.entr + pkgs.fava + pkgs.fd pkgs.htop pkgs.ripgrep - pkgs.bat - pkgs.delta - pkgs.fd + pkgs.typst + pkgs.wget + + # Neovim deps + # pkgs.texlab + # pkgs.efm-langserver # # It is sometimes useful to fine-tune packages, for example, by applying # # overrides. You can do that directly here, just don't forget the @@ -53,6 +64,15 @@ EDITOR = "nvim"; }; + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + config = { + hide_env_diff = true; + }; + }; + programs.fzf.enable = true; programs.fzf.enableZshIntegration = true; @@ -67,37 +87,6 @@ programs.lazygit.enable = true; - programs.zsh = { - enable = true; - prezto = { - enable = true; - editor.keymap = "vi"; - editor.dotExpansion = true; - pmodules = [ - "environment" - "terminal" - "utility" - "directory" - "editor" - "history" - "syntax-highlighting" - "history-substring-search" - "autosuggestions" - "completion" - ]; - }; - shellAliases = { - lg = "lazygit"; - cat = "bat"; - diff = "delta"; - s = "kitty +kitten ssh"; - }; - }; - - programs.starship = { - enable = true; - enableZshIntegration = true; - }; programs.neovim.enable = true; # Let Home Manager install and manage itself.