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,59 +4,59 @@
fetchurl, fetchurl,
autoPatchelfHook, autoPatchelfHook,
cups, cups,
libusb1 libusb1,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "B1160_B1160w_UnifiedLinuxDriver"; pname = "B1160_B1160w_UnifiedLinuxDriver";
version = "1.01"; version = "1.01";
src = fetchurl { src = fetchurl {
url = "https://dl.dell.com/FOLDER00947576M/1/${pname}_${version}.tar.gz"; url = "https://dl.dell.com/FOLDER00947576M/1/${pname}_${version}.tar.gz";
sha256 = "10b75a899ba7aff3b95158f6fc49f09d6eef670608480ee48c179337c5337375"; sha256 = "10b75a899ba7aff3b95158f6fc49f09d6eef670608480ee48c179337c5337375";
curlOptsList = ["--user-agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0"]; curlOptsList = ["--user-agent" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0"];
}; };
# https://nixos.org/manual/nixpkgs/unstable/#setup-hook-autopatchelfhook # https://nixos.org/manual/nixpkgs/unstable/#setup-hook-autopatchelfhook
# https://nixos.wiki/wiki/Packaging/Binaries # https://nixos.wiki/wiki/Packaging/Binaries
# https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos/522823#522823 # https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos/522823#522823
# TODO: This step does not work # TODO: This step does not work
nativeBuildInputs = [ nativeBuildInputs = [
cups cups
stdenv.cc.cc.lib stdenv.cc.cc.lib
libusb1 libusb1
autoPatchelfHook autoPatchelfHook
]; ];
unpackCmd = '' unpackCmd = ''
mkdir -p root mkdir -p root
tar xvf $curSrc --directory=root tar xvf $curSrc --directory=root
''; '';
# This is already built # This is already built
dontBuild = true; dontBuild = true;
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
mkdir -p $out mkdir -p $out
mkdir -p $out/cups mkdir -p $out/cups
mkdir -p $out/lib mkdir -p $out/lib
mkdir -p $out/lib64 mkdir -p $out/lib64
mkdir -p $out/sbin mkdir -p $out/sbin
cp -r cdroot/Linux/x86_64/at_root/usr/sbin/* $out/sbin/ cp -r cdroot/Linux/x86_64/at_root/usr/sbin/* $out/sbin/
cp -r cdroot/Linux/x86_64/at_root/usr/lib64/*.so.* $out/lib64/ cp -r cdroot/Linux/x86_64/at_root/usr/lib64/*.so.* $out/lib64/
cp -r cdroot/Linux/x86_64/at_root/usr/lib64/cups/* $out/cups/ cp -r cdroot/Linux/x86_64/at_root/usr/lib64/cups/* $out/cups/
cp -r cdroot/Linux/x86_64/at_root/opt/smfp-common/lib/* $out/lib/ cp -r cdroot/Linux/x86_64/at_root/opt/smfp-common/lib/* $out/lib/
runHook postInstall runHook postInstall
''; '';
meta = with lib; { meta = with lib; {
description = "CUPS driver for the Dell B1160w printer."; description = "CUPS driver for the Dell B1160w printer.";
longDescription = "CUPS driver for the Dell B1160w printer."; longDescription = "CUPS driver for the Dell B1160w printer.";
homepage = "https://www.dell.com/support/home/de-de/drivers/driversdetails?driverid=1m4pc"; homepage = "https://www.dell.com/support/home/de-de/drivers/driversdetails?driverid=1m4pc";
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 = [
url = "https://patch-diff.githubusercontent.com/raw/GermainZ/xdg-desktop-portal-termfilechooser/pull/6.patch"; (fetchpatch {
hash = "sha256-GjK6GL15liHYm5U0XBSIf5H8Cc4RIWBD0O47lLWcep0="; url = "https://patch-diff.githubusercontent.com/raw/GermainZ/xdg-desktop-portal-termfilechooser/pull/6.patch";
})]; 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,8 +196,9 @@ 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 =
(mylib.modules.mkLink "~/NixFlake/config/obsidian/latex_snippets.json" "~/Notes/Obsidian/Chriphost/latex_snippets.json"); lib.hm.dag.entryAfter ["writeBoundary"]
(mylib.modules.mkLink "~/NixFlake/config/obsidian/latex_snippets.json" "~/Notes/Obsidian/Chriphost/latex_snippets.json");
}; };
xdg.mime.enable = true; xdg.mime.enable = true;
@ -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 =
owner = "jarun"; (pkgs.fetchFromGitHub {
repo = "nnn"; owner = "jarun";
rev = "6a8d74a43a2135a186dc59c5a1f561444ca098e4"; repo = "nnn";
sha256 = "sha256-jxPfaHRPWy1L87YkK1G/9cBgUwjyJyPXM2jG4VE4+kQ="; rev = "6a8d74a43a2135a186dc59c5a1f561444ca098e4";
}) + "/plugins"; sha256 = "sha256-jxPfaHRPWy1L87YkK1G/9cBgUwjyJyPXM2jG4VE4+kQ=";
})
+ "/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,25 +1,24 @@
{ {
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";
# TODO: Add other themes, whitesur for example # TODO: Add other themes, whitesur for example
theme = { theme = {
papirusIcons = mkBoolOpt false "Enable the Papirus icon theme"; papirusIcons = mkBoolOpt false "Enable the Papirus icon theme";
numixCursor = mkBoolOpt false "Enable the Numix cursor theme"; numixCursor = mkBoolOpt false "Enable the Numix cursor theme";
wallpaper = mkOption { wallpaper = mkOption {
type = types.str; type = types.str;
default = "constructionsite"; default = "constructionsite";
description = "What wallpaper to use"; description = "What wallpaper to use";
};
}; };
};
settings = { settings = {
}; };
} }

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,124 +37,126 @@ 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
assertions = [ mkIf cfg.enable {
{ assertions = [
assertion = nixosConfig.programs.hyprland.enable; {
message = "Can't enable Hyprland module with Hyprland disabled!"; assertion = nixosConfig.programs.hyprland.enable;
} message = "Can't enable Hyprland module with Hyprland disabled!";
]; }
];
gtk = { gtk = {
enable = true; enable = true;
iconTheme.package = pkgs.papirus-icon-theme; iconTheme.package = pkgs.papirus-icon-theme;
iconTheme.name = "Papirus"; iconTheme.name = "Papirus";
}; };
home.pointerCursor = { home.pointerCursor = {
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
package = pkgs.bibata-cursors; package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic"; name = "Bibata-Modern-Classic";
size = 16; size = 16;
}; };
home.sessionVariables = { home.sessionVariables = {
# QT_QPA_PLATFORMTHEME = "qt5ct"; # QT_QPA_PLATFORMTHEME = "qt5ct";
}; };
# Polkit # Polkit
home.file.".config/hypr/polkit.conf".text = ''exec-once = ${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1''; home.file.".config/hypr/polkit.conf".text = ''exec-once = ${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1'';
home.file.".config/hypr/waybar-reload.conf".text = let home.file.".config/hypr/waybar-reload.conf".text = let
waybar-reload = pkgs.writeScript "waybar-reload" '' waybar-reload = pkgs.writeScript "waybar-reload" ''
#! ${pkgs.bash}/bin/bash #! ${pkgs.bash}/bin/bash
trap "${pkgs.procps}/bin/pkill waybar" EXIT trap "${pkgs.procps}/bin/pkill waybar" EXIT
while true; do while true; do
${waybar-hyprland}/bin/waybar -c $HOME/NixFlake/config/waybar/config -s $HOME/NixFlake/config/waybar/style.css & ${waybar-hyprland}/bin/waybar -c $HOME/NixFlake/config/waybar/config -s $HOME/NixFlake/config/waybar/style.css &
${pkgs.inotifyTools}/bin/inotifywait -e create,modify $HOME/NixFlake/config/waybar/config $HOME/NixFlake/config/waybar/style.css ${pkgs.inotifyTools}/bin/inotifywait -e create,modify $HOME/NixFlake/config/waybar/config $HOME/NixFlake/config/waybar/style.css
${pkgs.procps}/bin/pkill waybar ${pkgs.procps}/bin/pkill waybar
done done
'';
in ''
exec-once = ${waybar-reload}
''; '';
in ''
exec-once = ${waybar-reload}
'';
home.file.".config/hypr/hyprpaper.conf".text = '' home.file.".config/hypr/hyprpaper.conf".text = ''
preload = ~/NixFlake/wallpapers/${cfg.theme}.png preload = ~/NixFlake/wallpapers/${cfg.theme}.png
wallpaper = HDMI-A-1, ~/NixFlake/wallpapers/${cfg.theme}.png wallpaper = HDMI-A-1, ~/NixFlake/wallpapers/${cfg.theme}.png
wallpaper = HDMI-A-2, ~/NixFlake/wallpapers/${cfg.theme}.png wallpaper = HDMI-A-2, ~/NixFlake/wallpapers/${cfg.theme}.png
''; '';
home.activation = { home.activation = {
# NOTE: Keep the hyprland/waybar config symlinked, to allow easy changes with hotreload # NOTE: Keep the hyprland/waybar config symlinked, to allow easy changes with hotreload
# 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 =
(mkLink "~/NixFlake/config/hyprland/hyprland.conf" "~/.config/hypr/hyprland.conf"); hm.dag.entryAfter ["writeBoundary"]
(mkLink "~/NixFlake/config/hyprland/hyprland.conf" "~/.config/hypr/hyprland.conf");
# linkWaybarConfig = hm.dag.entryAfter ["writeBoundary"] # linkWaybarConfig = hm.dag.entryAfter ["writeBoundary"]
# (mkLink "~/NixFlake/config/waybar/config" "~/.config/waybar/config"); # (mkLink "~/NixFlake/config/waybar/config" "~/.config/waybar/config");
# linkWaybarStyle = hm.dag.entryAfter ["writeBoundary"] # linkWaybarStyle = hm.dag.entryAfter ["writeBoundary"]
# (mkLink "~/NixFlake/config/waybar/style.css" "~/.config/waybar/style.css"); # (mkLink "~/NixFlake/config/waybar/style.css" "~/.config/waybar/style.css");
# linkWaybarColors = hm.dag.entryAfter ["writeBoundary"] # linkWaybarColors = hm.dag.entryAfter ["writeBoundary"]
# (mkLink "~/NixFlake/config/waybar/colors" "~/.config/waybar/colors"); # (mkLink "~/NixFlake/config/waybar/colors" "~/.config/waybar/colors");
};
home.packages = with pkgs; [
hyprpaper # Wallpaper setter
hyprpicker # Color picker
wl-clipboard
clipman # Clipboard manager (wl-paste)
imv # Image viewer
moc # Audio player
ncpamixer # ncurses pavucontrol
slurp # Region selector for screensharing
grim # Grab images from compositor
xfce.thunar
xfce.tumbler # Thunar thumbnails
libsForQt5.polkit-kde-agent
];
services = {
# Notification service
dunst = {
enable = true;
};
};
programs = {
rofi = {
enable = true;
package = pkgs.rofi-wayland;
plugins = [
pkgs.keepmenu # TODO: Rofi KeepassXC frontend
];
# NOTE: Don't use this, use the configfile for hot-reload
# terminal = "${pkgs.kitty}/bin/kitty";
# font = "JetBrains Mono 14";
# theme =
# extraConfig = '''';
}; };
waybar = { home.packages = with pkgs; [
enable = true; hyprpaper # Wallpaper setter
package = waybar-hyprland; hyprpicker # Color picker
systemd = { wl-clipboard
enable = false; # Gets started by hyprland clipman # Clipboard manager (wl-paste)
imv # Image viewer
moc # Audio player
ncpamixer # ncurses pavucontrol
slurp # Region selector for screensharing
grim # Grab images from compositor
xfce.thunar
xfce.tumbler # Thunar thumbnails
libsForQt5.polkit-kde-agent
];
services = {
# Notification service
dunst = {
enable = true;
};
};
programs = {
rofi = {
enable = true;
package = pkgs.rofi-wayland;
plugins = [
pkgs.keepmenu # TODO: Rofi KeepassXC frontend
];
# NOTE: Don't use this, use the configfile for hot-reload
# terminal = "${pkgs.kitty}/bin/kitty";
# font = "JetBrains Mono 14";
# theme =
# extraConfig = '''';
};
waybar = {
enable = true;
package = waybar-hyprland;
systemd = {
enable = false; # Gets started by hyprland
};
}; };
}; };
}; };
};
} }

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;