1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 19:47:47 +00:00

Multi hosts, finally

This commit is contained in:
RGBCube 2024-01-02 13:41:00 +03:00
parent 084d2093bd
commit bd42073480
No known key found for this signature in database
48 changed files with 200 additions and 311 deletions

View file

@ -1,5 +1,5 @@
{ ulib, ... }: with ulib;
systemConfiguration {
desktopSystemConfiguration {
services.auto-cpufreq = enabled {};
}

View file

@ -1,6 +1,6 @@
{ ulib, ... }: with ulib;
systemConfiguration {
desktopSystemConfiguration {
services.blueman = enabled {};
hardware.bluetooth = enabled {

View file

@ -1,9 +0,0 @@
{ ulib, pkgs, ... }: with ulib;
systemConfiguration {
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
systemd-boot.editor = false;
};
}

View file

@ -6,6 +6,6 @@ homeConfiguration {
programs.btop = enabled {
settings.color_theme = "base16";
settings.rounded_corners = theme.corner-radius != 0;
settings.rounded_corners = theme.cornerRadius != 0;
};
}

View file

@ -1,10 +1,14 @@
{ ulib, pkgs, theme, ... }: with ulib; merge
{ ulib, pkgs, theme, ... }: with ulib; merge3
(graphicalConfiguration {
(desktopSystemConfiguration {
nixpkgs.config.allowUnfree = true;
})
(desktopHomeConfiguration {
xdg.configFile."Vencord/settings/quickCss.css".text = theme.discordCss;
})
(graphicalPackages (with pkgs; [
(desktopSystemPackages (with pkgs; [
(discord.override {
withOpenASAR = true;
withVencord = true;

View file

@ -1,6 +1,6 @@
{ ulib, theme, ... }: with ulib;
graphicalConfiguration {
desktopHomeConfiguration {
services.dunst = with theme.withHashtag; enabled {
iconTheme = icons;
@ -9,13 +9,13 @@ graphicalConfiguration {
dmenu = "fuzzel --dmenu";
corner_radius = corner-radius;
corner_radius = cornerRadius;
gap_size = margin;
horizontal_padding = padding;
padding = padding;
frame_color = base0A;
frame_width = border-width;
frame_width = borderWidth;
separator_color = "frame";
background = base00;

View file

@ -1,6 +1,6 @@
{ ulib, ... }: with ulib;
systemConfiguration {
serverSystemConfiguration {
services.endlessh = enabled {
openFirewall = true;
port = 22;

View file

@ -1,6 +1,6 @@
{ ulib, ... }: with ulib;
graphicalConfiguration {
desktopHomeConfiguration {
programs.firefox = enabled {};
programs.librewolf = enabled {};

View file

@ -8,7 +8,7 @@
};
})
(systemFonts (with pkgs; [
(desktopSystemFonts (with pkgs; [
theme.font.sans.package
theme.font.mono.package

View file

@ -1,6 +1,6 @@
{ ulib, theme, ... }: with ulib;
graphicalConfiguration {
desktopHomeConfiguration {
programs.fuzzel = with theme; enabled {
settings.main = {
dpi-aware = false;
@ -29,8 +29,8 @@ graphicalConfiguration {
};
settings.border = {
radius = corner-radius;
width = border-width;
radius = cornerRadius;
width = borderWidth;
};
};
}

View file

@ -1,6 +1,10 @@
{ lib, ulib, pkgs, upkgs, theme, ... }: with ulib;
{ inputs, lib, ulib, pkgs, upkgs, theme, ... }: with ulib; merge
graphicalConfiguration {
(desktopSystemConfiguration {
home-manager.sharedModules = [ inputs.ghosttyModule.homeModules.default ];
})
(desktopHomeConfiguration {
programs.nushell.environmentVariables.TERMINAL = "ghostty";
programs.ghostty = enabled {
@ -69,4 +73,4 @@ graphicalConfiguration {
];
};
};
}
})

View file

@ -1,4 +1,4 @@
{ ulib, pkgs, ... }: with ulib;
{ lib, ulib, pkgs, ... }: with ulib;
homeConfiguration {
programs.nushell.shellAliases = {
@ -59,11 +59,11 @@ homeConfiguration {
init.defaultBranch = "master";
push.autoSetupRemote = true;
url."ssh://git@github.com/".insteadOf = "https://github.com/";
} // lib.mkIf ulib.isDesktop {
commit.gpgSign = true;
gpg.format = "ssh";
user.signingKey = "~/.ssh/id_rsa";
url."ssh://git@github.com/".insteadOf = "https://github.com/";
};
};
}

View file

@ -1,10 +1,10 @@
{ ulib, pkgs, theme, ... }: with ulib; merge
(systemConfiguration {
(desktopSystemConfiguration {
programs.dconf = enabled {};
})
(graphicalConfiguration {
(desktopHomeConfiguration {
gtk = enabled {
gtk3.extraCss = theme.adwaitaGtkCss;
gtk4.extraCss = theme.adwaitaGtkCss;

View file

@ -67,7 +67,7 @@
};
})
(homePackages (with pkgs; [
(desktopSystemPackages (with pkgs; [
# CMAKE
cmake-language-server

View file

@ -1,6 +1,6 @@
{ ulib, pkgs, upkgs, theme, ... }: with ulib; merge3
(systemConfiguration {
(desktopSystemConfiguration {
hardware.opengl = enabled {};
xdg.portal = enabled {
@ -12,7 +12,7 @@
};
})
(graphicalConfiguration {
(desktopHomeConfiguration {
wayland.windowManager.hyprland = with theme; enabled {
package = upkgs.hyprland;
@ -140,7 +140,7 @@
''
decoration {
drop_shadow = false
rounding = ${toString corner-radius}
rounding = ${toString cornerRadius}
blur {
enabled = false
@ -154,7 +154,7 @@
gaps_in = ${toString (margin/ 2)}
gaps_out = ${toString margin}
border_size = ${toString border-width}
border_size = ${toString borderWidth}
col.active_border = 0xFF${base0A}
col.nogroup_border_active = 0xFF${base0A}
@ -215,7 +215,7 @@
};
})
(homePackages (with pkgs; [
(desktopHomePackages (with pkgs; [
brightnessctl
cliphist
grim

View file

@ -1,6 +1,6 @@
{ ulib, theme, ... }: with ulib;
graphicalConfiguration {
desktopHomeConfiguration {
programs.kitty = with theme.withHashtag; enabled {
font = with font; {
inherit (mono) name package;

View file

@ -1,6 +1,8 @@
{ ulib, ... }: with ulib;
systemConfiguration {
console.keyMap = "trq";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = let
locale = "tr_TR.UTF-8";

View file

@ -1,5 +1,5 @@
{ ulib, ... }: with ulib;
systemConfiguration {
desktopSystemConfiguration {
services.logind.powerKey = "ignore";
}

5
modules/nano/default.nix Normal file
View file

@ -0,0 +1,5 @@
{ ulib, ... }: with ulib;
systemConfiguration {
environment.defaultPackages = [];
}

View file

@ -1,11 +1,11 @@
{ ulib, ... }: with ulib; merge
(systemConfiguration {
(desktopSystemConfiguration {
networking.networkmanager = enabled {};
users.extraGroups.networkmanager.members = ulib.normalUsers;
users.extraGroups.networkmanager.members = ulib.users.all;
})
(homeConfiguration {
(desktopHomeConfiguration {
programs.nushell.shellAliases.wifi = "nmcli dev wifi show-password";
})

View file

@ -1,4 +1,4 @@
''
{ lib, ulib, ... }: ''
$env.config = {
bracketed_paste: true
buffer_editor: ""
@ -182,15 +182,17 @@ $env.config.cursor_shape = {
$env.config.hooks = {
command_not_found: {||
task status
| where label == boom
| get id
| each {|id|
task kill $id | null
task remove $id | null
}
${lib.optionals ulib.isDesktop ''
task status
| where label == boom
| get id
| each {|id|
task kill $id | null
task remove $id | null
}
task spawn --label boom { pw-play ${./boom.opus} }
task spawn --label boom { pw-play ${./boom.opus} }
''}
}
display_output: "table --expand"
env_change: {}

View file

@ -1,4 +1,4 @@
{ config, ulib, pkgs, upkgs, theme, ... }: with ulib; merge3
{ config, ulib, pkgs, ... } @ inputs: with ulib; merge3
(systemConfiguration {
users.defaultUserShell = pkgs.nushell;
@ -8,11 +8,8 @@
programs.starship = enabled {};
programs.nushell = enabled {
configFile.text = import ./configuration.nix.nu;
envFile.text = import ./environment.nix.nu {
inherit (upkgs) nuScripts;
inherit theme;
};
configFile.text = import ./configuration.nix.nu inputs;
envFile.text = import ./environment.nix.nu inputs;
environmentVariables = {
inherit (config.environment.variables) NIX_LD;

View file

@ -1,7 +1,9 @@
{ nuScripts, theme }: ''
if (tty) == /dev/tty1 {
(Hyprland)
}
{ lib, ulib, upkgs, theme, ... }: ''
${lib.optionals ulib.isDesktop ''
if (tty) == /dev/tty1 {
(Hyprland)
}
''}
$env.PROMPT_INDICATOR = "";
$env.PROMPT_INDICATOR_VI_INSERT = "";
@ -34,5 +36,5 @@ def --wrapped hx [...arguments] {
}
}
use ${nuScripts}/modules/background_task/task.nu
use ${upkgs.nuScripts}/modules/background_task/task.nu
''

View file

@ -1,8 +1,8 @@
{ config, ulib, ... }: with ulib;
{ ulib, ... }: with ulib;
systemConfiguration {
serverSystemConfiguration {
services.openssh = enabled {
ports = if config.services.endlessh.enable then [ 2222 ] else [ 22 ];
ports = [ 2222 ];
settings = {
KbdInteractiveAuthentication = false;
PasswordAuthentication = false;

View file

@ -1,5 +1,5 @@
{ ulib, pkgs, ... }: with ulib;
graphicalPackages (with pkgs; [
desktopHomePackages (with pkgs; [
openttd
])

View file

@ -1,4 +1,4 @@
{ ulib, pkgs, upkgs, ... }: with ulib; merge
{ ulib, pkgs, upkgs, ... }: with ulib; merge3
(systemPackages (with pkgs; [
asciinema
@ -15,9 +15,9 @@
tree
usbutils
yt-dlp
]))
wine
(desktopSystemPackages (with pkgs; [
clang_16
clang-tools_16
gh
@ -27,9 +27,11 @@
maven
upkgs.zig
vlang
wine
]))
(graphicalPackages (with pkgs; [
(desktopHomePackages (with pkgs; [
qbittorrent
thunderbird
whatsapp-for-linux

View file

@ -1,6 +1,6 @@
{ ulib, ... }: with ulib;
systemConfiguration {
desktopSystemConfiguration {
security.rtkit = enabled {};
sound = enabled {};

View file

@ -1,6 +1,6 @@
{ ulib, pkgs, ... }: with ulib;
graphicalConfiguration {
desktopHomeConfiguration {
qt = enabled {
platformTheme = "gnome";
style.name = "adwaita-dark";

View file

@ -1,10 +1,10 @@
{ inputs, ulib, pkgs, ... }: with ulib; merge
(systemConfiguration {
(desktopSystemConfiguration {
nixpkgs.overlays = [ inputs.fenix.overlays.default ];
})
(systemPackages (with pkgs; [
(desktopSystemPackages (with pkgs; [
(fenix.complete.withComponents [
"cargo"
"clippy"

View file

@ -1,6 +1,7 @@
{ ulib, ... }: with ulib;
systemConfiguration {
# TODO: Move to cube host.
services.site = { # enabled {
openFirewall = true;
};

View file

@ -1,8 +1,8 @@
{ ulib, ... }: with ulib;
homeConfiguration {
desktopHomeConfiguration {
programs.ssh = enabled {
matchBlocks."*".setEnv.TERM = "xterm-kitty";
matchBlocks."*".setEnv.TERM = "xterm-kitty";
matchBlocks.cube = {
hostname = "5.255.78.70";

View file

@ -1,12 +1,12 @@
{ ulib, pkgs, ... }: with ulib; merge
(systemConfiguration {
(desktopSystemConfiguration {
# Steam uses 32-bit drivers for some unholy fucking reason.
hardware.opengl.driSupport32Bit = true;
nixpkgs.config.allowUnfree = true;
})
(graphicalPackages (with pkgs; [
(desktopHomePackages (with pkgs; [
steam
]))

View file

@ -3,7 +3,7 @@
systemConfiguration {
security.sudo = enabled {
extraConfig = ''
Defaults timestamp_timeout=-1
Defaults timestamp_timeout=${if ulib.isDesktop then "-1" else "0"}
'';
execWheelOnly = true;
};

View file

@ -1,12 +1,12 @@
{ ulib, theme, ... }: with ulib;
graphicalConfiguration {
desktopHomeConfiguration {
programs.waybar = with theme.withHashtag; enabled {
systemd = enabled {};
settings = [{
layer = "top";
height = 2 * corner-radius;
height = 2 * cornerRadius;
margin-right = margin;
margin-left = margin;
@ -124,7 +124,7 @@ graphicalConfiguration {
style = ''
* {
border: none;
border-radius: ${toString corner-radius}px;
border-radius: ${toString cornerRadius}px;
font-family: "${font.sans.name}";
}