From 6a425d6ac1ee57f3c43a2d462bc2f0056fcd9682 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 8 Oct 2023 14:42:43 -0400 Subject: [PATCH] feat(nix): add NUR --- nixos/flake.nix | 9 ++++-- nixos/home/main.nix | 3 +- nixos/home/packages.nix | 63 +++++++++++++++++++++-------------------- 3 files changed, 41 insertions(+), 34 deletions(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index 6bd1048..77767b1 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -1,7 +1,7 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - + nur.url = "github:nix-community/NUR"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -12,17 +12,18 @@ url = "github:horriblename/hyprgrass"; inputs.hyprland.follows = "hyprland"; }; - ags.url = "github:Aylur/ags"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; }; - outputs = { self, nixpkgs, home-manager, ... }@attrs: { + outputs = { self, nixpkgs, home-manager, nur, ... }@attrs: { nixosConfigurations.wim = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = attrs; modules = [ + nur.nixosModules.nur + ({ ... }: { nix = { # Edit nix.conf @@ -40,7 +41,9 @@ }; }; }) + ./configuration.nix + home-manager.nixosModules.home-manager { home-manager.extraSpecialArgs = attrs; home-manager.useGlobalPkgs = true; diff --git a/nixos/home/main.nix b/nixos/home/main.nix index d7f8caf..457e162 100644 --- a/nixos/home/main.nix +++ b/nixos/home/main.nix @@ -1,4 +1,4 @@ -{ home-manager, ... }: +{ home-manager, nur, ... }: { ## Global config to add home-manager module @@ -19,6 +19,7 @@ home-manager.users.matt = { imports = [ + nur.hmModules.nur ./dconf.nix ./theme.nix ./hyprland.nix diff --git a/nixos/home/packages.nix b/nixos/home/packages.nix index eac0071..4dd475d 100644 --- a/nixos/home/packages.nix +++ b/nixos/home/packages.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { programs = { @@ -24,40 +24,43 @@ }; }; - home.packages = with pkgs; - (with python311Packages; [ - python - pyclip + home.packages = (with pkgs.python311Packages; [ + python + pyclip + ]) ++ - ]) ++ - (with nodePackages; [ - undollar + (with pkgs.nodePackages; [ + undollar + ]) ++ - ]) ++ - (with plasma5Packages; [ - polkit-kde-agent - ark - kcharselect - kdenlive - okular + (with pkgs.plasma5Packages; [ + polkit-kde-agent + ark + kcharselect + kdenlive + okular - # Dolphin & co - dolphin - dolphin-plugins - kdegraphics-thumbnailers - ffmpegthumbs - kio - kio-admin # needs to be both here and in system pkgs - kio-extras - kmime + # Dolphin & co + dolphin + dolphin-plugins + kdegraphics-thumbnailers + ffmpegthumbs + kio + kio-admin # needs to be both here and in system pkgs + kio-extras + kmime + ]) ++ - ]) ++ - (with gnome; [ - gnome-calculator - seahorse + (with pkgs.gnome; [ + gnome-calculator + seahorse + ]) ++ - ]) ++ [ + (with config.nur.repos.rycee; [ + mozilla-addons-to-nix + ]) ++ + (with pkgs; [ # School virt-manager gradle @@ -105,7 +108,7 @@ ) & exec env SUDO_ASKPASS=${pkgs.plasma5Packages.ksshaskpass}/bin/${pkgs.plasma5Packages.ksshaskpass.pname} sudo -k -EA "${gparted}/bin/${gparted.pname}" "$@" '') - ]; + ]); xdg.desktopEntries.gparted = { name = "GParted";