diff --git a/configuration.nix b/configuration.nix index 3862ee9..a9020df 100644 --- a/configuration.nix +++ b/configuration.nix @@ -62,7 +62,6 @@ ]; packages = with pkgs; [ ]; }; - # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -83,6 +82,13 @@ # List services that you want to enable: + security.polkit = { + enable = true; + enablePkexecWrapper = true; + }; + + + programs.zsh.enable = true; programs.hyprland = { @@ -98,8 +104,8 @@ settings = { initial_session = { - command = "${pkgs.uwsm}/bin/uwsm start hyprland"; - user = "reaper"; + command = "${pkgs.uwsm}/bin/uwsm start hyprland"; + user = "reaper"; }; }; }; diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 6518eec..f650d97 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,32 +1,48 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/667f2c84-43dc-43de-a4e8-a1d5079ae4f1"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/667f2c84-43dc-43de-a4e8-a1d5079ae4f1"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5ECD-6EBF"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/d7a5eece-520e-4e6e-9523-467a07c428ef"; } + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/5ECD-6EBF"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/d7a5eece-520e-4e6e-9523-467a07c428ef"; } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/home.nix b/home.nix index a4fcf17..a04cd16 100644 --- a/home.nix +++ b/home.nix @@ -9,6 +9,8 @@ oh-my-posh nerd-fonts.hack pkgs.nixfmt + nixd + pkgs.polkit_gnome ]; @@ -39,6 +41,21 @@ ''; }; + # AppLauncher + programs.wofi = { + enable = true; + + settings = { + show = "drun"; + width = 500; + height = 350; + prompt = "Search applications"; + allow_images = true; + image_size = 24; + }; + }; + + # Terminal programs.kitty = { enable = true; settings = { @@ -47,6 +64,75 @@ }; }; + # Baseline user programs + + #firefox + programs.firefox = { + enable = true; + + # Firefox profile + profiles.default = { + id = 0; + name = "default"; + isDefault = true; + + # Settings + settings = { + "browser.startup.homepage" = "https://home.reaperofveriod.nl"; + "browser.search.region" = "NL"; + "browser.search.isUS" = false; + "browser.startup.page" = 3; + "privacy.donatenotrack.enabled" = true; + "privacy.trackingprotection.enabled" = true; + }; + }; + + # Extensions + policies.ExtensionSettings = { + "uBlock0@raymondhill.net" = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi"; + installation_mode = "force_installed"; + }; + }; + }; + + # Vscodium + programs.vscodium = { + enable = true; + package = pkgs.vscodium; + mutableExtensionsDir = false; + + profiles.default = { + extensions = with pkgs.vscode-extensions; [ + jnoortheen.nix-ide + ]; + + userSettings = { + # General editor settings + "editor.tabSize" = 2; + "editor.insertSpaces" = true; + "editor.detectIndentation" = false; + "editor.formatOnSave" = true; + "editor.bracketPairColorization.enabled" = true; + + # Nix language support + "nix.enableLanguageServer" = true; + "nix.serverPath" = "${pkgs.nixd}/bin/nixd"; + + # Nix-specific settings + "[nix]" = { + "editor.defaultFormatter" = "jnoortheen.nix-ide"; + "editor.tabSize" = 2; + "editor.formatOnSave" = true; + }; + + # Formatting + "nix.formatterPath" = "${pkgs.nixfmt}/bin/nixfmt"; + }; + }; + }; + + # Hyprland wayland.windowManager.hyprland = { enable = true; @@ -57,18 +143,26 @@ settings = { monitor = [ - "DP-1,1920x1080@143.85,1920x0,1" - "DP-2,1920x1080@119.98,3840x0,1" - "DP-3,1920x1080@119.98,0x0,1" + "DP-1,1920x1080@143.85,1920x0,1" + "DP-2,1920x1080@119.98,3840x0,1" + "DP-3,1920x1080@119.98,0x0,1" ]; bind = [ "CTRL_L ALT_L , T, exec, kitty" "CTRL_L SHIFT_L , Q, killactive" + ", SUPER_L, exec, ${pkgs.writeShellScript "wofi-toggle" '' + if ${pkgs.procps}/bin/pgrep -f '/bin/wofi|wofi --show' > /dev/null; then + ${pkgs.procps}/bin/pkill -f '/bin/wofi|wofi --show' + else + ${pkgs.wofi}/bin/wofi --show drun + fi + ''}" ]; exec-once = [ "waybar" + "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" ]; general = {