1
This commit is contained in:
2023-04-26 12:56:31 +02:00
parent 1b83c0131f
commit 9a457490d4
39 changed files with 308 additions and 316 deletions

View File

@ -4,7 +4,7 @@
fetchurl, fetchurl,
autoPatchelfHook, autoPatchelfHook,
cups, cups,
libusb1 libusb1,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "B1160_B1160w_UnifiedLinuxDriver"; pname = "B1160_B1160w_UnifiedLinuxDriver";
@ -59,4 +59,4 @@ stdenv.mkDerivation rec {
license = licenses.unfree; license = licenses.unfree;
platforms = ["x86_64-linux"]; platforms = ["x86_64-linux"];
}; };
} }

View File

@ -1,9 +1,9 @@
{ lib {
, python310 lib,
, fetchFromGitHub python310,
, ffmpeg fetchFromGitHub,
ffmpeg,
}: }:
python310.pkgs.buildPythonApplication rec { python310.pkgs.buildPythonApplication rec {
pname = "spotdl"; pname = "spotdl";
version = "4.1.6"; version = "4.1.6";
@ -83,7 +83,10 @@ python310.pkgs.buildPythonApplication rec {
]; ];
makeWrapperArgs = [ makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ]) "--prefix"
"PATH"
":"
(lib.makeBinPath [ffmpeg])
]; ];
meta = with lib; { meta = with lib; {
@ -91,6 +94,6 @@ python310.pkgs.buildPythonApplication rec {
homepage = "https://github.com/spotDL/spotify-downloader"; homepage = "https://github.com/spotDL/spotify-downloader";
changelog = "https://github.com/spotDL/spotify-downloader/releases/tag/v${version}"; changelog = "https://github.com/spotDL/spotify-downloader/releases/tag/v${version}";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ dotlambda ]; maintainers = with maintainers; [dotlambda];
}; };
} }

View File

