Skip to content

Commit

Permalink
Be wary of the jupyter service, not merged yet
Browse files Browse the repository at this point in the history
... addding a stack.yaml pour eveiter le genre de probleme que j'ai eu
avec hakyll du style jaspervdj/hakyll#614.
  [ERROR] ./about.rst: hGetContents: invalid argument (invalid byte sequence)

parce que nix n\avait pas LANG dans l'env
  • Loading branch information
teto committed Aug 8, 2018
1 parent b77e955 commit 59ffda6
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 28 deletions.
6 changes: 6 additions & 0 deletions home/stack.yaml
@@ -0,0 +1,6 @@
# see https://docs.haskellstack.org/en/stable/nix_integration/#configuration
# for confiugration options
nix:
enable: true
# true by default but will cause problems such as https://github.com/jaspervdj/hakyll/issues/614
pure: false
3 changes: 3 additions & 0 deletions nixpkgs/common-desktop.nix
Expand Up @@ -23,6 +23,9 @@ in
# ./desktopPkgs.nix
# ./modules/tor.nix

# only if available
./modules/jupyter.nix

];

boot.kernelModules = [
Expand Down
1 change: 0 additions & 1 deletion nixpkgs/configuration-xps.nix
Expand Up @@ -22,7 +22,6 @@ let
./extraTools.nix

]
# ++ lib.optional (services ? jupyter) ./jupyter.nix
;

# TODO conditionnally enable it
Expand Down
4 changes: 4 additions & 0 deletions nixpkgs/home-common.nix
Expand Up @@ -49,6 +49,10 @@ rec {

home.file.".ghc/ghci.conf".source = ../home/ghci.conf;

# useful to prevent some problems with nix
# https://github.com/commercialhaskell/stack/issues/2358
home.file.".stack/config.yaml".source = ../home/stack.yaml;


# TODO doesn't find ZDOTDIR (yet)
# TODO maybe we can add to PATH
Expand Down
4 changes: 2 additions & 2 deletions nixpkgs/home-desktop.nix
Expand Up @@ -19,8 +19,8 @@ let
];

devPkgs = with pkgs; [
cabal-install
cabal2nix
# cabal-install
# cabal2nix
editorconfig-core-c
exa
gdb
Expand Down
4 changes: 3 additions & 1 deletion nixpkgs/home-mail.nix
Expand Up @@ -112,7 +112,9 @@ in

# sendCommand = config.programs.msmtp.sendCommand;
# mta type
# contactCompletionCommand
# contactCompletionCommand = ''
# '';

# createAliases=true;
# generate alias
# TODO test http://alot.readthedocs.io/en/latest/configuration/key_bindings.html
Expand Down
35 changes: 20 additions & 15 deletions nixpkgs/modules/jupyter.nix
Expand Up @@ -6,22 +6,27 @@
# port = 8123; # 8888 by default
# notebookDir = "/var/www/jupyter"; # ~ by default
# password is 'test'

# raw jupyter config
notebookConfig = ''
'';
password = "'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'";
kernels= {
# kernels= {

sage = let
# readFile
kernel= builtins.fromJSON (builtins.readFile (pkgs.sage + "/share/jupyter/kernels/sagemath/kernel.json")) // {
language="python";
};
env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
ipykernel
pandas
scikitlearn
# qtconsole
]));
in
kernel;
# sage = let
# # readFile
# kernel= builtins.fromJSON (builtins.readFile (pkgs.sage + "/share/jupyter/kernels/sagemath/kernel.json")) // {
# language="python";
# };
# env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [
# ipykernel
# pandas
# scikitlearn
# # qtconsole
# ]));
# in
# kernel;
# {
# displayName = "Python 3 for sage";
# argv = [
Expand All @@ -35,7 +40,7 @@
# logo32 = "$ {env.sitePackages}/ipykernel/resources/logo-32x32.png";
# logo64 = "$ {env.sitePackages}/ipykernel/resources/logo-64x64.png";
# };
};
# };

};
}
9 changes: 0 additions & 9 deletions nixpkgs/overlays/kernels.nix
Expand Up @@ -2,11 +2,6 @@ self: prev:
# with prev.lib.kernel;

let
# pkgs.haskell.lib.doJailbreak
# myHaskellOverlay = selfHaskell: prevHaskell: {

# # TODO
# };

# TODO tester ce qui fait flipper/ peut foirer
# EXT4_ENCRYPTION
Expand Down Expand Up @@ -462,10 +457,6 @@ in rec {
];
};

# haskellPackages = prev.haskellPackages.extend myHaskellOverlay;
# haskell overlay pkgs.haskell.lib.doJailbreak
# pkgs.haskell.lib.doJailbreak
# jailbreak = true;
# linux_latest_9p = prev.pkgs.linux_latest.override({
# extraConfig = ''
# NET_9P y
Expand Down

0 comments on commit 59ffda6

Please sign in to comment.