mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 12:19:12 +00:00
Update the modules
* Python module now has an additional option for the package to be installed for easier installation of other versions. * The Python module also has a restriction of installing version 3 and above. * The JavaScript module has been moved into a more general module for web-based tools (including PHP).
This commit is contained in:
parent
c74dd2ff17
commit
80cb28be86
@ -113,10 +113,6 @@
|
||||
};
|
||||
go.enable = true;
|
||||
java.enable = true;
|
||||
javascript = {
|
||||
deno.enable = true;
|
||||
node.enable = true;
|
||||
};
|
||||
lisp = {
|
||||
clojure.enable = true;
|
||||
guile.enable = true;
|
||||
@ -130,6 +126,14 @@
|
||||
};
|
||||
rust.enable = true;
|
||||
vcs.enable = true;
|
||||
web = {
|
||||
enable = true;
|
||||
javascript = {
|
||||
deno.enable = true;
|
||||
node.enable = true;
|
||||
};
|
||||
php.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
drivers = { veikk.enable = true; };
|
||||
@ -189,7 +193,7 @@
|
||||
]
|
||||
|
||||
# My custom packages.
|
||||
++ (with pkgs.nur.foo-dogsquared; [ segno ]);
|
||||
++ (with pkgs.nur.foo-dogsquared; [ julia-bin license-cli openring segno ]);
|
||||
|
||||
# Setting up the shell environment.
|
||||
my.env = {
|
||||
|
@ -21,11 +21,11 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Enable JACK for the most serious audio applications.
|
||||
services.jack = {
|
||||
jackd.enable = true;
|
||||
alsa.enable = false;
|
||||
loopback = { enable = true; };
|
||||
};
|
||||
# services.jack = {
|
||||
# jackd.enable = true;
|
||||
# alsa.enable = false;
|
||||
# loopback = { enable = true; };
|
||||
# };
|
||||
|
||||
hardware.pulseaudio.package =
|
||||
pkgs.pulseaudio.override { jackaudioSupport = true; };
|
||||
|
@ -10,12 +10,12 @@
|
||||
./gamedev.nix
|
||||
./go.nix
|
||||
./java.nix
|
||||
./javascript.nix
|
||||
./lisp.nix
|
||||
./math.nix
|
||||
./perl.nix
|
||||
./python.nix
|
||||
./rust.nix
|
||||
./vcs.nix
|
||||
./web.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
# JavaScript, the poster boy of hated languages...
|
||||
# I think it's pretty great, when it works.
|
||||
# Otherwise, it is a disaster from its syntax and the massive ecosystem among others.
|
||||
# Since I use/experiment with the ecosystem so stuff like Node and Deno are combined into one module file.
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.dev.javascript;
|
||||
in {
|
||||
options.modules.dev.javascript = let
|
||||
mkBoolOption = bool:
|
||||
mkOption {
|
||||
type = types.bool;
|
||||
default = bool;
|
||||
};
|
||||
in {
|
||||
deno.enable = mkBoolOption false;
|
||||
node.enable = mkBoolOption false;
|
||||
};
|
||||
|
||||
config = {
|
||||
my.packages = with pkgs;
|
||||
(if cfg.deno.enable then
|
||||
[
|
||||
deno # The Deltarune of Node.
|
||||
]
|
||||
else
|
||||
[ ]) ++
|
||||
|
||||
(if cfg.node.enable then
|
||||
[
|
||||
nodejs # The JavaScript framework/runtime where you don't have to kill someone for bad code. :)
|
||||
]
|
||||
else
|
||||
[ ]);
|
||||
};
|
||||
}
|
@ -16,30 +16,37 @@ in {
|
||||
in {
|
||||
enable = mkBoolOption false;
|
||||
math.enable = mkBoolOption false;
|
||||
pkg = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.python37;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.packages = with pkgs;
|
||||
[
|
||||
(python37.withPackages (p:
|
||||
with python3Packages;
|
||||
[
|
||||
beautifulsoup4 # How soups are beautiful again?
|
||||
requests # The requests for your often-asked questions.
|
||||
pip # Named after a certain mouse that lives in a barnyard and its ability to keep track of dependencies.
|
||||
pytools # It's the little things that counts.
|
||||
pytest # Try to make a good grade or else.
|
||||
poetry # It rhymes...
|
||||
scrapy # Create an extractor from a box of scraps.
|
||||
setuptools # Setup your stuff.
|
||||
]
|
||||
assertions = [{
|
||||
assertion = versionAtLeast cfg.pkg.version "3";
|
||||
message = "Python version should be only 3 and above.";
|
||||
}];
|
||||
my.packages = with pkgs; [
|
||||
(cfg.pkg.withPackages (p:
|
||||
with python3Packages;
|
||||
[
|
||||
beautifulsoup4 # How soups are beautiful again?
|
||||
requests # The requests for your often-asked questions.
|
||||
pytools # It's the little things that counts.
|
||||
pytest # Try to make a good grade or else.
|
||||
poetry # It rhymes...
|
||||
scrapy # Create an extractor from a box of scraps.
|
||||
setuptools # Setup your stuff.
|
||||
]
|
||||
|
||||
++ (if cfg.math.enable then [
|
||||
numpy # Numbers are also good, right?
|
||||
sympy # When will you notice that math is good?
|
||||
] else
|
||||
[ ])))
|
||||
];
|
||||
++ (if cfg.math.enable then [
|
||||
numpy # Numbers are also good, right?
|
||||
sympy # When will you notice that math is good?
|
||||
] else
|
||||
[ ])))
|
||||
python3Packages.pip # Named after a certain animal that lives in a barnyard.
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
50
modules/dev/web.nix
Executable file
50
modules/dev/web.nix
Executable file
@ -0,0 +1,50 @@
|
||||
# Web development, the poster boy of hated programming subsets...
|
||||
# I think it's pretty great, when it works.
|
||||
# Otherwise, it is a disaster from the massive ecosystem among others.
|
||||
# Since I use/experiment with the ecosystem so stuff like Node and Deno are combined into one module file.
|
||||
{ config, options, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.dev.web;
|
||||
in {
|
||||
options.modules.dev.web = let
|
||||
mkBoolOption = bool:
|
||||
mkOption {
|
||||
type = types.bool;
|
||||
default = bool;
|
||||
};
|
||||
in {
|
||||
enable = mkBoolOption false;
|
||||
javascript = {
|
||||
enable = mkBoolOption false;
|
||||
deno.enable = mkBoolOption false;
|
||||
node.enable = mkBoolOption false;
|
||||
};
|
||||
php.enable = mkBoolOption false;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.packages = with pkgs;
|
||||
[ caddy ] ++ (if cfg.javascript.deno.enable then
|
||||
[
|
||||
deno # The Deltarune of Node.
|
||||
]
|
||||
else
|
||||
[ ]) ++
|
||||
|
||||
(if cfg.javascript.node.enable then
|
||||
[
|
||||
nodejs # The JavaScript framework/runtime where you don't have to kill someone for bad code. :)
|
||||
]
|
||||
else
|
||||
[ ]) ++
|
||||
|
||||
(if cfg.php.enable then [
|
||||
php # Behold, the most hated language (at least in my experience).
|
||||
phpPackages.composer # Composes PHP projects prematurely.
|
||||
phpPackages.phpcs # Quality control tool.
|
||||
phpPackages.php-cs-fixer # Fixes your incorrectly formatted dirt.
|
||||
] else
|
||||
[ ]);
|
||||
};
|
||||
}
|
@ -5,6 +5,7 @@
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.editors.emacs;
|
||||
emacsOrgProtocolDesktopEntry = pkgs.makeDesktopItem {
|
||||
name = "org-protocol";
|
||||
desktopName = "Org-Protocol";
|
||||
@ -27,10 +28,9 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.modules.editors.emacs.enable {
|
||||
config = mkIf cfg.enable {
|
||||
my.packages = with pkgs; [
|
||||
((emacsPackagesNgGen config.modules.editors.emacs.pkg).emacsWithPackages
|
||||
(epkgs: [ epkgs.vterm ]))
|
||||
((emacsPackagesNgGen cfg.pkg).emacsWithPackages (epkgs: [ epkgs.vterm ]))
|
||||
|
||||
emacsOrgProtocolDesktopEntry
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
[
|
||||
(self: super:
|
||||
with super; {
|
||||
# Add packages from the unstable channel with `pkgs.unstable.$PKG`.
|
||||
veikk-linux-driver =
|
||||
(callPackage ./veikk-driver.nix { kernel = pkgs.linux_5_8; });
|
||||
nur.foo-dogsquared = import (fetchTarball
|
||||
"https://github.com/foo-dogsquared/nur-packages/archive/develop.tar.gz") {
|
||||
"https://github.com/foo-dogsquared/nur-packages/archive/master.tar.gz") {
|
||||
inherit pkgs;
|
||||
};
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user