diff --git a/flake.lock b/flake.lock index 0dee5fe..5a8a1b0 100644 --- a/flake.lock +++ b/flake.lock @@ -111,7 +111,7 @@ "nix-darwin": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgs-darwin" ] }, "locked": { @@ -147,11 +147,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748022455, - "narHash": "sha256-XiE6W4I2cB+b/mYdkdrW70M2KPqj5nY0VHw3+i6duvs=", + "lastModified": 1750969886, + "narHash": "sha256-zW/OFnotiz/ndPFdebpo3X0CrbVNf22n4DjN2vxlb58=", "owner": "nixos", "repo": "nixpkgs", - "rev": "85464f6a9651821d209a37a90a2f05f1fc981941", + "rev": "a676066377a2fe7457369dd37c31fd2263b662f4", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-darwin": { + "locked": { + "lastModified": 1750903198, + "narHash": "sha256-63IOb2kjG8VERVnwgoWSrN13bmKeQVoDINOu10/h8iw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ca5542ac5290cdfe15e36f82fb5de02764ade1f0", "type": "github" }, "original": { @@ -229,6 +245,7 @@ "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", + "nixpkgs-darwin": "nixpkgs-darwin", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", "plasma-manager": "plasma-manager", diff --git a/flake.nix b/flake.nix index 7317aa2..5219080 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,8 @@ inputs = { # Specify the source of Home Manager and Nixpkgs. - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-25.05-darwin"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; home-manager = { url = "github:nix-community/home-manager/release-25.05"; @@ -15,7 +16,7 @@ }; nix-darwin = { url = "github:LnL7/nix-darwin/nix-darwin-25.05"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs-darwin"; }; rycee-nurpkgs = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; @@ -33,8 +34,9 @@ }; }; - outputs = { self, nix-darwin, nixpkgs, nixpkgs-unstable, home-manager, agenix - , rycee-nurpkgs, nur, nix-flatpak, plasma-manager, ... }: + outputs = { self, nix-darwin, nixpkgs, nixpkgs-darwin, nixpkgs-unstable + , home-manager, agenix, rycee-nurpkgs, nur, nix-flatpak, plasma-manager, ... + }: let mkHomeConfiguration = { hostname, arch ? "x86_64", os ? "linux" , desktop ? false, extraModules ? [ ] }: diff --git a/homes/common.nix b/homes/common.nix index ddd6c73..38edd35 100644 --- a/homes/common.nix +++ b/homes/common.nix @@ -10,6 +10,7 @@ let } ''; + starship-config = import ./../programs/starship.nix; in { home = { stateVersion = "23.11"; @@ -144,58 +145,7 @@ in { ''; }; pandoc = { enable = true; }; - starship = { - enable = true; - enableBashIntegration = true; - enableZshIntegration = true; - settings = { - add_newline = false; - format = lib.concatStrings [ - "$os" - " " - "($container )" - "\\[" - "([$username](bold yellow)@[$hostname](bold red) )" - "[$directory](cyan)" - "($git_branch$git_commit$git_state$git_metrics$git_status)" - "\\] " - "($package)" - "($conda$direnv$julia$nix_shell$nodejs$python$quarto$rlang$ruby)" - "($shell)" - "$character" - ]; - right_format = lib.concatStrings [ "$cmd_duration" "$battery" ]; - character = { - success_symbol = "[\\$](bold green)"; - error_symbol = "[\\$](bold red)"; - }; - git_metrics = { disabled = false; }; - git_status = { - # Remove trailing space from format string - format = "([\\[$all_status$ahead_behind\\]]($style))"; - }; - hostname = { format = "[$hostname]($style)"; }; - shell = { - # Show which shell if not using zsh (the default) - disabled = false; - zsh_indicator = ""; - style = "yellow bold"; - }; - os = { - disabled = false; - symbols = { - AlmaLinux = ""; - Alpine = ""; - CentOS = ""; - Debian = ""; - Fedora = ""; - Macos = ""; - }; - }; - username = { format = "[$user]($style)"; }; - }; - - }; + starship = starship-config { inherit lib; }; yt-dlp = { enable = true; }; zsh = { enable = true; diff --git a/programs/starship.nix b/programs/starship.nix new file mode 100644 index 0000000..d7f8d9c --- /dev/null +++ b/programs/starship.nix @@ -0,0 +1,51 @@ +{ lib }: { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + settings = { + add_newline = false; + format = lib.concatStrings [ + "$os" + " " + "($container )" + "\\[" + "([$username](bold yellow)@[$hostname](bold red) )" + "[$directory](cyan)" + "($git_branch$git_commit$git_state$git_metrics$git_status)" + "\\] " + "($package)" + "($conda$direnv$julia$nix_shell$nodejs$python$quarto$rlang$ruby)" + "($shell)" + "$character" + ]; + right_format = lib.concatStrings [ "$cmd_duration" "$battery" ]; + character = { + success_symbol = "[\\$](bold green)"; + error_symbol = "[\\$](bold red)"; + }; + git_metrics = { disabled = false; }; + git_status = { + # Remove trailing space from format string + format = "([\\[$all_status$ahead_behind\\]]($style))"; + }; + hostname = { format = "[$hostname]($style)"; }; + os = { + disabled = false; + symbols = { + AlmaLinux = ""; + Alpine = ""; + CentOS = ""; + Debian = ""; + Fedora = ""; + Macos = ""; + }; + }; + shell = { + # Show which shell if not using zsh (the default) + disabled = false; + zsh_indicator = ""; + style = "yellow bold"; + }; + username = { format = "[$user]($style)"; }; + }; +}