Compare commits
4 Commits
2bcbe365c1
...
05ed0caab9
| Author | SHA1 | Date | |
|---|---|---|---|
| 05ed0caab9 | |||
| 49d769cad2 | |||
| adcc104f8f | |||
| 0abf1fc657 |
File diff suppressed because it is too large
Load Diff
@ -460,19 +460,21 @@ rec {
|
||||
# vale # Why not lint everything (including english)?
|
||||
|
||||
# TODO: Development module, I need multiple modules to be able to add python packages to a single python install...
|
||||
(python311.withPackages (p: with p; [
|
||||
# p.rich
|
||||
# p.numpy
|
||||
# p.scipy
|
||||
# p.matplotlib
|
||||
# p.pillow # for ranger
|
||||
# p.pygments # for emacs
|
||||
(python311.withPackages (p:
|
||||
with p; [
|
||||
# p.rich
|
||||
# p.numpy
|
||||
# p.scipy
|
||||
# p.matplotlib
|
||||
# p.pillow # for ranger
|
||||
# p.pygments # for emacs
|
||||
|
||||
# For nvim CHADtree
|
||||
pyyaml
|
||||
std2
|
||||
pynvim
|
||||
]))
|
||||
# For nvim CHADtree
|
||||
pyyaml
|
||||
std2
|
||||
pynvim
|
||||
pynvim-pp
|
||||
]))
|
||||
jetbrains.clion
|
||||
jetbrains.rust-rover
|
||||
jetbrains.pycharm-professional
|
||||
|
||||
@ -14,12 +14,13 @@ in {
|
||||
options.modules.chromium = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; builtins.concatLists [
|
||||
(optionals cfg.google [
|
||||
google-chrome # Trash, but required for decker pdf export
|
||||
(pkgs.writeShellScriptBin "chrome" "exec -a $0 ${google-chrome}/bin/google-chrome-stable $@")
|
||||
])
|
||||
];
|
||||
home.packages = with pkgs;
|
||||
builtins.concatLists [
|
||||
(optionals cfg.google [
|
||||
google-chrome # Trash, but required for decker pdf export
|
||||
(pkgs.writeShellScriptBin "chrome" "exec -a $0 ${google-chrome}/bin/google-chrome-stable $@")
|
||||
])
|
||||
];
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -9,4 +9,5 @@
|
||||
networking = import ./networking.nix {inherit inputs pkgs lib;};
|
||||
virtualisation = import ./virtualisation.nix {inherit inputs pkgs lib;};
|
||||
rofi = import ./rofi.nix {inherit inputs pkgs lib;};
|
||||
generators = import ./generators.nix {inherit inputs pkgs lib;};
|
||||
}
|
||||
|
||||
49
lib/generators.nix
Normal file
49
lib/generators.nix
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: rec {
|
||||
# NOTE: Taken from NixVim https://github.com/nix-community/nixvim/blob/main/lib/to-lua.nix
|
||||
toLuaObject = args:
|
||||
if builtins.isAttrs args
|
||||
then
|
||||
if lib.hasAttr "__raw" args
|
||||
then args.__raw
|
||||
else if lib.hasAttr "__empty" args
|
||||
then "{ }"
|
||||
else
|
||||
"{"
|
||||
+ (lib.concatStringsSep "," (
|
||||
lib.mapAttrsToList (
|
||||
n: v: let
|
||||
valueString = toLuaObject v;
|
||||
in
|
||||
if lib.hasPrefix "__unkeyed" n
|
||||
then valueString
|
||||
else if lib.hasPrefix "__rawKey__" n
|
||||
then ''[${lib.removePrefix "__rawKey__" n}] = '' + valueString
|
||||
else if n == "__emptyString"
|
||||
then "[''] = " + valueString
|
||||
else "[${toLuaObject n}] = " + valueString
|
||||
) (lib.filterAttrs (n: v: v != null && (toLuaObject v != "{}")) args)
|
||||
))
|
||||
+ "}"
|
||||
else if builtins.isList args
|
||||
then "{" + lib.concatMapStringsSep "," toLuaObject args + "}"
|
||||
else if builtins.isString args
|
||||
then
|
||||
# This should be enough!
|
||||
builtins.toJSON args
|
||||
else if builtins.isPath args
|
||||
then builtins.toJSON (toString args)
|
||||
else if builtins.isBool args
|
||||
then "${lib.boolToString args}"
|
||||
else if builtins.isFloat args
|
||||
then "${toString args}"
|
||||
else if builtins.isInt args
|
||||
then "${toString args}"
|
||||
else if (args == null)
|
||||
then "nil"
|
||||
else "";
|
||||
}
|
||||
@ -30,7 +30,10 @@
|
||||
linkConfig = {
|
||||
# This corresponds to the [LINK] section
|
||||
# RequiredForOnline = "routable";
|
||||
RequiredForOnline = if routable then "routable" else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
||||
RequiredForOnline =
|
||||
if routable
|
||||
then "routable"
|
||||
else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
||||
};
|
||||
};
|
||||
|
||||
@ -76,7 +79,10 @@
|
||||
linkConfig = {
|
||||
# This corresponds to the [LINK] section
|
||||
# RequiredForOnline = "routable";
|
||||
RequiredForOnline = if routable then "routable" else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
||||
RequiredForOnline =
|
||||
if routable
|
||||
then "routable"
|
||||
else "no"; # Don't make nixos-rebuild wait for systemd-networkd-wait-online.service
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -136,5 +136,10 @@ pkgs.devshell.mkShell {
|
||||
help = "Display the wanted dynamic libraries by a binary";
|
||||
command = "echo 'ldd (readlink -f (which <arg>))'";
|
||||
}
|
||||
{
|
||||
name = "help-closure";
|
||||
help = "Display the closure of a package";
|
||||
command = "echo 'nix path-info --recursive --size --closure-size --human-readable (readlink -f (which <arg>))'";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@ -96,18 +96,18 @@
|
||||
# videoDrivers = ["amdgpu"];
|
||||
};
|
||||
|
||||
# NOTE: This has been relocated here from the default config, because it forces en-US keyboard layout
|
||||
# The laptop needs de-DE...
|
||||
# Chinese Input
|
||||
i18n.inputMethod.enabled = "fcitx5";
|
||||
i18n.inputMethod.fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
# NOTE: This has been relocated here from the default config, because it forces en-US keyboard layout
|
||||
# The laptop needs de-DE...
|
||||
# Chinese Input
|
||||
i18n.inputMethod.enabled = "fcitx5";
|
||||
i18n.inputMethod.fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
|
||||
addons = with pkgs; [
|
||||
fcitx5-gtk
|
||||
libsForQt5.fcitx5-qt
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-configtool # TODO: Remove this and set config through HomeManager
|
||||
];
|
||||
};
|
||||
addons = with pkgs; [
|
||||
fcitx5-gtk
|
||||
libsForQt5.fcitx5-qt
|
||||
fcitx5-chinese-addons
|
||||
fcitx5-configtool # TODO: Remove this and set config through HomeManager
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user