diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | apps/firefox.nix | 45 | ||||
| -rw-r--r-- | apps/nixvim.nix | 66 | ||||
| -rw-r--r-- | apps/powermenu.nix | 4 | ||||
| -rw-r--r-- | apps/spicetify.nix | 20 | ||||
| -rw-r--r-- | configuration.nix | 143 | ||||
| -rw-r--r-- | flake.lock | 40 | ||||
| -rw-r--r-- | flake.nix | 25 | ||||
| -rw-r--r-- | home.nix | 26 | ||||
| -rw-r--r-- | shells/all.nix | 2 | ||||
| -rw-r--r-- | shells/csci.nix | 8 | ||||
| -rw-r--r-- | shells/haemolacriaa.nix | 2 |
12 files changed, 145 insertions, 237 deletions
@@ -0,0 +1 @@ +hardware-configuration.nix diff --git a/apps/firefox.nix b/apps/firefox.nix index c1d86a4..07f3ea2 100644 --- a/apps/firefox.nix +++ b/apps/firefox.nix @@ -1,35 +1,35 @@ { pkgs, ... }: { programs.firefox = { enable = true; - + profiles.ozpv = { - userChrome = '' + userChrome = '' :root[tabsintitlebar][sizemode="normal"]{ --uc-window-drag-space-width: 24px; } :root[uidensity="compact"]{ --tab-block-margin: 2px !important; } - + #navigator-toolbox{ --uc-navigationbar-width: 40vw; --uc-toolbar-height: 40px; --uc-urlbar-min-width: 50vw; } - + #scrollbutton-up, #scrollbutton-down{ border-block-width: 2px !important; } - + :root[uidensity="compact"] #navigator-toolbox{ --uc-toolbar-height: 34px; } :root[uidensity="touch"] #navigator-toolbox{ --uc-toolbar-height: 44px; } - + @media screen and (max-width: 1500px){ #urlbar-container{ min-width: 300px !important; flex-shrink: 1 !important; } } - + #TabsToolbar{ margin-left: var(--uc-navigationbar-width); --tabs-navbar-shadow-size: 0px; @@ -37,16 +37,16 @@ #tabbrowser-tabs{ --tab-min-height: calc(var(--uc-toolbar-height) - 2 * var(--tab-block-margin,0px)) !important; } - + .titlebar-spacer[type="pre-tabs"]{ display: none } - + #navigator-toolbox > #nav-bar{ margin-right:calc(100vw - var(--uc-navigationbar-width)); margin-top: calc(0px - var(--uc-toolbar-height)); } - + :root[tabsintitlebar="true"] #nav-bar{ padding-left: var(--uc-window-drag-space-width) !important } - + @media (-moz-gtk-csd-reversed-placement), (-moz-platform: macos){ .titlebar-buttonbox-container{ @@ -62,13 +62,13 @@ @media (-moz-platform: macos){ :root[tabsintitlebar="true"] #nav-bar{ padding-inline: calc(var(--uc-window-drag-space-width,0px) + 72px) 0px !important; } } - + .tab-close-button{ margin-top: 0 !important } - + #urlbar[open]:focus-within{ min-width: var(--uc-urlbar-min-width,none) !important; } - + #urlbar-container:not(:hover) .urlbar-history-dropmarker{ margin-inline-start: -28px; } - + #customization-panelWrapper > .panel-arrowbox > .panel-arrow{ margin-inline-end: initial !important; } ''; @@ -107,7 +107,8 @@ "browser.newtabpage.activity-stream.telemetry" = false; "browser.newtabpage.activity-stream.feeds.snippets" = false; "browser.newtabpage.activity-stream.feeds.section.topstories" = false; - "browser.newtabpage.activity-stream.section.highlights.includePocket" = false; + "browser.newtabpage.activity-stream.section.highlights.includePocket" = + false; "browser.newtabpage.activity-stream.showSponsored" = false; "browser.newtabpage.activity-stream.feeds.discoverystreamfeed" = false; "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; @@ -181,7 +182,8 @@ "extensions.webservice.discoverURL" = ""; "extensions.webextensions.restrictedDomains" = ""; "extensions.postDownloadThirdPartyPrompt" = false; - "geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocat"; + "geo.provider.network.url" = + "https://location.services.mozilla.com/v1/geolocat"; "geo.provider.ms-windows-location" = false; "geo.provider.use_gpsd" = false; "geo.provider.use_geoclue" = false; @@ -230,8 +232,10 @@ "privacy.donottrackheader.value" = 1; "privacy.firstparty.isolate" = true; "privacy.partition.serviceWorkers" = true; - "privacy.partition.always_partition_third_party_non_cookie_storage" = true; - "privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage" = true; + "privacy.partition.always_partition_third_party_non_cookie_storage" = + true; + "privacy.partition.always_partition_third_party_non_cookie_storage.exempt_sessionstorage" = + true; "privacy.query_stripping" = true; "privacy.resistFingerprinting" = true; "privacy.trackingprotection.cryptomining.enabled" = true; @@ -244,7 +248,8 @@ "privacy.window.maxInnerHeight" = 900; "privacy.resistFingerprinting.block_mozAddonManager" = true; "security.ssl.disable_session_identifiers" = true; - "services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = false; + "services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSite" = + false; "signon.autofillForms" = false; "toolkit.telemetry.archive.enabled" = false; "toolkit.telemetry.bhrPing.enabled" = false; diff --git a/apps/nixvim.nix b/apps/nixvim.nix index 87a0dbe..9be4721 100644 --- a/apps/nixvim.nix +++ b/apps/nixvim.nix @@ -7,15 +7,16 @@ enable = true; # fix rust_analyzer error - extraConfigLua = "for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do - local default_diagnostic_handler = vim.lsp.handlers[method] - vim.lsp.handlers[method] = function(err, result, context, config) - if err ~= nil and err.code == -32802 then - return - end - return default_diagnostic_handler(err, result, context, config) - end -end"; + extraConfigLua = '' + for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do + local default_diagnostic_handler = vim.lsp.handlers[method] + vim.lsp.handlers[method] = function(err, result, context, config) + if err ~= nil and err.code == -32802 then + return + end + return default_diagnostic_handler(err, result, context, config) + end + end''; keymaps = [ { @@ -71,16 +72,13 @@ end"; lua_ls.enable = true; bashls.enable = true; html.enable = true; - pyright.enable = true; jsonls.enable = true; - java_language_server.enable = true; cmake.enable = true; sqls.enable = true; nixd.enable = true; tailwindcss.enable = true; - # svelte.enable = true; rust_analyzer = { - enable = true; + enable = false; installRustc = true; installCargo = true; }; @@ -89,36 +87,37 @@ end"; lspkind.enable = true; - luasnip.enable = true; - cmp = { enable = true; autoEnableSources = true; - + settings = { - snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end"; - + snippet.expand = + "function(args) require('luasnip').lsp_expand(args.body) end"; + mapping = { "<Tab>" = "cmp.mapping.confirm({ select = true })"; - "<S-Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + "<S-Tab>" = + "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; }; - + sources = [ - {name = "path";} - {name = "nvim_lsp";} - {name = "luasnip";} - {name = "crates";} - {name = "buffer";} + { name = "path"; } + { name = "nvim_lsp"; } + { + name = "luasnip"; + } + # the worst thing in existence + # {name = "crates";} + { name = "buffer"; } ]; }; }; - + rustaceanvim = { - enable = false; - - settings = { - tools.enable_clippy = true; - }; + enable = true; + + settings = { tools.enable_clippy = true; }; }; web-devicons.enable = true; @@ -126,15 +125,14 @@ end"; lualine.enable = true; }; - colorschemes.catppuccin = { + colorschemes.gruvbox = { enable = true; settings = { - flavour = "latte"; integrations = { cmp = true; treesitter = true; }; - term_colors = true; + terminal_colors = true; }; }; diff --git a/apps/powermenu.nix b/apps/powermenu.nix index 97fc97d..07de48d 100644 --- a/apps/powermenu.nix +++ b/apps/powermenu.nix @@ -1,9 +1,9 @@ -{ pkgs ? import <nixpkgs> {}, stdenv ? pkgs.stdenv }: +{ pkgs ? import <nixpkgs> { }, stdenv ? pkgs.stdenv }: stdenv.mkDerivation rec { pname = "powermenu"; version = "1.0"; - + src = fetchGit { url = "https://github.com/ozpv/powermenu.git"; rev = "e5a826b6db2941c992912e940b7da37ae276b144"; diff --git a/apps/spicetify.nix b/apps/spicetify.nix deleted file mode 100644 index 4177b47..0000000 --- a/apps/spicetify.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, lib, inputs, ... }: - -{ - imports = [ inputs.spicetify-nix.homeManagerModules.default ]; - - programs.spicetify = - let - spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; - in - { - enable = true; - enabledExtensions = with spicePkgs.extensions; [ - adblock - hidePodcasts - # shuffle # shuffle+ (special characters are sanitized out of extension names) - ]; - theme = spicePkgs.themes.starryNight; - # colorScheme = ""; - }; -} diff --git a/configuration.nix b/configuration.nix index 1797d1f..3de77ef 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,12 +3,11 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, inputs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - inputs.home-manager.nixosModules.default - ]; - + imports = [ # Include the results of the hardware scan. + ./hardware-configuration.nix + inputs.home-manager.nixosModules.default + ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Bootloader. @@ -19,72 +18,71 @@ boot.loader.grub.useOSProber = true; boot.supportedFilesystems = [ "ntfs" ]; boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelModules = [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ]; + boot.kernelModules = + [ "kvm-amd" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ]; boot.kernelParams = [ "amd_iommu=on" "amd_iommu=pt" "kvm.ignore_msrs=1" ]; boot.extraModprobeConfig = "options vfio-pci ids=10de:25ac"; networking = { # dns.mullvad.net # nameservers = [ "194.242.2.2" ]; - networkmanager = { - enable = true; - }; + networkmanager = { enable = true; }; dhcpcd.extraConfig = "nohook resolv.conf"; hostName = "nixos"; # Define your hostname. - wireless.enable = false; # Enables wireless support via wpa_supplicant. + wireless.enable = false; # Enables wireless support via wpa_supplicant. firewall.enable = true; firewall.allowedTCPPorts = [ 80 3000 ]; }; - + # touchpad services.libinput.enable = true; - services.libinput.touchpad.naturalScrolling = false; - services.libinput.touchpad.middleEmulation = true; + services.libinput.touchpad.naturalScrolling = false; + services.libinput.touchpad.middleEmulation = true; services.libinput.touchpad.tapping = true; # graphics hardware.graphics.enable = true; -# hardware.nvidia = { -# modesetting.enable = true; -# -# # Nvidia power management. Experimental, and can cause sleep/suspend to fail. -# # Enable this if you have graphical corruption issues or application crashes after waking -# # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead -# # of just the bare essentials. -# powerManagement.enable = false; -# -# # Fine-grained power management. Turns off GPU when not in use. -# # Experimental and only works on modern Nvidia GPUs (Turing or newer). -# powerManagement.finegrained = false; -# -# # Use the NVidia open source kernel module (not to be confused with the -# # independent third-party "nouveau" open source driver). -# # Support is limited to the Turing and later architectures. Full list of -# # supported GPUs is at: -# # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus -# # Only available from driver 515.43.04+ -# # Currently alpha-quality/buggy, so false is currently the recommended setting. -# open = false; -# -# # Enable the Nvidia settings menu, -# # accessible via `nvidia-settings`. -# nvidiaSettings = true; -# -# # Optionally, you may need to select the appropriate driver version for your specific GPU. -# package = config.boot.kernelPackages.nvidiaPackages.stable; -# -# prime = { -# offload = { -# enable = true; -# enableOffloadCmd = true; -# }; -# -# # Make sure to use the correct Bus ID values for your system! -# amdgpuBusId = "PCI:115:0:0"; -# nvidiaBusId = "PCI:1:0:0"; -# }; -# }; -# services.xserver.videoDrivers = [ "nvidia" ]; + # hardware.nvidia = { + # modesetting.enable = true; + # + # # Nvidia power management. Experimental, and can cause sleep/suspend to fail. + # # Enable this if you have graphical corruption issues or application crashes after waking + # # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead + # # of just the bare essentials. + # powerManagement.enable = false; + # + # # Fine-grained power management. Turns off GPU when not in use. + # # Experimental and only works on modern Nvidia GPUs (Turing or newer). + # powerManagement.finegrained = false; + # + # # Use the NVidia open source kernel module (not to be confused with the + # # independent third-party "nouveau" open source driver). + # # Support is limited to the Turing and later architectures. Full list of + # # supported GPUs is at: + # # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # # Only available from driver 515.43.04+ + # # Currently alpha-quality/buggy, so false is currently the recommended setting. + # open = false; + # + # # Enable the Nvidia settings menu, + # # accessible via `nvidia-settings`. + # nvidiaSettings = true; + # + # # Optionally, you may need to select the appropriate driver version for your specific GPU. + # package = config.boot.kernelPackages.nvidiaPackages.stable; + # + # prime = { + # offload = { + # enable = true; + # enableOffloadCmd = true; + # }; + # + # # Make sure to use the correct Bus ID values for your system! + # amdgpuBusId = "PCI:115:0:0"; + # nvidiaBusId = "PCI:1:0:0"; + # }; + # }; + # services.xserver.videoDrivers = [ "nvidia" ]; # boot.kernelParams = [ "module_blacklist=amdgpu" "module_blacklist=i915" ]; # Configure network proxy if necessary @@ -112,7 +110,7 @@ # Configure keymap in X11 services.xserver = { enable = true; - displayManager.lightdm.enable = false; + displayManager.lightdm.enable = false; displayManager.startx.enable = true; windowManager.dwm.enable = true; windowManager.dwm.package = pkgs.dwm.overrideAttrs { @@ -124,23 +122,19 @@ xkb.layout = "us"; xkb.variant = ""; }; - + services.keyd = { enable = true; keyboards = { - default = { + default = { - ids = [ "*" ]; - settings = { - main = { - capslock = "backspace"; - }; + ids = [ "*" ]; + settings = { main = { capslock = "backspace"; }; }; }; }; }; -}; # compostior - services.picom.enable = true; + services.picom.enable = true; # login services.logind.extraConfig = '' @@ -152,18 +146,14 @@ isNormalUser = true; description = "ozpv"; extraGroups = [ "networkmanager" "wheel" "libvirtd" "docker" ]; - packages = with pkgs; []; + packages = with pkgs; [ ]; shell = pkgs.zsh; }; # lock screen programs.slock.enable = true; - home-manager = { - users.ozpv = { - imports = [ ./home.nix ]; - }; - }; + home-manager = { users.ozpv = { imports = [ ./home.nix ]; }; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -179,6 +169,7 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + nixfmt libinput-gestures brightnessctl discord @@ -202,7 +193,7 @@ rev = "8ee4bd60785b6a0078e15b80b27136f8536448e1"; }; }) - (callPackage ./apps/powermenu.nix {}) + (callPackage ./apps/powermenu.nix { }) networkmanager_dmenu maim sxiv @@ -232,13 +223,11 @@ bind-key h select-pane -R bind-key k select-pane -U bind-key j select-pane -D - ''; + ''; }; # fonts - fonts.packages = with pkgs; [ - nerd-fonts.jetbrains-mono - ]; + fonts.packages = with pkgs; [ nerd-fonts.jetbrains-mono ]; # bluetooth hardware.bluetooth.enable = false; @@ -274,6 +263,6 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.11"; # Did you read the comment? + system.stateVersion = "25.11"; # Did you read the comment? } @@ -35,22 +35,6 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -303,29 +287,7 @@ "inputs": { "home-manager": "home-manager", "nixpkgs": "nixpkgs", - "nixvim": "nixvim", - "spicetify-nix": "spicetify-nix" - } - }, - "spicetify-nix": { - "inputs": { - "flake-compat": "flake-compat_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1735013792, - "narHash": "sha256-kMSd7swqmksHIKh3CRTKTVkKDhqe68JKXkAg7GmAX4s=", - "owner": "Gerg-L", - "repo": "spicetify-nix", - "rev": "0b442bc3b6e796565c126ab720429650269e46ec", - "type": "github" - }, - "original": { - "owner": "Gerg-L", - "repo": "spicetify-nix", - "type": "github" + "nixvim": "nixvim" } }, "systems": { @@ -14,32 +14,25 @@ # If using a stable channel you can use `url = "github:nix-community/nixvim/nixos-<version>"` inputs.nixpkgs.follows = "nixpkgs"; }; - - spicetify-nix = { - url = "github:Gerg-L/spicetify-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; - outputs = { nixpkgs, home-manager, nixvim, spicetify-nix, ... }@inputs: + outputs = { nixpkgs, home-manager, nixvim, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; - in - { + in { nixosConfigurations.ozpv = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ + specialArgs = { inherit inputs; }; + modules = [ ./configuration.nix - home-manager.nixosModules.home-manager { - home-manager.extraSpecialArgs = { inherit inputs; }; - } + home-manager.nixosModules.home-manager + { home-manager.extraSpecialArgs = { inherit inputs; }; } ]; }; + devShells.x86_64-linux = { - default = (import ./shells/all.nix {inherit pkgs;}); - haemolacriaa = (import ./shells/haemolacriaa.nix {inherit pkgs;}); - csci = (import ./shells/csci.nix {inherit pkgs;}); + default = (import ./shells/all.nix { inherit pkgs; }); + haemolacriaa = (import ./shells/haemolacriaa.nix { inherit pkgs; }); }; }; } @@ -1,34 +1,22 @@ { config, pkgs, libs, inputs, ... }: { - imports = [ - ./apps/firefox.nix - ./apps/nixvim.nix - ./apps/spicetify.nix - ]; + imports = [ ./apps/firefox.nix ./apps/nixvim.nix ]; home.username = "ozpv"; home.homeDirectory = "/home/ozpv"; - home.stateVersion = "24.11"; + home.stateVersion = "25.05"; gtk.enable = true; - gtk.cursorTheme.package = pkgs.catppuccin-cursors.mochaDark; - gtk.cursorTheme.name = "catppuccin-mocha-dark-cursors"; - gtk.theme.package = pkgs.catppuccin-gtk; - gtk.theme.name = "catppuccin-gtk-theme-mocha"; + gtk.theme.package = pkgs.gruvbox-gtk-theme; + gtk.theme.name = "Gruvbox-Green"; nixpkgs.config.allowUnfree = true; - home.packages = with pkgs; [ - veracrypt - keepassxc - neofetch - ]; + home.packages = with pkgs; [ veracrypt keepassxc neofetch ]; - home.sessionVariables = { - EDITOR = "nvim"; - }; + home.sessionVariables = { EDITOR = "nvim"; }; programs.home-manager.enable = true; @@ -57,7 +45,7 @@ bvim = "vim"; vim = "nvim"; }; - + history.size = 10000; }; } diff --git a/shells/all.nix b/shells/all.nix index fb68f81..7c08745 100644 --- a/shells/all.nix +++ b/shells/all.nix @@ -1,4 +1,4 @@ -{ pkgs ? import <nixpkgs> {} }: +{ pkgs ? import <nixpkgs> { } }: pkgs.mkShell { packages = with pkgs; [ diff --git a/shells/csci.nix b/shells/csci.nix deleted file mode 100644 index c0f7dfb..0000000 --- a/shells/csci.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs ? import <nixpkgs> {} }: - -pkgs.mkShell { - packages = with pkgs; [ - clang - llvmPackages.bintools - ]; -} diff --git a/shells/haemolacriaa.nix b/shells/haemolacriaa.nix index 424d404..5bf4edd 100644 --- a/shells/haemolacriaa.nix +++ b/shells/haemolacriaa.nix @@ -1,4 +1,4 @@ -{ pkgs ? import <nixpkgs> {} }: +{ pkgs ? import <nixpkgs> { } }: pkgs.mkShell { packages = with pkgs; [ |
