mirror of
https://github.com/ryanccn/flake.git
synced 2025-12-06 08:10:43 +01:00
feat(fish): proper PATH initialization
This commit is contained in:
parent
ea378cf3af
commit
1833524619
6 changed files with 76 additions and 181 deletions
192
flake.lock
generated
192
flake.lock
generated
|
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720108828,
|
||||
"narHash": "sha256-+U7vAYqOUQMu1sq5mJGBf1lgADZl7zP+K/L9FAP3BnY=",
|
||||
"lastModified": 1725406948,
|
||||
"narHash": "sha256-HsSvwWqJ5nETVuLomBx6AvL39NSBXf/b/oCQ2IMYcCY=",
|
||||
"owner": "ryanccn",
|
||||
"repo": "am",
|
||||
"rev": "17b26b26cb9aa06cd112a0c44ecdb4987fec2e29",
|
||||
"rev": "8ba77d7600e56a71536b1d92863f8ac0df86783a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1722661201,
|
||||
"narHash": "sha256-2JX3S1hmmUhHuyGyGWnaM4xT0SiaDdVkNzmBrEowwK0=",
|
||||
"lastModified": 1724469296,
|
||||
"narHash": "sha256-p3R4LUNk6gC+fTKRUm9ByXaoRIocnQMwVuJSIxECQ8o=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "19a0f144f0204a12a89243363efb6a493b8cfc83",
|
||||
"rev": "874e668ddaf3687e8d38ccd0188a641ffefe1cfb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -35,26 +35,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"choirpack": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700231806,
|
||||
"narHash": "sha256-V7v+CfMuZOVzu2hirj09W/OZfVkDqn8GnrwqUv8u8Gc=",
|
||||
"owner": "ryanccn",
|
||||
"repo": "choirpack",
|
||||
"rev": "04710c4d8e8d05fc1c42be05748c65fe44921a58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryanccn",
|
||||
"repo": "choirpack",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin-custom-icons": {
|
||||
"locked": {
|
||||
"lastModified": 1719071371,
|
||||
|
|
@ -70,39 +50,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flakey-profile": {
|
||||
"locked": {
|
||||
"lastModified": 1712898590,
|
||||
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -110,11 +57,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722630065,
|
||||
"narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=",
|
||||
"lastModified": 1725180166,
|
||||
"narHash": "sha256-fzssXuGR/mCeGbzM1ExaTqDz7QDGta3WA4jJsZyRruo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "afc892db74d65042031a093adb6010c4c3378422",
|
||||
"rev": "471e3eb0a114265bcd62d11d58ba8d3421ee68eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -123,50 +70,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1714955862,
|
||||
"narHash": "sha256-REWlo2RYHfJkxnmZTEJu3Cd/2VM+wjjpPy7Xi4BdDTQ=",
|
||||
"ref": "refs/tags/2.90-beta.1",
|
||||
"rev": "b6799ab0374a8e1907a48915d3187e07da41d88c",
|
||||
"revCount": 15501,
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/lix"
|
||||
},
|
||||
"original": {
|
||||
"ref": "refs/tags/2.90-beta.1",
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/lix"
|
||||
}
|
||||
},
|
||||
"lix-module": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"flakey-profile": "flakey-profile",
|
||||
"lix": [
|
||||
"lix"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722485024,
|
||||
"narHash": "sha256-+7RReWaFQUO8MfAhJYNm4FkALuM3rPGy2AlXXv9Jmc8=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "e350380d72f94035c309e19fda2fd550f6ab7376",
|
||||
"revCount": 102,
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module"
|
||||
}
|
||||
},
|
||||
"nish": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -194,11 +97,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722609272,
|
||||
"narHash": "sha256-Kkb+ULEHVmk07AX+OhwyofFxBDpw+2WvsXguUS2m6e4=",
|
||||
"lastModified": 1725189302,
|
||||
"narHash": "sha256-IhXok/kwQqtusPsoguQLCHA+h6gKvgdCrkhIaN+kByA=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "f7142b8024d6b70c66fd646e1d099d3aa5bfec49",
|
||||
"rev": "7c4b53a7d9f3a3df902b3fddf2ae245ef20ebcda",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -207,13 +110,28 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-filter": {
|
||||
"locked": {
|
||||
"lastModified": 1710156097,
|
||||
"narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=",
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"rev": "3342559a24e85fc164b295c3444e8a139924675b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "nix-filter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722640603,
|
||||
"narHash": "sha256-TcXjLVNd3VeH1qKPH335Tc4RbFDbZQX+d7rqnDUoRaY=",
|
||||
"lastModified": 1725194671,
|
||||
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "81610abc161d4021b29199aa464d6a1a521e0cc9",
|
||||
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -225,22 +143,17 @@
|
|||
},
|
||||
"nrr": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nix-filter": "nix-filter",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": [
|
||||
"rust-overlay"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722254729,
|
||||
"narHash": "sha256-YyOR1TRtDB7c6/6R9TEZzhrkD+eDYApQgxzndWa19EU=",
|
||||
"lastModified": 1725325795,
|
||||
"narHash": "sha256-UJLBuGfqrrjBSueCLKsncYDVl3yRfctH7qxPrPJs6eU=",
|
||||
"owner": "ryanccn",
|
||||
"repo": "nrr",
|
||||
"rev": "d00398e93b341cb1e89f56966de753ccfd7cc7b2",
|
||||
"rev": "959431ce40b8ea23e608bccf94ea4781fb0955a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -271,11 +184,11 @@
|
|||
"ohmyzsh": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1722610855,
|
||||
"narHash": "sha256-iD8wKlrytTI8Ohyl7A8vwDkHDku23zod/B+vheRcHJ8=",
|
||||
"lastModified": 1725399322,
|
||||
"narHash": "sha256-WR4Z/0PwbLFle4OHBol5BJCeHi4mE02XyF4VmV1l8ys=",
|
||||
"owner": "ohmyzsh",
|
||||
"repo": "ohmyzsh",
|
||||
"rev": "3b5f018f7025a347e4888408b566caeaef2fabd7",
|
||||
"rev": "ab3d42a34cd0600b723de0accc248632f2dcf4e3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -288,12 +201,8 @@
|
|||
"inputs": {
|
||||
"am": "am",
|
||||
"catppuccin": "catppuccin",
|
||||
"choirpack": "choirpack",
|
||||
"darwin-custom-icons": "darwin-custom-icons",
|
||||
"flake-utils": "flake-utils",
|
||||
"home-manager": "home-manager",
|
||||
"lix": "lix",
|
||||
"lix-module": "lix-module",
|
||||
"nish": "nish",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
|
@ -311,11 +220,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722738111,
|
||||
"narHash": "sha256-cWD5pCs9AYb+512/yCx9D0Pl5KcmyuXHeJpsDw/D1vs=",
|
||||
"lastModified": 1725416653,
|
||||
"narHash": "sha256-iNBv7ILlZI6ubhW0ExYy8YgiLKUerudxY7n8R5UQK2E=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "27ec296d93cb4b2d03e8cbd019b1b4cde8c34280",
|
||||
"rev": "e5d3f9c2f24d852cddc79716daf0f65ce8468b28",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -324,29 +233,14 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vivid-zsh": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1690157517,
|
||||
"narHash": "sha256-HL4QQY1QMhTw76u/xbBzodViDAMjKhRhmVXptO7qKqY=",
|
||||
"lastModified": 1723631050,
|
||||
"narHash": "sha256-C+ASKsQ8dttn+FjgzEYtQnuTslkKU78Dbspj95E0cMs=",
|
||||
"owner": "ryanccn",
|
||||
"repo": "vivid-zsh",
|
||||
"rev": "c970eaaf90788c0e75e2a96159953f0f0c2a1b5a",
|
||||
"rev": "55def93e57fc083d9c40a653f9e27e97a453588d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
23
flake.nix
23
flake.nix
|
|
@ -16,18 +16,6 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
lix = {
|
||||
url = "git+https://git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
lix-module = {
|
||||
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.lix.follows = "lix";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
catppuccin = {
|
||||
url = "github:catppuccin/nix";
|
||||
};
|
||||
|
|
@ -45,13 +33,6 @@
|
|||
nrr = {
|
||||
url = "github:ryanccn/nrr";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.rust-overlay.follows = "rust-overlay";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
choirpack = {
|
||||
url = "github:ryanccn/choirpack";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nyoom = {
|
||||
|
|
@ -77,10 +58,6 @@
|
|||
url = "github:ryanccn/vivid-zsh";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ set -x SSH_AUTH_SOCK "$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/
|
|||
# Homebrew
|
||||
/opt/homebrew/bin/brew shellenv | source
|
||||
|
||||
# Nix
|
||||
fish_add_path -Pm /etc/profiles/per-user/$USER/bin /run/current-system/sw/bin
|
||||
|
||||
# fnm shell env
|
||||
fnm env --use-on-cd | source
|
||||
|
||||
|
|
|
|||
22
modules/fish.nix
Normal file
22
modules/fish.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
# https://github.com/LnL7/nix-darwin/issues/122#issuecomment-2272570087
|
||||
programs.fish.loginShellInit =
|
||||
let
|
||||
dquote = str: "\"" + str + "\"";
|
||||
|
||||
profiles = [
|
||||
"/etc/profiles/per-user/$USER" # home-manager profile
|
||||
"$HOME/.nix-profile" # non-XDG home profile
|
||||
"$(set -q XDG_STATE_HOME; and echo \"$XDG_STATE_HOME\"; or echo \"$HOME/.local/state\")/nix/profile" # XDG home profile
|
||||
"/run/current-system/sw" # nix-darwin system profile
|
||||
"/nix/var/nix/profiles/default" # system profile
|
||||
];
|
||||
|
||||
makeBinSearchPath = lib.concatMapStringsSep " " (path: (dquote "${path}/bin"));
|
||||
in
|
||||
''
|
||||
fish_add_path --move --prepend --path ${makeBinSearchPath profiles}
|
||||
set fish_user_paths $fish_user_paths
|
||||
'';
|
||||
}
|
||||
|
|
@ -16,8 +16,14 @@
|
|||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nix/issues/7273
|
||||
auto-optimise-store = !pkgs.stdenv.isDarwin;
|
||||
|
||||
extra-platforms = [
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
|
|
@ -28,9 +34,8 @@
|
|||
sandbox = true;
|
||||
use-xdg-base-directories = true;
|
||||
|
||||
extra-substituters = [ "https://cache.lix.systems" ];
|
||||
|
||||
extra-trusted-public-keys = [ "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" ];
|
||||
extra-substituters = [ ];
|
||||
extra-trusted-public-keys = [ ];
|
||||
|
||||
nix-path = config.nix.nixPath;
|
||||
};
|
||||
|
|
@ -41,7 +46,6 @@
|
|||
inputs.am.overlays.default
|
||||
inputs.nish.overlays.default
|
||||
inputs.nrr.overlays.default
|
||||
inputs.choirpack.overlays.default
|
||||
inputs.nyoom.overlays.default
|
||||
self.overlays.ryan-mono-bin
|
||||
self.overlays.ibm-plex
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
./modules/nix.nix
|
||||
./modules/packages.nix
|
||||
./modules/homebrew.nix
|
||||
./modules/fish.nix
|
||||
];
|
||||
|
||||
system.activationScripts.extraActivation = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue