Compare commits

...

7 commits

Author SHA1 Message Date
Benson Chu
a96879c99b Gimme drift 2026-04-24 10:31:26 -05:00
Benson Chu
ef0213fb6d Port work home-manager to 25.11 2026-04-05 17:04:06 -05:00
Benson Chu
efce4072eb overlays fixup 2026-04-05 17:02:27 -05:00
Benson Chu
d0c7c86970 Update inputs 2026-04-05 17:00:34 -05:00
Benson Chu
3e5b1e66f1 Overlays in one place 2026-04-05 17:00:05 -05:00
Benson Chu
6fae9d6670 After isync invoke emacs to update mu4e 2026-04-05 16:55:45 -05:00
Benson Chu
c9a28914a7 Disable this for now 2026-04-05 16:55:45 -05:00
6 changed files with 111 additions and 49 deletions

View file

@ -12,37 +12,6 @@ in
./flake-location.nix
];
nixpkgs.overlays = [
(final: prev: {
unstable = import inputs.unstable {
inherit system;
config.allowUnfree = true;
};
})
(final: prev: {
update = import inputs.update {
inherit system;
config.allowUnfree = true;
};
})
# https://discourse.nixos.org/t/dolphin-does-not-have-mime-associations/48985/14
# https://github.com/rumboon/dolphin-overlay/blob/main/default.nix
(final: prev: {
kdePackages = prev.kdePackages.overrideScope (kfinal: kprev: {
dolphin = kprev.dolphin.overrideAttrs (oldAttrs: {
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ prev.makeWrapper ];
postInstall = (oldAttrs.postInstall or "") + ''
wrapProgram $out/bin/dolphin \
--set XDG_CONFIG_DIRS "${prev.libsForQt5.kservice}/etc/xdg:$XDG_CONFIG_DIRS" \
--run "${kprev.kservice}/bin/kbuildsycoca6 --noincremental ${prev.libsForQt5.kservice}/etc/xdg/menus/applications.menu"
'';
});
});
})
] ++ import ./overlays.nix inputs ++ [
inputs.emacs-overlay.overlays.default
];
nix = {
settings.experimental-features = "nix-command flakes";

View file

@ -1,5 +1,7 @@
inputs:
inputs: system:
[
inputs.emacs-overlay.overlays.default
(final: prev: {
mps-debug = prev.mps.overrideAttrs (old: {
pname = old.pname + "-debug";
@ -19,5 +21,34 @@ inputs:
treesit-grammars.with-all-grammars
mu4e
]));
})
})
(final: prev: {
unstable = import inputs.unstable {
inherit system;
config.allowUnfree = true;
};
})
(final: prev: {
update = import inputs.update {
inherit system;
config.allowUnfree = true;
};
})
# https://discourse.nixos.org/t/dolphin-does-not-have-mime-associations/48985/14
# https://github.com/rumboon/dolphin-overlay/blob/main/default.nix
(final: prev: {
kdePackages = prev.kdePackages.overrideScope (kfinal: kprev: {
dolphin = kprev.dolphin.overrideAttrs (oldAttrs: {
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ prev.makeWrapper ];
postInstall = (oldAttrs.postInstall or "") + ''
wrapProgram $out/bin/dolphin \
--set XDG_CONFIG_DIRS "${prev.libsForQt5.kservice}/etc/xdg:$XDG_CONFIG_DIRS" \
--run "${kprev.kservice}/bin/kbuildsycoca6 --noincremental ${prev.libsForQt5.kservice}/etc/xdg/menus/applications.menu"
'';
});
});
})
]

View file

@ -8,11 +8,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1770053181,
"narHash": "sha256-YxLkG+tzWSX98pRt+4frXkZHPrHpu7afZXe9gCJ+aEo=",
"lastModified": 1774889817,
"narHash": "sha256-jTTsnHmkpP6Nls+zAeTkcXHYH5MQTwp9j0XojfhyRn4=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "a4a3e2816dc1adff3fa15fcf01dd95bf556ec96f",
"rev": "4627a115d6169feff1518ed0b243734f6cce717d",
"type": "github"
},
"original": {
@ -133,16 +133,16 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"lastModified": 1774388614,
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
@ -176,11 +176,11 @@
},
"unstable": {
"locked": {
"lastModified": 1763966396,
"narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=",
"lastModified": 1770197578,
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5ae3b07d8d6527c42f17c876e404993199144b6a",
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
"type": "github"
},
"original": {

View file

@ -19,6 +19,14 @@
url = "github:nix-community/NixOS-WSL/main";
inputs.nixpkgs.follows = "nixpkgs";
};
# drift = {
# url = "github:phlx0/drift";
# inputs = {
# nixpkgs.follows = "nixpkgs";
# flake-utils.follows = "flake-utils";
# };
# };
};
outputs = { self, nixpkgs, update, unstable, home-manager, nixos-hardware, emacs-overlay, ... }@inputs:
@ -28,7 +36,7 @@
inherit system;
overlays =
[emacs-overlay.overlays.default] ++
(import ./common/overlays.nix inputs);
(import ./common/overlays.nix inputs system);
};
mkSystem = h: {
"${h}" = nixpkgs.lib.nixosSystem {
@ -148,6 +156,11 @@
extraSpecialArgs = { inherit inputs; };
modules = [
./home/users/work.nix
{
home.packages = [
(pkgs.callPackage ./packages/drift.nix {})
];
}
];
};
};

View file

@ -23,7 +23,7 @@
nix = (lib.mkIf (!config.submoduleSupport.enable) {
package = pkgs.nix;
settings.experimental-features = "nix-command flakes";
registry.nixpkgs.flake = inputs.nixpkgs;
# registry.nixpkgs.flake = inputs.nixpkgs;
});
# This value determines the Home Manager release that your configuration is
@ -67,6 +67,14 @@
tmux
mold
aider-chat
rr
unstable.isync
mu
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
@ -108,9 +116,11 @@
home-manager.enable = true;
git = {
enable = true;
userName = "Benson Chu";
userEmail = "b-chu1@ti.com";
extraConfig = {
settings = {
user = {
name = "Benson Chu";
email = "b-chu1@ti.com";
};
core = {
editor = "emacsclient";
};
@ -128,8 +138,13 @@
services = {
mbsync = {
enable = true;
frequency = "*:0/10";
frequency = "*:0/5";
verbose = true;
package = pkgs.isync;
postExec = ''
${pkgs.myEmacs}/bin/emacsclient -e \
"(mu4e-update-mail-and-index mu4e-index-update-in-background)"
'';
};
};
}

34
packages/drift.nix Normal file
View file

@ -0,0 +1,34 @@
{
pkgs,
fetchFromGitHub
}:
pkgs.buildGoModule rec {
pname = "drift";
version = "dev";
src = fetchFromGitHub {
owner = "phlx0";
repo = "drift";
rev = "main";
hash = "sha256-QfxT7fhYeu70ZJnbJ3/LaBPgBzHbjwhQ0bPIMeR46/o=";
};
vendorHash = "sha256-FsNa9qp2MnPk1onv/O13mFi+82yP7D4LdILZsNzHs+4=";
# CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.commit=none"
"-X main.date=unknown"
];
meta = with pkgs.lib; {
description = "Terminal screensaver and ambient visualiser";
homepage = "https://github.com/phlx0/drift";
license = licenses.mit;
maintainers = [ ];
mainProgram = "drift";
};
}