@@ -12,8 +12,10 @@ import (
12
12
13
13
func syncFlakeToProfile (ctx context.Context , flakePath , profilePath string ) error {
14
14
cmd := exec .CommandContext (ctx , "nix" , "eval" , "--json" , flakePath + "#devShells." + nix .System ()+ ".default.buildInputs" )
15
+ cmd .Args = append (cmd .Args , nix .ExperimentalFlags ()... )
15
16
b , err := cmd .Output ()
16
17
if err != nil {
18
+
17
19
return fmt .Errorf ("nix eval devShells: %v" , err )
18
20
}
19
21
storePaths := []string {}
@@ -22,6 +24,7 @@ func syncFlakeToProfile(ctx context.Context, flakePath, profilePath string) erro
22
24
}
23
25
24
26
listCmd := exec .CommandContext (ctx , "nix" , "profile" , "list" , "--json" , "--profile" , profilePath )
27
+ listCmd .Args = append (listCmd .Args , nix .ExperimentalFlags ()... )
25
28
b , err = listCmd .Output ()
26
29
if err != nil {
27
30
return err
@@ -43,13 +46,15 @@ func syncFlakeToProfile(ctx context.Context, flakePath, profilePath string) erro
43
46
if len (remove ) > 0 {
44
47
removeCmd := exec .CommandContext (ctx , "nix" , "profile" , "remove" , "--profile" , profilePath )
45
48
removeCmd .Args = append (removeCmd .Args , remove ... )
49
+ removeCmd .Args = append (removeCmd .Args , nix .ExperimentalFlags ()... )
46
50
if err := removeCmd .Run (); err != nil {
47
51
return err
48
52
}
49
53
}
50
54
if len (add ) > 0 {
51
55
addCmd := exec .CommandContext (ctx , "nix" , "profile" , "install" , "--profile" , profilePath )
52
56
addCmd .Args = append (addCmd .Args , add ... )
57
+ addCmd .Args = append (addCmd .Args , nix .ExperimentalFlags ()... )
53
58
if err := addCmd .Run (); err != nil {
54
59
return err
55
60
}
0 commit comments