commit 5edf0f15fc931c4a411cdabb3605192a121b8c0e Author: Den Afanasyev Date: Sun Jun 15 07:14:24 2025 +0300 dotfiles init diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7132604 --- /dev/null +++ b/flake.lock @@ -0,0 +1,157 @@ +{ + "nodes": { + "brew-src": { + "flake": false, + "locked": { + "lastModified": 1749511373, + "narHash": "sha256-7u1TdHQaUCzzgf/n8T3bQosuYXyNBEPU/3WQQqozE5o=", + "owner": "Homebrew", + "repo": "brew", + "rev": "7b4ef99fed96966269ee35994407fa4c06097a4d", + "type": "github" + }, + "original": { + "owner": "Homebrew", + "ref": "4.5.6", + "repo": "brew", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749657191, + "narHash": "sha256-QLilaHuhGxiwhgceDWESj9gFcKIdEp7+9lRqNGpN8S4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "faeab32528a9360e9577ff4082de2d35c6bbe1ce", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "homebrew-bundle": { + "flake": false, + "locked": { + "lastModified": 1745335228, + "narHash": "sha256-TIKR2UgtyUmHLNZp255/vLs+1I10hXe+sciMEbAGFwE=", + "owner": "homebrew", + "repo": "homebrew-bundle", + "rev": "a3265c84b232e13048ecbf6fc18a2eedfadbeb08", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-bundle", + "type": "github" + } + }, + "homebrew-cask": { + "flake": false, + "locked": { + "lastModified": 1749757829, + "narHash": "sha256-a3kUNkJAbx4pI8wHdkDpzECht9CAFR5TcapasVdQUis=", + "owner": "homebrew", + "repo": "homebrew-cask", + "rev": "7fd6fcd0f86d5b2a67915eec1fa48c0aa8efb8a4", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-cask", + "type": "github" + } + }, + "homebrew-core": { + "flake": false, + "locked": { + "lastModified": 1749751630, + "narHash": "sha256-WE3L8N7Ubyzzp8Ft5LrnxSF02YQpMpgGEst2nKhNyvY=", + "owner": "homebrew", + "repo": "homebrew-core", + "rev": "2caa6d1734f371ccc56f3f8724878db49b9dabe2", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-core", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749739639, + "narHash": "sha256-oubMGIrW/vBdX+xw47LEcxrqYqZUdLYPE8xrLDKoBE8=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "72c88d5928196159e3a0d03e67b25d8044546ca6", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-homebrew": { + "inputs": { + "brew-src": "brew-src" + }, + "locked": { + "lastModified": 1749519004, + "narHash": "sha256-alxmYUeHT/rKYKuHuOHDazQqCIYdbEsaEpc1uMGosfM=", + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "rev": "e048b6646bc275341e0a854fa06168cec4c33962", + "type": "github" + }, + "original": { + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "homebrew-bundle": "homebrew-bundle", + "homebrew-cask": "homebrew-cask", + "homebrew-core": "homebrew-core", + "nix-darwin": "nix-darwin", + "nix-homebrew": "nix-homebrew", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..1a50b0d --- /dev/null +++ b/flake.nix @@ -0,0 +1,59 @@ +{ + description = "duumxh flake config"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew"; + nix-darwin = { + url = "github:nix-darwin/nix-darwin/master"; + 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"; + }; + + }; + + outputs = inputs@{ self, nixpkgs, nix-darwin, nix-homebrew, homebrew-core, homebrew-cask, homebrew-bundle, home-manager }: { + darwinConfigurations."MacBook-Den" = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + modules = [ + ./mbp.nix + + 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 ./home.nix; + } + ]; + }; + darwinPackages = self.darwinConfigurations."MacBook-Den".pkgs; + }; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..fff5559 --- /dev/null +++ b/home.nix @@ -0,0 +1,78 @@ +{ config, pkgs, lib, ... }: + +{ + + home = { + stateVersion = "25.11"; + packages = with pkgs; [ + neovim + temurin-jre-bin + rclone + storj-uplink + micro + bat + teleport + ansible + opentofu + yandex-cloud + #nodejs_23 + bun + nerd-fonts.jetbrains-mono + #inetutils + ffmpeg + go + gcc + bchunk + ]; + }; + + programs.git = { + enable = true; + userName = "Den Afanasyev"; + userEmail = "git@duumxh.me"; + }; + + programs.zsh = { + enable = true; + syntaxHighlighting.enable = true; + enableCompletion = true; + autosuggestion.enable = true; + oh-my-zsh = { + enable = true; + }; + shellAliases = { + nix-update = "sudo darwin-rebuild switch --flake ~/.nix"; + }; + }; + + programs.starship = { + enable = true; + enableZshIntegration = true; + }; + + programs.fzf = { + enable = true; + enableZshIntegration = true; + }; + + programs.zoxide = { + enable = true; + enableZshIntegration = true; + }; + + programs.eza = { + enable = true; + enableZshIntegration = true; + }; + + programs.zellij = { + enable = false; + enableZshIntegration = true; + }; + + programs.bat = { + enable = true; + }; + + programs.home-manager.enable = true; +} diff --git a/mbp.nix b/mbp.nix new file mode 100644 index 0000000..2e73400 --- /dev/null +++ b/mbp.nix @@ -0,0 +1,87 @@ +{ config, lib, pkgs, ... }: + +{ + homebrew = { + enable = true; + + onActivation.autoUpdate = true; + onActivation.upgrade = true; + #onActivation.cleanup = "zap"; + + casks = [ + "telegram" + "blip" + "meta" + "doppler" + "steam" + "logi-options+" + "cryptomator" + "crossover" + "clone-hero" + "mullvadvpn" + "vscodium" + "obs" + "qbittorrent@lt20" + "krita" + "arc" + "tailscale" + "blender" + "UTM" + "Keka" + "Secretive" + "Loop" + "HiddenBar" + "Obsidian" + "RayCast" + "Discord" + "Element" + "IINA" + "appcleaner" + "wireshark" + "ghostty" + "nvidia-geforce-now" + "teamspeak-client@beta" + "mac-mouse-fix" + "firefox" + "prismlauncher" + "orion" + ]; + + masApps = { + "Bitwarden" = 1352778147; + "DropOver" = 1355679052; + }; + }; + + system.primaryUser = "duumxh"; + users.users.duumxh.home = "/Users/duumxh"; + + nix.settings.experimental-features = "nix-command flakes"; + + programs.zsh.enable = true; + programs.gnupg.agent.enable = true; + + security.pam.services.sudo_local.touchIdAuth = true; + system.stateVersion = 5; + system.defaults = { + screencapture.type = "png"; + dock = { + autohide = true; + mineffect = "scale"; + minimize-to-application = true; + mru-spaces = false; + show-recents = false; + tilesize = 48; + }; + + finder = { + AppleShowAllFiles = true; + AppleShowAllExtensions = true; + ShowPathbar = true; + ShowStatusBar = true; + }; + }; + + nixpkgs.hostPlatform = "aarch64-darwin"; + nixpkgs.config.allowUnfree = true; +} diff --git a/thinkpad.nix b/thinkpad.nix new file mode 100644 index 0000000..e69de29