1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 11:07:44 +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

2
.gitignore vendored
View file

@ -10,7 +10,6 @@
!modules/autofreq/
!modules/bat/
!modules/blueman/
!modules/boot/
!modules/btop/
!modules/discord/
!modules/dunst/
@ -27,6 +26,7 @@
!modules/kitty/
!modules/localisation/
!modules/logind/
!modules/nano/
!modules/networkmanager/
!modules/nix/
!modules/nushell/

View file

@ -8,8 +8,8 @@
, hicolor-icon-theme
}:
stdenvNoCC.mkDerivation rec {
pname = "gruvbox-plus-icons";
stdenvNoCC.mkDerivation {
pname = "gruvbox-plus-icon-pack";
version = "unstable-2023-12-07";
src = fetchFromGitHub {
@ -42,6 +42,6 @@ stdenvNoCC.mkDerivation rec {
homepage = "https://github.com/SylEleuth/gruvbox-plus-icon-pack";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ eureka-cpu ];
maintainers = with maintainers; [ eureka-cpu RGBCube ];
};
}

View file

@ -86,7 +86,6 @@
nixSuper,
nixpkgs,
homeManager,
ghosttyModule,
nuScripts,
fenix,
zig,
@ -95,28 +94,38 @@
themes,
...
} @ inputs: let
lib = nixpkgs.lib;
importConfiguration = host: let
hostDefault = import ./hosts/${host} {
# Will explode if you try to use user dependant stuff.
ulib = (import ./lib lib null) // { merge = lib.recursiveUpdate; };
};
configuration = host: {
system,
normalUsers,
graphicalUsers ? [],
}: let
ulib = import ./lib lib normalUsers graphicalUsers;
users = {
all = builtins.attrNames hostDefault.users.users ++ [ "root" ];
graphical = builtins.attrNames (lib.filterAttrs (name: value: builtins.elem "graphical" (value.extraGroups or [])) hostDefault.users.users);
};
pkgs = import nixpkgs { inherit system; };
system = hostDefault.nixpkgs.hostPlatform;
upkgs = {
inherit nuScripts;
lib = nixpkgs.lib;
ulib = import ./lib lib users;
zig = zig.packages.${system}.master;
} // (lib.genAttrs
[ "nixSuper" "hyprland" "hyprpicker" "ghostty" "zls" ]
(name: inputs.${name}.packages.${system}.default));
pkgs = import nixpkgs { inherit system; };
upkgs = let
defaults = lib.genAttrs
[ "nixSuper" "hyprland" "hyprpicker" "ghostty" "zls" ]
(name: inputs.${name}.packages.${system}.default);
other = {
inherit nuScripts;
zig = zig.packages.${system}.master;
};
in defaults // other;
theme = themes.custom (themes.raw.gruvbox-dark-hard // {
corner-radius = 8;
border-width = 2;
cornerRadius = 8;
borderWidth = 2;
margin = 6;
padding = 8;
@ -131,19 +140,16 @@
font.mono.package = (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; });
icons.name = "Gruvbox-Plus-Dark";
icons.package = pkgs.callPackage (import ./derivations/gruvbox-icons.nix) {};
icons.package = pkgs.callPackage (import ./derivations/gruvbox-plus-icon-pack.nix) {};
});
defaultConfiguration = {
environment.defaultPackages = [];
home-manager.sharedModules = [ ghosttyModule.homeModules.default ];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
networking.hostName = host;
nixpkgs.hostPlatform = system;
};
in lib.nixosSystem {
inherit system;
@ -151,26 +157,17 @@
modules = [
homeManager.nixosModules.default
site.nixosModules.default
defaultConfiguration
./hosts/${host}
];
] ++ (builtins.attrValues (builtins.mapAttrs (name: type: ./modules/${name}) (builtins.readDir ./modules)))
++ (builtins.attrValues (builtins.mapAttrs (name: type: ./hosts/${host}/${name}) (builtins.readDir ./hosts/${host})));
};
configurations = builtins.mapAttrs configuration;
hosts = (builtins.attrNames
(nixpkgs.lib.filterAttrs
(name: value: value == "directory")
(builtins.readDir ./hosts)));
in {
nixosConfigurations = configurations {
enka = {
system = "x86_64-linux";
normalUsers = [ "nixos" "root" ];
graphicalUsers = [ "nixos" ];
};
cube = {
system = "x86_64-linux";
normalUsers = [ "rgb" "root" ];
};
};
nixosConfigurations = nixpkgs.lib.genAttrs hosts importConfiguration;
};
}

