-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Earthly is a build configuration framework utilizing buildkit and Dockerfile-like syntax for simplicity and fast builds.
- Loading branch information
1 parent
a998762
commit 406fb00
Showing
8 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -628,4 +628,10 @@ | |
github = "ALameLlama"; | ||
githubId = 55490546; | ||
}; | ||
folliehiyuki = { | ||
name = "Hoang Nguyen"; | ||
email = "[email protected]"; | ||
github = "folliehiyuki"; | ||
githubId = 67634026; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
|
||
cfg = config.programs.earthly; | ||
|
||
yamlFormat = pkgs.formats.yaml { }; | ||
|
||
in { | ||
meta.maintainers = [ maintainers.folliehiyuki ]; | ||
|
||
options.programs.earthly = { | ||
enable = mkEnableOption "earthly"; | ||
|
||
package = mkPackageOption pkgs "earthly" { }; | ||
|
||
settings = mkOption { | ||
type = yamlFormat.type; | ||
default = { }; | ||
description = '' | ||
Configuration written to ~/.earthly/config.yml file. | ||
See https://docs.earthly.dev/docs/earthly-config for supported values. | ||
''; | ||
example = literalExpression '' | ||
global = { | ||
disable_analytics = true; | ||
disable_log_sharing = true; | ||
}; | ||
''; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
home.packages = [ cfg.package ]; | ||
|
||
home.file.".earthly/config.yml" = mkIf (cfg.settings != { }) { | ||
source = yamlFormat.generate "earthly-config" cfg.settings; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ earthly-settings = ./earthly-settings.nix; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
_: | ||
|
||
{ | ||
programs.earthly = { | ||
enable = true; | ||
|
||
settings = { | ||
global.disable_analytics = true; | ||
|
||
git."github.com" = { | ||
auth = "ssh"; | ||
user = "username"; | ||
}; | ||
}; | ||
}; | ||
|
||
nmt.script = '' | ||
assertFileExists home-files/.earthly/config.yml | ||
assertFileContent home-files/.earthly/config.yml ${./earthly-settings.yml} | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
git: | ||
github.com: | ||
auth: ssh | ||
user: username | ||
global: | ||
disable_analytics: true |