From 5b3cbc05e54231392420d08ab3a7f99f68488122 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 30 Jan 2022 08:19:31 +0530 Subject: import prompt as flake input --- flake.lock | 173 ++++++++++++++++++++++++++++++++---------- flake.nix | 17 ++++- hosts/olive/configuration.nix | 1 + programs/tmux.nix | 4 +- 4 files changed, 152 insertions(+), 43 deletions(-) diff --git a/flake.lock b/flake.lock index f38f7a5..aec452b 100644 --- a/flake.lock +++ b/flake.lock @@ -19,6 +19,25 @@ "type": "github" } }, + "fenix_2": { + "inputs": { + "nixpkgs": "nixpkgs_6", + "rust-analyzer-src": "rust-analyzer-src_2" + }, + "locked": { + "lastModified": 1642141613, + "narHash": "sha256-WFS7T5oOLD8anu/77iz7EPz7zQsJZtP5qVa5485k3dI=", + "owner": "nix-community", + "repo": "fenix", + "rev": "d75ffc9f1d3b60bb597e48ae01f486a6de27d30e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -68,6 +87,24 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1635165013, + "narHash": "sha256-o/BdVjNwcB6jOmzZjOH703BesSkkS5O7ej3xhyO8hAY=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "5b9e0ff9d3b551234b4f3eb3983744fa354b17f1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -75,11 +112,11 @@ ] }, "locked": { - "lastModified": 1639871969, - "narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=", + "lastModified": 1642653493, + "narHash": "sha256-22mGPjiHUo2Jmze4IjXCJLjeK2mbvvCztHmUyUMr4yw=", "owner": "nix-community", "repo": "home-manager", - "rev": "697cc8c68ed6a606296efbbe9614c32537078756", + "rev": "28b9ae40c45c5e7711c353fee1b7af734e293979", "type": "github" }, "original": { @@ -96,11 +133,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1642320861, - "narHash": "sha256-gj68dBwDH0LjeBnt+03nbYiCwz97l7Ouz8/Ghbry4aY=", + "lastModified": 1643443970, + "narHash": "sha256-NVm4ccMpP72i5kD8izidLD3a4s/5WlWesrYv1Arz8O4=", "owner": "nix-community", "repo": "neovim-nightly-overlay", - "rev": "41934fe7e0c6b2b338f6e3bcd6b756638b556319", + "rev": "4c80ac9a435c2a0d22cb7067eb65cf3f6962124d", "type": "github" }, "original": { @@ -116,11 +153,11 @@ }, "locked": { "dir": "contrib", - "lastModified": 1642316915, - "narHash": "sha256-6afFNKsYHSOAupMUmFKKZ9l1YD2pAGKVoZZfJHzUia4=", + "lastModified": 1643415762, + "narHash": "sha256-qyk81eVlmm2U7apLHZlggoj1v9MIKX1YWWaALPKPNFc=", "owner": "neovim", "repo": "neovim", - "rev": "7085e5b0c8588618e643c87802afc515f67812d9", + "rev": "082ff2190c793d21c213748e556191f8aaa76cde", "type": "github" }, "original": { @@ -147,11 +184,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1642104392, - "narHash": "sha256-m71b7MgMh9FDv4MnI5sg9MiBVW6DhE1zq+d/KlLWSC8=", + "lastModified": 1643347846, + "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5aaed40d22f0d9376330b6fa413223435ad6fee5", + "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", "type": "github" }, "original": { @@ -163,11 +200,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1642104392, - "narHash": "sha256-m71b7MgMh9FDv4MnI5sg9MiBVW6DhE1zq+d/KlLWSC8=", + "lastModified": 1643169865, + "narHash": "sha256-+KIpNRazbc8Gac9jdWCKQkFv9bjceaLaLhlwqUEYu8c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5aaed40d22f0d9376330b6fa413223435ad6fee5", + "rev": "945ec499041db73043f745fad3b2a3a01e826081", "type": "github" }, "original": { @@ -179,11 +216,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1642190797, - "narHash": "sha256-cxeEEAtfIACnm8sV1oz0xlNp9IVk10Fxcc09ggoEZuo=", + "lastModified": 1643247693, + "narHash": "sha256-rmShxIuNjYBz4l83J0J++sug+MURUY1koPCzX4F8hfo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3ddd960a3b575bf3230d0e59f42614b71f9e0db9", + "rev": "6c4b9f1a2fd761e2d384ef86cff0d208ca27fdca", "type": "github" }, "original": { @@ -195,11 +232,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1642104392, - "narHash": "sha256-m71b7MgMh9FDv4MnI5sg9MiBVW6DhE1zq+d/KlLWSC8=", + "lastModified": 1643347846, + "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5aaed40d22f0d9376330b6fa413223435ad6fee5", + "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", "type": "github" }, "original": { @@ -211,11 +248,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1642069818, - "narHash": "sha256-666w6j8wl/bojfgpp0k58/UJ5rbrdYFbI2RFT2BXbSQ=", + "lastModified": 1643322911, + "narHash": "sha256-WLe4lXAYXH/v80iO02npX1wdXq4nIVEHJTONLXbQrL0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "46821ea01c8f54d2a20f5a503809abfc605269d7", + "rev": "d9e21f284317f85b3476c0043f4efea87a226c3a", "type": "github" }, "original": { @@ -225,18 +262,54 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1642069818, - "narHash": "sha256-666w6j8wl/bojfgpp0k58/UJ5rbrdYFbI2RFT2BXbSQ=", + "lastModified": 1643347846, + "narHash": "sha256-O0tyXF//ppRpe9yT1Uu5n34yI2MWDyY6ZiJ4Qn5zIkE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "46821ea01c8f54d2a20f5a503809abfc605269d7", + "rev": "5bb20f9dc70e9ee16e21cc404b6508654931ce41", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1643322911, + "narHash": "sha256-WLe4lXAYXH/v80iO02npX1wdXq4nIVEHJTONLXbQrL0=", + "owner": "NixOS", "repo": "nixpkgs", + "rev": "d9e21f284317f85b3476c0043f4efea87a226c3a", "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "prompt": { + "inputs": { + "fenix": "fenix", + "gitignore": "gitignore", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1643476516, + "narHash": "sha256-v1reqZPpdlyyOYs7ygbvhsH702++3bHdFe6RayJagvw=", + "ref": "master", + "rev": "4d3e72f5f03b5a0db1d69f262990a0519a9d8947", + "revCount": 2, + "type": "git", + "url": "https://git.peppe.rs/cli/prompt" + }, + "original": { + "type": "git", + "url": "https://git.peppe.rs/cli/prompt" } }, "root": { @@ -245,6 +318,7 @@ "neovim": "neovim", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", + "prompt": "prompt", "statix": "statix" } }, @@ -265,24 +339,43 @@ "type": "github" } }, + "rust-analyzer-src_2": { + "flake": false, + "locked": { + "lastModified": 1642101527, + "narHash": "sha256-C4zcaWULWlrirpEt/pA85CCMBt+7SWZweMaMJ7EvrXw=", + "owner": "rust-analyzer", + "repo": "rust-analyzer", + "rev": "b4c31481a554d0132003228ba319bd9476fe85ae", + "type": "github" + }, + "original": { + "owner": "rust-analyzer", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "statix": { "inputs": { - "fenix": "fenix", - "gitignore": "gitignore", - "nixpkgs": "nixpkgs_6" + "fenix": "fenix_2", + "gitignore": "gitignore_2", + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1642238855, - "narHash": "sha256-K+J3KeUnjoqMpL67sX7pQodCCCDTrfXSrd8sn/TnZEw=", - "owner": "nerdypepper", - "repo": "statix", - "rev": "23892b034d710bfbfa1f82c48fbfecb68f791f13", - "type": "github" + "lastModified": 1643431421, + "narHash": "sha256-LOuaDkOU5E+I6NTLboU1q5Of2HBAMALfxdg2gQTF2zg=", + "ref": "master", + "rev": "8e4eeb979ebaa8f0f461e66d986a75c3a80220b6", + "revCount": 106, + "type": "git", + "url": "https://git.peppe.rs/languages/statix" }, "original": { - "owner": "nerdypepper", - "repo": "statix", - "type": "github" + "type": "git", + "url": "https://git.peppe.rs/languages/statix" } } }, diff --git a/flake.nix b/flake.nix index 07b27e1..06ce985 100644 --- a/flake.nix +++ b/flake.nix @@ -3,13 +3,26 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; + nixos-hardware.url = "github:nixos/nixos-hardware"; + home-manager = { url = "github:nix-community/home-manager/release-21.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + neovim.url = "github:nix-community/neovim-nightly-overlay"; - statix.url = "github:nerdypepper/statix"; + + statix = { + url = "git+https://git.peppe.rs/languages/statix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + prompt = { + url = "git+https://git.peppe.rs/cli/prompt"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; outputs = @@ -19,12 +32,14 @@ , home-manager , neovim , statix + , prompt , ... } @ inputs: { overlays = { nvim-nightly = neovim.overlay; statix = statix.overlay; + prompt = prompt.overlay; }; nixosConfigurations = { diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix index 02bf4a5..77e3ffb 100644 --- a/hosts/olive/configuration.nix +++ b/hosts/olive/configuration.nix @@ -62,6 +62,7 @@ nixpkgs.overlays = with self.overlays; [ nvim-nightly statix + prompt ]; environment.systemPackages = with pkgs; [ diff --git a/programs/tmux.nix b/programs/tmux.nix index 8975f44..1e3a488 100644 --- a/programs/tmux.nix +++ b/programs/tmux.nix @@ -82,8 +82,8 @@ set -ag status-right "#[fg=colour7]#(bat -q)#[fg=colour12]" # status left - set -g status-left "#[fg=colour7]#(/home/np/code/rust/prompt/target/debug/prompt cwd #{pane_current_path}) " - set -ag status-left "#[fg=colour7]#(/home/np/code/rust/prompt/target/debug/prompt vcs #{pane_current_path})" + set -g status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt cwd #{pane_current_path}) " + set -ag status-left "#[fg=colour7]#(${pkgs.prompt}/bin/prompt vcs #{pane_current_path})" ''; }; } -- cgit v1.2.3