Changes
This commit is contained in:
parent
f1f4255d7d
commit
e2abde8b28
40
flake.lock
40
flake.lock
|
@ -210,6 +210,24 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": [
|
"systems": [
|
||||||
"stylix",
|
"stylix",
|
||||||
|
@ -589,7 +607,7 @@
|
||||||
},
|
},
|
||||||
"nuschtosSearch": {
|
"nuschtosSearch": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils_2",
|
||||||
"ixx": "ixx",
|
"ixx": "ixx",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
|
@ -612,6 +630,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nix-matlab": "nix-matlab",
|
"nix-matlab": "nix-matlab",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
@ -628,12 +647,12 @@
|
||||||
"base16-vim": "base16-vim",
|
"base16-vim": "base16-vim",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"flake-compat": "flake-compat_3",
|
"flake-compat": "flake-compat_3",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_3",
|
||||||
"git-hooks": "git-hooks_2",
|
"git-hooks": "git-hooks_2",
|
||||||
"gnome-shell": "gnome-shell",
|
"gnome-shell": "gnome-shell",
|
||||||
"home-manager": "home-manager_3",
|
"home-manager": "home-manager_3",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"systems": "systems_2",
|
"systems": "systems_3",
|
||||||
"tinted-foot": "tinted-foot",
|
"tinted-foot": "tinted-foot",
|
||||||
"tinted-kitty": "tinted-kitty",
|
"tinted-kitty": "tinted-kitty",
|
||||||
"tinted-tmux": "tinted-tmux",
|
"tinted-tmux": "tinted-tmux",
|
||||||
|
@ -683,6 +702,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"tinted-foot": {
|
"tinted-foot": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
{ nixpkgs, flake-utils, ... }:
|
{
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
imports = [
|
imports = [
|
||||||
|
./shell.nix
|
||||||
./languages/python.nix
|
./languages/python.nix
|
||||||
|
./utilities/cuda.nix
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -16,15 +22,21 @@ in
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
modules = [
|
evaluated =
|
||||||
attrs
|
(nixpkgs.lib.evalModules {
|
||||||
] ++ imports;
|
modules = [ attrs ] ++ imports;
|
||||||
evaluated = nixpkgs.lib.evalModules { inherit modules; };
|
specialArgs = {
|
||||||
|
pkgs = pkgs;
|
||||||
|
};
|
||||||
|
}).config;
|
||||||
|
recUpdate = nixpkgs.lib.recursiveUpdate;
|
||||||
|
shell = recUpdate {
|
||||||
|
env = evaluated.env;
|
||||||
|
packages = evaluated.packages ++ (evaluated.extraPackages pkgs);
|
||||||
|
} evaluated.override;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell shell;
|
||||||
TEST_ENV = builtins.trace evaluated.config "HELLO";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.python = {
|
||||||
|
enable = mkEnableOption "Python";
|
||||||
|
packages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package) // {
|
||||||
|
merge =
|
||||||
|
loc: defs: p:
|
||||||
|
lib.concatMap (def: (def.value p)) defs;
|
||||||
|
};
|
||||||
|
default = p: [ ];
|
||||||
|
description = "Python packages to install";
|
||||||
|
};
|
||||||
|
# TODO: Add option to directly read from requirements.txt, maybe with mach-nix
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf config.python.enable {
|
||||||
|
packages =
|
||||||
|
with pkgs;
|
||||||
|
let
|
||||||
|
packages = config.python.packages;
|
||||||
|
pythonPackage = python3.withPackages packages;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
pythonPackage
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,7 +5,7 @@ with lib;
|
||||||
options = {
|
options = {
|
||||||
env = mkOption {
|
env = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = [ ];
|
default = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
|
@ -13,5 +13,21 @@ with lib;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
description = "Packages to install";
|
description = "Packages to install";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package) // {
|
||||||
|
merge =
|
||||||
|
loc: defs: p:
|
||||||
|
lib.concatMap (def: (def.value p)) defs;
|
||||||
|
};
|
||||||
|
default = p: [ ];
|
||||||
|
description = "Extra packages to install";
|
||||||
|
};
|
||||||
|
|
||||||
|
override = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
default = { };
|
||||||
|
description = "Settings in the mkShell call to override";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
{
|
||||||
|
options.cuda = {
|
||||||
|
enable = mkEnableOption "CUDA";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf config.cuda.enable {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,6 +4,8 @@
|
||||||
imports = [
|
imports = [
|
||||||
./ide/mathematica.nix
|
./ide/mathematica.nix
|
||||||
./ide/matlab.nix
|
./ide/matlab.nix
|
||||||
|
# TODO: Move languages to make clear it is just IDE configuration
|
||||||
|
# Languages should be installed with devShells, however the IDE must be configured globally
|
||||||
./language/cpp.nix
|
./language/cpp.nix
|
||||||
./language/haskell.nix
|
./language/haskell.nix
|
||||||
./language/js.nix
|
./language/js.nix
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.modules.python;
|
cfg = config.modules.python;
|
||||||
package = pkgs.python3.withPackages cfg.extraPythonPackages;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.python = {
|
options.modules.python = {
|
||||||
|
@ -26,9 +25,7 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Development packages
|
# Development packages
|
||||||
home.packages = [
|
home.packages = [ ];
|
||||||
package
|
|
||||||
];
|
|
||||||
|
|
||||||
# Allow unfree
|
# Allow unfree
|
||||||
modules.unfree.allowedPackages = [
|
modules.unfree.allowedPackages = [
|
||||||
|
|
|
@ -109,16 +109,6 @@
|
||||||
tex.enable = true;
|
tex.enable = true;
|
||||||
jupyter.enable = true;
|
jupyter.enable = true;
|
||||||
|
|
||||||
# python.extraPythonPackages = p: [
|
|
||||||
# p.numpy
|
|
||||||
# p.scikit-learn
|
|
||||||
# p.scipy
|
|
||||||
# p.pandas
|
|
||||||
# p.matplotlib
|
|
||||||
# p.torch
|
|
||||||
# p.torchvision
|
|
||||||
# ];
|
|
||||||
|
|
||||||
# Enable unfree
|
# Enable unfree
|
||||||
unfree.enable = true;
|
unfree.enable = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue