refactor(wip): make common a bit better

This commit is contained in:
matt1432 2023-12-01 03:07:17 -05:00
parent cab24db17b
commit 3184379170
10 changed files with 39 additions and 29 deletions

View file

@ -1,10 +1,7 @@
{ {
config, config,
home-manager,
lib, lib,
nixpkgs, nixpkgs,
nixpkgs-wayland,
nix-index-database,
nh, nh,
nur, nur,
nix-melt, nix-melt,
@ -13,15 +10,13 @@
... ...
}: { }: {
imports = [ imports = [
./cachix.nix
./overlays
./device-vars.nix ./device-vars.nix
home-manager.nixosModules.default ./modules
nh.nixosModules.default ./overlays
./modules/locale.nix nur.nixosModules.nur
./modules/locate.nix nh.nixosModules.default
]; ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -42,9 +37,6 @@
exact = false; exact = false;
}; };
}; };
nixpkgs.overlays = [
nixpkgs-wayland.overlay
];
nh = { nh = {
enable = true; enable = true;
@ -67,24 +59,13 @@
}; };
home-manager.users = let home-manager.users = let
user = config.services.device-vars.username;
default = { default = {
imports = [ imports = [
nur.hmModules.nur nur.hmModules.nur
nix-index-database.hmModules.nix-index
{
programs = {
nix-index-database.comma.enable = true;
nix-index = {
enable = true;
enableBashIntegration = true;
};
};
}
./home/bash ./home
./home/git.nix
./home/neovim
./home/tmux.nix
./device-vars.nix ./device-vars.nix
({osConfig, ...}: { ({osConfig, ...}: {
@ -115,11 +96,11 @@
imagemagick imagemagick
usbutils usbutils
]); ]);
home.stateVersion = lib.mkDefault "23.05"; home.stateVersion = lib.mkDefault "23.05";
}; };
in { in {
root = default; root = default;
matt = default; # TODO: make user an array?
${user} = default;
}; };
} }

9
common/home/default.nix Normal file
View file

@ -0,0 +1,9 @@
{
imports = [
./bash
./git
./neovim
./nix-index
./tmux
];
}

View file

@ -0,0 +1,11 @@
{nix-index-db, ...}: {
imports = [nix-index-db.hmModules.nix-index];
programs = {
nix-index-database.comma.enable = true;
nix-index = {
enable = true;
enableBashIntegration = true;
};
};
}

View file

@ -0,0 +1,7 @@
{
imports = [
./cachix.nix
./locale.nix
./locate.nix
];
}

View file

@ -1,4 +1,4 @@
{neovim-flake, ...}: { {neovim-flake, nixpkgs-wayland, ...}: {
imports = [ imports = [
./dracula-theme.nix ./dracula-theme.nix
./regreet.nix ./regreet.nix
@ -7,7 +7,9 @@
nixpkgs.overlays = [ nixpkgs.overlays = [
(import ./blueberry.nix) (import ./blueberry.nix)
(import ./squeekboard.nix) (import ./squeekboard.nix)
neovim-flake.overlay neovim-flake.overlay
nixpkgs-wayland.overlay
(final: prev: { (final: prev: {
spotifywm = final.callPackage ./pkgs/spotifywm.nix {}; spotifywm = final.callPackage ./pkgs/spotifywm.nix {};

Binary file not shown.

BIN
flake.nix

Binary file not shown.