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

View File

@ -1,9 +1,9 @@
{ lib
, python310
, fetchFromGitHub
, ffmpeg
{
lib,
python310,
fetchFromGitHub,
ffmpeg,
}:
python310.pkgs.buildPythonApplication rec {
pname = "spotdl";
version = "4.1.6";
@ -83,7 +83,10 @@ python310.pkgs.buildPythonApplication rec {
];
makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ])
"--prefix"
"PATH"
":"
(lib.makeBinPath [ffmpeg])
];
meta = with lib; {
@ -91,6 +94,6 @@ python310.pkgs.buildPythonApplication rec {
homepage = "https://github.com/spotDL/spotify-downloader";
changelog = "https://github.com/spotDL/spotify-downloader/releases/tag/v${version}";
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
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, makeWrapper
, meson
, ninja
, pkg-config
, wayland-protocols
, wayland-scanner
# , grim
, inih
, libdrm
, mesa
, pipewire
, scdoc
# , slurp
, systemd
, wayland
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
makeWrapper,
meson,
ninja,
pkg-config,
wayland-protocols,
wayland-scanner,
# , grim
inih,
libdrm,
mesa,
pipewire,
scdoc,
# , slurp
systemd,
wayland,
}:
stdenv.mkDerivation rec {
pname = "xdg-desktop-portal-termfilechooser";
version = "0.1.0";
@ -39,15 +39,17 @@ stdenv.mkDerivation rec {
# })];
# Add hyprland to portal metainformation
patches = [(fetchpatch {
patches = [
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/GermainZ/xdg-desktop-portal-termfilechooser/pull/6.patch";
hash = "sha256-GjK6GL15liHYm5U0XBSIf5H8Cc4RIWBD0O47lLWcep0=";
})];
})
];
strictDeps = true;
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner makeWrapper ];
buildInputs = [ inih libdrm mesa pipewire systemd wayland wayland-protocols ];
depsBuildBuild = [pkg-config];
nativeBuildInputs = [meson ninja pkg-config scdoc wayland-scanner makeWrapper];
buildInputs = [inih libdrm mesa pipewire systemd wayland wayland-protocols];
mesonFlags = [
"-Dsd-bus-provider=libsystemd"

1
env/latex.nix vendored
View File

@ -17,7 +17,6 @@
config.allowUnfree = true;
overlays = [devshell.overlays.default];
};
# TODO: Custom LaTeX "distribution"? With curated packages?
in {
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.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");
};
@ -438,12 +439,12 @@ rec {
# package = pkgs.ungoogled-chromium;
extensions = [
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # UBlock Origin
{ id = "oboonakemofpalcgghocfoadofidjkkk"; } # KeepassXC Browser
{ id = "pkehgijcmpdhfbdbbnkijodmdjhbjlgp"; } # Privacy Badger
{ id = "lckanjgmijmafbedllaakclkaicjfmnk"; } # ClearURLs
{ id = "njdfdhgcmkocbgbhcioffdbicglldapd"; } # LocalCDN
{ id = "jaoafjdoijdconemdmodhbfpianehlon"; } # Skip Redirect
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # UBlock Origin
{id = "oboonakemofpalcgghocfoadofidjkkk";} # KeepassXC Browser
{id = "pkehgijcmpdhfbdbbnkijodmdjhbjlgp";} # Privacy Badger
{id = "lckanjgmijmafbedllaakclkaicjfmnk";} # ClearURLs
{id = "njdfdhgcmkocbgbhcioffdbicglldapd";} # LocalCDN
{id = "jaoafjdoijdconemdmodhbfpianehlon";} # Skip Redirect
];
};
@ -554,7 +555,7 @@ rec {
};
nnn = {
package = pkgs.nnn.override { withNerdIcons = true; };
package = pkgs.nnn.override {withNerdIcons = true;};
enable = true;
extraPackages = with pkgs; [
@ -586,12 +587,14 @@ rec {
v = "imgview";
};
src = (pkgs.fetchFromGitHub {
src =
(pkgs.fetchFromGitHub {
owner = "jarun";
repo = "nnn";
rev = "6a8d74a43a2135a186dc59c5a1f561444ca098e4";
sha256 = "sha256-jxPfaHRPWy1L87YkK1G/9cBgUwjyJyPXM2jG4VE4+kQ=";
}) + "/plugins";
})
+ "/plugins";
};
};

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@ with lib;
with mylib.modules; let
cfg = config.modules.email;
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
config = mkIf cfg.enable {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,9 @@
{
lib,
mylib
mylib,
}:
with lib;
with mylib.modules;
{
with mylib.modules; {
enable = mkEnableOpt "Flatpak module";
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";

View File

@ -19,7 +19,7 @@ in {
# TODO: SteamTinkerLaunch 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 {
assertions = [

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@ with lib;
with mylib.modules; let
cfg = config.modules.hyprland;
in {
options.modules.hyprland = import ./options.nix { inherit lib mylib; };
options.modules.hyprland = import ./options.nix {inherit lib mylib;};
config = let
# 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: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
patches = (oldAttrs.patches or [ ]) ++ [ workspaces-patch ];
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
patches = (oldAttrs.patches or []) ++ [workspaces-patch];
});
in mkIf cfg.enable {
in
mkIf cfg.enable {
assertions = [
{
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: Use this approach for every program that supports it, makes things much easier,
# 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");
# linkWaybarConfig = hm.dag.entryAfter ["writeBoundary"]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,10 +1,9 @@
{
lib,
mylib
mylib,
}:
with lib;
with mylib.modules;
{
with mylib.modules; {
enable = mkEnableOpt "Ranger";
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
netns-vpn = {
description = "Network namespace for ProtonVPN using Wireguard";
wantedBy = [ "default.target" ];
before = [ "display-manager.service" "network.target" ];
wantedBy = ["default.target"];
before = ["display-manager.service" "network.target"];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
@ -201,8 +201,8 @@
# - The endpoints/public keys should be in a map?
wg0-de-115 = {
description = "Wireguard ProtonVPN Server DE-115";
requires = [ "netns-vpn.service" ];
after = [ "netns-vpn.service" ];
requires = ["netns-vpn.service"];
after = ["netns-vpn.service"];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;