mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 10:10:45 -06:00
use options for langs
This commit is contained in:
parent
159f911d68
commit
0cedd85f4f
9 changed files with 59 additions and 25 deletions
|
@ -12,15 +12,18 @@
|
|||
virtualization
|
||||
|
||||
restic
|
||||
|
||||
# langs
|
||||
misc
|
||||
nim
|
||||
node
|
||||
tex
|
||||
];
|
||||
|
||||
services.vpn.enable = true;
|
||||
|
||||
languages = {
|
||||
misc.enable = true;
|
||||
python.enable = true;
|
||||
nim.enable = true;
|
||||
tex.enable = true;
|
||||
node.enable = true;
|
||||
};
|
||||
|
||||
|
||||
services.restic.backups.gdrive = {
|
||||
user = "daylin";
|
||||
|
|
|
@ -13,6 +13,7 @@ in rec {
|
|||
nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[ ../modules/roles/common.nix ] ++
|
||||
builtins.filter isNixFile (listFilesRecursive (../. + "/hosts/${hostname}"));
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{config, lib,pkgs,...}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages.misc;
|
||||
in
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.languages.misc.enable = mkEnableOption "go + rustup";
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# language supports
|
||||
nodejs
|
||||
go
|
||||
rustup
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
{nixpkgs,config, lib,pkgs,...}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages.nim;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
nixpkgs,
|
||||
...
|
||||
}: {
|
||||
options.languages.nim.enable = mkEnableOption "nim";
|
||||
config = mkIf cfg.enable {
|
||||
nixpkgs.overlays = [
|
||||
# (import ../../overlays/nim {})
|
||||
(import ../../overlays/nimlsp {})
|
||||
|
@ -16,4 +19,5 @@
|
|||
nimble
|
||||
nimlsp
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,14 @@
|
|||
{pkgs, ...}: {
|
||||
{config, lib,pkgs,...}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages.node;
|
||||
in
|
||||
{
|
||||
options.languages.node.enable = mkEnableOption "node";
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nodejs
|
||||
nodejs
|
||||
nodePackages.pnpm
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
{config, lib,pkgs,...}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages.python;
|
||||
in
|
||||
{
|
||||
options.languages.python.enable = mkEnableOption "python";
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# https://github.com/Mic92/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
|
||||
(pkgs.writeShellScriptBin "python" ''
|
||||
|
@ -14,4 +22,6 @@
|
|||
(python3.withPackages (ps: with ps; [pip]))
|
||||
micromamba
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{config, lib,pkgs,...}:
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
cfg = config.languages.tex;
|
||||
in
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options.languages.tex.enable = mkEnableOption "tex";
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
texlive.combined.scheme-full
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,5 +7,9 @@
|
|||
|
||||
# langs
|
||||
python
|
||||
misc
|
||||
node
|
||||
tex
|
||||
nim
|
||||
];
|
||||
}
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
...
|
||||
}: {
|
||||
imports = with inputs.self.nixosModules; [
|
||||
common
|
||||
gui
|
||||
vscode
|
||||
vpn
|
||||
# qtile
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue