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,
lib,
nixpkgs,
home-manager,
nh,
nix-melt,
@ -34,12 +33,6 @@
auto-optimise-store = true;
warn-dirty = false;
};
# Minimize dowloads of indirect nixpkgs flakes
registry.nixpkgs = {
flake = nixpkgs;
exact = false;
};
};
nh = {
@ -61,16 +54,12 @@
};
};
# Global hm settings
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users = let
default = {
imports = [
# Make the vars be the same on Nix and HM
./vars.nix
({osConfig, ...}: {vars = osConfig.vars;})
{vars = config.vars;}
nur.hmModules.nur
@ -83,28 +72,8 @@
nix-melt.packages.${pkgs.system}.default
nurl.packages.${pkgs.system}.default
]
++ (with config.customPkgs; [
pokemon-colorscripts
repl
])
++ (with config.nur.repos.rycee; [
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";
};

View file

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

View file

@ -5,5 +5,6 @@
./neovim
./nix-index
./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
./locale.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,
nixpkgs,
nur,
pkgs,
...
}: {
imports = [
./vars.nix
./pkgs
./modules/global.nix
nur.nixosModules.nur
];
@ -20,12 +19,6 @@
warn-dirty = false
'';
# Minimize dowloads of indirect nixpkgs flakes
registry.nixpkgs = {
flake = nixpkgs;
exact = false;
};
substituters = [
# Neovim and stuff
"https://nix-community.cachix.org"
@ -37,11 +30,7 @@
};
# Global hm settings
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
config = {
home-manager.config = {
imports = [
# Make the vars be the same on Nix and HM
./vars.nix
@ -53,28 +42,6 @@
./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";
};
};
}

Binary file not shown.