Compare commits
2 Commits
9976991058
...
1cb27eb1ac
Author | SHA1 | Date |
---|---|---|
Abhinav Sarkar | 1cb27eb1ac | |
Abhinav Sarkar | a2d2812bd2 |
|
@ -87,11 +87,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1666722780,
|
||||
"narHash": "sha256-UpGlFoJMbik+XItmPwoWFrQqOilMIclPrc7Iedt1YaM=",
|
||||
"lastModified": 1666813329,
|
||||
"narHash": "sha256-qe1tl0whKf8SW1Kza1KzvkovUV5ZbLv6kDDteYKeIL4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b2399a81902a5fa37f691a289fb2c33c1d64036c",
|
||||
"rev": "eb354ebf03d3819d00922d5069cfc63159083a84",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
2
home.nix
2
home.nix
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./programs ./launchd.nix ./nix.nix ];
|
||||
imports = [ ./programs ./scripts ./launchd.nix ./nix.nix ];
|
||||
|
||||
home.username = "abhinav";
|
||||
home.homeDirectory = "/Users/abhinav";
|
||||
|
|
1
justfile
1
justfile
|
@ -25,6 +25,7 @@ build: (_run "_build")
|
|||
|
||||
_switch:
|
||||
home-manager -v switch --flake "{{ root_dir }}#abhinav"
|
||||
report-hm-changes
|
||||
|
||||
# switch to latest home-manager generation
|
||||
switch: (_run "_switch")
|
||||
|
|
|
@ -104,8 +104,8 @@
|
|||
{
|
||||
name = "rust-analyzer";
|
||||
publisher = "rust-lang";
|
||||
version = "0.4.1260";
|
||||
sha256 = "0cv1hk14h5yw7zr0b60x5qsy622fd8fbgjarbkjr9sjw5bq2mj22";
|
||||
version = "0.4.1261";
|
||||
sha256 = "0z9jkwya41g94b6v1z3ajyqc138q30xsyhhvw1774cwmdi63alwa";
|
||||
}
|
||||
{
|
||||
name = "just";
|
||||
|
@ -122,8 +122,8 @@
|
|||
{
|
||||
name = "shellcheck";
|
||||
publisher = "timonwong";
|
||||
version = "0.26.1";
|
||||
sha256 = "1jbc08vwi7c8dz9rd09p01zy894i1xv7hmq6anbz1chpqbm1h62a";
|
||||
version = "0.26.2";
|
||||
sha256 = "1rwa5abai84vabaz34nfxrvyix8rwxnjys5v2mcy087nzj5i5crq";
|
||||
}
|
||||
{
|
||||
name = "sort-lines";
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
rc = pkgs.callPackage ./report-hm-changes.nix { inherit config pkgs; };
|
||||
in {
|
||||
home.packages = [ rc ];
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
profiles = "/nix/var/nix/profiles/per-user/${config.home.username}/home-manager-*-link";
|
||||
in
|
||||
pkgs.writeShellScriptBin "report-hm-changes" ''
|
||||
# Disable nvd if there are less than 2 hm profiles.
|
||||
if [ $(ls -d1v ${profiles} 2>/dev/null | wc -l) -lt 2 ]; then
|
||||
echo "Skipping changes report..."
|
||||
else
|
||||
${pkgs.nvd}/bin/nvd diff $(ls -d1v ${profiles} | tail -2)
|
||||
fi
|
||||
''
|
Loading…
Reference in New Issue