minor changes

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-05-11 02:06:48 +05:30
parent cdf5c2bce6
commit af80a94cfb
5 changed files with 397 additions and 320 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
Cargo.nix linguist-generated

695
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -61,20 +61,23 @@ jobs:
CACHIX_AUTH_TOKEN: ((cachix.token)) CACHIX_AUTH_TOKEN: ((cachix.token))
inputs: inputs:
- name: repo - name: repo
outputs:
- name: upload
platform: linux platform: linux
run: run:
path: sh path: sh
args: args:
- -c - -c
- | - |
nix-env -iA nixpkgs.cachix nix-env -iA nixpkgs.cachix nixpkgs.gzip
cachix use $CACHIX_NAME cachix use $CACHIX_NAME
cachix watch-exec pain nix -- --extra-experimental-features "nix-command flakes" build ./repo cachix watch-exec pain nix -- --extra-experimental-features "nix-command flakes" build ./repo
nix --extra-experimental-features "nix-command flakes" build ./repo#image -o result nix --extra-experimental-features "nix-command flakes" build ./repo#image -o result
nix-shell -p gzip --run "gzip -c $(readlink result) > final" gzip -cd < $(readlink result) > ./upload/image.tar
- put: image - put: image
inputs: [upload]
params: params:
image: final image: upload/image.tar
- put: nomad-job - put: nomad-job
params: params:
job_path: repo/singh3.nomad job_path: repo/singh3.nomad

View File

@@ -43,7 +43,7 @@
name = "singh3"; name = "singh3";
tag = "latest"; tag = "latest";
created = "now"; created = "now";
contents = packages.default; contents = [ packages.default ];
config.Cmd = [ "/bin/singh3" ]; config.Cmd = [ "/bin/singh3" ];
}; };
}; };

View File

@@ -48,8 +48,8 @@ EOF
} }
resources { resources {
cpu = 256 cpu = 128
memory = 128 memory = 100
} }
} }
@@ -59,7 +59,11 @@ EOF
config { config {
image = "natto17/singh3:latest" image = "natto17/singh3:latest"
force_pull = true force_pull = true
volumes = [ "/tmp:/tmp" ] }
resources {
cpu = 128
memory = 100
} }
template { template {