diff options
| author | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-07-25 13:40:27 -0400 |
|---|---|---|
| committer | Stefan Weigl-Bosker <stefan@s00.xyz> | 2025-07-25 13:40:27 -0400 |
| commit | f2fb01a55b54dae9a5c26c7e1bae3d17c18de73e (patch) | |
| tree | c861617d8ff6f5fdf188b1f7dd5774c1d17a3cd5 | |
| parent | 8a0457f14d000b4aae8bbd4e950654802f01c584 (diff) | |
| download | home-f2fb01a55b54dae9a5c26c7e1bae3d17c18de73e.tar.gz | |
repo: format tree
42 files changed, 881 insertions, 553 deletions
@@ -21,15 +21,15 @@ }; }; - outputs = - inputs@{ + outputs = + inputs@{ self, - nixpkgs, - home-manager, + nixpkgs, + home-manager, nixgl, neovim-nightly, nixos-hardware, - ... + ... }: let system = "x86_64-linux"; @@ -42,14 +42,15 @@ inherit system overlays; }; inherit (pkgs) lib; - in { + in + { nixosConfigurations = { form = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs; }; - modules = [ + modules = [ ./form/configuration.nix home-manager.nixosModules.home-manager { @@ -72,14 +73,14 @@ ./fw/configuration.nix home-manager.nixosModules.home-manager { - home-manager = { - users.stefan = import ./fw/home.nix; - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { - inherit system inputs pkgs; - }; - }; + home-manager = { + users.stefan = import ./fw/home.nix; + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { + inherit system inputs pkgs; + }; + }; } ]; }; diff --git a/form/configuration.nix b/form/configuration.nix index 4e8b78c..62c6a41 100644 --- a/form/configuration.nix +++ b/form/configuration.nix @@ -1,10 +1,15 @@ -{ config, lib, pkgs, inputs, ... }: { - imports = - [ - ../nixos - ./hardware-configuration.nix - ]; + config, + lib, + pkgs, + inputs, + ... +}: +{ + imports = [ + ../nixos + ./hardware-configuration.nix + ]; config.nixos = { username = "stefan"; @@ -16,10 +21,14 @@ system.stateVersion = "24.11"; hardware.graphics.enable = true; - boot.initrd.kernelModules = [ "nvidia" "nvidia_uvm" "nvidia_drm" ]; + boot.initrd.kernelModules = [ + "nvidia" + "nvidia_uvm" + "nvidia_drm" + ]; boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; # boot.kernelParams = []; - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = [ "nvidia" ]; services.desktopManager.plasma6.enable = true; services.displayManager.sddm = { enable = false; diff --git a/form/hardware-configuration.nix b/form/hardware-configuration.nix index 64f00e2..a7d05eb 100644 --- a/form/hardware-configuration.nix +++ b/form/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/1e39c424-417d-4218-8655-de4bb9ad57b3"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/1e39c424-417d-4218-8655-de4bb9ad57b3"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/F50B-956E"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/6fa8f3f6-f884-4879-9c11-90340ff6b3c2"; } + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/F50B-956E"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/6fa8f3f6-f884-4879-9c11-90340ff6b3c2"; } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/form/home.nix b/form/home.nix index c9f7a2f..4a691ea 100644 --- a/form/home.nix +++ b/form/home.nix @@ -1,4 +1,10 @@ -{ inputs, config, lib, pkgs, ... }: +{ + inputs, + config, + lib, + pkgs, + ... +}: { imports = [ ../modules/global.nix @@ -8,7 +14,7 @@ config.modules = { global = { wayland = true; - + extraPackages = with pkgs; [ wmenu cmatrix diff --git a/fw/configuration.nix b/fw/configuration.nix index c440db4..0b9ebe3 100644 --- a/fw/configuration.nix +++ b/fw/configuration.nix @@ -1,10 +1,14 @@ -{ config, lib, pkgs, ... }: { - imports = - [ - ../nixos - ./hardware-configuration.nix - ]; + config, + lib, + pkgs, + ... +}: +{ + imports = [ + ../nixos + ./hardware-configuration.nix + ]; config.nixos = { username = "stefan"; @@ -13,7 +17,10 @@ }; config = { - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; services.openssh.enable = true; programs.light.enable = true; @@ -37,7 +44,11 @@ }; }; - users.users."stefan".extraGroups = [ "input" "uinput" "video" ]; # TODO: remove + users.users."stefan".extraGroups = [ + "input" + "uinput" + "video" + ]; # TODO: remove environment.gnome.excludePackages = with pkgs; [ gnome-photos @@ -67,16 +78,16 @@ # Enable automatic login for the user. # services.getty.autologinUser = "stefan"; - + # services.interception-tools = { - # enable = true; - # plugins = [ pkgs.interception ] - # udevmonConfig = '' - # - JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE" - # DEVICE: - # EVENTS: - # EV_KEY: [KEY_CAPSLOCK, KEY_ESC] - # ''; + # enable = true; + # plugins = [ pkgs.interception ] + # udevmonConfig = '' + # - JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.caps2esc}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE" + # DEVICE: + # EVENTS: + # EV_KEY: [KEY_CAPSLOCK, KEY_ESC] + # ''; # }; services.fwupd.enable = true; # systemd.services.fprintd = { diff --git a/fw/hardware-configuration.nix b/fw/hardware-configuration.nix index 3d723db..b4ec7c2 100644 --- a/fw/hardware-configuration.nix +++ b/fw/hardware-configuration.nix @@ -1,34 +1,50 @@ # 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, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/fbc7b13a-334d-4049-bde3-7c7d4dd36bef"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/fbc7b13a-334d-4049-bde3-7c7d4dd36bef"; + fsType = "ext4"; + }; - boot.initrd.luks.devices."luks-76360bfd-a645-4066-bfbe-3c7436497b11".device = "/dev/disk/by-uuid/76360bfd-a645-4066-bfbe-3c7436497b11"; + boot.initrd.luks.devices."luks-76360bfd-a645-4066-bfbe-3c7436497b11".device = + "/dev/disk/by-uuid/76360bfd-a645-4066-bfbe-3c7436497b11"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2EDA-D947"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/05b9cfcd-b396-4165-86dd-deacea6ecb28"; } + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/2EDA-D947"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/05b9cfcd-b396-4165-86dd-deacea6ecb28"; } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/fw/home.nix b/fw/home.nix index 0f4ee8a..2be461e 100644 --- a/fw/home.nix +++ b/fw/home.nix @@ -1,4 +1,10 @@ -{ inputs, config, lib, pkgs, ... }: +{ + inputs, + config, + lib, + pkgs, + ... +}: { imports = [ ../modules/global.nix @@ -19,7 +25,7 @@ config.modules = { global = { wayland = true; - + extraPackages = with pkgs; [ wmenu cmatrix @@ -27,6 +33,7 @@ pfetch nicotine-plus mpc + ncmpcpp ]; }; diff --git a/modules/aerc.nix b/modules/aerc.nix index f799588..2ead033 100644 --- a/modules/aerc.nix +++ b/modules/aerc.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.aerc; in @@ -35,14 +40,18 @@ in "messages:folder=Drafts"."<Enter>" = ":recall<Enter>"; messages = { - /*** CUSTOM SECTION ***/ + /** + * CUSTOM SECTION ** + */ "n" = ":next<Enter>"; "e" = ":prev<Enter>"; N = ":next-folder<enter>"; E = ":prev-folder<enter>"; j = ":next-result<enter>"; J = ":prev-result<enter>"; - /*** ***/ + /** + * ** + */ g = ":select 0<Enter>"; G = ":select -1<Enter>"; @@ -147,4 +156,3 @@ in }; }; } - diff --git a/modules/email/default.nix b/modules/email/default.nix index bcbc21c..ebdd9b2 100644 --- a/modules/email/default.nix +++ b/modules/email/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.email; in @@ -17,7 +22,7 @@ in aerc = { enable = true; extraAccounts = { - default = "INBOX"; + default = "INBOX"; }; }; imap = { diff --git a/modules/firefox.nix b/modules/firefox.nix index 5d9f16f..004eb63 100644 --- a/modules/firefox.nix +++ b/modules/firefox.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.firefox; scheme = config.modules.scheme; @@ -58,7 +63,10 @@ in }; Preferences = { - "browser.contentblocking.category" = { Value = "strict"; Status = "locked"; }; + "browser.contentblocking.category" = { + Value = "strict"; + Status = "locked"; + }; "extensions.pocket.enabled" = lock-false; "extensions.screenshots.disabled" = lock-true; "browser.topsites.contile.enabled" = lock-false; diff --git a/modules/foot.nix b/modules/foot.nix index c124e07..68243a8 100644 --- a/modules/foot.nix +++ b/modules/foot.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.foot; scheme = config.modules.scheme; @@ -17,47 +22,47 @@ in }; settings = { main = { - font ="monospace:size=12"; - title="term"; - resize-by-cells="no"; - pad="0x0 center"; + font = "monospace:size=12"; + title = "term"; + resize-by-cells = "no"; + pad = "0x0 center"; }; desktop-notifications.command = "notify-send -a \${app-id} -i \${app-id} \${title} \${body}"; - url.label-letters="arstneio"; + url.label-letters = "arstneio"; cursor = { - style="block"; - blink="no"; - color="0f0f0f cacaca"; + style = "block"; + blink = "no"; + color = "0f0f0f cacaca"; }; colors = { # alpha=0.7; - foreground=fmt scheme.base05; - background=fmt scheme.base00; - regular0=fmt scheme.base01; - regular1=fmt scheme.base08; - regular2=fmt scheme.base0B; - regular3=fmt scheme.base0A; - regular4=fmt scheme.base0D; - regular5=fmt scheme.base0E; - regular6=fmt scheme.base0C; - regular7=fmt scheme.base06; - bright0=fmt scheme.base02; - bright1=fmt scheme.base12; - bright2=fmt scheme.base14; - bright3=fmt scheme.base13; - bright4=fmt scheme.base16; - bright5=fmt scheme.base17; - bright6=fmt scheme.base15; - bright7=fmt scheme.base07; - "16"=fmt scheme.base09; - "17"=fmt scheme.base0F; - "18"=fmt scheme.base01; - "19"=fmt scheme.base02; - "20"=fmt scheme.base04; - "21"=fmt scheme.base06; + foreground = fmt scheme.base05; + background = fmt scheme.base00; + regular0 = fmt scheme.base01; + regular1 = fmt scheme.base08; + regular2 = fmt scheme.base0B; + regular3 = fmt scheme.base0A; + regular4 = fmt scheme.base0D; + regular5 = fmt scheme.base0E; + regular6 = fmt scheme.base0C; + regular7 = fmt scheme.base06; + bright0 = fmt scheme.base02; + bright1 = fmt scheme.base12; + bright2 = fmt scheme.base14; + bright3 = fmt scheme.base13; + bright4 = fmt scheme.base16; + bright5 = fmt scheme.base17; + bright6 = fmt scheme.base15; + bright7 = fmt scheme.base07; + "16" = fmt scheme.base09; + "17" = fmt scheme.base0F; + "18" = fmt scheme.base01; + "19" = fmt scheme.base02; + "20" = fmt scheme.base04; + "21" = fmt scheme.base06; }; }; }; diff --git a/modules/fuzzel.nix b/modules/fuzzel.nix index 8101371..9058518 100644 --- a/modules/fuzzel.nix +++ b/modules/fuzzel.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.fuzzel; scheme = config.modules.scheme; diff --git a/modules/fzf.nix b/modules/fzf.nix index b407a22..f5a994d 100644 --- a/modules/fzf.nix +++ b/modules/fzf.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.fzf; scheme = config.modules.scheme; @@ -44,7 +49,7 @@ in ]; fileWidgetOptions = [ "--preview 'bat --style=numbers --theme base16 --line-range :500 {}'" -# "--preview 'head{}'" + # "--preview 'head{}'" ]; }; }; diff --git a/modules/git/default.nix b/modules/git/default.nix index 377d3d8..459ae1c 100644 --- a/modules/git/default.nix +++ b/modules/git/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.git; in @@ -30,7 +35,7 @@ in dark = true; }; }; -# extraConfig = {}; + # extraConfig = {}; # hooks = { # pre-commit = ; # }; @@ -54,7 +59,7 @@ in # "*.elf" ]; signing = { - signByDefault = true; + signByDefault = true; }; extraConfig = { init.defaultBranch = "main"; diff --git a/modules/global.nix b/modules/global.nix index e0d037e..463da2e 100644 --- a/modules/global.nix +++ b/modules/global.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, inputs, ...}: +{ + config, + lib, + pkgs, + inputs, + ... +}: let cfg = config.modules.global; berkeley-mono = pkgs.callPackage ../packages/berkeley-mono.nix { inherit pkgs; }; @@ -18,8 +24,11 @@ in extraPackages = mkOption { type = with lib.types; listOf package; description = "List of extra packages to install"; - example = [ pkgs.cowsay pkgs.lolcat ]; - default = []; + example = [ + pkgs.cowsay + pkgs.lolcat + ]; + default = [ ]; }; menu = mkOption { type = lib.types.submodule { @@ -44,7 +53,7 @@ in wrapWithNixGL = cfg.notNixOS; }; qutebrowser = { - wrapWithNixGL = cfg.notNixOS; + wrapWithNixGL = cfg.notNixOS; }; email.enable = true; aerc.enable = true; @@ -58,8 +67,8 @@ in }; nixGL = lib.mkIf cfg.notNixOS { - packages = inputs.nixgl.packages; - defaultWrapper = "mesa"; + packages = inputs.nixgl.packages; + defaultWrapper = "mesa"; }; programs = { @@ -78,7 +87,7 @@ in monospace = [ "NotoMono Nerd Font Mono" ]; sansSerif = [ "Noto Sans" ]; serif = [ "Noto Serif" ]; - emoji = [ "Noto Color Emoji"]; + emoji = [ "Noto Color Emoji" ]; }; }; @@ -122,30 +131,32 @@ in "$HOME/scripts" ]; - packages = with pkgs; [ - eza - fanwood - jq - ripgrep - elan - dmenu - berkeley-mono - binaryninja - tamzen - roboto - roboto-serif - cozette - inter - noto-fonts - noto-fonts-extra - noto-fonts-cjk-sans - noto-fonts-cjk-serif - noto-fonts-emoji - material-icons - ] ++ (builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts)) - ++ (lib.optional cfg.notNixOS nixgl.auto.nixGLDefault) - ++ (lib.optionals cfg.wayland + packages = + with pkgs; [ + eza + fanwood + jq + ripgrep + elan + dmenu + berkeley-mono + binaryninja + tamzen + roboto + roboto-serif + cozette + inter + noto-fonts + noto-fonts-extra + noto-fonts-cjk-sans + noto-fonts-cjk-serif + noto-fonts-emoji + material-icons + ] + ++ (builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts)) + ++ (lib.optional cfg.notNixOS nixgl.auto.nixGLDefault) + ++ (lib.optionals cfg.wayland [ wl-clipboard #... ]) diff --git a/modules/gpg/default.nix b/modules/gpg/default.nix index 31e39e5..4506d65 100644 --- a/modules/gpg/default.nix +++ b/modules/gpg/default.nix @@ -1,8 +1,18 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.gpg; - inherit (lib) mkEnableOption mkOption mkIf types; + inherit (lib) + mkEnableOption + mkOption + mkIf + types + ; in { options.modules.gpg = { @@ -16,7 +26,7 @@ in programs.gpg = { scdaemonSettings = { - disable-ccid = true; + disable-ccid = true; }; settings = { no-comments = true; @@ -51,7 +61,10 @@ in noAllowExternalCache = true; pinentryPackage = pkgs.pinentry-qt; - sshKeys = [ "36663E191B00E51513F90FA5CF2BCE8461C297CD" "97D70F96084527401BBA8AB714165B7413D13345" ]; + sshKeys = [ + "36663E191B00E51513F90FA5CF2BCE8461C297CD" + "97D70F96084527401BBA8AB714165B7413D13345" + ]; }; }; } diff --git a/modules/lazygit.nix b/modules/lazygit.nix index c4a1bde..d5196e0 100644 --- a/modules/lazygit.nix +++ b/modules/lazygit.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.lazygit; scheme = config.modules.scheme; @@ -36,13 +41,16 @@ in startInteractiveRebase = "u"; }; }; - gui= { + gui = { notARepository = "skip"; mouseEvents = false; showRandomTip = false; border = "single"; theme = { - activeBorderColor = [ scheme.base0D "bold" ]; + activeBorderColor = [ + scheme.base0D + "bold" + ]; inactiveBorderColor = [ scheme.base03 ]; searchingActiveBorderColor = [ scheme.base09 ]; optionsTextColor = [ scheme.base0D ]; diff --git a/modules/mako.nix b/modules/mako.nix index d67ebfa..9d6e652 100644 --- a/modules/mako.nix +++ b/modules/mako.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.mako; scheme = config.modules.scheme; @@ -13,7 +18,7 @@ in enable = true; backgroundColor = scheme.base00; textColor = scheme.base05; - borderColor = scheme.base0D; #"#a39ec4ff"; + borderColor = scheme.base0D; # "#a39ec4ff"; borderSize = 1; defaultTimeout = 20000; font = "monospace 10"; diff --git a/modules/mpd.nix b/modules/mpd.nix index 3c1d742..1be4804 100644 --- a/modules/mpd.nix +++ b/modules/mpd.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.mpd; scheme = config.modules.scheme; @@ -11,15 +16,15 @@ in config = lib.mkIf cfg.enable { services.mpd = { enable = true; - extraConfig = - '' - audio_output { - type "pipewire" - name "My PipeWire Output" - } + extraConfig = '' + audio_output { + type "pipewire" + name "My PipeWire Output" + } ''; musicDirectory = "~/music"; }; services.mpd-discord-rpc.enable = true; + services.mpdscribble.enable = true; }; } diff --git a/modules/mpv.nix b/modules/mpv.nix index ea5ed42..a89c19c 100644 --- a/modules/mpv.nix +++ b/modules/mpv.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.mpv; scheme = config.modules.scheme; diff --git a/modules/neovide.nix b/modules/neovide.nix index 83d67d1..e04c9d9 100644 --- a/modules/neovide.nix +++ b/modules/neovide.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.neovide; in @@ -16,9 +21,17 @@ in title-hidden = true; box-drawing.mode = "native"; font = { - normal = ["monospace"]; + normal = [ "monospace" ]; features = { - "monospace" = ["+ss01" "+ss07" "+ss11" "-calt" "+ss09" "+ss02" "+ss14"]; + "monospace" = [ + "+ss01" + "+ss07" + "+ss11" + "-calt" + "+ss09" + "+ss02" + "+ss14" + ]; }; size = 12.0; }; diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix index 125e426..a26123c 100644 --- a/modules/neovim/default.nix +++ b/modules/neovim/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ...}: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.neovim; scheme = config.modules.scheme; @@ -6,49 +11,52 @@ let # if we don't symlink, startuptime grows by an order of magnitude because of long runtimepath name = "tsparsers"; # paths = (pkgs.vimPlugins.nvim-treesitter.withAllGrammars).dependencies; - paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: with p; [ - tree-sitter-nix - tree-sitter-nu - tree-sitter-go - tree-sitter-rst - tree-sitter-lua - tree-sitter-css - tree-sitter-yaml - tree-sitter-toml - tree-sitter-scss - tree-sitter-json - tree-sitter-html - tree-sitter-fish - tree-sitter-bash - tree-sitter-query - tree-sitter-ocaml - tree-sitter-ocaml-interface - tree-sitter-latex - tree-sitter-python - tree-sitter-bibtex - tree-sitter-verilog - tree-sitter-comment - tree-sitter-dockerfile - tree-sitter-make - tree-sitter-cmake - tree-sitter-verilog - tree-sitter-scheme - tree-sitter-llvm - tree-sitter-html - tree-sitter-glsl - tree-sitter-devicetree - tree-sitter-cuda - tree-sitter-c - tree-sitter-cpp - tree-sitter-lua - tree-sitter-zig - tree-sitter-rust - tree-sitter-haskell - tree-sitter-toml - tree-sitter-markdown - tree-sitter-markdown-inline - tree-sitter-tablegen - ])).dependencies; + paths = + (pkgs.vimPlugins.nvim-treesitter.withPlugins ( + p: with p; [ + tree-sitter-nix + tree-sitter-nu + tree-sitter-go + tree-sitter-rst + tree-sitter-lua + tree-sitter-css + tree-sitter-yaml + tree-sitter-toml + tree-sitter-scss + tree-sitter-json + tree-sitter-html + tree-sitter-fish + tree-sitter-bash + tree-sitter-query + tree-sitter-ocaml + tree-sitter-ocaml-interface + tree-sitter-latex + tree-sitter-python + tree-sitter-bibtex + tree-sitter-verilog + tree-sitter-comment + tree-sitter-dockerfile + tree-sitter-make + tree-sitter-cmake + tree-sitter-verilog + tree-sitter-scheme + tree-sitter-llvm + tree-sitter-html + tree-sitter-glsl + tree-sitter-devicetree + tree-sitter-cuda + tree-sitter-c + tree-sitter-cpp + tree-sitter-lua + tree-sitter-zig + tree-sitter-rust + tree-sitter-haskell + tree-sitter-toml + tree-sitter-markdown + tree-sitter-markdown-inline + tree-sitter-tablegen + ] + )).dependencies; }; in { @@ -110,15 +118,15 @@ in plugin = nvim-highlight-colors; type = "lua"; config = - # lua - '' - require("nvim-highlight-colors").setup { - render = 'virtual', - virtual_symbol_position = 'eow', - virtual_symbol_prefix = " ", - virtual_symbol_suffix = "", - } - ''; + # lua + '' + require("nvim-highlight-colors").setup { + render = 'virtual', + virtual_symbol_position = 'eow', + virtual_symbol_prefix = " ", + virtual_symbol_suffix = "", + } + ''; } { @@ -126,16 +134,16 @@ in optional = true; type = "lua"; config = - # lua - '' - require("lz.n").load({ - "lean", - ft = "lean", - after = function() - require('lean').setup({ mappings = true }) - end, - }) - ''; + # lua + '' + require("lz.n").load({ + "lean", + ft = "lean", + after = function() + require('lean').setup({ mappings = true }) + end, + }) + ''; } tmux-nvim @@ -145,18 +153,18 @@ in plugin = telescope-nvim; optional = true; type = "lua"; - config = - # lua - '' - require("lz.n").load({ - "telescope.nvim", - cmd = "Telescope", - after = function() - require('telescope').setup({}) - require('telescope').load_extension('fzf') - end, - }) - ''; + config = + # lua + '' + require("lz.n").load({ + "telescope.nvim", + cmd = "Telescope", + after = function() + require('telescope').setup({}) + require('telescope').load_extension('fzf') + end, + }) + ''; } telescope-fzf-native-nvim @@ -168,59 +176,58 @@ in plugin = mini-pairs; type = "lua"; config = - # lua - '' - require("mini.pairs").setup() - ''; + # lua + '' + require("mini.pairs").setup() + ''; } { plugin = mini-surround; type = "lua"; config = - # lua - '' - require("mini.surround").setup({ silent = true }) - ''; + # lua + '' + require("mini.surround").setup({ silent = true }) + ''; } { plugin = mini-trailspace; type = "lua"; config = - # lua - '' - require("mini.trailspace").setup() - ''; + # lua + '' + require("mini.trailspace").setup() + ''; } { plugin = mini-splitjoin; type = "lua"; - config = - # lua - '' - require("mini.splitjoin").setup({ - mappings = { toggle = "", split = "", join = "" }, - }) - ''; + config = + # lua + '' + require("mini.splitjoin").setup({ + mappings = { toggle = "", split = "", join = "" }, + }) + ''; } { plugin = treesj; type = "lua"; config = - # lua - '' - require("treesj").setup({ use_default_keymaps = false, notify = false}) - --require("lz.n").load({ - -- "treesj", - -- cmd = {'TSJSplit', 'TSJToggle', 'TSJJoin'}, - -- after = function() - -- require("treesj").setup(use_default_keymaps = false) - -- end, - -- }) - ''; + # lua + '' + require("treesj").setup({ use_default_keymaps = false, notify = false}) + --require("lz.n").load({ + -- "treesj", + -- cmd = {'TSJSplit', 'TSJToggle', 'TSJJoin'}, + -- after = function() + -- require("treesj").setup(use_default_keymaps = false) + -- end, + -- }) + ''; } ]; - extraLuaConfig = - '' + extraLuaConfig = '' ${builtins.readFile ./nvim/init.lua} vim.cmd[[colorscheme ${scheme.name}]] vim.opt.runtimepath:prepend('${tsparsers}') diff --git a/modules/pass/default.nix b/modules/pass/default.nix index a92c331..2e9ab15 100644 --- a/modules/pass/default.nix +++ b/modules/pass/default.nix @@ -1,8 +1,18 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.pass; - inherit (lib) mkEnableOption mkOption mkIf types; + inherit (lib) + mkEnableOption + mkOption + mkIf + types + ; in { options.modules.pass = { @@ -26,29 +36,31 @@ in }; config = mkIf cfg.enable { - home.packages = with pkgs; [(writeShellScriptBin "passmenu" '' - shopt -s nullglob globstar + home.packages = with pkgs; [ + (writeShellScriptBin "passmenu" '' + shopt -s nullglob globstar - if [[ -n $WAYLAND_DISPLAY ]]; then - menu="${cfg.wmenu}" - elif [[ -n $DISPLAY ]]; then - menu="${cfg.xmenu}" # fallback to dmenu if running under x11 - else - echo "Error: No Wayland or X11 display detected" >&2 - exit 1 - fi + if [[ -n $WAYLAND_DISPLAY ]]; then + menu="${cfg.wmenu}" + elif [[ -n $DISPLAY ]]; then + menu="${cfg.xmenu}" # fallback to dmenu if running under x11 + else + echo "Error: No Wayland or X11 display detected" >&2 + exit 1 + fi - prefix=''${PASSWORD_STORE_DIR-~/.password-store} - password_files=( "$prefix"/**/*.gpg ) - password_files=( "''${password_files[@]#"$prefix"/}" ) - password_files=( "''${password_files[@]%.gpg}" ) + prefix=''${PASSWORD_STORE_DIR-~/.password-store} + password_files=( "$prefix"/**/*.gpg ) + password_files=( "''${password_files[@]#"$prefix"/}" ) + password_files=( "''${password_files[@]%.gpg}" ) - password=$(printf '%s\n' "''${password_files[@]}" | $menu "$@") + password=$(printf '%s\n' "''${password_files[@]}" | $menu "$@") - [[ -n $password ]] || exit + [[ -n $password ]] || exit - pass show -c "$password" 2>/dev/null - '')]; + pass show -c "$password" 2>/dev/null + '') + ]; programs.password-store = { package = pkgs.pass.override { dmenuSupport = false; @@ -56,9 +68,9 @@ in enable = true; settings = { PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; - PASSWORD_STORE_CHARACTER_SET=''[:alnum:]*!@^&_\-=[]|;~,./?''; - PASSWORD_STORE_CLIP_TIME="25"; - PASSWORD_STORE_KEY=cfg.key; + PASSWORD_STORE_CHARACTER_SET = ''[:alnum:]*!@^&_\-=[]|;~,./?''; + PASSWORD_STORE_CLIP_TIME = "25"; + PASSWORD_STORE_KEY = cfg.key; PASSWORD_STORE_ENABLE_EXTENSIONS = if cfg.enableExtensions then "1" else "0"; }; }; diff --git a/modules/qutebrowser/default.nix b/modules/qutebrowser/default.nix index 68c438d..4bc591b 100644 --- a/modules/qutebrowser/default.nix +++ b/modules/qutebrowser/default.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: let cfg = config.modules.qutebrowser; scheme = config.modules.scheme; @@ -40,7 +46,7 @@ in c.colors.downloads.start.fg = "${fg}" c.colors.downloads.stop.bg = "${bg2}" c.colors.downloads.stop.fg = "${fg}" - + c.colors.hints.bg = "${scheme.base0D}" c.colors.hints.fg = "${bg}" c.colors.hints.match.fg = "${bg2}" diff --git a/modules/rmpc.nix b/modules/rmpc.nix index f692c03..c3e9303 100644 --- a/modules/rmpc.nix +++ b/modules/rmpc.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.rmpc; in @@ -6,7 +11,7 @@ in options.modules.rmpc.enable = lib.mkEnableOption "rmpc"; config = lib.mkIf cfg.enable { - programs.rmpc = { + programs.rmpc = { enable = true; }; }; diff --git a/modules/scheme/default.nix b/modules/scheme/default.nix index 3367939..466a640 100644 --- a/modules/scheme/default.nix +++ b/modules/scheme/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.scheme; hexColorRegex = ''#([0-9a-fA-F]{3}){1,2}''; diff --git a/modules/services/default.nix b/modules/services/default.nix index b95a3e6..a7b523d 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -1,4 +1,11 @@ -{ self, config, lib, pkgs, nixgl, ... }: +{ + self, + config, + lib, + pkgs, + nixgl, + ... +}: let cfg = config.modules.services; @@ -26,45 +33,46 @@ in description = "Whether to enable the user service manager module."; }; coreServices = mkOption { - type = types.listOf types.str; + type = types.listOf types.str; description = "List of services to start first"; example = [ "dbus" ]; - default = []; + default = [ ]; }; services = mkOption { description = "List of user services to run on login"; - type = types.attrsOf (types.submodule { - options = { - run = mkOption { - type = types.str; - description = "The 'run' script for the service"; - example = - ''#!/bin/sh + type = types.attrsOf ( + types.submodule { + options = { + run = mkOption { + type = types.str; + description = "The 'run' script for the service"; + example = '' + #!/bin/sh - exec chpst -e "$TURNSTILE_ENV_DIR" foo - ''; - }; - log = mkOption { - type = types.nullOr types.str; - description = "The log/run script for the service. A pipe is opened from the output of the 'run' process to this script"; - example = - ''#!/bin/sh + exec chpst -e "$TURNSTILE_ENV_DIR" foo + ''; + }; + log = mkOption { + type = types.nullOr types.str; + description = "The log/run script for the service. A pipe is opened from the output of the 'run' process to this script"; + example = '' + #!/bin/sh - exec vlogger -t dbus-$(id -u) -p daemon - ''; - default = ""; + exec vlogger -t dbus-$(id -u) -p daemon + ''; + default = ""; + }; }; - }; - }); + } + ); }; }; - config = lib.mkIf cfg.enable { - xdg.configFile = (lib.concatMapAttrs mkService cfg.services) - // { - "service/turnstile-ready/conf" = { - text = ''core_services="${lib.strings.concatStringsSep " " cfg.coreServices}"''; - }; + config = lib.mkIf cfg.enable { + xdg.configFile = (lib.concatMapAttrs mkService cfg.services) // { + "service/turnstile-ready/conf" = { + text = ''core_services="${lib.strings.concatStringsSep " " cfg.coreServices}"''; }; + }; }; } diff --git a/modules/sway/default.nix b/modules/sway/default.nix index ba4ba36..1031fd9 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -1,4 +1,11 @@ -{ self, config, lib, pkgs, nixgl, ... }: +{ + self, + config, + lib, + pkgs, + nixgl, + ... +}: let cfg = config.modules.sway; scheme = config.modules.scheme; @@ -8,23 +15,25 @@ in enable = lib.mkEnableOption "sway"; wrapWithNixGL = lib.mkEnableOption "NixGL wrapper."; terminal = lib.mkOption { - type = lib.types.str; - description = "Terminal command."; + type = lib.types.str; + description = "Terminal command."; }; startup = lib.mkOption { - type = lib.types.listOf (lib.types.submodule { - options = { - command = lib.mkOption { - type = lib.types.string; - description = "Command to be executed on startup."; - }; - always = lib.mkOption { - type = lib.types.bool; - default = false; - description = "Whether to run command on each restart"; + type = lib.types.listOf ( + lib.types.submodule { + options = { + command = lib.mkOption { + type = lib.types.string; + description = "Command to be executed on startup."; + }; + always = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Whether to run command on each restart"; + }; }; - }; - }); + } + ); default = [ ]; description = "List of commands that sway will run on startup. This should be used only for sway specific applications"; }; @@ -43,7 +52,7 @@ in enable = true; systemd.enable = true; package = if cfg.wrapWithNixGL then (config.lib.nixGL.wrap pkgs.sway) else pkgs.sway; -# package = null; + # package = null; config = rec { modifier = "Mod4"; @@ -53,16 +62,19 @@ in right = "i"; fonts = { - names = [ "sans-serif" "monospace" ]; + names = [ + "sans-serif" + "monospace" + ]; # style = "Bold"; size = 10.0; }; terminal = "${cfg.terminal}"; - # menu = ''wmenu-run -n 4c4c4c -N 0d0d0d -s 8aac8b -S 0d0d0d -l 10 -f "ComicShannsMono Nerd Font Mono 10"''; + # menu = ''wmenu-run -n 4c4c4c -N 0d0d0d -s 8aac8b -S 0d0d0d -l 10 -f "ComicShannsMono Nerd Font Mono 10"''; # menu = "tofi-run | xargs swaymsg exec"; menu = "fuzzel"; - + defaultWorkspace = "workspace number 1"; input = { @@ -105,7 +117,10 @@ in workspaceAutoBackAndForth = false; workspaceOutputAssign = [ - { output = "HDMI-A-1"; workspace = "0"; } + { + output = "HDMI-A-1"; + workspace = "0"; + } ]; colors = { @@ -113,7 +128,7 @@ in focused = { border = scheme.base0D; # the border around the titlebar background = scheme.base0D; - childBorder = scheme.base0D; + childBorder = scheme.base0D; text = scheme.base00; # TODO: light/dark indicator = scheme.base09; }; @@ -134,47 +149,50 @@ in }; bars = [ - # { - # command = "waybar"; - # } - { - statusCommand = "i3status"; - # mode = "hide"; - # hiddenState = "hide"; - position = "top"; - fonts = { - names = [ "sans-serif" "monospace" ]; - size = "10.0"; - }; - extraConfig = '' - modifier ${modifier} - separator_symbol " " - ''; - colors = { - background = scheme.base10; # "#0d0d0d"; - statusline = scheme.base05; - focusedWorkspace = { - border = scheme.base10; # "#0d0d0d"; - background = scheme.base10; # "#0d0d0d"; - text = scheme.base05; + # { + # command = "waybar"; + # } + { + statusCommand = "i3status"; + # mode = "hide"; + # hiddenState = "hide"; + position = "top"; + fonts = { + names = [ + "sans-serif" + "monospace" + ]; + size = "10.0"; }; - activeWorkspace = { - border = scheme.base10; # "#0d0d0d"; + extraConfig = '' + modifier ${modifier} + separator_symbol " " + ''; + colors = { background = scheme.base10; # "#0d0d0d"; - text = scheme.base01; - }; - inactiveWorkspace = { - border = scheme.base10; # "#0d0d0d"; - background = scheme.base00; # "#0d0d0d"; - text = scheme.base01; - }; - bindingMode = { - border = scheme.base00; # "#0d0d0d"; - background = scheme.base00; # "#0d0d0d"; - text = scheme.base0E; + statusline = scheme.base05; + focusedWorkspace = { + border = scheme.base10; # "#0d0d0d"; + background = scheme.base10; # "#0d0d0d"; + text = scheme.base05; + }; + activeWorkspace = { + border = scheme.base10; # "#0d0d0d"; + background = scheme.base10; # "#0d0d0d"; + text = scheme.base01; + }; + inactiveWorkspace = { + border = scheme.base10; # "#0d0d0d"; + background = scheme.base00; # "#0d0d0d"; + text = scheme.base01; + }; + bindingMode = { + border = scheme.base00; # "#0d0d0d"; + background = scheme.base00; # "#0d0d0d"; + text = scheme.base0E; + }; }; - }; - } + } ]; focus = { @@ -182,7 +200,6 @@ in wrapping = "force"; }; - window = { border = 2; # hideEdgeBorders = "--i3 smart"; @@ -223,7 +240,8 @@ in "${modifier}+Shift+c" = "kill"; "${modifier}+Shift+r" = "reload"; - "${modifier}+Shift+q" = "exec swaynag -t warning -m 'do you really want to exit?' -B 'yes, exit' 'swaymsg exit'"; + "${modifier}+Shift+q" = + "exec swaynag -t warning -m 'do you really want to exit?' -B 'yes, exit' 'swaymsg exit'"; "${modifier}+${left}" = "focus left"; "${modifier}+${down}" = "focus down"; @@ -278,7 +296,8 @@ in # this can probably be simplified but im not a sed wizard "--locked XF86AudioRaiseVolume" = "exec pamixer -ui 2 && pamixer --get-volume > $WOBSOCK"; "--locked XF86AudioLowerVolume" = "exec pamixer -ud 2 && pamixer --get-volume > $WOBSOCK"; - "--locked XF86AudioMute" = ''exec pamixer --toggle-mute && ( [ "$(pamixer --get-mute)" = "true" ] && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK''; + "--locked XF86AudioMute" = + ''exec pamixer --toggle-mute && ( [ "$(pamixer --get-mute)" = "true" ] && echo 0 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK''; "--locked XF86MonBrightnessUp" = "exec light -A 5 && light -G | cut -d'.' -f1 > $WOBSOCK"; "--locked XF86MonBrightnessDown" = "exec light -U 5 && light -G | cut -d'.' -f1 > $WOBSOCK"; }; diff --git a/modules/tmux/default.nix b/modules/tmux/default.nix index b913add..fee49fa 100644 --- a/modules/tmux/default.nix +++ b/modules/tmux/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.tmux; scheme = config.modules.scheme; @@ -54,13 +59,12 @@ in # { # plugin = vim.tmux-navigatior; # extraConfig = '' - # set -g + # set -g # ''; # } ]; - extraConfig = - '' + extraConfig = '' set -g default-terminal "screen-256color" # set -g default-command zsh # this fixes colors for some reason set -g renumber-windows on diff --git a/modules/tofi.nix b/modules/tofi.nix index 7b36cb1..1b66112 100644 --- a/modules/tofi.nix +++ b/modules/tofi.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.tofi; scheme = config.modules.scheme; @@ -31,16 +36,16 @@ in "text-color" = scheme.base02; "placeholder-color" = scheme.base00; - "selection-background" = scheme.base00; #151515 + "selection-background" = scheme.base00; # 151515 "selection-color" = scheme.base05; - "selection-background-padding"= "0, -1"; + "selection-background-padding" = "0, -1"; - "text-cursor-style"="bar"; - "text-cursor-color"=scheme.base05; + "text-cursor-style" = "bar"; + "text-cursor-color" = scheme.base05; - "prompt-text"="\"\""; + "prompt-text" = "\"\""; - "background-color"=scheme.base00; + "background-color" = scheme.base00; num-results = 5; "outline-width" = 0; diff --git a/modules/wob.nix b/modules/wob.nix index fc6c062..3a79ce2 100644 --- a/modules/wob.nix +++ b/modules/wob.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.wob; scheme = config.modules.scheme; diff --git a/modules/zathura.nix b/modules/zathura.nix index aa2cfad..c5327e8 100644 --- a/modules/zathura.nix +++ b/modules/zathura.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.zathura; scheme = config.modules.scheme; diff --git a/modules/zoxide.nix b/modules/zoxide.nix index f86a725..dcc4600 100644 --- a/modules/zoxide.nix +++ b/modules/zoxide.nix @@ -1,8 +1,18 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.zoxide; - inherit (lib) mkEnableOption mkOption mkIf types; + inherit (lib) + mkEnableOption + mkOption + mkIf + types + ; in { options.modules.zoxide = { diff --git a/modules/zsh/default.nix b/modules/zsh/default.nix index 52278cf..e0659ba 100644 --- a/modules/zsh/default.nix +++ b/modules/zsh/default.nix @@ -1,8 +1,18 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.modules.zsh; - inherit (lib) mkEnableOption mkOption mkIf types; + inherit (lib) + mkEnableOption + mkOption + mkIf + types + ; in { options.modules.zsh = { @@ -48,68 +58,68 @@ in }; autosuggestion.enable = true; initContent = '' - source ~/.oh-my-zsh/themes/${cfg.theme}.zsh-theme - setopt nobeep - export KEYTIMEOUT=1 - export NO_COLOR=1 -# export KEYTIMEOUT=20 # note, set higher if you want to use surround mode or any chording + source ~/.oh-my-zsh/themes/${cfg.theme}.zsh-theme + setopt nobeep + export KEYTIMEOUT=1 + export NO_COLOR=1 + export UV_PYTHON_DOWNLOADS=never + # export KEYTIMEOUT=20 # note, set higher if you want to use surround mode or any chording - bindkey -M vicmd m vi-backward-char - bindkey -M vicmd n vi-down-line-or-history - bindkey -M vicmd e vi-up-line-or-history - bindkey -M vicmd i vi-forward-char + bindkey -M vicmd m vi-backward-char + bindkey -M vicmd n vi-down-line-or-history + bindkey -M vicmd e vi-up-line-or-history + bindkey -M vicmd i vi-forward-char - bindkey -M vicmd N vi-join + bindkey -M vicmd N vi-join - bindkey -M vicmd h vi-set-mark - bindkey -M vicmd j vi-repeat-search - bindkey -M vicmd k vi-forward-word-end - bindkey -M vicmd l vi-insert + bindkey -M vicmd h vi-set-mark + bindkey -M vicmd j vi-repeat-search + bindkey -M vicmd k vi-forward-word-end + bindkey -M vicmd l vi-insert - bindkey -M vicmd J vi-rev-repeat-search + bindkey -M vicmd J vi-rev-repeat-search - # vim style backspace (im a young soul) - bindkey -v '^?' backward-delete-char + # vim style backspace (im a young soul) + bindkey -v '^?' backward-delete-char - bindkey '^F' fzf-cd-widget - bindkey -M vicmd / fzf-history-widget -# bindkey -M vicmd " f" fzf-cd-widget -# bindkey -M vicmd . fzf - if [[ -n "$TMUX" ]]; then - # TODO: fix continuum so i dont need this hack - export TERM=screen-256color - fi + bindkey '^F' fzf-cd-widget + bindkey -M vicmd / fzf-history-widget + # bindkey -M vicmd " f" fzf-cd-widget + # bindkey -M vicmd . fzf + if [[ -n "$TMUX" ]]; then + # TODO: fix continuum so i dont need this hack + export TERM=screen-256color + fi - export PATH=$HOME:/.local/riscv/bin:$PATH:$HOME/.local/bin + export PATH=$HOME:/.local/riscv/bin:$PATH:$HOME/.local/bin - function zle-keymap-select() { - case $KEYMAP in - vicmd) echo -ne '\e[1 q';; # block - viins) echo -ne '\e[5 q';; # beam - main) echo -ne '\e[5 q';; # beam - esac - } - zle -N zle-keymap-select - zle-line-init() { - zle -K viins - echo -ne '\e[5 q' # beam - } - zle -N zle-line-init - echo -ne '\e[5 q' - precmd() { - print -Pn "\e]0;$(dirs -p | head -1)\e\\" - print -Pn "\e]133;A\e\\" - if ! builtin zle; then - print -n "\e]133;D\e\\" - fi - echo -ne '\e[5 q' - } - function preexec { - print -Pn "\e]0;''${(q)1}\e\\" - print -n "\e]133;C\e\\" - } + function zle-keymap-select() { + case $KEYMAP in + vicmd) echo -ne '\e[1 q';; # block + viins) echo -ne '\e[5 q';; # beam + main) echo -ne '\e[5 q';; # beam + esac + } + zle -N zle-keymap-select + zle-line-init() { + zle -K viins + echo -ne '\e[5 q' # beam + } + zle -N zle-line-init + echo -ne '\e[5 q' + precmd() { + print -Pn "\e]0;$(dirs -p | head -1)\e\\" + print -Pn "\e]133;A\e\\" + if ! builtin zle; then + print -n "\e]133;D\e\\" + fi + echo -ne '\e[5 q' + } + function preexec { + print -Pn "\e]0;''${(q)1}\e\\" + print -n "\e]133;C\e\\" + } ''; }; }; } - diff --git a/nixos/bluetooth.nix b/nixos/bluetooth.nix index ebe6b88..f9d6478 100644 --- a/nixos/bluetooth.nix +++ b/nixos/bluetooth.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.nixos.bluetooth; inherit (lib) types mkOption; diff --git a/nixos/default.nix b/nixos/default.nix index 7cde2e1..7fe9e5a 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,6 +1,12 @@ -{ config, lib, pkgs, inputs, ... }: -let - cfg = config.nixos; +{ + config, + lib, + pkgs, + inputs, + ... +}: +let + cfg = config.nixos; in { imports = [ @@ -11,7 +17,7 @@ in ]; options.nixos = with lib.options; { - hostname = mkOption { + hostname = mkOption { type = lib.types.str; description = "Hostname for the system"; default = "nixos"; @@ -46,7 +52,10 @@ in # nixos = { # }; nix = { - settings.experimental-features = [ "nix-command" "flakes" ]; + settings.experimental-features = [ + "nix-command" + "flakes" + ]; }; # time.timeZone = lib.mkDefault cfg.timezone; @@ -55,11 +64,18 @@ in nixpkgs.config.allowUnfree = true; boot = { - consoleLogLevel=0; + consoleLogLevel = 0; initrd.verbose = false; initrd.systemd.enable = true; # required for early stuff kernelPackages = pkgs.linuxPackages_latest; - kernelParams = ["quiet" "splash" "rd.systemd.show_status=false" "rd.udev.log_level=3" "udev.log_priority=3" "boot.shell_on_fail"]; + kernelParams = [ + "quiet" + "splash" + "rd.systemd.show_status=false" + "rd.udev.log_level=3" + "udev.log_priority=3" + "boot.shell_on_fail" + ]; loader = { timeout = 0; systemd-boot = { @@ -90,8 +106,8 @@ in "networkmanager" "gamemode" ]; - # ++ (lib.optional cfg.wifi "networkmanager") - # ++ (lib.optional cfg.gaming "gamemode"); + # ++ (lib.optional cfg.wifi "networkmanager") + # ++ (lib.optional cfg.gaming "gamemode"); packages = with pkgs; [ unzip tree @@ -100,20 +116,22 @@ in shell = cfg.shell; }; - environment.systemPackages = with pkgs; [ - neovim - wl-clipboard - wmenu - gnupg - pinentry-qt - btop - man-pages - man-pages-posix - cage - zsh - discord-ptb - ] ++ (lib.optional cfg.wifi networkmanagerapplet); # TODO - + environment.systemPackages = + with pkgs; + [ + neovim + wl-clipboard + wmenu + gnupg + pinentry-qt + btop + man-pages + man-pages-posix + cage + zsh + discord-ptb + ] + ++ (lib.optional cfg.wifi networkmanagerapplet); # TODO services.greetd = { enable = false; @@ -123,7 +141,7 @@ in user = "${cfg.username}"; }; default_session = { - command = "${pkgs.greetd.greetd}/bin/agreety --cmd 'sway --unsupported-gpu'"; + command = "${pkgs.greetd.greetd}/bin/agreety --cmd 'sway --unsupported-gpu'"; }; }; }; @@ -155,28 +173,30 @@ in rtkit.enable = true; doas = { enable = true; - extraRules = [{ - users = ["${cfg.username}"]; - keepEnv = true; - persist = true; - }]; + extraRules = [ + { + users = [ "${cfg.username}" ]; + keepEnv = true; + persist = true; + } + ]; }; }; - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + services.xserver.xkb.layout = "us"; services.xserver.xkb.variant = "colemak_dh,"; @@ -248,6 +268,12 @@ in }; services.printing.enable = true; - services.printing.drivers = [ pkgs.gutenprint pkgs.brlaser pkgs.brgenml1lpr pkgs.brgenml1cupswrapper ]; + services.printing.drivers = [ + pkgs.gutenprint + pkgs.brlaser + pkgs.brgenml1lpr + pkgs.brgenml1cupswrapper + ]; }; + } diff --git a/nixos/keyd.nix b/nixos/keyd.nix index 8a17590..6ca7563 100644 --- a/nixos/keyd.nix +++ b/nixos/keyd.nix @@ -1,4 +1,10 @@ -{ config, lib, inputs, pkgs, ...}: +{ + config, + lib, + inputs, + pkgs, + ... +}: let cfg = config.nixos.keyd; in @@ -74,8 +80,7 @@ in space = "_"; }; }; - extraConfig = '' - ''; + extraConfig = ''''; }; }; }; diff --git a/nixos/osu.nix b/nixos/osu.nix index 3bfb11b..e791ebf 100644 --- a/nixos/osu.nix +++ b/nixos/osu.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: { options.nixos.osu = { enable = lib.mkEnableOption "osu!"; diff --git a/nixos/yubikey.nix b/nixos/yubikey.nix index 868913a..ce3d5d3 100644 --- a/nixos/yubikey.nix +++ b/nixos/yubikey.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.nixos.yubikey; inherit (lib) types mkOption; @@ -15,10 +20,10 @@ in config = lib.mkIf cfg.enable { environment.systemPackages = builtins.attrValues { inherit (pkgs) - yubioath-flutter - yubikey-manager - pam_u2f - ; + yubioath-flutter + yubikey-manager + pam_u2f + ; }; programs.yubikey-touch-detector = { @@ -37,10 +42,12 @@ in # interactive = true; interactive = false; cue = true; - authfile = pkgs.writeText "u2f-mappings" (lib.concatStrings [ - config.nixos.username - ":GB+R91Ur898D/fEgih7f/tsSDOaDw1QcEOSGzHs4fOUo5uCaliIiEK4fFGDClybL/8Qa7tGAN+mo0tU7PVmzfA==,GUPJuYykJoqBw7atGbIK/QcIATgJ3VZQKd1BrjMZ9g/f3nSejOv69LM5UCEoXAwuZHyJitVr1qYd1jLP2uckoQ==,es256,+presence" - ]); + authfile = pkgs.writeText "u2f-mappings" ( + lib.concatStrings [ + config.nixos.username + ":GB+R91Ur898D/fEgih7f/tsSDOaDw1QcEOSGzHs4fOUo5uCaliIiEK4fFGDClybL/8Qa7tGAN+mo0tU7PVmzfA==,GUPJuYykJoqBw7atGbIK/QcIATgJ3VZQKd1BrjMZ9g/f3nSejOv69LM5UCEoXAwuZHyJitVr1qYd1jLP2uckoQ==,es256,+presence" + ] + ); }; }; services = { diff --git a/packages/berkeley-mono.nix b/packages/berkeley-mono.nix index 291b80f..3cd7fa3 100644 --- a/packages/berkeley-mono.nix +++ b/packages/berkeley-mono.nix @@ -16,7 +16,7 @@ pkgs.stdenv.mkDerivation { installPhase = '' runHook preInstall - + install -Dm644 BerkeleyMonoPatchedNerdFont-Regular.ttf BerkeleyMonoPatchedNerdFontPropo-Regular.ttf -t $out/share/fonts/truetype runHook postInstall diff --git a/packages/binaryninja.nix b/packages/binaryninja.nix index aaf2401..fd17f0e 100644 --- a/packages/binaryninja.nix +++ b/packages/binaryninja.nix @@ -2,24 +2,30 @@ pkgs.buildFHSEnv { name = "binaryninja"; - targetPkgs = pkgs: with pkgs; [ - dbus - fontconfig - freetype - libGL - libxml2 - libxkbcommon - (python312.withPackages(ps: with ps; [ pypresence z3-solver ])) - xorg.libX11 - xorg.libxcb - xorg.xcbutilimage - xorg.xcbutilkeysyms - xorg.xcbutilrenderutil - xorg.xcbutilwm - wayland - zlib - gdb - ]; + targetPkgs = + pkgs: with pkgs; [ + dbus + fontconfig + freetype + libGL + libxml2 + libxkbcommon + (python312.withPackages ( + ps: with ps; [ + pypresence + z3-solver + ] + )) + xorg.libX11 + xorg.libxcb + xorg.xcbutilimage + xorg.xcbutilkeysyms + xorg.xcbutilrenderutil + xorg.xcbutilwm + wayland + zlib + gdb + ]; runScript = pkgs.writeScript "binaryninja.sh" '' set -e exec "~/.local/opt/binaryninja/binaryninja" # ! change this path if your installation is located somewhere else. diff --git a/void/home.nix b/void/home.nix index 42a959d..481d431 100644 --- a/void/home.nix +++ b/void/home.nix @@ -1,4 +1,10 @@ -{ inputs, config, lib, pkgs, ... }: +{ + inputs, + config, + lib, + pkgs, + ... +}: { imports = [ ../modules/global.nix @@ -67,10 +73,9 @@ mako.enable = true; neovide.enable = true; - services = { enable = true; - coreServices = ["dbus"]; + coreServices = [ "dbus" ]; services = { "pipewire" = { run = "${builtins.readFile ./services/pipewire/run}"; |