diff --git a/README.md b/README.md index 1fa1c5f..d4629ec 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,130 @@ -# Nix Flake Config -This repo contains personal nix flake config for macbook / wsl with home-manager. +# Nix Flake Configuration -# Getting started -If you want to use my config on macbook, make sure you're using nix-determinate. It's the best for MacOS. +This repository contains a personal Nix flake configuration for managing systems across **macOS (using nix-darwin)** and **WSL (using NixOS-WSL)**. It leverages Home Manager for user-specific configurations, SOPS-Nix for secrets management, and Nix Homebrew for macOS app installations. The configuration is modular, focusing on productivity tools, CLI programs, and essential packages for development workflows. -Clone this repo to the folder of your liking, \ No newline at end of file +Key features: +- Cross-platform support for macOS (aarch64-darwin) and WSL (x86_64-linux). +- Declarative Homebrew cask and MAS app management on macOS. +- Pre-configured CLI tools like `bat`, `eza`, `fzf`, `k9s`, `micro`, `ssh`, `zoxide`, and `zsh`. +- Common packages including `kubectl`, `helm`, `ansible`, `sops`, `talosctl`, and more. +- System tweaks for macOS (e.g., Dock settings, Finder preferences, Touch ID for sudo). +- Reproducible builds with Nix flakes. + +## Prerequisites + +### Installing Nix with nix-determinate (Recommended) + +**For macOS (nix-darwin):** Use [nix-determinate](https://github.com/DeterminateSystems/nix-installer) instead of the upstream Nix installer for better reproducibility, sandboxing, and integration on macOS. It avoids common issues with multi-user setups and Homebrew conflicts. + +Run the following command to install: + +```bash +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install +``` + +- This sets up Nix in a single-user mode optimized for deterministic builds. +- After installation, enable flakes by adding `experimental-features = nix-command flakes` to `~/.config/nix/nix.conf` if not already present. + +**For WSL (NixOS):** The standard Nix installation is sufficient. Install Nix following the [official WSL guide](https://nixos.wiki/wiki/NixOS_on_Windows). + +If you prefer nix-determinate for consistency: + +```bash +curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install +``` + +Ensure your WSL2 setup has systemd enabled for full NixOS compatibility (via `wsl.exe --install --distribution Ubuntu` or similar, then configure Nix). + +## Cloning the Repository + +Clone this repository to a location of your choice. For WSL compatibility, clone it to `~/Nix` to match the absolute paths in the flake (you may need to update paths in `flake.nix` otherwise). + +```bash +git clone https://github.com/your-username/dotfiles.git ~/Nix # Adjust URL +cd ~/Nix +``` + +## System Setup + +### macOS (nix-darwin) + +This configuration targets an M-series MacBook ("Dens-MacBook"). + +1. **Apply the flake:** + + ```bash + darwin-rebuild switch --flake .#Dens-MacBook + ``` + + - This builds and activates the nix-darwin configuration from `hosts/mbp/configuration.nix`. + - It includes: + - Homebrew integration via `nix-homebrew` (enable = true, user = "duumxh"). + - Home Manager for user "duumxh" via `hosts/mbp/home.nix`. + - SOPS-Nix for secrets. + - System settings (e.g., Touch ID sudo, Dock autohide, Finder shows hidden files). + +2. **Homebrew Apps Installed:** + - Casks: `arc`, `bettermouse`, `blender`, `citrix-workspace`, `cryptomator`, `discord`, `element`, `ghostty`, `iina`, `keka`, `meta`, `mullvad-vpn`, `obs`, `obsidian`, `orion`, `secretive`, `tailscale-app`, `telegram`, `utm`, `vscodium`. + - MAS Apps: Bitwarden, DropOver, Yubico Authenticator. + - Auto-update and upgrade on activation. + +3. **User Configuration (Home Manager):** + - Imports modules for CLI tools (see Project Structure). + - Zsh with SSH_AUTH_SOCK for Secretive integration. + - Packages from `modules/common.nix` (e.g., `age`, `ansible`, `bat`, `fzf-preview`, `kubectl`, `kubectx`, `helm`, `nerd-fonts.jetbrains-mono`, `nixfmt-rfc-style`, `opentofu`, `sops`, `talosctl`, `teleport`, `zsh-forgit`, etc.). + +### WSL (NixOS-WSL) + +This configuration sets up a lightweight NixOS instance in WSL2. + +1. **Apply the flake:** + + ```bash + sudo nixos-rebuild switch --flake .#nixos + ``` + + - This builds and activates the NixOS configuration from `hosts/wsl/configuration.nix`. + - Note: The flake uses absolute paths (`/home/duumxh/Nix/wsl/`), so ensure the repo is cloned to `~/Nix`. Update `flake.nix` to use relative paths (`./hosts/wsl/`) for portability. + - Includes: + - NixOS-WSL module (wsl.enable = true). + - Default user "duumxh" with zsh shell. + - Experimental features: `nix-command` and `flakes`. + - System state version: 25.05. + +2. **User Configuration (Home Manager):** + - Similar to macOS: Imports modules for CLI tools via `hosts/wsl/home.nix`. + - Same packages from `modules/common.nix`. + - Zsh enabled globally. + +## Project Structure + +- **flake.nix**: Defines inputs (nixpkgs, nix-darwin, NixOS-WSL, home-manager, etc.) and outputs: + - `darwinConfigurations."Dens-MacBook"`: macOS config. + - `nixosConfigurations.nixos`: WSL config. +- **hosts/**: + - `mbp/`: macOS-specific configs (`configuration.nix`, `home.nix`). + - `wsl/`: WSL-specific configs (`configuration.nix`, `home.nix`). +- **modules/**: + - `common.nix`: Shared Home Manager packages. + - `homebrew.nix`: Homebrew settings (casks, MAS apps). + - `programs/`: Modular configs for tools: + - `bat.nix`, `eza.nix`, `fzf.nix`, `git.nix`, `k9s.nix`, `micro.nix`, `ssh.nix`, `zoxide.nix`, `zsh.nix`. + +## Usage + +- **Rebuild after changes:** + - macOS: `darwin-rebuild switch --flake .#Dens-MacBook` + - WSL: `sudo nixos-rebuild switch --flake .#nixos` +- **Update flake lock:** `nix flake update` +- **Secrets management:** Use SOPS for encrypted files (integrated via `sops-nix`). +- **Customize:** Edit modules or add new ones. For user-specific tweaks, modify `home.nix` files. +- **Developing:** Run `nix develop` for a dev shell with common tools (if `devShell` is added to flake). + +## Notes + +- **nix-determinate:** Essential for macOS to ensure deterministic Nix builds and avoid upstream installer pitfalls. Not strictly required for WSL but recommended for consistency. +- **WSL Paths:** Adjust absolute paths in `flake.nix` for non-`~/Nix` clones. +- **State Versions:** macOS: 5 (nix-darwin), Home: 25.11. WSL: 25.05. +- **License:** [MIT](LICENSE) or as per your repo. + +For issues or contributions, open a PR or issue. diff --git a/flake.lock b/flake.lock index bc3cf6c..311ed23 100755 --- a/flake.lock +++ b/flake.lock @@ -40,11 +40,11 @@ ] }, "locked": { - "lastModified": 1760130406, - "narHash": "sha256-GKMwBaFRw/C1p1VtjDz4DyhyzjKUWyi1K50bh8lgA2E=", + "lastModified": 1761005073, + "narHash": "sha256-r6qbieh8iC1q1eCaWv15f4UIp8SeGffwswhNSA1Qk3s=", "owner": "nix-community", "repo": "home-manager", - "rev": "d305eece827a3fe317a2d70138f53feccaf890a1", + "rev": "84e1adb0cdd13f5f29886091c7234365e12b1e7f", "type": "github" }, "original": { @@ -72,11 +72,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1760211302, - "narHash": "sha256-HVl2Z625D3Y7Bh9fPbj0oFt1vGjVWt7ZCaoV1n08ojc=", + "lastModified": 1761041338, + "narHash": "sha256-nPPQWR1MXoGCbrkRPzjOLTzgAfbw1yedqw4IIP6rweA=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "f87e2b258ef5fbe8900380227a7215d54de104fd", + "rev": "2f2587d6d3432c35d23b0933ee9badb9caf1179b", "type": "github" }, "original": { @@ -88,11 +88,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1760212566, - "narHash": "sha256-AqJpqsm1+WXonanloEoivHhb9WqvFvO38l2Y3Ze0E1Q=", + "lastModified": 1761041429, + "narHash": "sha256-x7mhT2JeMpRbFrT6X3NHDdRADjIANXG2tskRfx8WqNA=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "49d48a960dc89c6282a903a8776c946d5c6be362", + "rev": "8de65e50e0df3c71b8f3f1a642b10c0192507db7", "type": "github" }, "original": { @@ -108,11 +108,11 @@ ] }, "locked": { - "lastModified": 1758805352, - "narHash": "sha256-BHdc43Lkayd+72W/NXRKHzX5AZ+28F3xaUs3a88/Uew=", + "lastModified": 1760721282, + "narHash": "sha256-aAHphQbU9t/b2RRy2Eb8oMv+I08isXv2KUGFAFn7nCo=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "c48e963a5558eb1c3827d59d21c5193622a1477c", + "rev": "c3211fcd0c56c11ff110d346d4487b18f7365168", "type": "github" }, "original": { @@ -148,11 +148,11 @@ ] }, "locked": { - "lastModified": 1759833546, - "narHash": "sha256-rOfkgIiiZNPUbf61OqEym60wXEODeDG8XH+gV/SUoUc=", + "lastModified": 1760536587, + "narHash": "sha256-wfWqt+igns/VazjPLkyb4Z/wpn4v+XIjUeI3xY/1ENg=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "7c0c0f4c3a51761434f18209fa9499b8579ff730", + "rev": "f98ee1de1fa36eca63c67b600f5d617e184e82ea", "type": "github" }, "original": { @@ -164,11 +164,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1760038930, - "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", + "lastModified": 1760878510, + "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", + "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", "type": "github" }, "original": { @@ -198,11 +198,11 @@ ] }, "locked": { - "lastModified": 1759635238, - "narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=", + "lastModified": 1760998189, + "narHash": "sha256-ee2e1/AeGL5X8oy/HXsZQvZnae6XfEVdstGopKucYLY=", "owner": "Mic92", "repo": "sops-nix", - "rev": "6e5a38e08a2c31ae687504196a230ae00ea95133", + "rev": "5a7d18b5c55642df5c432aadb757140edfeb70b3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index e482c3e..cb35c33 100755 --- a/flake.nix +++ b/flake.nix @@ -1,85 +1,102 @@ { - description = "duumxh flake config"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nix-homebrew.url = "github:zhaofengli/nix-homebrew"; - nix-darwin = { - url = "github:nix-darwin/nix-darwin/master"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nixos-wsl = { - url = "github:nix-community/NixOS-WSL/main"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - homebrew-core = { - url = "github:homebrew/homebrew-core"; - flake = false; - }; - homebrew-cask = { - url = "github:homebrew/homebrew-cask"; - flake = false; - }; - homebrew-bundle = { - url = "github:homebrew/homebrew-bundle"; - flake = false; - }; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - sops-nix = { - url = "github:Mic92/sops-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = inputs@{ self, nixpkgs, nix-darwin, nixos-wsl, nix-homebrew, homebrew-core, homebrew-cask, homebrew-bundle, home-manager, sops-nix }: { - darwinConfigurations."Dens-MacBook" = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; - modules = [ - ./hosts/mbp/configuration.nix - sops-nix.darwinModules.sops + description = "duumxh flake config"; - nix-homebrew.darwinModules.nix-homebrew { - nix-homebrew = { - enable = true; - enableRosetta = true; - user = "duumxh"; - taps = { - "homebrew/homebrew-core" = homebrew-core; - "homebrew/homebrew-cask" = homebrew-cask; - "homebrew/homebrew-bundle" = homebrew-bundle; - }; - mutableTaps = false; - }; - } - - home-manager.darwinModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.duumxh = import ./hosts/mbp/home.nix; - } - ]; - }; - darwinPackages = self.darwinConfigurations."Dens-MacBook".pkgs; - - nixosConfigurations = { - nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - nixos-wsl.nixosModules.default { - system.stateVersion = "25.05"; - wsl.enable = true; - } - /home/duumxh/Nix/wsl/configuration.nix - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.duumxh = /home/duumxh/Nix/wsl/home.nix; - } - ]; - }; - }; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nix-homebrew.url = "github:zhaofengli/nix-homebrew"; + nix-darwin = { + url = "github:nix-darwin/nix-darwin/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-wsl = { + url = "github:nix-community/NixOS-WSL/main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + homebrew-core = { + url = "github:homebrew/homebrew-core"; + flake = false; + }; + homebrew-cask = { + url = "github:homebrew/homebrew-cask"; + flake = false; + }; + homebrew-bundle = { + url = "github:homebrew/homebrew-bundle"; + flake = false; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; + + outputs = + { + self, + nixpkgs, + nix-darwin, + nixos-wsl, + nix-homebrew, + homebrew-core, + homebrew-cask, + homebrew-bundle, + home-manager, + sops-nix, + }: + { + darwinConfigurations."Dens-MacBook" = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + modules = [ + ./hosts/mbp/configuration.nix + sops-nix.darwinModules.sops + + nix-homebrew.darwinModules.nix-homebrew + { + nix-homebrew = { + enable = true; + enableRosetta = true; + user = "duumxh"; + taps = { + "homebrew/homebrew-core" = homebrew-core; + "homebrew/homebrew-cask" = homebrew-cask; + "homebrew/homebrew-bundle" = homebrew-bundle; + }; + mutableTaps = false; + }; + } + + home-manager.darwinModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.duumxh = import ./hosts/mbp/home.nix; + } + ]; + }; + darwinPackages = self.darwinConfigurations."Dens-MacBook".pkgs; + + nixosConfigurations = { + nixos = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + nixos-wsl.nixosModules.default + { + system.stateVersion = "25.05"; + wsl.enable = true; + } + /home/duumxh/Nix/wsl/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.duumxh = /home/duumxh/Nix/wsl/home.nix; + } + ]; + }; + }; + }; } diff --git a/hosts/mbp/configuration.nix b/hosts/mbp/configuration.nix index a647f63..3444d64 100755 --- a/hosts/mbp/configuration.nix +++ b/hosts/mbp/configuration.nix @@ -1,77 +1,77 @@ -{ config, lib, pkgs, ... }: +{ ... }: { - #Disable nix managment, since we use nix-determinate - nix.enable = false; + #Disable nix managment, since we use nix-determinate + nix.enable = false; - imports = [ - ../../modules/homebrew.nix + imports = [ + ../../modules/homebrew.nix ]; - homebrew = { - enable = true; + homebrew = { + enable = true; - onActivation.autoUpdate = true; - onActivation.upgrade = true; - #onActivation.cleanup = "zap"; + onActivation.autoUpdate = true; + onActivation.upgrade = true; + #onActivation.cleanup = "zap"; - brews = [ - "podman" - ]; + brews = [ + "podman" + ]; - casks = [ - "arc" - "bettermouse" - "blender" - "citrix-workspace" - "cryptomator" - "Discord" - "Element" - "ghostty" - "IINA" - "Keka" - "meta" - "mullvad-vpn" - "obs" - "Obsidian" - "orion" - "Secretive" - "tailscale-app" - "telegram" - "UTM" - "vscodium" - ]; + casks = [ + "arc" + "bettermouse" + "blender" + "citrix-workspace" + "cryptomator" + "Discord" + "Element" + "ghostty" + "IINA" + "Keka" + "meta" + "mullvad-vpn" + "obs" + "Obsidian" + "orion" + "Secretive" + "tailscale-app" + "telegram" + "UTM" + "vscodium" + ]; - masApps = { - "Bitwarden" = 1352778147; - "DropOver" = 1355679052; - "Yubico Authenticator" = 1497506650; - }; - }; + masApps = { + "Bitwarden" = 1352778147; + "DropOver" = 1355679052; + "Yubico Authenticator" = 1497506650; + }; + }; - system.primaryUser = "duumxh"; - users.users.duumxh.home = "/Users/duumxh"; + system.primaryUser = "duumxh"; + users.users.duumxh.home = "/Users/duumxh"; - security.pam.services.sudo_local.touchIdAuth = true; - system.stateVersion = 5; - system.defaults = { - screencapture.type = "png"; - dock = { - autohide = true; - autohide-delay = 0.0; - mineffect = "scale"; - minimize-to-application = true; - mru-spaces = false; - show-recents = false; - tilesize = 40; - }; + security.pam.services.sudo_local.touchIdAuth = true; + system.stateVersion = 5; + system.defaults = { + screencapture.type = "png"; + dock = { + autohide = true; + autohide-delay = 0.0; + mineffect = "scale"; + minimize-to-application = true; + mru-spaces = false; + show-recents = false; + tilesize = 40; + }; - finder = { - AppleShowAllFiles = true; - AppleShowAllExtensions = true; - ShowPathbar = true; - ShowStatusBar = true; - }; - }; + finder = { + AppleShowAllFiles = true; + AppleShowAllExtensions = true; + ShowPathbar = true; + ShowStatusBar = true; + }; + }; - nixpkgs.hostPlatform = "aarch64-darwin"; + nixpkgs.hostPlatform = "aarch64-darwin"; } diff --git a/hosts/mbp/home.nix b/hosts/mbp/home.nix index eeea22b..b11099f 100755 --- a/hosts/mbp/home.nix +++ b/hosts/mbp/home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ ... }: { imports = [ @@ -14,9 +14,16 @@ ../../modules/programs/zsh.nix ]; - programs.zsh = { - localVariables = { + programs.ssh.matchBlocks."*".extraOptions = { + SetEnv = "TERM=xterm-256color"; + }; + programs.zsh = { + localVariables = { SSH_AUTH_SOCK = "/Users/duumxh/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh"; - }; - }; + }; + shellAliases = { + nix-upgrade = "sudo darwin-rebuild switch --flake ~/Nix"; + }; + }; + } diff --git a/hosts/wsl/configuration.nix b/hosts/wsl/configuration.nix index 809604b..c61f63d 100755 --- a/hosts/wsl/configuration.nix +++ b/hosts/wsl/configuration.nix @@ -5,18 +5,21 @@ # NixOS-WSL specific options are documented on the NixOS-WSL repository: # https://github.com/nix-community/NixOS-WSL -{ config, lib, pkgs, ... }: +{ pkgs, ... }: { - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; wsl.defaultUser = "duumxh"; wsl.interop.register = true; programs.zsh.enable = true; users.users.duumxh = { - isNormalUser = true; - shell = pkgs.zsh; + isNormalUser = true; + shell = pkgs.zsh; }; # This value determines the NixOS release from which the default diff --git a/hosts/wsl/home.nix b/hosts/wsl/home.nix index afef99f..acda1cc 100755 --- a/hosts/wsl/home.nix +++ b/hosts/wsl/home.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ ... }: { imports = [ diff --git a/modules/common.nix b/modules/common.nix index 992aad1..a866d45 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,31 +1,37 @@ -{ pkgs, lib, ... }: +{ pkgs, ... }: { # Define home options directly if this is a standalone home.nix # or within config if it's a module home = { packages = with pkgs; [ - age - ansible - bat - deploy-rs - fzf-preview - kubectl - kubectx - kubernetes-helm - nerd-fonts.jetbrains-mono - nixfmt-rfc-style - opentofu - sops - talosctl - teleport - zsh-forgit - zsh-fzf-history-search - zsh-fzf-tab + age + ansible + bat + bun + cilium-cli + cmake + ninja + rustup + deploy-rs + fzf-preview + kubectl + kubectx + kubernetes-helm + nerd-fonts.jetbrains-mono + nil + nixd + opentofu + sops + talosctl + teleport + zsh-forgit + zsh-fzf-history-search + zsh-fzf-tab rclone ]; stateVersion = "25.11"; }; - #nixpkgs.config.allowUnfree = true; # It's better to put this in configuration.nix or a more specific place if it's only meant for certain hosts. + #nixpkgs.config.allowUnfree = true; # It's better to put this in configuration.nix or a more specific place if it's only meant for certain hosts. } diff --git a/modules/homebrew.nix b/modules/homebrew.nix index 1b9e8e2..1a8ce3b 100644 --- a/modules/homebrew.nix +++ b/modules/homebrew.nix @@ -1,40 +1,43 @@ -{ config, lib, pkgs, ... }: +{ ... }: { homebrew = { - enable = true; + enable = true; - onActivation.autoUpdate = true; - onActivation.upgrade = true; - #onActivation.cleanup = "zap"; + onActivation.autoUpdate = true; + onActivation.upgrade = true; + #onActivation.cleanup = "zap"; - casks = [ - "arc" - "bettermouse" - "blender" - "citrix-workspace" - "cryptomator" - "Discord" - "Element" - "ghostty" - "IINA" - "Keka" - "meta" - "mullvad-vpn" - "obs" - "Obsidian" - "orion" - "Secretive" - "tailscale-app" - "telegram" - "UTM" - "vscodium" - ]; + casks = [ + "arc" + "bettermouse" + "blender" + "citrix-workspace" + "cryptomator" + "Discord" + "Element" + "ghostty" + "IINA" + "Keka" + "meta" + "mullvad-browser" + "mullvad-vpn" + "obs" + "Obsidian" + "orion" + "Secretive" + "tailscale-app" + "telegram" + "UTM" + "vscodium" + "raycast" + "zed" + ]; - masApps = { - "Bitwarden" = 1352778147; - "DropOver" = 1355679052; - "Yubico Authenticator" = 1497506650; - }; - }; -} \ No newline at end of file + masApps = { + "Bitwarden" = 1352778147; + "DropOver" = 1355679052; + "Yubico Authenticator" = 1497506650; + }; + }; +} diff --git a/modules/programs/bat.nix b/modules/programs/bat.nix index 49e8362..111168c 100644 --- a/modules/programs/bat.nix +++ b/modules/programs/bat.nix @@ -1,7 +1,7 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.bat = { enable = true; }; -} \ No newline at end of file +} diff --git a/modules/programs/eza.nix b/modules/programs/eza.nix index 1023f1d..c2b2b0d 100644 --- a/modules/programs/eza.nix +++ b/modules/programs/eza.nix @@ -1,8 +1,8 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.eza = { enableZshIntegration = true; enable = true; }; -} \ No newline at end of file +} diff --git a/modules/programs/fzf.nix b/modules/programs/fzf.nix index 3e766fb..15b0b7f 100644 --- a/modules/programs/fzf.nix +++ b/modules/programs/fzf.nix @@ -1,35 +1,35 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.fzf = { - colors = { - fg = "-1"; - "fg+" = "#d0d0d0"; - bg = "-1"; - "bg+" = "#262626"; - hl = "#5f87af"; - "hl+" = "#5fd7ff"; - info = "#afaf87"; - marker = "#87ff00"; - prompt = "#d7005f"; - spinner = "#af5fff"; - pointer = "#af5fff"; - header = "#87afaf"; - border = "#262626"; - label = "#aeaeae"; - query = "#d9d9d9"; - }; - defaultOptions = [ - "--border=rounded" - "--border-label" - "--preview-window=border-rounded" - "--prompt=> " - "--marker=>" - "--pointer=◆" - "--separator=─" - "--scrollbar=│" - ]; - enableZshIntegration = true; - enable = true; + colors = { + fg = "-1"; + "fg+" = "#d0d0d0"; + bg = "-1"; + "bg+" = "#262626"; + hl = "#5f87af"; + "hl+" = "#5fd7ff"; + info = "#afaf87"; + marker = "#87ff00"; + prompt = "#d7005f"; + spinner = "#af5fff"; + pointer = "#af5fff"; + header = "#87afaf"; + border = "#262626"; + label = "#aeaeae"; + query = "#d9d9d9"; + }; + defaultOptions = [ + "--border=rounded" + "--border-label" + "--preview-window=border-rounded" + "--prompt=> " + "--marker=>" + "--pointer=◆" + "--separator=─" + "--scrollbar=│" + ]; + enableZshIntegration = true; + enable = true; }; -} \ No newline at end of file +} diff --git a/modules/programs/git.nix b/modules/programs/git.nix index d69b307..346ed95 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -1,9 +1,13 @@ -{ config, pkgs, lib, ... }: +{ ... }: { programs.git = { enable = true; - userName = "Den Afanasyev"; - userEmail = "ceo@furry.industries"; + settings = { + user = { + name = "Den Afanasyev"; + email = "ceo@furry.industries"; + }; + }; }; -} \ No newline at end of file +} diff --git a/modules/programs/k9s.nix b/modules/programs/k9s.nix index 140b4f6..35ffb83 100644 --- a/modules/programs/k9s.nix +++ b/modules/programs/k9s.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.k9s = { skins = { diff --git a/modules/programs/micro.nix b/modules/programs/micro.nix index d1624c9..1afb0ff 100644 --- a/modules/programs/micro.nix +++ b/modules/programs/micro.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.micro = { @@ -8,4 +8,4 @@ }; enable = true; }; -} \ No newline at end of file +} diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index 97f72c6..c3157c9 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -1,8 +1,8 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.ssh = { enable = true; enableDefaultConfig = false; }; -} \ No newline at end of file +} diff --git a/modules/programs/zoxide.nix b/modules/programs/zoxide.nix index 2136ae5..fb4c306 100644 --- a/modules/programs/zoxide.nix +++ b/modules/programs/zoxide.nix @@ -1,8 +1,8 @@ -{ config, lib, pkgs, ... }: +{ ... }: { programs.zoxide = { enableZshIntegration = true; enable = true; }; -} \ No newline at end of file +} diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index b509952..4b748f0 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -1,53 +1,56 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { programs.zsh = { - enable = true; - enableCompletion = true; - syntaxHighlighting.enable = true; + enable = true; + enableCompletion = true; + syntaxHighlighting.enable = true; - prezto = { - prompt = { theme = "powerlevel10k"; }; - enable = true; - }; - - autosuggestion = { - #highlight = "fg=#ff00ff,bg=cyan,bold,underline"; - #strategy = [ "completion" "history" ]; - enable = true; - }; - - plugins = [ - { - name = "fzf-tab"; - src = "${pkgs.zsh-fzf-tab}/share/fzf-tab"; - } - ]; - - history = { - append = true; - expireDuplicatesFirst = true; - }; - - initContent = lib.mkOrder 500 '' - source ~/.p10k.zsh - echo "Hey there raccoon! 🦝🍁" - ''; - localVariables = { - PURE_GIT_PULL = "0"; - TELEPORT_ADD_KEYS_TO_AGENT = "no"; - K9S_SKIN = "transparent"; + prezto = { + prompt = { + theme = "powerlevel10k"; }; + enable = true; + }; - shellAliases = { - ls = "eza"; - cd = "z"; - cat = "bat"; - k = "kubectl"; - m = "micro"; - h = "helm"; - tp = "teleport"; - t = "talosctl"; - }; - }; -} \ No newline at end of file + autosuggestion = { + #highlight = "fg=#ff00ff,bg=cyan,bold,underline"; + #strategy = [ "completion" "history" ]; + enable = true; + }; + + plugins = [ + { + name = "fzf-tab"; + src = "${pkgs.zsh-fzf-tab}/share/fzf-tab"; + } + ]; + + history = { + append = true; + expireDuplicatesFirst = true; + }; + + localVariables = { + PURE_GIT_PULL = "0"; + TELEPORT_ADD_KEYS_TO_AGENT = "no"; + K9S_SKIN = "transparent"; + }; + + initContent = lib.mkOrder 500 '' + source ~/.p10k.zsh + echo "Hey there raccoon! 🦝🍁" + ''; + + shellAliases = { + ls = "eza"; + cd = "z"; + cat = "bat"; + k = "kubectl"; + m = "micro"; + h = "helm"; + tp = "teleport"; + t = "talosctl"; + }; + }; +}