More tweaks, more fun!

This commit is contained in:
Gabriel Arazas 2020-11-05 14:39:02 +08:00
parent 4114c91901
commit aa2d8ac987
27 changed files with 111 additions and 37 deletions

View File

@ -90,6 +90,7 @@
fonts.enable = true;
files.enable = true;
graphics = {
enable = true;
raster.enable = true;
vector.enable = true;
_3d.enable = true;
@ -123,6 +124,10 @@
};
math.enable = true;
perl.enable = true;
perl = {
enable = true;
raku.enable = true;
};
python = {
enable = true;
math.enable = true;

View File

@ -5,7 +5,8 @@
with lib;
let cfg = config.modules.desktop.audio;
let
cfg = config.modules.desktop.audio;
in {
options.modules.desktop.audio = let
mkBoolDefault = bool:

View File

@ -3,7 +3,8 @@
with lib;
let cfg = config.modules.desktop.browsers;
let
cfg = config.modules.desktop.browsers;
in {
options.modules.desktop.browsers = let
mkBoolDefault = bool:

View File

@ -1,7 +1,11 @@
# Even if my designs are computer-aided, it's still horrible. :(
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.desktop.cad;
in {
options.modules.desktop.cad = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.desktop.cad.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [
freecad # FREE AS A BIRD, FREE AS A ALL-YOU-CAN-EAT BUFFER!
#kicad # The CAD for ki which is a form of energy found everywhere.

View File

@ -3,7 +3,8 @@
with lib;
let cfg = config.modules.desktop.files;
let
cfg = config.modules.desktop.files;
in {
options.modules.desktop.files = {
enable = mkOption {

View File

@ -1,7 +1,11 @@
# My selection of fonts for this setup.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.desktop.fonts;
in {
options.modules.desktop.fonts = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.desktop.fonts.enable {
config = mkIf cfg.enable {
# Enable fontconfig to easily discover fonts installed from home-manager.
fonts = {
fontDir.enable = true;

View File

@ -4,7 +4,8 @@
with lib;
let cfg = config.modules.desktop.graphics;
let
cfg = config.modules.desktop.graphics;
in {
options.modules.desktop.graphics = let
mkBoolDefault = bool:
@ -13,13 +14,14 @@ in {
default = bool;
};
in {
enable = mkBoolDefault false;
programmable.enable = mkBoolDefault false;
raster.enable = mkBoolDefault false;
vector.enable = mkBoolDefault false;
_3d.enable = mkBoolDefault false;
};
config = {
config = mkIf cfg.enable {
my.packages = with pkgs;
[
font-manager # Self-explanatory name is self-explanatory.

View File

@ -1,7 +1,11 @@
# Muh consumer applications...
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.desktop.multimedia;
in {
options.modules.desktop.multimedia = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.desktop.multimedia.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [
ffmpeg # The ultimate multimedia toolkit for everybody!
hexchat # The ultimate IRC client for neckbeards.

View File

@ -1,7 +1,11 @@
# I'm not in academia but I like managing my library resources.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.desktop.research;
in {
options.modules.desktop.research = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.desktop.research.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [
exiftool # A file metadata reader/writer/helicopter.
zotero # An academic's best friend.

View File

@ -1,7 +1,11 @@
# Android is the mobile version of Linux.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.dev.android;
in {
options.modules.dev.android = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.dev.android.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [
android-studio # The apartment for Android development.
dart # It's JavaScript except saner and slimmer.
@ -21,6 +25,9 @@ with lib; {
# Enable Android Debug Bridge for some device debugging.
programs.adb.enable = true;
# Install Anbox emulation.
virtualisation.anbox.enable = true;
my.user.extraGroups = [ "adbusers" ];
};
}

View File

@ -1,7 +1,11 @@
# The utmost requirements for a development workflow.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.dev.base;
in {
options.modules.dev.base = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.dev.base.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [
caddy # THE ULTIMATE HTTPS/2 SERVER FOR 'YER GOLFIN' SESSIONS!!!
cmake # Yo, I heard you like Makefiles.

View File

@ -1,7 +1,11 @@
# My stuff for C and C++.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.dev.cc;
in {
options.modules.dev.cc = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.dev.cc.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [
cmake # Yo dawg, I heard you like Make.
# clang # A C compiler frontend for LLVM.

View File

@ -2,6 +2,7 @@
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.dev.data;
in {

View File

@ -5,7 +5,8 @@
with lib;
let cfg = config.modules.dev.documentation;
let
cfg = config.modules.dev.documentation;
in {
options.modules.dev.documentation = let
mkBoolOption = bool:

View File

@ -4,7 +4,8 @@
with lib;
let cfg = config.modules.dev.game-dev;
let
cfg = config.modules.dev.game-dev;
in {
options.modules.dev.game-dev = let
mkBoolOption = bool:

View File

@ -3,7 +3,8 @@
with lib;
let cfg = config.modules.dev.go;
let
cfg = config.modules.dev.go;
in {
options.modules.dev.go = {
enable = mkOption {

View File

@ -4,7 +4,8 @@
with lib;
let cfg = config.modules.dev.java;
let
cfg = config.modules.dev.java;
in {
options.modules.dev.java = {
enable = mkOption {

View File

@ -5,7 +5,8 @@
with lib;
let cfg = config.modules.dev.lisp;
let
cfg = config.modules.dev.lisp;
in {
options.modules.dev.lisp = let
mkBoolDefault = bool:

View File

@ -3,7 +3,8 @@
with lib;
let cfg = config.modules.dev.math;
let
cfg = config.modules.dev.math;
in {
options.modules.dev.math = let
mkEnableOption = mkOption {

View File

@ -3,6 +3,7 @@
with lib;
let
cfg = config.modules.dev.perl;
perlWithPackages = pkgs.perl.withPackages (p:
with pkgs.perlPackages; [
ModuleBuild
@ -16,8 +17,16 @@ in {
type = types.bool;
default = false;
};
raku.enable = mkOption {
type = types.bool;
default = false;
};
};
config =
mkIf config.modules.dev.perl.enable { my.packages = [ perlWithPackages ]; };
config = mkIf cfg.enable {
my.packages = [ perlWithPackages ]
++ (if cfg.raku.enable then [
rakudo
] else []); };
}

View File

@ -5,7 +5,8 @@
with lib;
let cfg = config.modules.dev.python;
let
cfg = config.modules.dev.python;
in {
options.modules.dev.python = let
mkBoolOption = bool:

View File

@ -4,7 +4,8 @@
with lib;
let cfg = config.modules.dev.rust;
let
cfg = config.modules.dev.rust;
in {
options.modules.dev.rust = {
enable = mkOption {

View File

@ -3,7 +3,8 @@
with lib;
let cfg = config.modules.dev.vcs;
let
cfg = config.modules.dev.vcs;
in {
options.modules.dev.vcs = {
enable = mkOption {

View File

@ -5,7 +5,9 @@
{ config, options, lib, pkgs, ... }:
with lib;
let cfg = config.modules.dev.web;
let
cfg = config.modules.dev.web;
in {
options.modules.dev.web = let
mkBoolOption = bool:

View File

@ -1,7 +1,11 @@
# Here are the base packages for my shell workflow.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.shell.base;
in {
options.modules.shell.base = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.shell.base.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [
aria2 # The sequel to aria(1).
aspell # Hunt down a spelling bee champion to come to your shell.

View File

@ -1,7 +1,11 @@
# A file manager for hipsters.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.shell.lf;
in {
options.modules.shell.lf = {
enable = mkOption {
type = types.bool;
@ -9,7 +13,7 @@ with lib; {
};
};
config = mkIf config.modules.shell.lf.enable {
config = mkIf cfg.enable {
my.packages = with pkgs; [ lf ];
my.home.xdg.configFile."lf" = {

View File

@ -1,7 +1,11 @@
# The Zoomer shell is cool for them prompts.
{ config, options, lib, pkgs, ... }:
with lib; {
with lib;
let
cfg = config.modules.shell.zsh;
in {
options.modules.shell.zsh = {
enable = mkOption {
type = types.bool;
@ -10,7 +14,7 @@ with lib; {
};
# Going to use the home-manager module for zsh since it is cool.
config = mkIf config.modules.shell.zsh.enable {
config = mkIf cfg.enable {
programs.zsh = {
enable = true;
enableCompletion = true;