dam you can't conditionally import, cringe
This commit is contained in:
parent
db5366102b
commit
720828a097
7 changed files with 68 additions and 77 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue