From 55c17db428cf7495528ad61884685977b2be40ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 16 Apr 2023 17:56:43 +0200 Subject: [PATCH] refactor(profiles)!: split up desktop profile --- flake.nix | 3 + hosts/nixos-desktop/default.nix | 7 +- modules/profiles/desktop.nix | 133 +++++++------------------------- modules/profiles/personal.nix | 60 ++++++++++++++ modules/profiles/ripping.nix | 32 ++++++++ 5 files changed, 126 insertions(+), 109 deletions(-) create mode 100644 modules/profiles/personal.nix create mode 100644 modules/profiles/ripping.nix diff --git a/flake.nix b/flake.nix index 89db2c0..e748da9 100644 --- a/flake.nix +++ b/flake.nix @@ -122,6 +122,7 @@ ./modules/profiles/base.nix ./modules/profiles/gaming.nix ./modules/profiles/desktop.nix + ./modules/profiles/personal.nix ]; hostDefaults.modules = [ @@ -143,6 +144,7 @@ ./hosts/nixos-laptop self.nixosModules.desktop self.nixosModules.gaming + self.nixosModules.personal ]; @@ -150,6 +152,7 @@ ./hosts/nixos-desktop self.nixosModules.desktop self.nixosModules.gaming + self.nixosModules.personal ]; /* diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index 9dc9c88..b88a65e 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -10,8 +10,11 @@ # Include the results of the hardware scan. ./hardware-configuration.nix ]; - - my.programs.hyprland.nvidiaSupport = true; + my = { + programs.hyprland.nvidiaSupport = true; + services.mullvad.enable = true; + programs.ledger.enable = true; + }; # KERNEL boot.kernelPackages = pkgs.linuxPackages_latest; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 755c68a..ef5a639 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -5,135 +5,56 @@ with lib; { my = { yubikey = { - enable = true; + enable = mkDefault true; luksSupport = { - enable = true; - devices = [ "enc" ]; + enable = mkDefault true; + devices = mkDefault [ "enc" ]; }; }; - wallpapers.enable = true; + wallpapers.enable = mkDefault true; theming = { - enable = true; - scheme = "catppuccin-macchiato"; - }; - virtualisation = { - podman.enable = true; - libvirtd.enable = true; + enable = mkDefault true; + scheme = mkDefault "catppuccin-macchiato"; }; + virtualisation.podman.enable = mkDefault true; programs = { - adb.enable = true; - hyprland.enable = true; - code.enable = true; - firefox = { - enable = true; - arkenfox = { - enable = true; - overrides = { - ## arkenfox overrides - # automatic search - "keyword.enabled" = true; - "browser.search.suggest.enabled" = true; - "browser.urlbar.suggest.searches" = true; - - # startup page - "browser.startup.homepage" = "https://searxng.moritzboeh.me/"; - "browser.startup.page" = 1; - - # drm - "media.eme.enabled" = true; - - # sanitisation - "privacy.clearOnShutdown.history" = false; - - # disable letterboxing - "privacy.resistFingerprinting.letterboxing" = false; - - ## OTHER - # Dont show warning when accessing about:config - "browser.aboutConfig.showWarning" = false; - - # Hide bookmarks - "browser.toolbars.bookmarks.visibility" = "never"; - - # Smooth scrolling - "general.smoothScroll.lines.durationMaxMS" = 125; - "general.smoothScroll.lines.durationMinMS" = 125; - "general.smoothScroll.mouseWheel.durationMaxMS" = 200; - "general.smoothScroll.mouseWheel.durationMinMS" = 100; - "general.smoothScroll.msdPhysics.enabled" = true; - "general.smoothScroll.other.durationMaxMS" = 125; - "general.smoothScroll.other.durationMinMS" = 125; - "general.smoothScroll.pages.durationMaxMS" = 125; - "general.smoothScroll.pages.durationMinMS" = 125; - "mousewheel.min_line_scroll_amount" = 40; - "mousewheel.system_scroll_override_on_root_content.enabled" = true; - "mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175; - "mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175; - "toolkit.scrollbox.horizontalScrollDistance" = 6; - "toolkit.scrollbox.verticalScrollDistance" = 2; - }; - }; - }; - git.signing = true; - gpg.enable = true; - hub.enable = true; - ledger.enable = true; - logseq.enable = true; - nvim.enable = true; - python.versions."311".enable = true; - ssh = { - enable = true; - includeSecrets = [ ../../secrets/ssh-home.age ]; - }; - spotify.enable = true; - thunar.enable = true; - zathura.enable = true; + chromium.enable = mkDefault true; + firefox.enable = mkDefault true; + gpg.enable = mkDefault true; + hyprland.enable = mkDefault true; + logseq.enable = mkDefault true; + nvim.enable = mkDefault true; + python.versions."311".enable = mkDefault true; + spotify.enable = mkDefault true; + ssh.enable = mkDefault true; + thunar.enable = mkDefault true; + zathura.enable = mkDefault true; }; services = { - dunst.enable = true; - kdeconnect.enable = true; - mullvad.enable = true; - openconnect.enable = true; - printing.enable = true; + dunst.enable = mkDefault true; gammastep.enable = true; + kdeconnect.enable = mkDefault true; + printing.enable = true; wireguard.enable = true; }; }; environment.systemPackages = with pkgs; [ - # nix - nixpkgs-review - - # ripping - abcde - handbrake - picard - - # other anki calibre - jellyfin-media-player keepassxc - stable.libreoffice # HACK to fix build error + nixpkgs-review pavucontrol + stable.libreoffice # HACK to fix build error stable.signal-desktop - tlaplusToolbox - vlc - thunderbird - plantuml - - jetbrains.pycharm-professional - synology-drive-client - texlive.combined.scheme-full + thunderbird + vlc ]; - programs = { - chromium.enable = true; - nix-ld.enable = true; - }; + programs.nix-ld.enable = true; home-manager.users.moritz = { services.nextcloud-client = { @@ -148,7 +69,5 @@ with lib; { alsa.enable = true; pulse.enable = true; }; - # Remap capslock to esc and shift + capslock to capslock - xserver.xkbOptions = "terminate:ctrl_alt_bksp,caps:escape_shifted_capslock"; }; } diff --git a/modules/profiles/personal.nix b/modules/profiles/personal.nix new file mode 100644 index 0000000..6bf7167 --- /dev/null +++ b/modules/profiles/personal.nix @@ -0,0 +1,60 @@ +{ lib, ... }: + +with lib; +{ + my = { + services.openconnect.enable = true; + programs = { + ssh.includeSecrets = mkDefault [ ../../secrets/ssh-home.age ]; + git.signing = mkDefault true; + hub.enable = mkDefault true; + firefox.arkenfox = { + enable = mkDefault true; + overrides = mkDefault { + ## arkenfox overrides + # automatic search + "keyword.enabled" = true; + "browser.search.suggest.enabled" = true; + "browser.urlbar.suggest.searches" = true; + + # startup page + "browser.startup.homepage" = "https://searxng.moritzboeh.me/"; + "browser.startup.page" = 1; + + # drm + "media.eme.enabled" = true; + + # sanitisation + "privacy.clearOnShutdown.history" = false; + + # disable letterboxing + "privacy.resistFingerprinting.letterboxing" = false; + + ## OTHER + # Dont show warning when accessing about:config + "browser.aboutConfig.showWarning" = false; + + # Hide bookmarks + "browser.toolbars.bookmarks.visibility" = "never"; + + # Smooth scrolling + "general.smoothScroll.lines.durationMaxMS" = 125; + "general.smoothScroll.lines.durationMinMS" = 125; + "general.smoothScroll.mouseWheel.durationMaxMS" = 200; + "general.smoothScroll.mouseWheel.durationMinMS" = 100; + "general.smoothScroll.msdPhysics.enabled" = true; + "general.smoothScroll.other.durationMaxMS" = 125; + "general.smoothScroll.other.durationMinMS" = 125; + "general.smoothScroll.pages.durationMaxMS" = 125; + "general.smoothScroll.pages.durationMinMS" = 125; + "mousewheel.min_line_scroll_amount" = 40; + "mousewheel.system_scroll_override_on_root_content.enabled" = true; + "mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175; + "mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175; + "toolkit.scrollbox.horizontalScrollDistance" = 6; + "toolkit.scrollbox.verticalScrollDistance" = 2; + }; + }; + }; + }; +} diff --git a/modules/profiles/ripping.nix b/modules/profiles/ripping.nix new file mode 100644 index 0000000..be56abe --- /dev/null +++ b/modules/profiles/ripping.nix @@ -0,0 +1,32 @@ +{ pkgs }: + +{ + environment.systemPackages = with pkgs; [ + # nix + nixpkgs-review + + # ripping + abcde + handbrake + picard + + # other + anki + calibre + jellyfin-media-player + keepassxc + stable.libreoffice # HACK to fix build error + pavucontrol + stable.signal-desktop + tlaplusToolbox + vlc + thunderbird + plantuml + + jetbrains.pycharm-professional + + synology-drive-client + + texlive.combined.scheme-full + ]; +}