refactor: change hosts to devices and separate hm modules from nix modules

This commit is contained in:
matt1432 2023-10-28 18:20:09 -04:00
parent 80eec12883
commit 0e4c446438
127 changed files with 33 additions and 49 deletions

View file

@ -13,13 +13,14 @@
}: {
imports = [
./cachix.nix
./overlays
./device-vars.nix
home-manager.nixosModules.default
nh.nixosModules.default
./modules/programs.nix
./modules/locale.nix
./overlays
./hostvars.nix
];
nixpkgs.config.allowUnfree = true;
@ -64,14 +65,14 @@
default = {
imports = [
nur.hmModules.nur
./modules/bash
./modules/git.nix
./modules/neovim
./modules/tmux.nix
./home/bash
./home/git.nix
./home/neovim
./home/tmux.nix
./hostvars.nix
./device-vars.nix
({ osConfig, ... }: {
services.hostvars = osConfig.services.hostvars;
services.device-vars = osConfig.services.device-vars;
})
];

View file

@ -1,5 +1,5 @@
{ lib, ... }: {
options.services.hostvars = with lib; {
options.services.device-vars = with lib; {
username = mkOption {
description = ''
Username that was defined at the initial setup process
@ -9,7 +9,7 @@
configDir = mkOption {
description = ''
The path to where most of the hosts' configs are in the .nix folder
The path to where most of the devices' configs are in the .nix folder
'';
type = types.nullOr types.str;
};

View file

@ -1,5 +1,3 @@
# Home-manager module
{ config, lib, ... }: {
imports = [
./programs.nix

View file

@ -1,5 +1,3 @@
# Home-manager module
{ pkgs, ... }: {
programs = {
fzf = {

View file

@ -1,5 +1,3 @@
# Home-manager module
{ pkgs, ... }: {
programs = {

View file

@ -1,5 +1,3 @@
# Home-manager module
{ pkgs, lib, ... }: let
# installs a vim plugin from git with a given tag / branch
plugin = owner: repo: rev: hash: pkgs.vimUtils.buildVimPlugin {
@ -11,7 +9,7 @@
};
fileContents = lib.strings.fileContents;
in {
# TODO: make a gradle module and have java in hostvars.nix
# TODO: make a gradle module and have java in device-vars.nix
xdg.dataFile = {
".gradle/gradle.properties".source =
pkgs.writeText "gradle.properties" ''

View file

@ -1,5 +1,3 @@
# Home-manager module
{ pkgs, ... }: {
programs = {
tmux = {

View file

@ -12,7 +12,7 @@
./modules/nvidia.nix
];
services.hostvars = {
services.device-vars = {
username = "matt";
fontSize = 10.0;
};
@ -33,9 +33,9 @@
matt = {
imports = [
../../modules/alacritty.nix
../../modules/dconf.nix
../../modules/firefox
../../home/alacritty.nix
../../home/dconf.nix
../../home/firefox
];
# No touchy

Some files were not shown because too many files have changed in this diff Show more