@ -1,25 +1,25 @@
# NOTE: Adapted from nixpkgs xdg-desktop-portal-wlr derivation # NOTE: Adapted from nixpkgs xdg-desktop-portal-wlr derivation
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, fetchpatch fetchFromGitHub,
, makeWrapper fetchpatch,
, meson makeWrapper,
, ninja meson,
, pkg-config ninja,
, wayland-protocols pkg-config,
, wayland-scanner wayland-protocols,
# , grim wayland-scanner,
, inih # , grim
, libdrm inih,
, mesa libdrm,
, pipewire mesa,
, scdoc pipewire,
# , slurp scdoc,
, systemd # , slurp
, wayland systemd,
wayland,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "xdg-desktop-portal-termfilechooser"; pname = "xdg-desktop-portal-termfilechooser";
version = "0.1.0"; version = "0.1.0";
@ -39,15 +39,17 @@ stdenv.mkDerivation rec {
# })]; # })];
# Add hyprland to portal metainformation # Add hyprland to portal metainformation
patches = [(fetchpatch { patches = [
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/GermainZ/xdg-desktop-portal-termfilechooser/pull/6.patch"; url = "https://patch-diff.githubusercontent.com/raw/GermainZ/xdg-desktop-portal-termfilechooser/pull/6.patch";
hash = "sha256-GjK6GL15liHYm5U0XBSIf5H8Cc4RIWBD0O47lLWcep0="; hash = "sha256-GjK6GL15liHYm5U0XBSIf5H8Cc4RIWBD0O47lLWcep0=";
})]; })
];
strictDeps = true; strictDeps = true;
depsBuildBuild = [ pkg-config ]; depsBuildBuild = [pkg-config];
nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner makeWrapper ]; nativeBuildInputs = [meson ninja pkg-config scdoc wayland-scanner makeWrapper];
buildInputs = [ inih libdrm mesa pipewire systemd wayland wayland-protocols ]; buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
mesonFlags = [ mesonFlags = [
"-Dsd-bus-provider=libsystemd" "-Dsd-bus-provider=libsystemd"

1
env/latex.nix vendored
View File

@ -17,7 +17,6 @@
config.allowUnfree = true; config.allowUnfree = true;
overlays = [devshell.overlays.default]; overlays = [devshell.overlays.default];
}; };
# TODO: Custom LaTeX "distribution"? With curated packages? # TODO: Custom LaTeX "distribution"? With curated packages?
in { in {
devShell = pkgs.devshell.mkShell { devShell = pkgs.devshell.mkShell {

View File

@ -196,7 +196,8 @@ rec {
home.file.".local/share/navi/cheats/christoph.cheat".source = ../../config/navi/christoph.cheat; home.file.".local/share/navi/cheats/christoph.cheat".source = ../../config/navi/christoph.cheat;
home.activation = { home.activation = {
linkObsidianLatexSnippets = lib.hm.dag.entryAfter ["writeBoundary"] linkObsidianLatexSnippets =
lib.hm.dag.entryAfter ["writeBoundary"]
(mylib.modules.mkLink "~/NixFlake/config/obsidian/latex_snippets.json" "~/Notes/Obsidian/Chriphost/latex_snippets.json"); (mylib.modules.mkLink "~/NixFlake/config/obsidian/latex_snippets.json" "~/Notes/Obsidian/Chriphost/latex_snippets.json");
}; };
@ -438,12 +439,12 @@ rec {
# package = pkgs.ungoogled-chromium; # package = pkgs.ungoogled-chromium;
extensions = [ extensions = [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # UBlock Origin {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # UBlock Origin
{ id = "oboonakemofpalcgghocfoadofidjkkk"; } # KeepassXC Browser {id = "oboonakemofpalcgghocfoadofidjkkk";} # KeepassXC Browser
{ id = "pkehgijcmpdhfbdbbnkijodmdjhbjlgp"; } # Privacy Badger {id = "pkehgijcmpdhfbdbbnkijodmdjhbjlgp";} # Privacy Badger
{ id = "lckanjgmijmafbedllaakclkaicjfmnk"; } # ClearURLs {id = "lckanjgmijmafbedllaakclkaicjfmnk";} # ClearURLs
{ id = "njdfdhgcmkocbgbhcioffdbicglldapd"; } # LocalCDN {id = "njdfdhgcmkocbgbhcioffdbicglldapd";} # LocalCDN
{ id = "jaoafjdoijdconemdmodhbfpianehlon"; } # Skip Redirect {id = "jaoafjdoijdconemdmodhbfpianehlon";} # Skip Redirect
]; ];
}; };
@ -554,7 +555,7 @@ rec {
}; };
nnn = { nnn = {
package = pkgs.nnn.override { withNerdIcons = true; }; package = pkgs.nnn.override {withNerdIcons = true;};
enable = true; enable = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
@ -586,12 +587,14 @@ rec {
v = "imgview"; v = "imgview";
}; };
src = (pkgs.fetchFromGitHub { src =
(pkgs.fetchFromGitHub {
owner = "jarun"; owner = "jarun";
repo = "nnn"; repo = "nnn";
rev = "6a8d74a43a2135a186dc59c5a1f561444ca098e4"; rev = "6a8d74a43a2135a186dc59c5a1f561444ca098e4";
sha256 = "sha256-jxPfaHRPWy1L87YkK1G/9cBgUwjyJyPXM2jG4VE4+kQ="; sha256 = "sha256-jxPfaHRPWy1L87YkK1G/9cBgUwjyJyPXM2jG4VE4+kQ=";
}) + "/plugins"; })
+ "/plugins";
}; };
}; };

View File

@ -17,11 +17,9 @@ rec {
config = { config = {
modules = { modules = {
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
]; ];
}; };
} }

View File

@ -15,7 +15,7 @@ in {
../flatpak ../flatpak
]; ];
options.modules.audio = import ./options.nix { inherit lib mylib; }; options.modules.audio = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Audio module"; enable = mkEnableOpt "Audio module";
# TODO: Group these in categories (like instruments/VSTs or sth) # TODO: Group these in categories (like instruments/VSTs or sth)

View File

