Reformat using alejandra
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
...
|
||||
}: let
|
||||
# create a module that only contains the options
|
||||
toModule = name: {options.modules.${name} = (import ../../home/modules/${name}/options.nix {inherit lib mylib;});};
|
||||
toModule = name: {options.modules.${name} = import ../../home/modules/${name}/options.nix {inherit lib mylib;};};
|
||||
|
||||
# evaluate a single module
|
||||
evalModule = name: (lib.evalModules {modules = [(toModule name)];});
|
||||
@ -15,17 +15,18 @@
|
||||
optionsDoc = name: pkgs.nixosOptionsDoc {options = (evalModule name).options;};
|
||||
|
||||
# copy the markdown for a single generated optionsDoc
|
||||
optionsMD = name: stdenv.mkDerivation {
|
||||
src = ./.;
|
||||
name = "options-doc-${name}";
|
||||
buildPhase = ''
|
||||
mkdir $out
|
||||
cat ${(optionsDoc name).optionsCommonMark} >> $out/${name}.md
|
||||
'';
|
||||
};
|
||||
optionsMD = name:
|
||||
stdenv.mkDerivation {
|
||||
src = ./.;
|
||||
name = "options-doc-${name}";
|
||||
buildPhase = ''
|
||||
mkdir $out
|
||||
cat ${(optionsDoc name).optionsCommonMark} >> $out/${name}.md
|
||||
'';
|
||||
};
|
||||
|
||||
# copy the markdown for all generated optionsDocs
|
||||
allOptionsMDs = let
|
||||
allOptionsMDs = let
|
||||
index = stdenv.mkDerivation {
|
||||
src = ./.;
|
||||
name = "modules-options-index-md";
|
||||
@ -34,11 +35,12 @@
|
||||
echo "# Chriphost NixOS Modules Options" >> $out/index.md
|
||||
'';
|
||||
};
|
||||
in
|
||||
names: pkgs.symlinkJoin {
|
||||
name = "modules-options-doc-md";
|
||||
paths = (map optionsMD names) ++ [index];
|
||||
};
|
||||
in
|
||||
names:
|
||||
pkgs.symlinkJoin {
|
||||
name = "modules-options-doc-md";
|
||||
paths = (map optionsMD names) ++ [index];
|
||||
};
|
||||
|
||||
# generate the actual package (calls all of the above)
|
||||
modules = [
|
||||
|
@ -5,23 +5,19 @@
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
gsettings-desktop-schemas,
|
||||
gtk3
|
||||
gtk3,
|
||||
}:
|
||||
|
||||
# TODO: This doesn't run. Why does it work like this (APPIMAGE_DEBUG_EXEC=bash appimage-run WiiUDownloader-Linux-x86_64.AppImage) though?
|
||||
# pkgs.appimageTools.wrapType2 rec {
|
||||
# name = "WiiUDownloader";
|
||||
# version = "v1.32";
|
||||
|
||||
# src = fetchurl {
|
||||
# url = "https://github.com/Xpl0itU/WiiUDownloader/releases/download/${version}/WiiUDownloader-Linux-x86_64.AppImage";
|
||||
# sha256 = "sha256-YWLQd/Wmz5BDyc+oe6JQkT849DaPc5HtJXIDZKUdHNE=";
|
||||
# };
|
||||
|
||||
# profile = ''
|
||||
# export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
|
||||
# '';
|
||||
|
||||
# # extraPkgs = pkgs: with pkgs; [
|
||||
# # ];
|
||||
# }
|
||||
@ -83,6 +79,7 @@ let
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
in pkgs.writeShellScriptBin "wiiu-downloader-wrapped" ''
|
||||
XDG_DATA_DIRS="${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS" ${wiiu-downloader}/bin/WiiUDownloader
|
||||
''
|
||||
in
|
||||
pkgs.writeShellScriptBin "wiiu-downloader-wrapped" ''
|
||||
XDG_DATA_DIRS="${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS" ${wiiu-downloader}/bin/WiiUDownloader
|
||||
''
|
||||
|
@ -23,7 +23,7 @@ rec {
|
||||
|
||||
kb-layout = "us";
|
||||
kb-variant = "altgr-intl";
|
||||
|
||||
|
||||
monitors = ''
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor = HDMI-A-1, 2560x1440@144, 1920x0, 1
|
||||
|
@ -26,7 +26,7 @@ rec {
|
||||
|
||||
kb-layout = "us";
|
||||
kb-variant = "altgr-intl";
|
||||
|
||||
|
||||
monitors = ''
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor = eDP-1, 1920x1080@60, 0x0, 1
|
||||
|
@ -77,25 +77,23 @@ with mylib.modules;
|
||||
linkFontDir =
|
||||
lib.hm.dag.entryAfter ["writeBoundary"]
|
||||
(mkLink "/run/current-system/sw/share/X11/fonts" "${config.home.homeDirectory}/.local/share/fonts/fonts");
|
||||
copyBaseFonts =
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
cp -f ${pkgs.lxgw-wenkai}/share/fonts/truetype/LXGWWenKaiMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
cp -f ${pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}}/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFontMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
cp -f ${pkgs.noto-fonts}/share/fonts/noto/NotoSans[wdth,wght].ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
cp -f ${pkgs.noto-fonts-emoji}/share/fonts/noto/NotoColorEmoji.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
'';
|
||||
copyBaseFonts = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
cp -f ${pkgs.lxgw-wenkai}/share/fonts/truetype/LXGWWenKaiMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
cp -f ${pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}}/share/fonts/truetype/NerdFonts/JetBrainsMonoNerdFontMono-Regular.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
cp -f ${pkgs.noto-fonts}/share/fonts/noto/NotoSans[wdth,wght].ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
cp -f ${pkgs.noto-fonts-emoji}/share/fonts/noto/NotoColorEmoji.ttf ${config.home.homeDirectory}/.local/share/fonts/
|
||||
'';
|
||||
})
|
||||
(mkElse cfg.fontFix {
|
||||
unlinkFontDir =
|
||||
lib.hm.dag.entryAfter ["writeBoundary"]
|
||||
(mkUnlink "${config.home.homeDirectory}/.local/share/fonts/fonts");
|
||||
deleteBaseFonts =
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/LXGWWenKaiMono-Regular.ttf
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/JetBrainsMonoNerdFontMono-Regular.ttf
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/NotoSans[wdth,wght].ttf
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/NotoColorEmoji.ttf
|
||||
'';
|
||||
deleteBaseFonts = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/LXGWWenKaiMono-Regular.ttf
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/JetBrainsMonoNerdFontMono-Regular.ttf
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/NotoSans[wdth,wght].ttf
|
||||
rm ${config.home.homeDirectory}/.local/share/fonts/NotoColorEmoji.ttf
|
||||
'';
|
||||
})
|
||||
|
||||
# Fixes missing icons + cursor
|
||||
|
@ -9,7 +9,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
}:
|
||||
with mylib.networking; {
|
||||
imports = [
|
||||
# Import my system modules
|
||||
@ -32,14 +32,16 @@ with mylib.networking; {
|
||||
};
|
||||
|
||||
wireguard-tunnels = {
|
||||
wg0-de-115 = (mkWireguardService
|
||||
wg0-de-115 = (
|
||||
mkWireguardService
|
||||
"wg0-de-115"
|
||||
"proton-de-115.key"
|
||||
"9+CorlxrTsQR7qjIOVKsEkk8Z7UUS5WT3R1ccF7a0ic="
|
||||
"194.126.177.14"
|
||||
);
|
||||
|
||||
wg0-lu-16 = (mkWireguardService
|
||||
wg0-lu-16 = (
|
||||
mkWireguardService
|
||||
"wg0-lu-16"
|
||||
"proton-lu-16.key"
|
||||
"asu9KtQoZ3iKwELsDTgjPEiFNcD1XtgGgy3O4CZFg2w="
|
||||
@ -302,9 +304,11 @@ with mylib.networking; {
|
||||
# NOTE: Don't do this with HomeManager as I need the fonts in the fontdir for flatpak apps
|
||||
fonts = with pkgs; [
|
||||
# Monospace fonts
|
||||
(nerdfonts.override {fonts = [
|
||||
"JetBrainsMono"
|
||||
];})
|
||||
(nerdfonts.override {
|
||||
fonts = [
|
||||
"JetBrainsMono"
|
||||
];
|
||||
})
|
||||
|
||||
# Sans/Serif fonts
|
||||
noto-fonts
|
||||
@ -318,9 +322,9 @@ with mylib.networking; {
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
serif = [ "Noto Serif CJK SC" ];
|
||||
sansSerif = [ "Noto Sans CJK SC" ];
|
||||
monospace = [ "JetBrainsMono Nerd Font Mono" ];
|
||||
serif = ["Noto Serif CJK SC"];
|
||||
sansSerif = ["Noto Sans CJK SC"];
|
||||
monospace = ["JetBrainsMono Nerd Font Mono"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -135,7 +135,7 @@
|
||||
hydra = {
|
||||
image = "linuxserver/nzbhydra2:5.1.8";
|
||||
autoStart = false;
|
||||
|
||||
|
||||
extraOptions = [
|
||||
"--network=ns:/var/run/netns/vpn"
|
||||
"--dns=10.2.0.1"
|
||||
@ -238,17 +238,21 @@
|
||||
|
||||
# Make the system services available to the user
|
||||
# NOTE: This doesn't work, since the cidfile is located in /run, which is not writable for regular users...
|
||||
systemd.user.services = let
|
||||
systemd.user.services = let
|
||||
# Filter all system service attributes that the user units don't have and add some required attributes
|
||||
system2user = attrs: lib.mergeAttrs (lib.attrsets.filterAttrs (n: v: !(
|
||||
n == "confinement" ||
|
||||
n == "runner" ||
|
||||
n == "environment"
|
||||
)) attrs) {
|
||||
startLimitIntervalSec = 1;
|
||||
startLimitBurst = 5;
|
||||
};
|
||||
system2user = attrs:
|
||||
lib.mergeAttrs (lib.attrsets.filterAttrs (n: v:
|
||||
!(
|
||||
n
|
||||
== "confinement"
|
||||
|| n == "runner"
|
||||
|| n == "environment"
|
||||
))
|
||||
attrs) {
|
||||
startLimitIntervalSec = 1;
|
||||
startLimitBurst = 5;
|
||||
};
|
||||
in {
|
||||
# podman-stablediffusion = system2user config.systemd.services.podman-stablediffusion;
|
||||
# podman-stablediffusion = system2user config.systemd.services.podman-stablediffusion;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user