Skip to content

Commit

Permalink
modules/home
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Sep 28, 2024
1 parent 32b5ca0 commit 84eef98
Show file tree
Hide file tree
Showing 33 changed files with 49 additions and 47 deletions.
3 changes: 2 additions & 1 deletion configurations/home/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ let
in
{
imports = [
self.homeModules.common-linux
self.homeModules.default
self.homeModules.linux-only
];
home.username = "srid";
home.homeDirectory = "/home/srid";
Expand Down
10 changes: 10 additions & 0 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ in
)
(builtins.readDir "${self}/configurations/nixos");

homeModules = inputs.nixpkgs.lib.mapAttrs'
(fn: _:
let
inherit (inputs.nixpkgs) lib;
name = lib.removeSuffix ".nix" fn;
in
lib.nameValuePair name "${self}/modules/home/${fn}"
)
(builtins.readDir "${self}/modules/home");

overlays = lib.mapAttrs'
(fn: _:
let name = lib.removeSuffix ".nix" fn; in
Expand Down
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
[
./flake-module.nix
./users
./home
./nixos
./nix-darwin
];
Expand Down
43 changes: 0 additions & 43 deletions home/default.nix

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions modules/home/darwin-only.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
imports = [
./all/zsh.nix
./all/wezterm
./all/himalaya.nix
./all/_1password.nix
];
}
19 changes: 19 additions & 0 deletions modules/home/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
home.stateVersion = "22.11";
imports = [
./all/tmux.nix
./all/neovim.nix
# ./helix.nix
./all/ssh.nix
./all/starship.nix
./all/terminal.nix
./all/nix.nix
./all/git.nix
./all/direnv.nix
./all/zellij.nix
# ./nushell.nix
./all/just.nix
# ./powershell.nix
./all/juspay.nix
];
}
6 changes: 6 additions & 0 deletions modules/home/linux-only.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
imports = [
./all/bash.nix
./all/vscode-server.nix
];
}
3 changes: 2 additions & 1 deletion nix-darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
{
home-manager.users.${config.people.myself} = {
imports = [
self.homeModules.common-darwin
self.homeModules.default
self.homeModules.darwin-only
];
};
}
Expand Down
3 changes: 2 additions & 1 deletion nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
users.users.${config.people.myself}.isNormalUser = true;
home-manager.users.${config.people.myself} = {
imports = [
self.homeModules.common-linux
self.homeModules.default
self.homeModules.linux-only
];
};
}
Expand Down

0 comments on commit 84eef98

Please sign in to comment.