From 25911fcecd5efd4c95a98f21b7110232cce7d50d Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 7 Apr 2026 15:25:24 +0200 Subject: Add desktop role for home-manager modules Signed-off-by: Mel --- machines/bismuth/home.nix | 1 + machines/moissanite/home.nix | 1 + machines/serpentine/home.nix | 1 + machines/wolfram/home.nix | 3 +++ modules/home/common.nix | 25 +------------------------ modules/home/desktop.nix | 30 ++++++++++++++++++++++++++++++ modules/home/development-server.nix | 26 +------------------------- 7 files changed, 38 insertions(+), 49 deletions(-) create mode 100644 modules/home/desktop.nix diff --git a/machines/bismuth/home.nix b/machines/bismuth/home.nix index 1eb223e..874d3c9 100644 --- a/machines/bismuth/home.nix +++ b/machines/bismuth/home.nix @@ -3,6 +3,7 @@ { imports = [ ../../modules/home/common.nix + ../../modules/home/desktop.nix ]; xdg.configFile = { diff --git a/machines/moissanite/home.nix b/machines/moissanite/home.nix index 8f27ed2..95fc88a 100644 --- a/machines/moissanite/home.nix +++ b/machines/moissanite/home.nix @@ -3,6 +3,7 @@ { imports = [ ../../modules/home/common.nix + ../../modules/home/desktop.nix ]; home.stateVersion = "25.05"; diff --git a/machines/serpentine/home.nix b/machines/serpentine/home.nix index 73ad27e..8c0c0b7 100644 --- a/machines/serpentine/home.nix +++ b/machines/serpentine/home.nix @@ -2,6 +2,7 @@ { imports = [ + ../../modules/home/common.nix ../../modules/home/development-server.nix ]; diff --git a/machines/wolfram/home.nix b/machines/wolfram/home.nix index 8f27ed2..602453d 100644 --- a/machines/wolfram/home.nix +++ b/machines/wolfram/home.nix @@ -3,6 +3,9 @@ { imports = [ ../../modules/home/common.nix + + # technically not a desktop, but good enough for now + ../../modules/home/desktop.nix ]; home.stateVersion = "25.05"; diff --git a/modules/home/common.nix b/modules/home/common.nix index 4379a2b..a7afb69 100644 --- a/modules/home/common.nix +++ b/modules/home/common.nix @@ -8,9 +8,7 @@ in imports = [ ../foundation/home - ./shell.nix - ./code.nix - ./zed.nix + ./shell.nix # shell settings, fish in this case ]; programs = { @@ -40,7 +38,6 @@ in init.defaultBranch = "main"; pull.rebase = true; }; - }; direnv = { @@ -49,26 +46,6 @@ in }; }; - xdg.configFile = { - # home-manager does not have the option to pass an alacritty - # config file directly. - "alacritty/alacritty.toml".source = ../../configs/alacritty.toml; - }; - - home.file = { - # base .vimrc for tools outside of vim, like the - # VSCode Vim plugin. - ".vimrc".source = ../../configs/.vimrc; - - # special .vimrc for the IdeaVim plugin in JetBrains IDEs. - # `source`s the normal ~/.vimrc and enables IdeaVim-specfic plugins. - ".ideavimrc".source = ../../configs/.ideavimrc; - }; - - home.sessionPath = [ - "$HOME/.local/share/JetBrains/Toolbox/scripts" - ]; - home.packages = [ nx-script ]; diff --git a/modules/home/desktop.nix b/modules/home/desktop.nix new file mode 100644 index 0000000..10b3bf5 --- /dev/null +++ b/modules/home/desktop.nix @@ -0,0 +1,30 @@ +{ ... }: + +{ + imports = [ + ./code.nix # vscode + ./zed.nix # zed editor + ]; + + xdg.configFile = { + # home-manager does not have the option to pass an alacritty + # config file directly. + "alacritty/alacritty.toml".source = ../../configs/alacritty.toml; + }; + + home.file = { + # base .vimrc for tools outside of vim, like the + # VSCode Vim plugin. + ".vimrc".source = ../../configs/.vimrc; + + # special .vimrc for the IdeaVim plugin in JetBrains IDEs. + # `source`s the normal ~/.vimrc and enables IdeaVim-specfic plugins. + ".ideavimrc".source = ../../configs/.ideavimrc; + }; + + home.sessionPath = [ + # add scripts to launch jetbrains products to path, + # like `clion`. + "$HOME/.local/share/JetBrains/Toolbox/scripts" + ]; +} diff --git a/modules/home/development-server.nix b/modules/home/development-server.nix index 3813acf..7dd0e80 100644 --- a/modules/home/development-server.nix +++ b/modules/home/development-server.nix @@ -2,35 +2,11 @@ { imports = [ - ../foundation/home - - ./shell.nix - ./zed.nix + ./zed.nix # zed editor, accessed remotely ]; programs = { # make dev-server accessible from remote zed instance. zed-editor.installRemoteServer = true; - - git = { - enable = true; - userName = "Mel"; - userEmail = "mel@rnrd.eu"; - signing = { - key = "D75A C286 ACA7 00B4 D8EC 377D 2082 F8EC 11CC 009B"; - signByDefault = true; - }; - ignores = [ - # ignore most vim swap-files - "*~" - "[._]*.sw?" - ]; - extraConfig.init.defaultBranch = "main"; - }; - - direnv = { - enable = true; - nix-direnv.enable = true; - }; }; } -- cgit 1.4.1