From c9509e103c2104fd94809a86c1e8663d64f4854d Mon Sep 17 00:00:00 2001 From: kB01 Date: Sat, 23 Nov 2024 15:18:10 +0100 Subject: [PATCH] Switched to Home-Manager Setup on HyperC --- homes/x86_64-linux/kb@HyperC/default.nix | 155 +++++++++++++++++++++++ systems/x86_64-linux/HyperC/default.nix | 125 ++---------------- 2 files changed, 166 insertions(+), 114 deletions(-) create mode 100644 homes/x86_64-linux/kb@HyperC/default.nix diff --git a/homes/x86_64-linux/kb@HyperC/default.nix b/homes/x86_64-linux/kb@HyperC/default.nix new file mode 100644 index 0000000..17de0fd --- /dev/null +++ b/homes/x86_64-linux/kb@HyperC/default.nix @@ -0,0 +1,155 @@ +{ config, pkgs, lib, inputs, ... }: +let + # Firefox Profile Setting States + lock-false = { + Value = false; + Status = "locked"; + }; + lock-true = { + Value = true; + Status = "locked"; + }; + lock-empty-string = { + Value = ""; + Status = "locked"; + }; +in { + home.username = "kb"; + home.homeDirectory = "/home/kb"; + home.packages = with pkgs; [ + # System + kdePackages.kate + kdePackages.kcalc + fastfetch + btop + filelight + # Office + thunderbird + libreoffice-qt + logseq + xournalpp + xournal + rnote + # Security + gnupg + keepassxc + pass-wayland + veracrypt + protonvpn-gui + mosh # Mobile Shell + # Media + freetube + inkscape + blender + cheese + gimp + vlc + kid3 + tidal-hifi + bookworm + foliate + # Tools + transmission_4-qt + prusa-slicer + xorg.xkbcomp + hunspell + hunspellDicts.de_DE + hunspellDicts.en_US + #kicad + dig + # Messengers + element-desktop # Matrix Client + telegram-desktop + signal-desktop + webcord + # Customization + firefoxpwa + # Development + vscodium + scrcpy + # Experiments + # Gaming + prismlauncher + ]; + + services.syncthing.enable = true; + services.syncthing.extraOptions = [ + "--config=/home/kb/.config/syncthing" + "--data=/home/kb/sync" + ]; + + services.gpg-agent.enable = true; + + services.ssh-agent.enable = true; + + services.kdeconnect.enable = true; + + programs.firefox = { + enable = true; + nativeMessagingHosts = [ pkgs.firefoxpwa ]; + policies = { + DisableTelemetry = true; + DisableFirefoxStudies = true; + DisablePocket = true; + DisableFirefoxAccounts = true; + AutofillAddressEnabled = false; + AutofillCreditCardEnabled = false; + OfferToSaveLogins = false; + FirefoxHome.TopSites = false; + FirefoxHome.SponsoredTopSites = false; + Preferences = { + "browser.newtabpage.pinned" = lock-empty-string; + "browser.topsites.contile.enabled" = lock-false; + }; + DontCheckDefaultBrowser = true; + DisableProfileImport = true; + SearchBar = "unified"; + SearchEngines.Add = [ # Only Available in ESR Releases https://mozilla.github.io/policy-templates/#searchengines--add + { + Name = "Brave"; + URLTemplate = "https://search.brave.com/search?q={SearchTerms}"; + Alias = "br"; + } + ]; + ExtensionSettings = { # See https://mozilla.github.io/policy-templates/#extensionsettings + "extension@tabliss.io" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/3940751/tabliss-2.6.0.xpi"; + installation_mode = "normal_installed"; + }; + "gdpr@cavi.au.dk" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4362793/consent_o_matic-1.1.3.xpi"; + installation_mode = "normal_installed"; + }; + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4382536/ublock_origin-1.61.0.xpi"; + installation_mode = "normal_installed"; + }; + "keepassxc-browser@keepassxc.org" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4376326/keepassxc_browser-1.9.4.xpi"; + installation_mode = "normal_installed"; + }; + "offline-qr-code@rugk.github.io" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4349427/offline_qr_code_generator-1.9.xpi"; + installation_mode = "normal_installed"; + }; + "addon@darkreader.org" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4378073/darkreader-4.9.96.xpi"; + installation_mode = "normal_installed"; + }; + "firefoxpwa@filips.si" = { + install_url = "https://addons.mozilla.org/firefox/downloads/file/4383345/pwas_for_firefox-2.13.1.xpi"; + installation_mode = "normal_installed"; + }; + }; + Bookmarks = [ + { + Title = "Syncthing"; + URL = "localhost:8384"; + Placement = "toolbar"; + } + ]; + }; + }; + + home.stateVersion = "24.05"; +} diff --git a/systems/x86_64-linux/HyperC/default.nix b/systems/x86_64-linux/HyperC/default.nix index 6f5d822..712f293 100644 --- a/systems/x86_64-linux/HyperC/default.nix +++ b/systems/x86_64-linux/HyperC/default.nix @@ -14,8 +14,8 @@ nix.package = pkgs.lix; nix.settings.experimental-features = [ "nix-command" "flakes" ]; nixpkgs.config.permittedInsecurePackages = [ - "electron-27.3.11" - ]; + "electron-27.3.11" + ]; nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "veracrypt" @@ -38,15 +38,14 @@ supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; mandatoryFeatures = [ "big-parallel" ]; } - { - hostName = "voloxo-remotebuild"; - system = "x86_64-linux"; - maxJobs = 6; - speedFactor = 6; - supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; - mandatoryFeatures = [ "big-parallel" ]; - - } + # { + # hostName = "voloxo-remotebuild"; + # system = "x86_64-linux"; + # maxJobs = 6; + # speedFactor = 6; + # supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + # mandatoryFeatures = [ "big-parallel" ]; + # } ]; # services.tlp.enable = true; @@ -61,13 +60,6 @@ # boot.plymouth.enable = false; networking.hostName = "HyperC"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking networking.networkmanager.enable = true; # Set your time zone. @@ -124,93 +116,14 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; }; - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.schlossrave = { - isNormalUser = true; - description = "schlossrave Service Account"; - extraGroups = [ "networkmanager" ]; - packages = with pkgs; [ - kdePackages.kate - fastfetch - btop - firefox - qlcplus - dig - ]; - }; - users.users.kb = { + users.users.kb = { # Managed via Home-Manager isNormalUser = true; description = "kb"; extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - kdePackages.kate - fastfetch - btop - testdisk - xournalpp - xournal - rnote - #mypaint - firefox - vim - filelight - taxi - transmission_3 - transmission-remote-gtk - bookworm - foliate - filelight - micropython - mpy-utils - logseq - keepassxc - terminator - thunderbird - blender - prismlauncher - prusa-slicer - xorg.xkbcomp - krita - veracrypt - libreoffice-qt - hunspell - hunspellDicts.de_DE - hunspellDicts.en_US - languagetool - freetube - signal-desktop - kicad - protonvpn-gui - telegram-desktop - vlc - filezilla - inkscape - obs-studio - steam - iamb # Matrix CLI - element-desktop # Matrix GUI - dig - alacritty # Terminal - zed-editor # Editor - ]; }; - # Install firefox. - programs.firefox.enable = true; - - programs.kdeconnect.enable = true; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ @@ -232,24 +145,9 @@ defaultEditor = true; }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - programs.firefox.nativeMessagingHosts.packages = [ pkgs.firefoxpwa ]; programs.ssh.startAgent = true; - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; # List services that you want to enable: - - services.syncthing = { - enable = true; - user = "kb"; - dataDir = "/home/kb"; - configDir = "/home/kb/.config/syncthing"; - }; services.transmission.settings = { download-dir = "${config.services.transmission.home}/Torrents"; }; @@ -259,7 +157,6 @@ secretKeyFile = "/var/cache-HyperC-priv-key.pem"; }; - system.stateVersion = "24.05"; # Did you read the comment? }