mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-12-22 18:30:43 -06:00
namespace options under oizys
This commit is contained in:
parent
1da7e1ff0b
commit
6e3aa008df
17 changed files with 94 additions and 74 deletions
|
@ -12,7 +12,6 @@
|
||||||
nim = true;
|
nim = true;
|
||||||
python = true;
|
python = true;
|
||||||
};
|
};
|
||||||
cli.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
rclone
|
rclone
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
nix-ld
|
nix-ld
|
||||||
];
|
];
|
||||||
|
|
||||||
desktop.enable = true;
|
oizys.desktop.enable = true;
|
||||||
cli.enable = true;
|
cli.enable = true;
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
|
|
|
@ -10,17 +10,20 @@
|
||||||
docker
|
docker
|
||||||
];
|
];
|
||||||
|
|
||||||
cli.enable = true;
|
oizys = {
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
|
vpn.enable = true;
|
||||||
|
languages = [
|
||||||
|
"misc"
|
||||||
|
"python"
|
||||||
|
"nim"
|
||||||
|
"tex"
|
||||||
|
"node"
|
||||||
|
];
|
||||||
|
};
|
||||||
vivaldi.enable = true;
|
vivaldi.enable = true;
|
||||||
|
|
||||||
languages = {
|
|
||||||
misc = true;
|
|
||||||
python = true;
|
|
||||||
nim = true;
|
|
||||||
tex = true;
|
|
||||||
node = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
zk
|
zk
|
||||||
|
@ -30,8 +33,6 @@
|
||||||
|
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland.enable = true;
|
||||||
|
|
||||||
services.vpn.enable = true;
|
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
user = "daylin";
|
user = "daylin";
|
||||||
repository = "rclone:g:archives/othalan";
|
repository = "rclone:g:archives/othalan";
|
||||||
|
|
|
@ -21,17 +21,12 @@
|
||||||
|
|
||||||
gui
|
gui
|
||||||
|
|
||||||
# langs
|
languages
|
||||||
python
|
|
||||||
misc
|
|
||||||
node
|
|
||||||
tex
|
|
||||||
nim
|
|
||||||
|
|
||||||
# programs
|
# programs
|
||||||
vivaldi
|
vivaldi
|
||||||
vscode
|
vscode
|
||||||
];
|
];
|
||||||
|
|
||||||
options.desktop.enable = lib.mkEnableOption "is desktop";
|
options.oizys.desktop.enable = lib.mkEnableOption "is desktop";
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.desktop;
|
cfg = config.oizys.desktop;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.desktop;
|
cfg = config.oizys.desktop;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
@ -4,10 +4,15 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkOption mkIf types;
|
||||||
cfg = config.cli;
|
cfg = config.oizys.cli;
|
||||||
in {
|
in {
|
||||||
options.cli.enable = mkEnableOption "cli";
|
options.oizys.cli.enable = mkOption {
|
||||||
|
default = true;
|
||||||
|
description = "Whether to enable cli.";
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.direnv.enable = true;
|
programs.direnv.enable = true;
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.desktop;
|
cfg = config.oizys.desktop;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
cfg = config.languages;
|
|
||||||
in {
|
|
||||||
options.languages.misc = mkEnableOption "go + rustup";
|
|
||||||
config = mkIf cfg.misc {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
go
|
|
||||||
rustup
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (lib) mkEnableOption mkIf;
|
|
||||||
cfg = config.languages;
|
|
||||||
in {
|
|
||||||
options.languages.tex = mkEnableOption "tex";
|
|
||||||
config = mkIf cfg.tex {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
texlive.combined.scheme-full
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
24
modules/languages/default.nix
Normal file
24
modules/languages/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkOption types literalExpression mdDoc;
|
||||||
|
cfg = config.oizys.languages;
|
||||||
|
in {
|
||||||
|
imports = [./nim.nix ./tex.nix ./misc.nix ./node.nix ./python.nix];
|
||||||
|
options.oizys.languages = mkOption {
|
||||||
|
type = with types; nullOr (listOf str);
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
List of programming languages to enable.
|
||||||
|
'';
|
||||||
|
default = null;
|
||||||
|
example = literalExpression ''
|
||||||
|
[
|
||||||
|
"python"
|
||||||
|
"nim"
|
||||||
|
]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
16
modules/languages/misc.nix
Normal file
16
modules/languages/misc.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
cfg = config.oizys.languages;
|
||||||
|
in {
|
||||||
|
config = mkIf (builtins.elem "misc" cfg) {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
go
|
||||||
|
rustup
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,11 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.languages;
|
cfg = config.oizys.languages;
|
||||||
in {
|
in {
|
||||||
options.languages.nim = mkEnableOption "nim";
|
config = mkIf (builtins.elem "nim" cfg) {
|
||||||
config = mkIf cfg.nim {
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nim
|
nim
|
||||||
|
|
|
@ -4,11 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.languages;
|
cfg = config.oizys.languages;
|
||||||
in {
|
in {
|
||||||
options.languages.node = mkEnableOption "node";
|
config = mkIf (builtins.elem "node" cfg) {
|
||||||
config = mkIf cfg.node {
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
nodePackages.pnpm
|
nodePackages.pnpm
|
|
@ -4,11 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkIf;
|
||||||
cfg = config.languages;
|
cfg = config.oizys.languages;
|
||||||
in {
|
in {
|
||||||
options.languages.python = mkEnableOption "python";
|
config = mkIf (builtins.elem "python" cfg) {
|
||||||
config = mkIf cfg.python {
|
|
||||||
environment.systemPackages = let
|
environment.systemPackages = let
|
||||||
python = pkgs.python3.withPackages (ps: with ps; [pip]);
|
python = pkgs.python3.withPackages (ps: with ps; [pip]);
|
||||||
in
|
in
|
16
modules/languages/tex.nix
Normal file
16
modules/languages/tex.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
# cfg = config.oizys.languages;
|
||||||
|
langEnabled = name: builtins.elem name config.oizys.languages;
|
||||||
|
in {
|
||||||
|
config = mkIf (langEnabled "tex") {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
texlive.combined.scheme-full
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,10 +5,10 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
cfg = config.services.vpn;
|
cfg = config.oizys.vpn;
|
||||||
in {
|
in {
|
||||||
options.services.vpn.enable = mkEnableOption ''
|
options.oizys.vpn.enable = mkEnableOption ''
|
||||||
use openconnect vpn
|
Whether to enable openconnect for vpn connection.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
Loading…
Reference in a new issue