ydeployer via direnv
parent
44f4bbb79f
commit
42cb5ccb2d
|
@ -2,3 +2,5 @@ result
|
||||||
*~
|
*~
|
||||||
/mutt/.mutt/hcache-lock
|
/mutt/.mutt/hcache-lock
|
||||||
/emacs/emacs.el
|
/emacs/emacs.el
|
||||||
|
.direnv
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
use flake ..#deployer
|
|
@ -0,0 +1,2 @@
|
||||||
|
node_modules/
|
||||||
|
dist/
|
|
@ -0,0 +1,5 @@
|
||||||
|
yarn-cache
|
||||||
|
index.ts
|
||||||
|
nix.ts
|
||||||
|
ssh.ts
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
import "../dist/index.js"
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env -S tsx
|
|
||||||
import { ssh, SSH } from './ssh.js'
|
import { ssh, SSH } from './ssh.js'
|
||||||
import { Expression, BuiltOutput } from './nix.js'
|
import { Expression, BuiltOutput } from './nix.js'
|
||||||
|
|
||||||
|
@ -18,6 +17,12 @@ class Cmd {
|
||||||
}
|
}
|
||||||
async run() {
|
async run() {
|
||||||
const opt = argv._[0]
|
const opt = argv._[0]
|
||||||
|
if (opt == "__autocompletes") {
|
||||||
|
for (const k of Object.keys(this.registry)) {
|
||||||
|
console.log(k)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if (opt && this.registry[opt]) await this.registry[opt]()
|
if (opt && this.registry[opt]) await this.registry[opt]()
|
||||||
else {
|
else {
|
||||||
console.log("Possible options: \n")
|
console.log("Possible options: \n")
|
||||||
|
@ -98,6 +103,8 @@ class MachineInterface {
|
||||||
_commands?: string[]
|
_commands?: string[]
|
||||||
constructor(machine: Machine) {
|
constructor(machine: Machine) {
|
||||||
this.machine = machine
|
this.machine = machine
|
||||||
|
// hack:
|
||||||
|
delete this._commands
|
||||||
}
|
}
|
||||||
@cmd
|
@cmd
|
||||||
async ssh() {
|
async ssh() {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,10 +8,14 @@
|
||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"bin": {
|
||||||
|
"ydeployer": "./bin/ydeployer.js"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"watch": "exec tsc --noEmit -w",
|
"watch": "exec tsc --noEmit -w",
|
||||||
"start": "exec tsx ./index.ts",
|
"start": "exec tsx ./index.ts",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
|
"prepare": "exec tsup ./*.ts --dts --format esm"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -20,6 +24,7 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"tsup": "^6.7.0",
|
||||||
"tsx": "^3.12.2",
|
"tsx": "^3.12.2",
|
||||||
"typescript": "^4.9.4",
|
"typescript": "^4.9.4",
|
||||||
"zx": "^7.1.1"
|
"zx": "^7.1.1"
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ buildYarnPackage }:
|
||||||
|
buildYarnPackage {
|
||||||
|
src = ./.;
|
||||||
|
postBuild = ''
|
||||||
|
yarn install --production --ignore-scripts --prefer-offline
|
||||||
|
'';
|
||||||
|
postInstall = ''
|
||||||
|
rm $out/bin/yarn
|
||||||
|
sed -i '/^cd /d' $out/bin/ydeployer
|
||||||
|
'';
|
||||||
|
meta.mainProgram = "ydeployer";
|
||||||
|
passthru.exePath = "/bin/ydeployer";
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
21
flake.lock
21
flake.lock
|
@ -235,6 +235,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-npm-buildpackage": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1677562139,
|
||||||
|
"narHash": "sha256-J39FdMjECbWGSXVHmEdyGBD2aRYGhg9bWEPf1/ZR47k=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "nix-npm-buildpackage",
|
||||||
|
"rev": "d45296118cae672982f192451dd3e19fa6c2d068",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "nix-npm-buildpackage",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673803274,
|
"lastModified": 1673803274,
|
||||||
|
@ -380,6 +400,7 @@
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
|
"nix-npm-buildpackage": "nix-npm-buildpackage",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixos-mailserver": "nixos-mailserver",
|
"nixos-mailserver": "nixos-mailserver",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
|
20
flake.nix
20
flake.nix
|
@ -14,10 +14,12 @@
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nix-index-database.url = "github:Mic92/nix-index-database";
|
nix-index-database.url = "github:Mic92/nix-index-database";
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
nix-npm-buildpackage.url = "github:serokell/nix-npm-buildpackage";
|
||||||
|
nix-npm-buildpackage.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
outputs = inputs@{ nixpkgs, home-manager, nixpkgs-mozilla, emacs-overlay
|
outputs = inputs@{ nixpkgs, home-manager, nixpkgs-mozilla, emacs-overlay
|
||||||
, nixpkgs-wayland, nixpkgs-stable, nixos-hardware, agenix, flake-utils
|
, nixpkgs-wayland, nixpkgs-stable, nixos-hardware, agenix, flake-utils
|
||||||
, nix-index-database
|
, nix-index-database, nix-npm-buildpackage
|
||||||
, self
|
, self
|
||||||
, ... }:
|
, ... }:
|
||||||
(flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
(flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||||
|
@ -59,6 +61,21 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
y-deployer
|
||||||
|
];
|
||||||
|
};
|
||||||
|
devShells.deployer = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
yarn
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
apps.default = flake-utils.lib.mkApp {
|
||||||
|
drv = pkgs.y-deployer;
|
||||||
|
};
|
||||||
# updater script for home profile
|
# updater script for home profile
|
||||||
# works around https://github.com/nix-community/home-manager/issues/2848
|
# works around https://github.com/nix-community/home-manager/issues/2848
|
||||||
apps.update-home = flake-utils.lib.mkApp {
|
apps.update-home = flake-utils.lib.mkApp {
|
||||||
|
@ -78,6 +95,7 @@
|
||||||
nixpkgs-mozilla.overlay
|
nixpkgs-mozilla.overlay
|
||||||
emacs-overlay.overlay
|
emacs-overlay.overlay
|
||||||
agenix.overlay
|
agenix.overlay
|
||||||
|
nix-npm-buildpackage.overlays.default
|
||||||
(import ./fixups.nix)
|
(import ./fixups.nix)
|
||||||
(import ./pkgs)
|
(import ./pkgs)
|
||||||
(import ./pkgs/mdr.nix)
|
(import ./pkgs/mdr.nix)
|
||||||
|
|
|
@ -251,6 +251,7 @@ in {
|
||||||
unzip
|
unzip
|
||||||
vim
|
vim
|
||||||
xdg-utils
|
xdg-utils
|
||||||
|
countfftabs
|
||||||
#wlrctl
|
#wlrctl
|
||||||
|
|
||||||
## coins
|
## coins
|
||||||
|
@ -270,9 +271,10 @@ in {
|
||||||
neomutt
|
neomutt
|
||||||
spotify
|
spotify
|
||||||
tdesktop
|
tdesktop
|
||||||
|
signal-desktop
|
||||||
virt-manager
|
virt-manager
|
||||||
wireshark
|
wireshark
|
||||||
yubioath-flutter
|
#yubioath-flutter
|
||||||
|
|
||||||
## games
|
## games
|
||||||
prismlauncher
|
prismlauncher
|
||||||
|
|
|
@ -34,5 +34,6 @@
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
wayland-push-to-talk-fix = self.callPackage ./wayland-push-to-talk-fix.nix {};
|
wayland-push-to-talk-fix = self.callPackage ./wayland-push-to-talk-fix.nix {};
|
||||||
|
y-deployer = self.callPackage ../deployer/package.nix {};
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue