Started work on modularized machine config, does not quite work yet. Changed Ophanim's kernel to hardened.
This commit is contained in:
parent
2efae4f888
commit
a0f361425a
10 changed files with 162 additions and 63 deletions
|
@ -3,9 +3,10 @@
|
|||
gitpkgs ? import /nixpkgs/default.nix,
|
||||
config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = with lib; import ("/etc/nixos/machines/" + (replaceStrings ["\n"] [""] (readFile /etc/hostname)) + "/configuration.nix");
|
||||
optPkgs = with lib; package: pkgstring: if elem pkgstring cfg.pkgs then package else [];
|
||||
optPkgs = package: pkgstring: if elem pkgstring config.machine.pkgs then package else [];
|
||||
gitpkgs = import /nixpkgs/default.nix {};
|
||||
|
||||
# Programms I'm likely to want on every machine and/or may execute as root
|
||||
|
@ -36,7 +37,7 @@ let
|
|||
nix-update-source
|
||||
nix-zsh-completions
|
||||
nixbang
|
||||
# nixops
|
||||
nixops
|
||||
nmap
|
||||
nox
|
||||
ntfs3g
|
||||
|
@ -66,6 +67,12 @@ let
|
|||
zsh
|
||||
];
|
||||
|
||||
dict = with pkgs; [
|
||||
translate-shell
|
||||
( hunspellWithDicts (with pkgs.hunspellDicts; [ de-de en-us ] ))
|
||||
( aspellWithDicts (d: [ d.de d.en d.en-computers d.en-science ] ))
|
||||
];
|
||||
|
||||
emacs = gitpkgs.emacsWithPackages (epkgs: with epkgs; [
|
||||
/* Theming */
|
||||
solarized-theme color-theme-sanityinc-tomorrow moe-theme powerline moody minions
|
||||
|
@ -80,6 +87,7 @@ let
|
|||
wsd-mode
|
||||
plantuml-mode
|
||||
/* Other Stuff, not yet sorted */
|
||||
google-translate
|
||||
transmission
|
||||
org-plus-contrib orgit ox-gfm ox-rst
|
||||
eclim
|
||||
|
@ -152,7 +160,7 @@ let
|
|||
})
|
||||
];
|
||||
|
||||
python3 = gitpkgs.python3Full.withPackages(ps: with ps; [
|
||||
python3 = gitpkgs.python3Full.withPackages(ps: with ps; [
|
||||
GitPython
|
||||
bpython
|
||||
configparser
|
||||
|
@ -160,6 +168,7 @@ let
|
|||
elpy
|
||||
emoji
|
||||
epc
|
||||
genanki
|
||||
numpy
|
||||
opencv3
|
||||
paho-mqtt
|
||||
|
@ -168,7 +177,6 @@ let
|
|||
pip
|
||||
plotly
|
||||
pyflakes
|
||||
pygame_sdl2
|
||||
pylama
|
||||
pylint
|
||||
pyopengl
|
||||
|
@ -201,10 +209,9 @@ let
|
|||
# flask_sqlalchemy
|
||||
# flask_testing
|
||||
# flask_wtf
|
||||
# flaskbabel
|
||||
# flaskbabel
|
||||
/* temporarily fix python stuff */
|
||||
py3status pytz tzlocal
|
||||
|
||||
]);
|
||||
|
||||
rustpkgs = with pkgs; [
|
||||
|
@ -243,6 +250,7 @@ let
|
|||
|
||||
in {
|
||||
environment.systemPackages = base
|
||||
++ (optPkgs dict "dict")
|
||||
++ (optPkgs [emacs] "emacs")
|
||||
++ (optPkgs extra "extra")
|
||||
++ (optPkgs mailutils "mailutils")
|
||||
|
@ -256,8 +264,8 @@ in {
|
|||
++ (optPkgs xpkgs "xpkgs");
|
||||
|
||||
services.emacs = {
|
||||
enable = (lib.elem "emacs" cfg.pkgs);
|
||||
install = (lib.elem "emacs" cfg.pkgs);
|
||||
enable = (elem "emacs" config.machine.pkgs);
|
||||
install = (elem "emacs" config.machine.pkgs);
|
||||
package = emacs;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue