add build recipe in justfile

This commit is contained in:
ulic-youthlic 2025-02-05 21:19:33 +08:00
parent de118840bd
commit 17ba6c7e05
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
5 changed files with 13 additions and 4 deletions

6
Justfile Normal file → Executable file
View file

@ -1,3 +1,5 @@
#!/usr/bin/env -S just --justfile
FLAKE_HOME := justfile_directory() FLAKE_HOME := justfile_directory()
DEFAULT_SPECIALISATION := "default" DEFAULT_SPECIALISATION := "default"
@ -10,6 +12,9 @@ switch specialisation=DEFAULT_SPECIALISATION:
update: update:
nix flake update --log-format internal-json 2>&1 | nom --json nix flake update --log-format internal-json 2>&1 | nom --json
build specialisation=DEFAULT_SPECIALISATION:
nh os build {{ FLAKE_HOME }} {{ if specialisation == DEFAULT_SPECIALISATION { "-S" } else { "-s " + specialisation } }}
deploy host: deploy host:
deploy {{ FLAKE_HOME }}#{{ host }} deploy {{ FLAKE_HOME }}#{{ host }}
@ -24,3 +29,4 @@ alias u := update
alias d := deploy alias d := deploy
alias c := clean alias c := clean
alias h := health alias h := health
alias b := build

View file

@ -50,7 +50,6 @@
gitoxide gitoxide
viu viu
fd fd
just
]; ];
programs.ssh = { programs.ssh = {
enable = true; enable = true;

View file

@ -69,6 +69,5 @@
kdePackages.kdenlive kdePackages.kdenlive
fd fd
viu viu
just
]; ];
} }

View file

@ -8,6 +8,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
spacer spacer
devenv devenv
just
]; ];
}; };
} }

View file

@ -1,4 +1,8 @@
{ config, lib, ... }: {
config,
lib,
...
}:
let let
inherit (lib) mkEnableOption mkIf mkMerge; inherit (lib) mkEnableOption mkIf mkMerge;
fish-cfg = config.youthlic.programs.fish; fish-cfg = config.youthlic.programs.fish;
@ -19,7 +23,7 @@ in
options = { options = {
youthlic.programs = { youthlic.programs = {
fish = { fish = {
enable =mkEnableOption "fish"; enable = mkEnableOption "fish";
}; };
bash = { bash = {
enable = mkEnableOption "bash"; enable = mkEnableOption "bash";