@ -18,7 +18,7 @@ in {
# Options is a vector of options this module defines # Options is a vector of options this module defines
# This module defines only the "emacs" option and suboptions "enable" and "doom" # This module defines only the "emacs" option and suboptions "enable" and "doom"
options.modules.emacs = import ./options.nix { inherit lib mylib; }; options.modules.emacs = import ./options.nix {inherit lib mylib;};
# Config is the merged set of all module configurations # Config is the merged set of all module configurations
# Here we define what happens to the config if the module is active (but only if the module is active) # Here we define what happens to the config if the module is active (but only if the module is active)

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Emacs module"; enable = mkEnableOpt "Emacs module";
# TODO: Use an enum for this not individual options # TODO: Use an enum for this not individual options

View File

@ -14,7 +14,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.email; cfg = config.modules.email;
in { in {
options.modules.email = import ./options.nix { inherit lib mylib; }; options.modules.email = import ./options.nix {inherit lib mylib;};
# TODO: Add Maildir to nextcloud sync # TODO: Add Maildir to nextcloud sync
config = mkIf cfg.enable { config = mkIf cfg.enable {

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Email"; enable = mkEnableOpt "Email";
autosync = mkEnableOpt "Automatically call \"notmuch new\" via systemd timer"; autosync = mkEnableOpt "Automatically call \"notmuch new\" via systemd timer";
imapnotify = mkEnableOpt "Use imapnotify to sync and index mail automatically"; imapnotify = mkEnableOpt "Use imapnotify to sync and index mail automatically";

View File

@ -12,7 +12,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.firefox; cfg = config.modules.firefox;
in { in {
options.modules.firefox = import ./options.nix { inherit lib mylib; }; options.modules.firefox = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; home.packages = with pkgs;

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Firefox"; enable = mkEnableOpt "Firefox";
wayland = mkBoolOpt false "Enable firefox wayland support"; wayland = mkBoolOpt false "Enable firefox wayland support";
vaapi = mkBoolOpt false "Enable firefox vaapi support"; vaapi = mkBoolOpt false "Enable firefox vaapi support";

View File

@ -10,7 +10,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.fish; cfg = config.modules.fish;
in { in {
options.modules.fish = import ./options.nix { inherit lib mylib; }; options.modules.fish = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.fish = { programs.fish = {

View File

@ -1,9 +1,8 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Fish"; enable = mkEnableOpt "Fish";
} }

View File

@ -14,7 +14,7 @@ with mylib.modules;
let let
cfg = config.modules.flatpak; cfg = config.modules.flatpak;
in { in {
options.modules.flatpak = import ./options.nix { inherit lib mylib; }; options.modules.flatpak = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Flatpak module"; enable = mkEnableOpt "Flatpak module";
fontFix = mkBoolOpt true "Link fonts to ~/.local/share/fonts so flatpak apps can find them"; fontFix = mkBoolOpt true "Link fonts to ~/.local/share/fonts so flatpak apps can find them";
iconFix = mkBoolOpt true "Link icons to ~/.local/share/icons so flatpak apps can find them"; iconFix = mkBoolOpt true "Link icons to ~/.local/share/icons so flatpak apps can find them";

View File

@ -19,7 +19,7 @@ in {
# TODO: SteamTinkerLaunch option # TODO: SteamTinkerLaunch option
# TODO: Dolphin + SteamRomManager option # TODO: Dolphin + SteamRomManager option
options.modules.gaming = import ./options.nix { inherit lib mylib; }; options.modules.gaming = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Gaming module"; enable = mkEnableOpt "Gaming module";
# discordElectron.enable = mkEnableOpt "Discord (Electron) (nixpkgs)"; # discordElectron.enable = mkEnableOpt "Discord (Electron) (nixpkgs)";

View File

@ -10,7 +10,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.gnome; cfg = config.modules.gnome;
in { in {
options.modules.gnome = import ./options.nix { inherit lib mylib; }; options.modules.gnome = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Gnome Desktop"; enable = mkEnableOpt "Gnome Desktop";
# TODO: Add option for dash-to-dock # TODO: Add option for dash-to-dock
extensions = mkBoolOpt false "Enable Gnome shell-extensions"; extensions = mkBoolOpt false "Enable Gnome shell-extensions";

View File

@ -10,7 +10,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.hyprland; cfg = config.modules.hyprland;
in { in {
options.modules.hyprland = import ./options.nix { inherit lib mylib; }; options.modules.hyprland = import ./options.nix {inherit lib mylib;};
config = let config = let
# Taken from https://github.com/Ruixi-rebirth/flakes/blob/main/modules/programs/wayland/waybar/workspace-patch.nix # Taken from https://github.com/Ruixi-rebirth/flakes/blob/main/modules/programs/wayland/waybar/workspace-patch.nix
@ -37,10 +37,11 @@ in {
}; };
waybar-hyprland = pkgs.waybar.overrideAttrs (oldAttrs: { waybar-hyprland = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
patches = (oldAttrs.patches or [ ]) ++ [ workspaces-patch ]; patches = (oldAttrs.patches or []) ++ [workspaces-patch];
}); });
in mkIf cfg.enable { in
mkIf cfg.enable {
assertions = [ assertions = [
{ {
assertion = nixosConfig.programs.hyprland.enable; assertion = nixosConfig.programs.hyprland.enable;
@ -96,7 +97,8 @@ in {
# TODO: Don't symlink at all, why not just tell Hyprland where the config is? Much easier # TODO: Don't symlink at all, why not just tell Hyprland where the config is? Much easier
# TODO: Use this approach for every program that supports it, makes things much easier, # TODO: Use this approach for every program that supports it, makes things much easier,
# as everything can just stay in ~/NixFlake/config # as everything can just stay in ~/NixFlake/config
linkHyprlandConfig = hm.dag.entryAfter ["writeBoundary"] linkHyprlandConfig =
hm.dag.entryAfter ["writeBoundary"]
(mkLink "~/NixFlake/config/hyprland/hyprland.conf" "~/.config/hypr/hyprland.conf"); (mkLink "~/NixFlake/config/hyprland/hyprland.conf" "~/.config/hypr/hyprland.conf");
# linkWaybarConfig = hm.dag.entryAfter ["writeBoundary"] # linkWaybarConfig = hm.dag.entryAfter ["writeBoundary"]

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Hyprland Window Manager + Compositor"; enable = mkEnableOpt "Hyprland Window Manager + Compositor";
theme = mkOption { theme = mkOption {

View File

@ -11,7 +11,7 @@ with mylib.modules; let
cfg = config.modules.kitty; cfg = config.modules.kitty;
# cfgnv = config.modules.neovim; # cfgnv = config.modules.neovim;
in { in {
options.modules.kitty = import ./options.nix { inherit lib mylib; }; options.modules.kitty = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.kitty = { programs.kitty = {

View File

@ -1,9 +1,8 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Kitty"; enable = mkEnableOpt "Kitty";
} }

View File

@ -10,7 +10,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.misc; cfg = config.modules.misc;
in { in {
options.modules.misc = import ./options.nix { inherit lib mylib; }; options.modules.misc = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; home.packages = with pkgs;

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Misc module"; enable = mkEnableOpt "Misc module";
keepass = { keepass = {

View File

@ -10,7 +10,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.neovim; cfg = config.modules.neovim;
in { in {
options.modules.neovim = import ./options.nix { inherit lib mylib; }; options.modules.neovim = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
# TODO: Configure by option # TODO: Configure by option

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "NeoVim"; enable = mkEnableOpt "NeoVim";
alias = mkBoolOpt false "Link nvim to vim/vi"; alias = mkBoolOpt false "Link nvim to vim/vi";
} }

View File

@ -13,7 +13,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.nextcloud; cfg = config.modules.nextcloud;
in { in {
options.modules.nextcloud = import ./options.nix { inherit lib mylib; }; options.modules.nextcloud = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Nextcloud Client"; enable = mkEnableOpt "Nextcloud Client";
autostart = mkBoolOpt false "Autostart the Nextcloud client (systemd)"; autostart = mkBoolOpt false "Autostart the Nextcloud client (systemd)";
} }

View File

@ -11,7 +11,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.plasma; cfg = config.modules.plasma;
in { in {
options.modules.plasma = import ./options.nix { inherit lib mylib; }; options.modules.plasma = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [

View File

@ -1,9 +1,8 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Plasma Desktop"; enable = mkEnableOpt "Plasma Desktop";
} }

View File

@ -10,7 +10,7 @@ with lib;
with mylib.modules; let with mylib.modules; let
cfg = config.modules.ranger; cfg = config.modules.ranger;
in { in {
options.modules.ranger = import ./options.nix { inherit lib mylib; }; options.modules.ranger = import ./options.nix {inherit lib mylib;};
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; home.packages = with pkgs;

View File

@ -1,10 +1,9 @@
{ {
lib, lib,
mylib mylib,
}: }:
with lib; with lib;
with mylib.modules; with mylib.modules; {
{
enable = mkEnableOpt "Ranger"; enable = mkEnableOpt "Ranger";
preview = mkBoolOpt false "Enable Ranger image preview"; preview = mkBoolOpt false "Enable Ranger image preview";
} }

View File

@ -180,8 +180,8 @@
# This namespace contains the WireGuard virtual network device, because this should be the only interface available for apps that should run through VPN # This namespace contains the WireGuard virtual network device, because this should be the only interface available for apps that should run through VPN
netns-vpn = { netns-vpn = {
description = "Network namespace for ProtonVPN using Wireguard"; description = "Network namespace for ProtonVPN using Wireguard";
wantedBy = [ "default.target" ]; wantedBy = ["default.target"];
before = [ "display-manager.service" "network.target" ]; before = ["display-manager.service" "network.target"];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;
@ -201,8 +201,8 @@
# - The endpoints/public keys should be in a map? # - The endpoints/public keys should be in a map?
wg0-de-115 = { wg0-de-115 = {
description = "Wireguard ProtonVPN Server DE-115"; description = "Wireguard ProtonVPN Server DE-115";
requires = [ "netns-vpn.service" ]; requires = ["netns-vpn.service"];
after = [ "netns-vpn.service" ]; after = ["netns-vpn.service"];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
RemainAfterExit = true; RemainAfterExit = true;