diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7b187da --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +check: + alejandra --check ./**/*.nix + +format: + alejandra ./**/*.nix diff --git a/flake.nix b/flake.nix index 607ffa3..f79881a 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ utils.url = "github:numtide/flake-utils"; rust-overlay.url = "github:oxalica/rust-overlay"; - nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; + nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; nixos-wsl = { url = "github:nix-community/NixOS-WSL"; @@ -16,10 +16,10 @@ nixpkgs.follows = "nixpkgs"; }; }; - vscode-server = { - url = "github:nix-community/nixos-vscode-server"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + vscode-server = { + url = "github:nix-community/nixos-vscode-server"; + inputs.nixpkgs.follows = "nixpkgs"; + }; darwin = { url = "github:lnl7/nix-darwin/master"; @@ -34,20 +34,32 @@ }; }; - outputs = { self, nixpkgs, unstable, nur, utils, rust-overlay, nix-vscode-extensions, nixos-wsl, vscode-server, darwin, home-manager, ... }@inputs: { - + outputs = { + self, + nixpkgs, + unstable, + nur, + utils, + rust-overlay, + nix-vscode-extensions, + nixos-wsl, + vscode-server, + darwin, + home-manager, + ... + } @ inputs: { # This repo's overlay plus any other overlays you use # If you want to use packages from flakes that are not nixpkgs (such as NUR), add their overlays here.\ overlays = { default = import ./overlays inputs; pkg-sets = ( final: prev: { - unstable = import inputs.unstable { system = final.system; }; - trunk = import inputs.trunk { system = final.system; }; + unstable = import inputs.unstable {system = final.system;}; + trunk = import inputs.trunk {system = final.system;}; } ); rust-overlay = rust-overlay.overlays.default; - vscode-extensions = nix-vscode-extensions.overlays.default; + vscode-extensions = nix-vscode-extensions.overlays.default; }; overlaysModule = { @@ -55,7 +67,6 @@ }; nixosConfigurations = { - loft = nixpkgs.lib.nixosSystem { system = utils.lib.system.x86_64-linux; modules = [ @@ -66,7 +77,7 @@ ./machines/loft/configuration.nix ]; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; }; kitchen = nixpkgs.lib.nixosSystem { @@ -79,7 +90,7 @@ ./machines/kitchen/configuration.nix ]; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; }; # WSL environment @@ -88,21 +99,20 @@ modules = [ self.overlaysModule home-manager.nixosModules.home-manager - vscode-server.nixosModules.default + vscode-server.nixosModules.default ./modules/containers.nix ./modules/nix.nix ./machines/work/configuration.nix ]; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; }; - }; darwinConfigurations = { mac = darwin.lib.darwinSystem { system = "aarch64-darwin"; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ self.overlaysModule home-manager.darwinModules.home-manager @@ -123,14 +133,17 @@ homeDirectory = "/home/michael"; username = "michael"; stateVersion = "21.05"; - configuration = { config, pkgs, ... }: - { - programs.home-manager.enable = true; + configuration = { + config, + pkgs, + ... + }: { + programs.home-manager.enable = true; - imports = [ - ./user/environments/nixos/home.nix - ]; - }; + imports = [ + ./user/environments/nixos/home.nix + ]; + }; }; wsl = inputs.home-manager.lib.homeManagerConfiguration { @@ -138,14 +151,17 @@ homeDirectory = "/home/michael"; username = "michael"; stateVersion = "21.05"; - configuration = { config, pkgs, ... }: - { - programs.home-manager.enable = true; + configuration = { + config, + pkgs, + ... + }: { + programs.home-manager.enable = true; - imports = [ - ./user/environments/wsl/home.nix - ]; - }; + imports = [ + ./user/environments/wsl/home.nix + ]; + }; }; mac = inputs.home-manager.lib.homeManagerConfiguration { @@ -153,17 +169,19 @@ homeDirectory = "/Users/michael"; username = "michael"; stateVersion = "22.05"; - configuration = { config, pkgs, ... }: - { - programs.home-manager.enable = true; + configuration = { + config, + pkgs, + ... + }: { + programs.home-manager.enable = true; - imports = [ - ./user/environments/mac/home.nix - ]; - }; + imports = [ + ./user/environments/mac/home.nix + ]; + }; }; }; - }; # // utils.lib.eachSystem [ "aarch64-linux" "x86_64-darwin" "x86_64-linux" ] (system: { # nixpkgs = import nixpkgs { diff --git a/machines/kitchen/configuration.nix b/machines/kitchen/configuration.nix index 3d695fa..e11e616 100644 --- a/machines/kitchen/configuration.nix +++ b/machines/kitchen/configuration.nix @@ -1,76 +1,76 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + config, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; - networking.hostName = "kitchen-nixos"; # Define your hostname. + networking.hostName = "kitchen-nixos"; # Define your hostname. - # The global useDHCP flag is deprecated, therefore explicitly set to false here. - # Per-interface useDHCP will be mandatory in the future, so this generated config - # replicates the default behaviour. - networking.useDHCP = false; - networking.networkmanager.enable = true; + # The global useDHCP flag is deprecated, therefore explicitly set to false here. + # Per-interface useDHCP will be mandatory in the future, so this generated config + # replicates the default behaviour. + networking.useDHCP = false; + networking.networkmanager.enable = true; - # Set your time zone. - time.timeZone = "America/New_York"; + # Set your time zone. + time.timeZone = "America/New_York"; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - wget - micro - gnome.gnome-tweaks - ]; + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + wget + micro + gnome.gnome-tweaks + ]; - home-manager = { - users.michael = import ../../user/environments/nixos/home.nix pkgs; - useGlobalPkgs = true; - }; + home-manager = { + users.michael = import ../../user/environments/nixos/home.nix pkgs; + useGlobalPkgs = true; + }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # pinentryFlavor = "gnome3"; - # }; + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # pinentryFlavor = "gnome3"; + # }; - # List services that you want to enable: - # Enable the OpenSSH daemon. - # services.openssh.enable = true; + # List services that you want to enable: + # Enable the OpenSSH daemon. + # services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; - programs.adb.enable = true; + programs.adb.enable = true; - programs.zsh.enable = true; + programs.zsh.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.michael = { - isNormalUser = true; - description = "Michael Thomas"; - extraGroups = [ "wheel" "docker" "podman" "adbusers" "dialout" ]; - shell = pkgs.zsh; - }; + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.michael = { + isNormalUser = true; + description = "Michael Thomas"; + extraGroups = ["wheel" "docker" "podman" "adbusers" "dialout"]; + shell = pkgs.zsh; + }; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # 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 = "22.05"; # Did you read the comment? - -} \ No newline at end of file + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # 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 = "22.05"; # Did you read the comment? +} diff --git a/machines/kitchen/hardware-configuration.nix b/machines/kitchen/hardware-configuration.nix index 34738d2..8f61941 100644 --- a/machines/kitchen/hardware-configuration.nix +++ b/machines/kitchen/hardware-configuration.nix @@ -1,37 +1,41 @@ # 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, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - boot.resumeDevice = "/dev/disk/by-uuid/9d98ce9b-236f-4a03-910a-84c5d5f12f03"; - boot.supportedFilesystems = [ "ntfs" ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/9d98ce9b-236f-4a03-910a-84c5d5f12f03"; - fsType = "ext4"; - }; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + boot.resumeDevice = "/dev/disk/by-uuid/9d98ce9b-236f-4a03-910a-84c5d5f12f03"; + boot.supportedFilesystems = ["ntfs"]; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/D725-6983"; - fsType = "vfat"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/9d98ce9b-236f-4a03-910a-84c5d5f12f03"; + fsType = "ext4"; + }; - swapDevices = [ - { - device = "/swapfile"; - priority = 0; - size = 2048; - } - ]; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D725-6983"; + fsType = "vfat"; + }; - nix.settings.max-jobs = lib.mkDefault 12; - # High-DPI console - console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; -} \ No newline at end of file + swapDevices = [ + { + device = "/swapfile"; + priority = 0; + size = 2048; + } + ]; + + nix.settings.max-jobs = lib.mkDefault 12; + # High-DPI console + console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz"; +} diff --git a/machines/loft/configuration.nix b/machines/loft/configuration.nix index 71ef307..506a5ce 100644 --- a/machines/loft/configuration.nix +++ b/machines/loft/configuration.nix @@ -1,104 +1,105 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + config, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; - # Set your time zone. - time.timeZone = "America/New_York"; + # Set your time zone. + time.timeZone = "America/New_York"; - # Configure suspend to disk - systemd.sleep.extraConfig = '' - SuspendState=disk - SuspendMode=suspend - HibernateMode=platform shutdown - ''; + # Configure suspend to disk + systemd.sleep.extraConfig = '' + SuspendState=disk + SuspendMode=suspend + HibernateMode=platform shutdown + ''; - ############## - # NETWORKING # - ############## - networking.useDHCP = false; - networking.networkmanager.enable = true; + ############## + # NETWORKING # + ############## + networking.useDHCP = false; + networking.networkmanager.enable = true; - networking.hostName = "loft"; # Define your hostname. - networking.firewall.enable = false; + networking.hostName = "loft"; # Define your hostname. + networking.firewall.enable = false; - home-manager = { + home-manager = { users.michael = import ../../user/environments/nixos/home.nix pkgs; useGlobalPkgs = true; }; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # }; - - # Configure keymap in X11 - # services.xserver.layout = "us"; - # services.xserver.xkbOptions = "eurosign:e"; + # Select internationalisation properties. + # i18n.defaultLocale = "en_US.UTF-8"; + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + # }; - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; + # Configure keymap in X11 + # services.xserver.layout = "us"; + # services.xserver.xkbOptions = "eurosign:e"; - programs.adb.enable = true; + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; - programs.zsh.enable = true; + programs.adb.enable = true; - users.defaultUserShell = pkgs.zsh; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.michael = { - isNormalUser = true; - description = "Michael Thomas"; - extraGroups = [ "wheel" "docker" "networkmanager" "adbusers" ]; # Enable ‘sudo’ for the user. - shell = pkgs.zsh; - }; + programs.zsh.enable = true; - # List packages installed in system profile. To search, run: - # $ nix search wget - environment.systemPackages = with pkgs; [ - wget micro - google-chrome - gnome3.gnome-tweaks - gnomeExtensions.gsconnect - ]; + users.defaultUserShell = pkgs.zsh; + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.michael = { + isNormalUser = true; + description = "Michael Thomas"; + extraGroups = ["wheel" "docker" "networkmanager" "adbusers"]; # Enable ‘sudo’ for the user. + shell = pkgs.zsh; + }; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + wget + micro + google-chrome + gnome3.gnome-tweaks + gnomeExtensions.gsconnect + ]; - # List services that you want to enable: + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; - # Enable the OpenSSH daemon. - # services.openssh.enable = true; + # List services that you want to enable: - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; + # Enable the OpenSSH daemon. + # services.openssh.enable = true; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # 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 = "20.09"; # Did you read the comment? + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # 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 = "20.09"; # Did you read the comment? } diff --git a/machines/loft/hardware-configuration.nix b/machines/loft/hardware-configuration.nix index 6802bd1..440d939 100644 --- a/machines/loft/hardware-configuration.nix +++ b/machines/loft/hardware-configuration.nix @@ -1,35 +1,39 @@ # 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, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.blacklistedKernelModules = [ "radeon" "amdgpu" ]; - # boot.kernelParams = [ "radeon.si_support=0" "radeon.cik_support=0" "amdgpu.si_support=1" "amdgpu.cik_support=1" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.blacklistedKernelModules = ["radeon" "amdgpu"]; + # boot.kernelParams = [ "radeon.si_support=0" "radeon.cik_support=0" "amdgpu.si_support=1" "amdgpu.cik_support=1" ]; + boot.extraModulePackages = []; - fileSystems."/" = { - device = "/dev/disk/by-uuid/76737cbf-9b6b-4236-ac9d-7d0daa9c1bf2"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/76737cbf-9b6b-4236-ac9d-7d0daa9c1bf2"; + fsType = "ext4"; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/BA82-2808"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/BA82-2808"; + fsType = "vfat"; + }; - swapDevices = [ - { - device = "/dev/disk/by-uuid/9943357a-de4b-498b-b408-0b79b74435d1"; - } - ]; + swapDevices = [ + { + device = "/dev/disk/by-uuid/9943357a-de4b-498b-b408-0b79b74435d1"; + } + ]; - powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; - hardware.cpu.intel.updateMicrocode = true; -} \ No newline at end of file + hardware.cpu.intel.updateMicrocode = true; +} diff --git a/machines/mac/configuration.nix b/machines/mac/configuration.nix index 5a40240..09e9e98 100644 --- a/machines/mac/configuration.nix +++ b/machines/mac/configuration.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { users.users.michael = { home = "/Users/michael"; shell = pkgs.zsh; @@ -12,7 +14,7 @@ }; environment = { - shells = with pkgs; [ zsh ]; + shells = with pkgs; [zsh]; variables = { EDITOR = "nvim"; VISUAL = "nvim"; @@ -45,7 +47,7 @@ }; }; - security.pam.enableSudoTouchIdAuth = true; + security.pam.enableSudoTouchIdAuth = true; services = { nix-daemon.enable = true; diff --git a/machines/work/configuration.nix b/machines/work/configuration.nix index dbf9c82..59de1f7 100644 --- a/machines/work/configuration.nix +++ b/machines/work/configuration.nix @@ -1,10 +1,13 @@ -{ lib, pkgs, modulesPath, inputs, ... }: - -with lib; -let - defaultUser = "michael"; -in { + lib, + pkgs, + modulesPath, + inputs, + ... +}: +with lib; let + defaultUser = "michael"; +in { imports = [ "${modulesPath}/profiles/minimal.nix" @@ -46,7 +49,7 @@ in users.users.${defaultUser} = { uid = pkgs.lib.mkForce 1001; - extraGroups = [ "wheel" "docker" "podman" ]; + extraGroups = ["wheel" "docker" "podman"]; shell = pkgs.zsh; }; diff --git a/modules/auto-upgrades.nix b/modules/auto-upgrades.nix index e0bec0d..6452eec 100644 --- a/modules/auto-upgrades.nix +++ b/modules/auto-upgrades.nix @@ -1,5 +1,5 @@ { - # Enable automatic updates - system.autoUpgrade.enable = true; - system.autoUpgrade.allowReboot = false; -} \ No newline at end of file + # Enable automatic updates + system.autoUpgrade.enable = true; + system.autoUpgrade.allowReboot = false; +} diff --git a/modules/avahi.nix b/modules/avahi.nix index 67b3c81..7a5bde0 100644 --- a/modules/avahi.nix +++ b/modules/avahi.nix @@ -1,9 +1,9 @@ -{ - # Enable Avahi Network Discovery - services.avahi = { - enable = true; - nssmdns = true; - publish.enable = true; - publish.addresses = true; - }; -} \ No newline at end of file +{ + # Enable Avahi Network Discovery + services.avahi = { + enable = true; + nssmdns = true; + publish.enable = true; + publish.addresses = true; + }; +} diff --git a/modules/bootloader.nix b/modules/bootloader.nix index 9806267..b8c0550 100644 --- a/modules/bootloader.nix +++ b/modules/bootloader.nix @@ -1,7 +1,7 @@ { - # Use the systemd-boot EFI boot loader. - boot.loader.timeout = 0; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = false; - boot.plymouth.enable = true; -} \ No newline at end of file + # Use the systemd-boot EFI boot loader. + boot.loader.timeout = 0; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = false; + boot.plymouth.enable = true; +} diff --git a/modules/common.nix b/modules/common.nix index c4b83ae..b3bc209 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,13 +1,13 @@ { - imports = [ - ./auto-upgrades.nix - ./avahi.nix - ./bootloader.nix - ./cups.nix - ./flatpak.nix - ./fonts.nix - ./gnome.nix - ./nix.nix - ./sound.nix - ]; -} \ No newline at end of file + imports = [ + ./auto-upgrades.nix + ./avahi.nix + ./bootloader.nix + ./cups.nix + ./flatpak.nix + ./fonts.nix + ./gnome.nix + ./nix.nix + ./sound.nix + ]; +} diff --git a/modules/containers.nix b/modules/containers.nix index 6a26de7..ec1b4a5 100644 --- a/modules/containers.nix +++ b/modules/containers.nix @@ -1,14 +1,13 @@ -{ pkgs, ... }: -{ - # Enable Podman w/ docker compose compatibility - virtualisation.podman = { - enable = true; - dockerSocket.enable = true; - defaultNetwork.settings.dns_enabled = true; - }; +{pkgs, ...}: { + # Enable Podman w/ docker compose compatibility + virtualisation.podman = { + enable = true; + dockerSocket.enable = true; + defaultNetwork.settings.dns_enabled = true; + }; - environment.systemPackages = with pkgs; [ - docker-client - docker-compose - ]; -} \ No newline at end of file + environment.systemPackages = with pkgs; [ + docker-client + docker-compose + ]; +} diff --git a/modules/cups.nix b/modules/cups.nix index d78fbd3..baf8de0 100644 --- a/modules/cups.nix +++ b/modules/cups.nix @@ -1,8 +1,7 @@ -{ pkgs, ... }: -{ - # Enable CUPS to print documents. - services.printing = { - enable = true; - drivers = [ pkgs.epson-escpr2 ]; - }; -} \ No newline at end of file +{pkgs, ...}: { + # Enable CUPS to print documents. + services.printing = { + enable = true; + drivers = [pkgs.epson-escpr2]; + }; +} diff --git a/modules/flatpak.nix b/modules/flatpak.nix index 06fce59..fa9ea20 100644 --- a/modules/flatpak.nix +++ b/modules/flatpak.nix @@ -1,6 +1,6 @@ { - # Enable Flatpak support - services.flatpak.enable = true; - services.fwupd.enable = true; - appstream.enable = true; -} \ No newline at end of file + # Enable Flatpak support + services.flatpak.enable = true; + services.fwupd.enable = true; + appstream.enable = true; +} diff --git a/modules/fonts.nix b/modules/fonts.nix index 6abeabb..8968609 100644 --- a/modules/fonts.nix +++ b/modules/fonts.nix @@ -1,24 +1,23 @@ -{ pkgs, ... }: -{ - # Font Settings - fonts = { - fonts = with pkgs; [ - roboto - inter - ]; - fontconfig = { - localConf = '' - - system-ui - - Inter - Roboto - Cantarell - Liberation Sans - DejaVu Sans - - - ''; - }; - }; -} \ No newline at end of file +{pkgs, ...}: { + # Font Settings + fonts = { + fonts = with pkgs; [ + roboto + inter + ]; + fontconfig = { + localConf = '' + + system-ui + + Inter + Roboto + Cantarell + Liberation Sans + DejaVu Sans + + + ''; + }; + }; +} diff --git a/modules/gnome.nix b/modules/gnome.nix index ce95f7c..29fd522 100644 --- a/modules/gnome.nix +++ b/modules/gnome.nix @@ -1,9 +1,9 @@ { - # Enable the GNOME Desktop Environment. - services.xserver.enable = true; - services.xserver.displayManager.gdm.enable = true; - services.xserver.desktopManager.gnome.enable = true; - services.gnome.gnome-browser-connector.enable = true; - programs.dconf.enable = true; - security.polkit.enable = true; -} \ No newline at end of file + # Enable the GNOME Desktop Environment. + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + services.gnome.gnome-browser-connector.enable = true; + programs.dconf.enable = true; + security.polkit.enable = true; +} diff --git a/modules/nix.nix b/modules/nix.nix index d443eba..01aba7e 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -1,21 +1,20 @@ -{ pkgs, ... }: -{ - nix = { - extraOptions = '' - experimental-features = flakes nix-command - ''; - # this is required until nix 2.4 is released - package = pkgs.nixFlakes; +{pkgs, ...}: { + nix = { + extraOptions = '' + experimental-features = flakes nix-command + ''; + # this is required until nix 2.4 is released + package = pkgs.nixFlakes; - settings.auto-optimise-store = true; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - }; + settings.auto-optimise-store = true; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + }; - nixpkgs.config = { - allowUnfree = true; - }; + nixpkgs.config = { + allowUnfree = true; + }; } diff --git a/modules/sound.nix b/modules/sound.nix index 149fcee..8c32227 100644 --- a/modules/sound.nix +++ b/modules/sound.nix @@ -1,5 +1,5 @@ { - # Enable sound. - sound.enable = true; - hardware.pulseaudio.enable = true; -} \ No newline at end of file + # Enable sound. + sound.enable = true; + hardware.pulseaudio.enable = true; +} diff --git a/overlays/default.nix b/overlays/default.nix index d3d7d72..a054471 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,10 +1,13 @@ -{ nixpkgs, unstable, ... }: - -let +{ + nixpkgs, + unstable, + ... +}: let inherit (nixpkgs.lib) composeManyExtensions; inherit (builtins) attrNames readDir; - localOverlays = map + localOverlays = + map (f: import (./default + "/${f}")) (attrNames (readDir ./default)); in -composeManyExtensions (localOverlays) + composeManyExtensions localOverlays diff --git a/overlays/default/paperwm.nix b/overlays/default/paperwm.nix index 77747eb..eebfc1d 100644 --- a/overlays/default/paperwm.nix +++ b/overlays/default/paperwm.nix @@ -1,13 +1,15 @@ self: super: { - gnomeExtensions = super.gnomeExtensions // { - paperwm = super.gnomeExtensions.paperwm.overrideDerivation (old: { - version = "43.0"; - src = super.fetchFromGitHub { - owner = "paperwm"; - repo = "PaperWM"; - rev = "64960df6cde10bcf47c33ce56a2d35e99d8d02bf"; - sha256 = "sha256-ejyWIa4HX1lEIHc9qax8jgrgi992W6rkTK60FGzKI/E="; - }; - }); - }; + gnomeExtensions = + super.gnomeExtensions + // { + paperwm = super.gnomeExtensions.paperwm.overrideDerivation (old: { + version = "43.0"; + src = super.fetchFromGitHub { + owner = "paperwm"; + repo = "PaperWM"; + rev = "64960df6cde10bcf47c33ce56a2d35e99d8d02bf"; + sha256 = "sha256-ejyWIa4HX1lEIHc9qax8jgrgi992W6rkTK60FGzKI/E="; + }; + }); + }; } diff --git a/overlays/iptables/default.nix b/overlays/iptables/default.nix index 3163bd0..ba2c481 100644 --- a/overlays/iptables/default.nix +++ b/overlays/iptables/default.nix @@ -1,5 +1,5 @@ self: super: { - iptables = super.iptables.override { - nftablesCompat = false; - }; + iptables = super.iptables.override { + nftablesCompat = false; + }; } diff --git a/user/environments/mac/config.nix b/user/environments/mac/config.nix index 6e55391..1dd1750 100644 --- a/user/environments/mac/config.nix +++ b/user/environments/mac/config.nix @@ -1,3 +1,3 @@ { - allowUnfree = true; + allowUnfree = true; } diff --git a/user/environments/mac/home.nix b/user/environments/mac/home.nix index a17102e..7d99ee8 100644 --- a/user/environments/mac/home.nix +++ b/user/environments/mac/home.nix @@ -1,12 +1,11 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { imports = [ ../../modules/zsh.nix ../../modules/dev.nix ../../modules/git.nix ../../modules/fonts.nix ../../modules/nvim.nix - ../../modules/vscode.nix + ../../modules/vscode.nix ]; home.packages = with pkgs; [ @@ -16,8 +15,8 @@ # Add homebrew applications to path programs.zsh = { profileExtra = '' - PATH=/opt/homebrew/bin:$PATH - ''; + PATH=/opt/homebrew/bin:$PATH + ''; prezto.pmodules = [ "osx" ]; diff --git a/user/environments/nixos/config.nix b/user/environments/nixos/config.nix index 6e55391..1dd1750 100644 --- a/user/environments/nixos/config.nix +++ b/user/environments/nixos/config.nix @@ -1,3 +1,3 @@ { - allowUnfree = true; + allowUnfree = true; } diff --git a/user/environments/nixos/home.nix b/user/environments/nixos/home.nix index a299dd3..5e141e9 100644 --- a/user/environments/nixos/home.nix +++ b/user/environments/nixos/home.nix @@ -1,14 +1,14 @@ { - imports = [ - ../../modules/dev.nix - ../../modules/firefox.nix - ../../modules/fonts.nix - ../../modules/git.nix - ../../modules/git_nixos.nix - ../../modules/gnome.nix - ../../modules/vscode.nix - ../../modules/zsh.nix - ]; - - home.stateVersion = "21.05"; + imports = [ + ../../modules/dev.nix + ../../modules/firefox.nix + ../../modules/fonts.nix + ../../modules/git.nix + ../../modules/git_nixos.nix + ../../modules/gnome.nix + ../../modules/vscode.nix + ../../modules/zsh.nix + ]; + + home.stateVersion = "21.05"; } diff --git a/user/environments/wsl/config.nix b/user/environments/wsl/config.nix index 6e55391..1dd1750 100644 --- a/user/environments/wsl/config.nix +++ b/user/environments/wsl/config.nix @@ -1,3 +1,3 @@ { - allowUnfree = true; + allowUnfree = true; } diff --git a/user/environments/wsl/home.nix b/user/environments/wsl/home.nix index 705e889..02701ca 100644 --- a/user/environments/wsl/home.nix +++ b/user/environments/wsl/home.nix @@ -1,28 +1,27 @@ -{ pkgs, ... }: -{ - imports = [ - ../../modules/dev.nix - ../../modules/git.nix - ../../modules/nvim.nix - ../../modules/zsh.nix - ]; +{pkgs, ...}: { + imports = [ + ../../modules/dev.nix + ../../modules/git.nix + ../../modules/nvim.nix + ../../modules/zsh.nix + ]; - home.packages = with pkgs; [ - neofetch - pfetch - fortune - micro - ]; + home.packages = with pkgs; [ + neofetch + pfetch + fortune + micro + ]; - programs.git.extraConfig = { - safe.directory = "*"; - }; + programs.git.extraConfig = { + safe.directory = "*"; + }; - programs.zsh = { - shellAliases = { - code = "/mnt/c/Program\\ Files/Microsoft\\ VS\\ Code/Code.exe"; - }; - }; + programs.zsh = { + shellAliases = { + code = "/mnt/c/Program\\ Files/Microsoft\\ VS\\ Code/Code.exe"; + }; + }; - home.stateVersion = "22.05"; + home.stateVersion = "22.05"; } diff --git a/user/modules/dev.nix b/user/modules/dev.nix index 11319cf..1102b72 100644 --- a/user/modules/dev.nix +++ b/user/modules/dev.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { home.packages = with pkgs; [ # devbox unstable.devbox @@ -18,10 +17,10 @@ kubernetes-helm # Nix nil - nixpkgs-fmt + alejandra # Rust (rust-bin.stable.latest.default.override { - extensions = [ "rust-src" ]; + extensions = ["rust-src"]; }) ]; home.file.npmrc = { diff --git a/user/modules/firefox.nix b/user/modules/firefox.nix index 543a599..daf9b64 100644 --- a/user/modules/firefox.nix +++ b/user/modules/firefox.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { # Add Firefox GNOME theme directory home.file."firefox-gnome-theme" = { target = ".mozilla/firefox/default/chrome/firefox-gnome-theme"; @@ -23,7 +22,7 @@ }; userChrome = '' @import "firefox-gnome-theme/userChrome.css"; - @import "firefox-gnome-theme/theme/colors/dark.css"; + @import "firefox-gnome-theme/theme/colors/dark.css"; ''; }; }; diff --git a/user/modules/fonts.nix b/user/modules/fonts.nix index b0bfe00..c0ddd68 100644 --- a/user/modules/fonts.nix +++ b/user/modules/fonts.nix @@ -1,11 +1,10 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - (nerdfonts.override { fonts = [ "FiraCode" ]; }) - google-fonts - inter - cascadia-code - ]; +{pkgs, ...}: { + home.packages = with pkgs; [ + (nerdfonts.override {fonts = ["FiraCode"];}) + google-fonts + inter + cascadia-code + ]; - # fonts.fontconfig.enable = true; -} \ No newline at end of file + # fonts.fontconfig.enable = true; +} diff --git a/user/modules/git.nix b/user/modules/git.nix index 2b9b193..e3f966b 100644 --- a/user/modules/git.nix +++ b/user/modules/git.nix @@ -1,18 +1,21 @@ -{ pkgs, lib, ... }: { - home.packages = with pkgs; [ - git-lfs - ]; + pkgs, + lib, + ... +}: { + home.packages = with pkgs; [ + git-lfs + ]; - # Use pkgs.gitAndTools.gitFull in order to get libsecret support - programs.git = { - enable = true; - userEmail = "michaelhthomas@outlook.com"; - userName = "Michael Thomas"; - extraConfig = { - credential.helper = lib.mkDefault "store"; - pull.rebase = "false"; - init.defaultBranch = "main"; - }; - }; -} \ No newline at end of file + # Use pkgs.gitAndTools.gitFull in order to get libsecret support + programs.git = { + enable = true; + userEmail = "michaelhthomas@outlook.com"; + userName = "Michael Thomas"; + extraConfig = { + credential.helper = lib.mkDefault "store"; + pull.rebase = "false"; + init.defaultBranch = "main"; + }; + }; +} diff --git a/user/modules/git_nixos.nix b/user/modules/git_nixos.nix index 44d234c..c48e043 100644 --- a/user/modules/git_nixos.nix +++ b/user/modules/git_nixos.nix @@ -1,10 +1,9 @@ -{ pkgs, ... }: -{ - # Use pkgs.gitAndTools.gitFull in order to get libsecret support - programs.git = { - package = pkgs.gitAndTools.gitFull; - extraConfig = { - credential.helper = "libsecret"; - }; - }; -} \ No newline at end of file +{pkgs, ...}: { + # Use pkgs.gitAndTools.gitFull in order to get libsecret support + programs.git = { + package = pkgs.gitAndTools.gitFull; + extraConfig = { + credential.helper = "libsecret"; + }; + }; +} diff --git a/user/modules/gnome.nix b/user/modules/gnome.nix index 1a7530f..5b1a01d 100644 --- a/user/modules/gnome.nix +++ b/user/modules/gnome.nix @@ -1,35 +1,34 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - gnomeExtensions.caffeine - unstable.gnomeExtensions.paperwm - gnomeExtensions.cleaner-overview - unstable.gnomeExtensions.vertical-overview - gnomeExtensions.disable-workspace-switch-animation-for-gnome-40 - gnomeExtensions.blur-my-shell - ]; +{pkgs, ...}: { + home.packages = with pkgs; [ + gnomeExtensions.caffeine + unstable.gnomeExtensions.paperwm + gnomeExtensions.cleaner-overview + unstable.gnomeExtensions.vertical-overview + gnomeExtensions.disable-workspace-switch-animation-for-gnome-40 + gnomeExtensions.blur-my-shell + ]; - gtk = { - enable = true; - theme = { - name = "Adwaita-dark"; - # package = pkgs.arc-theme; - }; - font.name = "Inter 11"; - iconTheme = { - name = "Papirus"; - package = pkgs.papirus-icon-theme; - }; - }; + gtk = { + enable = true; + theme = { + name = "Adwaita-dark"; + # package = pkgs.arc-theme; + }; + font.name = "Inter 11"; + iconTheme = { + name = "Papirus"; + package = pkgs.papirus-icon-theme; + }; + }; - programs.gnome-terminal = { - enable = true; - profile = { - "5ddfe964-7ee6-4131-b449-26bdd97518f7" = { - default = true; - visibleName = "Michael"; - font = "FiraCode Nerd Font 12"; - }; - }; - }; + programs.gnome-terminal = { + enable = true; + profile = { + "5ddfe964-7ee6-4131-b449-26bdd97518f7" = { + default = true; + visibleName = "Michael"; + font = "FiraCode Nerd Font 12"; + }; + }; + }; } diff --git a/user/modules/home-manager.nix b/user/modules/home-manager.nix index 36e6066..a004171 100644 --- a/user/modules/home-manager.nix +++ b/user/modules/home-manager.nix @@ -1,19 +1,19 @@ { - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; - # Home Manager needs a bit of information about you and the - # paths it should manage. - home.username = builtins.getEnv "USER"; - home.homeDirectory = builtins.getEnv "HOME"; + # Home Manager needs a bit of information about you and the + # paths it should manage. + home.username = builtins.getEnv "USER"; + home.homeDirectory = builtins.getEnv "HOME"; - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # You can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - home.stateVersion = "21.03"; + # This value determines the Home Manager release that your + # configuration is compatible with. This helps avoid breakage + # when a new Home Manager release introduces backwards + # incompatible changes. + # + # You can update Home Manager without changing this value. See + # the Home Manager release notes for a list of state version + # changes in each release. + home.stateVersion = "21.03"; } diff --git a/user/modules/nvim.nix b/user/modules/nvim.nix index b092d2c..522417e 100644 --- a/user/modules/nvim.nix +++ b/user/modules/nvim.nix @@ -1,5 +1,8 @@ -{ pkgs, config, ... }: { + pkgs, + config, + ... +}: { programs.neovim = { enable = true; }; @@ -9,12 +12,13 @@ }; # Copy Neovim config - xdg.configFile.nvim.source = config.lib.file.mkOutOfStoreSymlink + xdg.configFile.nvim.source = + config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/nix-dots/user/modules/nvim"; - home.packages = with pkgs; [ - ripgrep - gnumake - gcc - ]; + home.packages = with pkgs; [ + ripgrep + gnumake + gcc + ]; } diff --git a/user/modules/nvim/lua/plugins/lsp.lua b/user/modules/nvim/lua/plugins/lsp.lua index cf3c72f..6fd65ce 100644 --- a/user/modules/nvim/lua/plugins/lsp.lua +++ b/user/modules/nvim/lua/plugins/lsp.lua @@ -42,4 +42,14 @@ return { }, }, }, + { + "stevearc/conform.nvim", + ---@class ConformOpts + opts = { + ---@type table + formatters_by_ft = { + nix = { "alejandra" }, + }, + }, + }, } diff --git a/user/modules/vscode.nix b/user/modules/vscode.nix index a0044fe..20db8fb 100644 --- a/user/modules/vscode.nix +++ b/user/modules/vscode.nix @@ -1,68 +1,75 @@ -{ config, pkgs, ... }: +{ + config, + pkgs, + ... +}: let + package = pkgs.vscodium; -let - package = pkgs.vscodium; + vscodePname = package.pname; - vscodePname = package.pname; + configDir = + { + "vscode" = "Code"; + "vscode-insiders" = "Code - Insiders"; + "vscodium" = "VSCodium"; + } + .${vscodePname}; - configDir = { - "vscode" = "Code"; - "vscode-insiders" = "Code - Insiders"; - "vscodium" = "VSCodium"; - }.${vscodePname}; - - userDir = if pkgs.stdenv.hostPlatform.isDarwin then - "Library/Application Support/${configDir}/User" - else - "${config.xdg.configHome}/${configDir}/User"; + userDir = + if pkgs.stdenv.hostPlatform.isDarwin + then "Library/Application Support/${configDir}/User" + else "${config.xdg.configHome}/${configDir}/User"; configFilePath = "${userDir}/settings.json"; - keybindingsFilePath = "${userDir}/keybindings.json"; + keybindingsFilePath = "${userDir}/keybindings.json"; in { - xdg.configFile."${config.home.homeDirectory}/${configFilePath}".source = + xdg.configFile."${config.home.homeDirectory}/${configFilePath}".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/nix-dots/user/modules/vscode/settings.json"; - xdg.configFile."${config.home.homeDirectory}/${keybindingsFilePath}".source = - config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/nix-dots/user/modules/vscode/keybindings.json"; + xdg.configFile."${config.home.homeDirectory}/${keybindingsFilePath}".source = + config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/Projects/nix-dots/user/modules/vscode/keybindings.json"; - programs = { - vscode = { - enable = true; - inherit package; - extensions = with pkgs.open-vsx; [ - # Editor - vscodevim.vim - pkgs.vscode-marketplace.miguelsolorio.min-theme - streetsidesoftware.code-spell-checker + programs = { + vscode = { + enable = true; + inherit package; + extensions = with pkgs.open-vsx; [ + # Editor + vscodevim.vim + pkgs.vscode-marketplace.miguelsolorio.min-theme + streetsidesoftware.code-spell-checker - # Git - mhutchie.git-graph - waderyan.gitblame + # Git + mhutchie.git-graph + waderyan.gitblame - # Web Development - astro-build.astro-vscode - redwan-hossain.auto-rename-tag-clone - bradlc.vscode-tailwindcss - johnsoncodehk.volar - svelte.svelte-vscode - dbaeumer.vscode-eslint - esbenp.prettier-vscode - antfu.iconify - csstools.postcss - # Dart / Flutter - dart-code.dart-code + # Web Development + astro-build.astro-vscode + redwan-hossain.auto-rename-tag-clone + bradlc.vscode-tailwindcss + johnsoncodehk.volar + svelte.svelte-vscode + dbaeumer.vscode-eslint + esbenp.prettier-vscode + antfu.iconify + csstools.postcss + ms-playwright.playwright - # Java - redhat.java - vscjava.vscode-java-debug - vscjava.vscode-java-test - vscjava.vscode-maven - vscjava.vscode-java-dependency + # Dart / Flutter + dart-code.dart-code - # Nix - jnoortheen.nix-ide - ]; - }; - }; + # Java + redhat.java + vscjava.vscode-java-debug + vscjava.vscode-java-test + vscjava.vscode-maven + vscjava.vscode-java-dependency + + # Nix + jnoortheen.nix-ide + kamadorueda.alejandra + ]; + }; + }; } diff --git a/user/modules/zsh.nix b/user/modules/zsh.nix index 43baaa8..224e24f 100644 --- a/user/modules/zsh.nix +++ b/user/modules/zsh.nix @@ -1,47 +1,46 @@ -{ pkgs, ... }: -{ - programs.zsh = { - enable = true; - plugins = [ - { - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = pkgs.fetchFromGitHub { - owner = "chisui"; - repo = "zsh-nix-shell"; - rev = "v0.1.0"; - sha256 = "0snhch9hfy83d4amkyxx33izvkhbwmindy0zjjk28hih1a9l2jmx"; - }; - } - ]; - prezto = { - enable = true; - pmodules = [ - "archive" - "docker" - "environment" - "git" - "terminal" - "editor" - "history" - "directory" - "spectrum" - "utility" - "completion" - "command-not-found" - "syntax-highlighting" - "history-substring-search" - "autosuggestions" - "prompt" - ]; - }; - }; - programs.starship = { - enable = true; - enableZshIntegration = true; - settings = { - character.success_symbol = "[➜](green)"; - character.error_symbol = "[➜](red)"; - }; - }; -} \ No newline at end of file +{pkgs, ...}: { + programs.zsh = { + enable = true; + plugins = [ + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.1.0"; + sha256 = "0snhch9hfy83d4amkyxx33izvkhbwmindy0zjjk28hih1a9l2jmx"; + }; + } + ]; + prezto = { + enable = true; + pmodules = [ + "archive" + "docker" + "environment" + "git" + "terminal" + "editor" + "history" + "directory" + "spectrum" + "utility" + "completion" + "command-not-found" + "syntax-highlighting" + "history-substring-search" + "autosuggestions" + "prompt" + ]; + }; + }; + programs.starship = { + enable = true; + enableZshIntegration = true; + settings = { + character.success_symbol = "[➜](green)"; + character.error_symbol = "[➜](red)"; + }; + }; +}