-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
102 lines (90 loc) · 2.67 KB
/
Copy pathflake.nix
File metadata and controls
102 lines (90 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
description = "Rumpus - 1970s-inspired terminal color theme";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in
{
packages = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.stdenv.mkDerivation {
pname = "rumpus";
version = "1.0.0";
src = ./.;
installPhase = ''
runHook preInstall
mkdir -p $out
# Copy all theme directories
cp -r ghostty $out/
cp -r zellij $out/
cp -r tmux $out/
cp -r fish $out/
cp -r zsh $out/
cp -r delta $out/
cp -r bat $out/
cp -r helix $out/
cp -r zed $out/
cp -r nvim $out/
runHook postInstall
'';
meta = with pkgs.lib; {
description = "1970s-inspired terminal color theme for multiple tools";
homepage = "https://github.com/715d/rumpus";
license = licenses.mit;
maintainers = [ ];
platforms = platforms.unix;
};
};
# Alias for convenience
rumpus = self.packages.${system}.default;
}
);
homeManagerModules = {
default = { pkgs, lib, config, ... }: {
imports = [ ./nix/modules/home-manager.nix ];
config = lib.mkIf (config.rumpus.enable or false) {
rumpus.package = lib.mkDefault self.packages.${pkgs.system}.default;
};
};
rumpus = self.homeManagerModules.default;
};
# Development shells
devShells = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.mkShell {
buildInputs = [
pkgs.nixpkgs-fmt
];
shellHook = ''
echo "🎨 Rumpus development environment"
echo "Available commands:"
echo " nix build - Build the package"
echo " nix flake check - Run checks"
echo " nix fmt . - Format Nix files"
'';
};
}
);
# Formatter for `nix fmt`
formatter = forAllSystems (system: nixpkgsFor.${system}.nixpkgs-fmt);
};
}