Adds packages

This commit is contained in:
Abhinav Sarkar 2024-10-18 17:41:54 +05:30
parent c8fe2f5c0b
commit 1285ab1d85
4 changed files with 39 additions and 8 deletions

19
flake.lock generated
View File

@ -200,6 +200,22 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1729044727,
"narHash": "sha256-GKJjtPY+SXfLF/yTN7M2cAnQB6RERFKnQhD8UvPSf3M=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dc2e0028d274394f73653c7c90cc63edbb696be1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-24.05-darwin",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"dm-mono-font": "dm-mono-font",
@ -210,7 +226,8 @@
"monaspace-font": "monaspace-font",
"nix-darwin": "nix-darwin",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
}
},
"systems": {

View File

@ -3,6 +3,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
@ -37,17 +38,21 @@
};
};
outputs = inputs@{ self, nixpkgs, nix-darwin, home-manager, lix-module, ... }:
outputs = inputs@{ self, nixpkgs, nixpkgs-stable, nix-darwin, home-manager, lix-module, ... }:
let
system = "x86_64-darwin";
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
};
pkgs-stable = import nixpkgs-stable {
inherit system;
config = { allowUnfree = true; };
};
in {
darwinConfigurations."Abhinavs-MacBook-Pro" = nix-darwin.lib.darwinSystem {
inherit system;
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs pkgs-stable; };
modules = [
./configuration.nix
./homebrew.nix
@ -58,7 +63,7 @@
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.abhinav = import ./home.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.extraSpecialArgs = { inherit inputs pkgs-stable; };
}
];
};

View File

@ -1,26 +1,35 @@
{ inputs, config, pkgs, ... }:
{ inputs, config, pkgs, pkgs-stable, ... }:
let
leanHaskellBinary = pkgs.haskell.lib.compose.overrideCabal (old: {
isLibrary = false;
doHaddock = false;
enableLibraryProfiling = false;
enableSharedLibraries = false;
enableSeparateBinOutput = true;
});
opaComplete = name: pkgs.haskellPackages.generateOptparseApplicativeCompletions [name];
nixPackages = with pkgs; [
config.nix.package
niv
nix
nix-diff
nix-tree
nixfmt
nixfmt-rfc-style
nvd
nixd
statix
cachix
nix-output-monitor
];
networkingPackages = with pkgs; [ curl dig httpie openssh mosh ];
networkingPackages = with pkgs; [ curl dig httpie openssh ] ++ [ pkgs-stable.mosh ];
cmdLineUtilPackages = with pkgs; [ bash broot coreutils-full fd gnugrep less ranger tree unixtools.watch ];
miscPackages = with pkgs; [
as-tree
binutils
brotli
cabal2nix
(opaComplete "cabal-plan" (leanHaskellBinary haskellPackages.cabal-plan))
cloc
comma
difftastic

View File

@ -24,7 +24,7 @@ in {
ghe =
"set -l dir (mktemp -d); git clone --depth 1 https://github.com/$argv $dir; cd $dir; ranger;";
nix-roots = ''
nix-store --gc --print-roots | grep -v lsof | grep -v libproc
nix-store --gc --print-roots | grep -v lsof | grep -v libproc | grep -v "{temp:"
'';
nix-roots-tree = ''nix-roots | sed "s/\/nix\/store\///g" | as-tree'';
};