Skip to content

Commit da58b34

Browse files
committed
fix: resolve issues on nixos building
Signed-off-by: Jérémy Audiger <[email protected]>
1 parent 3d50efb commit da58b34

20 files changed

+77
-51
lines changed

modules/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
imports = [
55
./host.nix
66
./home-manager.nix
7+
./homebrew-stub.nix
78
];
89
}

modules/homebrew-stub.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Stub module for homebrew options
2+
{
3+
lib,
4+
...
5+
}:
6+
7+
{
8+
options.homebrew = {
9+
casks = lib.mkOption {
10+
type = lib.types.listOf lib.types.str;
11+
default = [ ];
12+
description = "Homebrew casks to install (Darwin only, stub on NixOS)";
13+
};
14+
};
15+
}

pkgs/ziggy.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
2121
];
2222

2323
meta = with lib; {
24-
description = "A data serialization language for expressing clear API messages, config files, etc.";
24+
description = "A data serialization language for expressing clear API messages, config files, etc";
2525
homepage = "https://ziggy-lang.io";
2626
license = licenses.mit;
2727
maintainers = with maintainers; [ jaudiger ];

profiles/program/chatgpt.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# NOTE: ChatGPT desktop app is not available on Linux
12
{
23
config,
34
lib,
@@ -8,5 +9,7 @@ let
89
isDarwin = config.nixpkgs.hostPlatform.isDarwin;
910
in
1011
{
11-
homebrew.casks = lib.mkIf isDarwin [ "chatgpt" ];
12+
homebrew = lib.mkIf isDarwin {
13+
casks = [ "chatgpt" ];
14+
};
1215
}

profiles/program/claude-app.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# NOTE: Claude desktop app is not available on Linux
12
{
23
config,
34
lib,
@@ -8,5 +9,7 @@ let
89
isDarwin = config.nixpkgs.hostPlatform.isDarwin;
910
in
1011
{
11-
homebrew.casks = lib.mkIf isDarwin [ "claude" ];
12+
homebrew = lib.mkIf isDarwin {
13+
casks = [ "claude" ];
14+
};
1215
}

profiles/program/discord.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1+
# NOTE: Discord is not available on aarch64-linux (only x86_64-linux)
12
{
23
config,
3-
pkgs,
44
lib,
55
...
66
}:
77

88
let
99
isDarwin = config.nixpkgs.hostPlatform.isDarwin;
10-
isLinux = config.nixpkgs.hostPlatform.isLinux;
1110
in
1211
{
13-
homebrew.casks = lib.mkIf isDarwin [ "discord" ];
14-
15-
modules.home-manager.home.packages = lib.optionals isLinux [
16-
pkgs.discord
17-
];
12+
homebrew = lib.mkIf isDarwin {
13+
casks = [ "discord" ];
14+
};
1815
}

profiles/program/docker.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ let
88
isDarwin = config.nixpkgs.hostPlatform.isDarwin;
99
in
1010
{
11-
homebrew.casks = lib.mkIf isDarwin [ "docker-desktop" ];
11+
homebrew = lib.mkIf isDarwin {
12+
casks = [ "docker-desktop" ];
13+
};
1214

1315
modules.host.shell.aliases = {
1416
d = "docker";

profiles/program/freecad.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ let
1010
isLinux = config.nixpkgs.hostPlatform.isLinux;
1111
in
1212
{
13-
homebrew.casks = lib.mkIf isDarwin [ "freecad" ];
13+
homebrew = lib.mkIf isDarwin {
14+
casks = [ "freecad" ];
15+
};
1416

1517
modules.home-manager.home.packages = lib.optionals isLinux [
1618
pkgs.freecad

profiles/program/ghostty.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
config,
3-
pkgs,
43
lib,
54
...
65
}:
76

87
let
98
isDarwin = config.nixpkgs.hostPlatform.isDarwin;
10-
isLinux = config.nixpkgs.hostPlatform.isLinux;
119
in
1210
{
13-
homebrew.casks = lib.mkIf isDarwin [ "ghostty" ];
11+
homebrew = lib.mkIf isDarwin {
12+
casks = [ "ghostty" ];
13+
};
1414

1515
modules.home-manager = {
1616
programs.ghostty = {

profiles/program/insomnia.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1+
# NOTE: Insomnia is not available on aarch64-linux (only x86_64-linux)
12
{
23
config,
3-
pkgs,
44
lib,
55
...
66
}:
77

88
let
99
isDarwin = config.nixpkgs.hostPlatform.isDarwin;
10-
isLinux = config.nixpkgs.hostPlatform.isLinux;
1110
in
1211
{
13-
homebrew.casks = lib.mkIf isDarwin [ "insomnia" ];
14-
15-
modules.home-manager.home.packages = lib.optionals isLinux [
16-
pkgs.insomnia
17-
];
12+
homebrew = lib.mkIf isDarwin {
13+
casks = [ "insomnia" ];
14+
};
1815
}

0 commit comments

Comments
 (0)