dam you can't conditionally import, cringe

This commit is contained in:
martyTF 2025-12-16 17:01:01 +01:00
parent db5366102b
commit 720828a097
7 changed files with 68 additions and 77 deletions

View file

@ -5,30 +5,10 @@
...
}:
let
modules =
if config.networking.hostName == "marty-pc" then
[
./system/import_system.nix
./modules/imports.nix
]
else if config.networking.hostName == "marty-latitude" then
[
./system/import_system.nix
./modules/imports.nix
]
else if config.networking.hostName == "marty-server" then
[
./system/import_system.nix
./modules/imports.nix
]
else
[ ];
in
{
imports = modules;
imports = [
./system/import_system.nix
./modules/import_modules.nix
];
}

View file

@ -4,11 +4,22 @@
pkgs,
...
}:
let
enable_git =
if config.networking.hostName == "marty-pc" then
true
else if config.networking.hostName == "marty-latitude" then
true
else if config.networking.hostName == "marty-server" then
true
else
false;
in
{
programs = {
git = {
enable = true;
enable = enable_git;
config = {
init = {
defaultBranch = "main";

View file

@ -5,29 +5,10 @@
...
}:
let
modules =
if config.networking.hostName == "marty-pc" then
[
./git.nix
./vscodium.nix
]
else if config.networking.hostName == "marty-latitude" then
[
./git.nix
./vscodium.nix
]
else if config.networking.hostName == "marty-server" then
[
./git.nix
]
else
[ ];
in
{
imports = modules;
imports = [
./git.nix
./vscodium.nix
];
}

View file

@ -5,11 +5,23 @@
...
}:
let
enable_vscode =
if config.networking.hostName == "marty-pc" then
true
else if config.networking.hostName == "marty-latitude" then
true
else if config.networking.hostName == "marty-server" then
false
else
false;
in
{
programs.vscode = {
enable = true;
enable = enable_vscode;
package = pkgs.vscodium;
defaultEditor = true;
defaultEditor = enable_vscode;
extensions = with pkgs.vscode-extensions; [
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons

View file

@ -5,14 +5,26 @@
...
}:
let
enable_hyprland =
if config.networking.hostName == "marty-pc" then
true
else if config.networking.hostName == "marty-latitude" then
true
else if config.networking.hostName == "marty-server" then
false
else
false;
in
{
programs = {
hyprland = {
enable = true;
xwayland.enable = true;
enable = enable_hyprland;
xwayland.enable = enable_hyprland;
};
hyprlock = {
enable = true;
enable = enable_hyprland;
};
};
}

View file

@ -5,26 +5,9 @@
...
}:
let
modules =
if config.networking.hostName == "marty-pc" then
[
./hyprland.nix
./waybar.nix
]
else if config.networking.hostName == "marty-latitude" then
[
./hyprland.nix
./waybar.nix
]
else if config.networking.hostName == "marty-server" then
[
]
else
[ ];
in
{
imports = modules;
imports = [
./hyprland.nix
./waybar.nix
];
}

View file

@ -5,10 +5,22 @@
...
}:
let
enable_waybar =
if config.networking.hostName == "marty-pc" then
true
else if config.networking.hostName == "marty-latitude" then
true
else if config.networking.hostName == "marty-server" then
false
else
false;
in
{
programs = {
waybar = {
enable = true;
enable = enable_waybar;
};
};
}