From 85a46854fe5598cf510bd2cdadba0a90bb92d0a0 Mon Sep 17 00:00:00 2001 From: rocketcamel Date: Wed, 22 Jan 2025 16:58:58 -0800 Subject: [PATCH] refactor: pkgs --- nix/home-old.nix | 1 - nix/hosts/tux/configuration.nix | 14 +----------- nix/hosts/tux/hardware-configuration.nix | 28 ++++++++++++------------ nix/modules/commonPackages.nix | 12 +++++++++- nix/users/luca/git.nix | 4 +--- nix/users/luca/home.nix | 7 +----- 6 files changed, 28 insertions(+), 38 deletions(-) diff --git a/nix/home-old.nix b/nix/home-old.nix index 8c0ed4d..65e2cc6 100644 --- a/nix/home-old.nix +++ b/nix/home-old.nix @@ -1,6 +1,5 @@ { config, pkgs, ... }: - { home.username = "luca"; home.homeDirectory = "/home/luca"; diff --git a/nix/hosts/tux/configuration.nix b/nix/hosts/tux/configuration.nix index dfbc61a..b989747 100644 --- a/nix/hosts/tux/configuration.nix +++ b/nix/hosts/tux/configuration.nix @@ -91,7 +91,6 @@ users.users.luca = { isNormalUser = true; extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. - packages = with pkgs; [ vesktop nodejs_22 pnpm ]; shell = pkgs.zsh; hashedPassword = "$y$j9T$wp9I05TfxjrAzCMCcxlei1$Fm7sJJSwFHpSIQT0RESOdJ7vkTYyN0IXs5n/xkg65y3"; @@ -102,18 +101,7 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; - config.commonPackages ++ [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - wget - curl - ripgrep - git - neovim - busybox - dolphin - wireguard-tools - gh - ]; + config.commonPackages ++ [ dolphin wireguard-tools ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/nix/hosts/tux/hardware-configuration.nix b/nix/hosts/tux/hardware-configuration.nix index 187777e..dc2bf31 100644 --- a/nix/hosts/tux/hardware-configuration.nix +++ b/nix/hosts/tux/hardware-configuration.nix @@ -4,25 +4,24 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/6b97d24a-2aff-482d-a7e4-952914ca3d50"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/6b97d24a-2aff-482d-a7e4-952914ca3d50"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0193-75C3"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0193-75C3"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; swapDevices = [ ]; @@ -34,5 +33,6 @@ # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nix/modules/commonPackages.nix b/nix/modules/commonPackages.nix index 12b1c42..2e38b8f 100644 --- a/nix/modules/commonPackages.nix +++ b/nix/modules/commonPackages.nix @@ -6,6 +6,16 @@ description = "Common packages"; }; }; - config.commonPackages = with pkgs; [ wget busybox curl stow ]; + config.commonPackages = with pkgs; [ + wget + busybox + curl + stow + gh + oh-my-posh + neovim + ripgrep + git + ]; config.programs.nix-ld.enable = true; } diff --git a/nix/users/luca/git.nix b/nix/users/luca/git.nix index 2ccd69f..9d3efbd 100755 --- a/nix/users/luca/git.nix +++ b/nix/users/luca/git.nix @@ -3,9 +3,7 @@ userName = "rocketcamel"; userEmail = "luca_lise@icloud.com"; extraConfig = { - init = { - defaultBranch = "main"; - }; + init = { defaultBranch = "main"; }; commit.gpgsign = true; gpg.format = "ssh"; user.signingkey = "~/.ssh/commits.id_rsa.pub"; diff --git a/nix/users/luca/home.nix b/nix/users/luca/home.nix index c806281..63d6bf7 100755 --- a/nix/users/luca/home.nix +++ b/nix/users/luca/home.nix @@ -10,12 +10,7 @@ tmux = import ./tmux.nix { inherit pkgs; }; }; - home.packages = with pkgs; [ - nodejs_22 - pnpm - gh - oh-my-posh - ]; + home.packages = with pkgs; [ nodejs_22 pnpm ]; home.stateVersion = "24.11";