diff --git a/.config/nix/flake.nix b/.config/nix/flake.nix index 80941a2..eab2676 100644 --- a/.config/nix/flake.nix +++ b/.config/nix/flake.nix @@ -37,7 +37,7 @@ useGlobalPkgs = true; useUserPackages = true; extraSpecialArgs = inputs; - users.tobi.imports = [ ./modules/home-manager ]; + users.tobi = import ./home; }; } ]; diff --git a/.config/nix/home/alacritty.nix b/.config/nix/home/alacritty.nix new file mode 100644 index 0000000..12af8df --- /dev/null +++ b/.config/nix/home/alacritty.nix @@ -0,0 +1,17 @@ +{ ... }: +{ + programs.alacritty = { + enable = true; + settings.font = { + size = 14; + normal.family = "Iosevka Comfy"; + normal.style = "Regular"; + }; + settings.window = { + padding.x = 18; + padding.y = 18; + opacity = 0.85; + decorations = "Buttonless"; + }; + }; +} diff --git a/.config/nix/home/amethyst.nix b/.config/nix/home/amethyst.nix new file mode 100644 index 0000000..626c817 --- /dev/null +++ b/.config/nix/home/amethyst.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + xdg.configFile."amethyst/amethyst.yml".text = '' + window-margins: true + window-margin-size: 10 + mouse-swaps-windows: true + mouse-resizes-windows: true + ''; +} diff --git a/.config/nix/home/core.nix b/.config/nix/home/core.nix new file mode 100644 index 0000000..6ab1f8a --- /dev/null +++ b/.config/nix/home/core.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + raycast + ripgrep + tree + curl + less + ]; + + home.sessionVariables = { + PAGER = "less"; + CLICOLOR = 1; + EDITOR = "emacs"; + }; + + programs.bat.enable = true; + programs.git.enable = true; +} diff --git a/.config/nix/home/default.nix b/.config/nix/home/default.nix new file mode 100644 index 0000000..94a1def --- /dev/null +++ b/.config/nix/home/default.nix @@ -0,0 +1,21 @@ +{ ... }: +let + username = "tobi"; +in +{ + imports = [ + ./alacritty.nix + ./amethyst.nix + ./core.nix + ./starship.nix + ./zsh.nix + ]; + + home = { + username = username; + homeDirectory = "/Users/${username}"; + stateVersion = "23.05"; + }; + + programs.home-manager.enable = true; +} diff --git a/.config/nix/home/starship.nix b/.config/nix/home/starship.nix new file mode 100644 index 0000000..6934dab --- /dev/null +++ b/.config/nix/home/starship.nix @@ -0,0 +1,10 @@ +{ ... }: +{ + programs.starship = { + enable = true; + enableZshIntegration = true; + settings.gcloud.disabled = true; + settings.aws.disabled = true; + settings.hostname.style = "bold green"; + }; +} diff --git a/.config/nix/home/zsh.nix b/.config/nix/home/zsh.nix new file mode 100644 index 0000000..4b9147d --- /dev/null +++ b/.config/nix/home/zsh.nix @@ -0,0 +1,13 @@ +{ ... }: +{ + programs.zsh = { + enable = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + shellAliases = { + ls = "ls --color=auto -F"; + nixswitch = "pushd ~/.config/nix; darwin-rebuild switch --flake .#"; + nixup = "pushd ~/.config/nix; nix flake update"; + }; + }; +} diff --git a/.config/nix/modules/apps.nix b/.config/nix/modules/apps.nix index 369dfca..804b46f 100644 --- a/.config/nix/modules/apps.nix +++ b/.config/nix/modules/apps.nix @@ -2,17 +2,27 @@ homebrew = { enable = true; + onActivation.autoUpdate = false; + brews = [ + "curl" "imagemagick" "trippy" + "wget" ]; casks = [ "amethyst" + "anki" + "caffeine" "firefox" "logseq" + "iglance" + "karabiner-elements" + "nextcloud" "protonmail-bridge" "protonvpn" + "temurin17" "thunderbird" "vlc" ]; diff --git a/.config/nix/modules/darwin/default.nix b/.config/nix/modules/darwin/default.nix index 13bce3d..4d3509e 100644 --- a/.config/nix/modules/darwin/default.nix +++ b/.config/nix/modules/darwin/default.nix @@ -1,7 +1,5 @@ ({ pkgs, ... }: { - programs.zsh.enable = true; - environment = { shells = with pkgs; [ bash zsh fish ]; loginShell = pkgs.zsh; diff --git a/.config/nix/modules/home-manager/default.nix b/.config/nix/modules/home-manager/default.nix deleted file mode 100644 index 21d5d1f..0000000 --- a/.config/nix/modules/home-manager/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ pkgs, ... }: { - home.username = "tobi"; - home.homeDirectory = "/Users/tobi"; - home.stateVersion = "23.05"; - home.packages = with pkgs; [ - raycast - ripgrep - tree - curl - less - ]; - home.sessionVariables = { - PAGER = "less"; - CLICOLOR = 1; - EDITOR = "emacs"; - }; - programs.home-manager.enable = true; - programs.bat.enable = true; - programs.git.enable = true; - programs.zsh = { - enable = true; - enableCompletion = true; - syntaxHighlighting.enable = true; - shellAliases = { - ls = "ls --color=auto -F"; - nixswitch = "pushd ~/.config/nix; darwin-rebuild switch --flake .#"; - nixup = "pushd ~/.config/nix; nix flake update"; - }; - }; - programs.starship = { - enable = true; - enableZshIntegration = true; - settings.gcloud.disabled = true; - settings.aws.disabled = true; - settings.hostname.style = "bold green"; - }; - programs.alacritty = { - enable = true; - settings.font = { - size = 14; - normal.family = "Iosevka Comfy"; - normal.style = "Regular"; - }; - settings.window = { - padding.x = 18; - padding.y = 18; - opacity = 0.85; - decorations = "Buttonless"; - }; - }; - xdg.configFile."amethyst/amethyst.yml".text = '' - window-margins: true - window-margin-size: 10 - mouse-swaps-windows: true - mouse-resizes-windows: true - ''; -} diff --git a/.config/nix/modules/system.nix b/.config/nix/modules/system.nix index 7cb87be..2eae959 100644 --- a/.config/nix/modules/system.nix +++ b/.config/nix/modules/system.nix @@ -33,6 +33,7 @@ }; menuExtraClock = { + IsAnalog = false; Show24Hour = true; ShowDate = 0; ShowDayOfWeek = false;