View file

@ -1,12 +1,14 @@
{ lib, ulib, ... }: with ulib; merge3
{ ulib, ... }: with ulib; merge
(systemConfiguration {
system.stateVersion = "23.05";
nixpkgs.hostPlatform = "x86_64-linux";
time.timeZone = "Europe/Amsterdam";
users.users.rgb = normalUser {
description = "NixOS";
description = "RGB";
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDRSLWxpIMOZIQv9ggDnAwSxmux/TZvuEPgq2HFiH+oI2OE07xYQAiroBVI5HH+aIg1nwpYtArANoD8V9Hrx2XCo2py/fMi9LhJWNMlFVcRLqYrCmrZYhBqZhxXIdY+wXqkSE7kvTKsz84BrhwilfA/bqTgVw2Ro6w0RnTzUhlYx4w10DT3isN09cQJMgvuyWNRlpGpkEGhPwyXythKM2ERoHTfq/XtpiGZQeLr6yoTTd9q4rbvnGGka5IUEz3RrmeXEs13l02IY6dCUFJkRRsK8dvB9zFjQyM08IqdaoHeudZoCOsnl/AiegZ7C5FoYEKIXY86RqxS3TH3nwuxe2fXTNr9gwf2PumM1Yh2WxV4+pHQOksxW8rWgv1nXMT5AG0RrJxr+S0Nn7NBbzCImrprX3mg4vJqT24xcUjUSDYllEMa2ioXGCeff8cwVKK/Ly5fwj0AX1scjiw+b7jD6VvDLA5z+ALwCblxiRMCN0SOMk9/V2Xsg9YIRMHyQwpqu8k= u0_a216@localhost" ];
};
@ -14,31 +16,4 @@
(homeConfiguration {
home.stateVersion = "23.11";
programs.git.extraConfig.commit.gpgSign = lib.mkForce false;
})
(importModules [
./hardware.nix
"bat"
"btop"
"endlessh"
"git"
"helix"
"kernel"
"localisation"
"networkmanager"
"nix"
"nushell"
"openssh"
"pueue"
"packages"
"python"
"ripgrep"
"rust"
"site"
"ssh"
"sudo"
"tmp"
])

View file

@ -1,9 +1,7 @@
{ ulib, modulesPath, ... }: with ulib;
systemConfiguration {
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
];
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub = enabled {
device = "/dev/vda";

View file

@ -1,17 +0,0 @@
{ ulib, pkgs, ... }: with ulib;
systemPackages (with pkgs; [
fastfetch
fd
hyperfine
moreutils
nix-index
nix-output-monitor
p7zip
pstree
strace
tree
yt-dlp
gh
])

View file

@ -1,12 +1,13 @@
{ ulib, ... }: with ulib; merge3
{ ulib, ... }: with ulib; merge
(systemConfiguration {
system.stateVersion = "23.05";
console.keyMap = "trq";
nixpkgs.hostPlatform = "x86_64-linux";
time.timeZone = "Europe/Istanbul";
users.users.nixos = normalUser {
users.users.nixos = graphicalUser {
description = "NixOS";
extraGroups = [ "wheel" ];
};
@ -19,44 +20,3 @@
(homeConfiguration {
home.stateVersion = "23.05";
})
(importModules [
./hardware.nix
"autofreq"
"bat"
"blueman"
"boot"
"btop"
"discord"
"dunst"
"firefox"
"fonts"
"fuzzel"
"ghostty"
"git"
"gtk"
"helix"
"hyprland"
"kernel"
"kitty"
"localisation"
"logind"
"networkmanager"
"nix"
"nushell"
"openttd"
"packages"
"pipewire"
"pueue"
"python"
"qt"
"ripgrep"
"rust"
"ssh"
"steam"
"sudo"
"tmp"
"w3m"
"waybar"
])

View file

@ -1,4 +1,12 @@
{
{ ulib, ... }: with ulib;
systemConfiguration {
boot.loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
systemd-boot.editor = false;
};
boot.initrd.availableKernelModules = [
"ahci"
"rtsx_pci_sdmmc"

View file

@ -1,44 +0,0 @@
{ ulib, pkgs, upkgs, ... }: with ulib; merge
(systemPackages (with pkgs; [
asciinema
fastfetch
fd
hyperfine
moreutils
nix-index
nix-output-monitor
p7zip
pstree
strace
timg
tree
usbutils
yt-dlp
wine
clang_16
clang-tools_16
gh
go
jdk
lld
maven
upkgs.zig
vlang
]))
(graphicalPackages (with pkgs; [
qbittorrent
thunderbird
whatsapp-for-linux
xfce.thunar
krita
obs-studio
libreoffice
hunspellDicts.en_US
hunspellDicts.en_GB-ize
]))

View file

@ -1,31 +1,37 @@
normalUsers: graphicalUsers:
rec {
inherit normalUsers graphicalUsers;
systemConfiguration = configuration: configuration;
systemPackages = packages: systemConfiguration {
environment.systemPackages = packages;
};
systemFonts = packages: systemConfiguration {
fonts.packages = packages;
};
lib: users: let
userHomeConfiguration = users: configuration: {
home-manager.users = builtins.foldl' (final: user: final // {
${user} = configuration;
}) {} (if builtins.isList users then users else [ users ]);
};
in rec {
inherit users;
graphicalConfiguration = userHomeConfiguration graphicalUsers;
graphicalPackages = packages: graphicalConfiguration {
home.packages = packages;
};
isServer = users.graphical == [];
isDesktop = !isServer;
homeConfiguration = userHomeConfiguration normalUsers;
homePackages = packages: homeConfiguration {
home.packages = packages;
};
# For every machine.
systemConfiguration = configuration: configuration;
systemPackages = packages: systemConfiguration { environment.systemPackages = packages; };
systemFonts = packages: systemConfiguration { fonts.packages = packages; };
# For every user, on every machine.
homeConfiguration = configuration: { home-manager.sharedModules = [ configuration ]; };
homePackages = packages: homeConfiguration { home.packages = packages; };
# For every desktop.
desktopSystemConfiguration = configuration: if isServer then {} else configuration;
desktopSystemPackages = packages: if isServer then {} else systemPackages packages;
desktopSystemFonts = packages: if isServer then {} else systemFonts packages;
# For every graphical user on every desktop.
desktopHomeConfiguration = configuration: if isServer then {} else userHomeConfiguration users.graphical configuration;
desktopHomePackages = packages: if isServer then {} else desktopHomeConfiguration { home.packages = packages; };
# For every server.
serverSystemConfiguration = configuration: if isServer then configuration else {};
serverSystemPackages = packages: if isServer then systemPackages packages else {};
serverSystemFonts = packages: if isServer then systemFonts packages else {};
# For every user on every server.
serverHomeConfiguration = configuration: if isServer then homeConfiguration configuration else {};
serverHomePackages = packages: if isServer then homePackages packages else {};
}

View file

@ -1,9 +1,5 @@
lib: normalUsers: graphicalUsers:
(import ./configuration.nix normalUsers graphicalUsers)
//
(import ./merge.nix lib)
//
(import ./modules.nix)
//
(import ./values.nix)
lib: users: let
configuration = import ./configuration.nix lib users;
merge = import ./merge.nix lib;
values = import ./values.nix;
in configuration // merge // values

View file

@ -1,8 +1,11 @@
lib:
rec {
merge = lib.recursiveUpdate;
merge3 = x: y: merge (merge x y);
merge4 = x: y: merge3 (merge x y);
merge5 = x: y: merge4 (merge x y);
lib: let
mergeAll = builtins.foldl' (collected: module: {
imports = collected.imports ++ [ module ];
}) { imports = []; };
in {
merge = a: b: mergeAll [ a b ];
merge3 = a: b: c: mergeAll [ a b c ];
merge4 = a: b: c: d: mergeAll [ a b c d ];
merge5 = a: b: c: d: e: mergeAll [ a b c d e ];
merge6 = a: b: c: d: e: f: mergeAll [ a b c d e f ];
}

View file

@ -1,8 +0,0 @@
{
importModules = modules: {
imports = builtins.map (module: if builtins.isPath module then
module
else
../modules/${module}) modules;
};
}

View file

@ -6,4 +6,9 @@
normalUser = attributes: attributes // {
isNormalUser = true;
};
graphicalUser = attributes: attributes // {
isNormalUser = true;
extraGroups = [ "graphical" ] ++ attributes.extraGroups or [];
};
}

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}";
}