refactor(common): move common stuff out of droid and default

This commit is contained in:
matt1432 2023-12-13 21:38:30 -05:00
parent bd7e203fb1
commit 0982a473de
8 changed files with 53 additions and 77 deletions

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
nixpkgs,
home-manager, home-manager,
nh, nh,
nix-melt, nix-melt,
@ -34,12 +33,6 @@
auto-optimise-store = true; auto-optimise-store = true;
warn-dirty = false; warn-dirty = false;
}; };
# Minimize dowloads of indirect nixpkgs flakes
registry.nixpkgs = {
flake = nixpkgs;
exact = false;
};
}; };
nh = { nh = {
@ -61,16 +54,12 @@
}; };
}; };
# Global hm settings
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users = let home-manager.users = let
default = { default = {
imports = [ imports = [
# Make the vars be the same on Nix and HM # Make the vars be the same on Nix and HM
./vars.nix ./vars.nix
({osConfig, ...}: {vars = osConfig.vars;}) {vars = config.vars;}
nur.hmModules.nur nur.hmModules.nur
@ -83,28 +72,8 @@
nix-melt.packages.${pkgs.system}.default nix-melt.packages.${pkgs.system}.default
nurl.packages.${pkgs.system}.default nurl.packages.${pkgs.system}.default
] ]
++ (with config.customPkgs; [
pokemon-colorscripts
repl
])
++ (with config.nur.repos.rycee; [ ++ (with config.nur.repos.rycee; [
mozilla-addons-to-nix mozilla-addons-to-nix
])
++ (with pkgs.nodePackages; [
undollar
])
++ (with pkgs; [
dracula-theme
neofetch
progress
wget
tree
mosh
rsync
killall
imagemagick
usbutils
zip
]); ]);
home.stateVersion = lib.mkDefault "23.05"; home.stateVersion = lib.mkDefault "23.05";
}; };

View file

@ -1,7 +1,7 @@
# Check git status of nix configs # Check git status of nix configs
( (
cd ~/.nix || exit 1 cd ~/.nix || exit 1
git fetch --all > /dev/null git fetch --all --quiet
GIT=$(git -c color.status=always status | GIT=$(git -c color.status=always status |
grep -v -e "On branch" \ grep -v -e "On branch" \
-e "up to date" \ -e "up to date" \

View file

@ -5,5 +5,6 @@
./neovim ./neovim
./nix-index ./nix-index
./tmux ./tmux
./packages.nix
]; ];
} }

27
common/home/packages.nix Normal file
View file

@ -0,0 +1,27 @@
{
config,
pkgs,
...
}: {
home.packages =
(with config.customPkgs; [
pokemon-colorscripts
repl
])
++ (with pkgs.nodePackages; [
undollar
])
++ (with pkgs; [
dracula-theme
neofetch
progress
wget
tree
mosh
rsync
killall
imagemagick
usbutils
zip
]);
}

View file

@ -3,5 +3,6 @@
./cachix.nix ./cachix.nix
./locale.nix ./locale.nix
./locate.nix ./locate.nix
./global.nix
]; ];
} }

11
common/modules/global.nix Normal file
View file

@ -0,0 +1,11 @@
{nixpkgs, ...}: {
# Minimize dowloads of indirect nixpkgs flakes
nix.registry.nixpkgs = {
flake = nixpkgs;
exact = false;
};
# Global hm settings
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}

View file

@ -1,13 +1,12 @@
{ {
config, config,
nixpkgs,
nur, nur,
pkgs,
... ...
}: { }: {
imports = [ imports = [
./vars.nix ./vars.nix
./pkgs ./pkgs
./modules/global.nix
nur.nixosModules.nur nur.nixosModules.nur
]; ];
@ -20,12 +19,6 @@
warn-dirty = false warn-dirty = false
''; '';
# Minimize dowloads of indirect nixpkgs flakes
registry.nixpkgs = {
flake = nixpkgs;
exact = false;
};
substituters = [ substituters = [
# Neovim and stuff # Neovim and stuff
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
@ -37,11 +30,7 @@
}; };
# Global hm settings # Global hm settings
home-manager = { home-manager.config = {
useGlobalPkgs = true;
useUserPackages = true;
config = {
imports = [ imports = [
# Make the vars be the same on Nix and HM # Make the vars be the same on Nix and HM
./vars.nix ./vars.nix
@ -53,28 +42,6 @@
./pkgs ./pkgs
]; ];
home.packages =
(with config.customPkgs; [
pokemon-colorscripts
repl
])
++ (with pkgs.nodePackages; [
undollar
])
++ (with pkgs; [
dracula-theme
neofetch
progress
wget
tree
mosh
rsync
killall
imagemagick
usbutils
]);
home.stateVersion = "23.05"; home.stateVersion = "23.05";
}; };
};
} }

Binary file not shown.