From aa507c081404d2af5883be73babac8a6543297af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Wed, 2 Oct 2024 14:38:34 +0100 Subject: [PATCH] use zsh on work mac --- flake.nix | 2 +- nixos/boxes/cushy/default.nix | 23 +++++++++++++++++------ nixos/git/default.nix | 12 ++++++------ nixos/zsh/default.nix | 10 ++++++++-- 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index bda8588a..179f3187 100644 --- a/flake.nix +++ b/flake.nix @@ -179,7 +179,7 @@ useGlobalPkgs = true; useUserPackages = true; users."Cyryl.Plotnicki" = { - home.username = "Cyryl.Plotnicki"; + home.username = "Cyryl.Plotnicki"; home.homeDirectory = "/Users/Cyryl.Plotnicki"; programs.zsh.loginExtra = '' eval "$(/opt/homebrew/bin/brew shellenv)" diff --git a/nixos/boxes/cushy/default.nix b/nixos/boxes/cushy/default.nix index 01fb3394..01fc959e 100644 --- a/nixos/boxes/cushy/default.nix +++ b/nixos/boxes/cushy/default.nix @@ -5,9 +5,22 @@ lib, nixpkgs-nixos-unstable-and-unfree, ... -}: { +}: let + username = "Cyryl.Plotnicki"; +in { imports = [ - (import ../../git { inherit pkgs; inherit lib; inherit config; cyplo.username = "Cyryl.Plotnicki"; }) + (import ../../zsh { + inherit pkgs; + inherit lib; + inherit config; + cyplo.username = username; + }) + (import ../../git { + inherit pkgs; + inherit lib; + inherit config; + cyplo.username = username; + }) ]; services.nix-daemon.enable = true; @@ -33,8 +46,6 @@ }) ]; - - homebrew.enable = true; homebrew.casks = [ "caffeine" @@ -61,10 +72,10 @@ ]; programs.kitty.settings.hide_window_decorations = lib.mkForce false; - home.sessionPath = ["$HOME/bin"]; + home.sessionPath = ["$HOME/bin" "/Users/Cyryl.Plotnicki/Library/Application Support/JetBrains/Toolbox/scripts"]; home.packages = with pkgs; []; programs = { - git.userEmail = "cyryl.plotnicki@cushon.co.uk"; + git.userEmail = "cyryl.plotnicki@cushon.co.uk"; }; }; } diff --git a/nixos/git/default.nix b/nixos/git/default.nix index f8e93032..0ac1ec70 100644 --- a/nixos/git/default.nix +++ b/nixos/git/default.nix @@ -4,11 +4,11 @@ lib, cyplo, ... -}: -let - username = if cyplo ? username then "${cyplo.username}" else "cyryl"; -in -{ - +}: let + username = + if cyplo ? username + then "${cyplo.username}" + else "cyryl"; +in { home-manager.users."${username}" = {...}: {imports = [./home.nix];}; } diff --git a/nixos/zsh/default.nix b/nixos/zsh/default.nix index 7c6dc526..2b9a6a17 100644 --- a/nixos/zsh/default.nix +++ b/nixos/zsh/default.nix @@ -2,8 +2,14 @@ config, pkgs, lib, + cyplo, ... -}: { +}: let + username = + if cyplo ? username + then "${cyplo.username}" + else "cyryl"; +in { programs.zsh.enable = true; - home-manager.users.cyryl = {...}: {imports = [./home.nix];}; + home-manager.users."${username}" = {...}: {imports = [./home.nix];}; }