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 74 additions and 98 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,44 +30,18 @@
};
# Global hm settings
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
home-manager.config = {
imports = [
# Make the vars be the same on Nix and HM
./vars.nix
{vars = config.vars;}
config = {
imports = [
# Make the vars be the same on Nix and HM
./vars.nix
{vars = config.vars;}
nur.hmModules.nur
nur.hmModules.nur
./home
./pkgs
];
./home
./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";
};
}

View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1702406046,
"narHash": "sha256-WUGOYlF/gCLXsziPARTFm+M3Ivy6orf131pCnD106vk=",
"lastModified": 1702518713,
"narHash": "sha256-UcJ7sUCt/LkpgcsMBBv9NNCPkdLQAloyAbHfOY2CJP0=",
"owner": "Aylur",
"repo": "ags",
"rev": "46e73ba8b17ff17f0f01e29e7be6817bd57da6b0",
"rev": "869c6f1588e91418ca983d6ee53d4c8535af171e",
"type": "github"
},
"original": {
@ -314,11 +314,11 @@
]
},
"locked": {
"lastModified": 1702423270,
"narHash": "sha256-3ZA5E+b2XBP+c9qGhWpRApzPq/PZtIPgkeEDpTBV4g8=",
"lastModified": 1702510888,
"narHash": "sha256-+7Bd9j47gDjD1DD0K9zKwA+8TjnTdTRGMVCERh6w2L0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d9297efd3a1c3ebb9027dc68f9da0ac002ae94db",
"rev": "5e9d1fe19f2d17cdfeb3b7e5e668f763e430cd28",
"type": "github"
},
"original": {
@ -426,11 +426,11 @@
]
},
"locked": {
"lastModified": 1702425860,
"narHash": "sha256-OSnsE8Po3f/iGYhtaMLAZbzTXIfkYl6lOEDj9SGHNdE=",
"lastModified": 1702512266,
"narHash": "sha256-V/str4xE9Xge14Uvmx3Yn654Pp1j4yksm6Ym0euOz6k=",
"owner": "nix-community",
"repo": "neovim-nightly-overlay",
"rev": "331bf7d82d0fd66c118dfff92e8400217ce64515",
"rev": "aa3c0f14a6f526177cab4d5d06d19bce29583492",
"type": "github"
},
"original": {
@ -449,11 +449,11 @@
},
"locked": {
"dir": "contrib",
"lastModified": 1702419470,
"narHash": "sha256-R5Ce+MY0VIM8ZU1Zswy7Ir+QWvCj9nI8zckw2f/s3mU=",
"lastModified": 1702505781,
"narHash": "sha256-a7vX/TBsqD4b/0YrBd4Jpl+Y5b1k3oz6XbzWFiwwzDw=",
"owner": "neovim",
"repo": "neovim",
"rev": "d65c6a0bafada059e87a11a4bcd129afc16d2e5d",
"rev": "5aa1ba3efe0597a5f508b8220961c75c3359ccdb",
"type": "github"
},
"original": {
@ -468,11 +468,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1701522423,
"narHash": "sha256-V5TQ/1loQnegDjfLh61DxBWEQZivYEBq2kQpT0fn2cQ=",
"lastModified": 1702509832,
"narHash": "sha256-wrHIBEp6GM52Jljmc/L2sT9Z1Z1gj10MdyphJNvFe98=",
"owner": "viperML",
"repo": "nh",
"rev": "375c6cf57de3a839b7937358659bea526da27eae",
"rev": "fc720bba2d31ebf99a08c7f625d1a9f9c3163d01",
"type": "github"
},
"original": {
@ -531,11 +531,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1702257462,
"narHash": "sha256-/V87P3A2vHUREnW4f7kmrg4HX5TOURy58Y6ZiMRnDas=",
"lastModified": 1702516441,
"narHash": "sha256-bhC1cqytO99L9i4BZLjaIEgDP4CpuVf+yP9pIFaWHjE=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "c0498654543de4e5137a6c7d7630f0b46230ec60",
"rev": "dcd1a7c19691646e41a3328aa7d055ec43443b8d",
"type": "github"
},
"original": {
@ -878,11 +878,11 @@
},
"nur": {
"locked": {
"lastModified": 1702500249,
"narHash": "sha256-oSeFFxfjhIQikapcUMF35uCUWC5guDR/kVjXrPIw3E4=",
"lastModified": 1702519359,
"narHash": "sha256-6cGY/OLUlpqFacNkApNAP7IijFey0/kYjAVSG2+MXOQ=",
"owner": "nix-community",
"repo": "NUR",
"rev": "fbfc9fcd228c7de006181bef7bdeedc297ede138",
"rev": "71ab6db9b868b33145a3cab0c42ba4d1c414884b",
"type": "github"
},
"original": {