mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 19:47:47 +00:00
Add cube host
This commit is contained in:
parent
26b3c2ce92
commit
140e5dcd64
16 changed files with 133 additions and 32 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
!hosts/
|
!hosts/
|
||||||
!hosts/enka/
|
!hosts/enka/
|
||||||
|
!hosts/cube/
|
||||||
|
|
||||||
!modules/
|
!modules/
|
||||||
!modules/autofreq/
|
!modules/autofreq/
|
||||||
|
@ -13,6 +14,7 @@
|
||||||
!modules/btop/
|
!modules/btop/
|
||||||
!modules/discord/
|
!modules/discord/
|
||||||
!modules/dunst/
|
!modules/dunst/
|
||||||
|
!modules/endlessh/
|
||||||
!modules/firefox/
|
!modules/firefox/
|
||||||
!modules/fonts/
|
!modules/fonts/
|
||||||
!modules/fuzzel/
|
!modules/fuzzel/
|
||||||
|
@ -21,15 +23,15 @@
|
||||||
!modules/gtk/
|
!modules/gtk/
|
||||||
!modules/helix/
|
!modules/helix/
|
||||||
!modules/hyprland/
|
!modules/hyprland/
|
||||||
|
!modules/kernel/
|
||||||
!modules/kitty/
|
!modules/kitty/
|
||||||
!modules/kmscon/
|
|
||||||
!modules/localisation/
|
!modules/localisation/
|
||||||
!modules/logind/
|
!modules/logind/
|
||||||
!modules/networkmanager/
|
!modules/networkmanager/
|
||||||
!modules/nix/
|
!modules/nix/
|
||||||
!modules/nushell/
|
!modules/nushell/
|
||||||
|
!modules/openssh/
|
||||||
!modules/openttd/
|
!modules/openttd/
|
||||||
!modules/packages/
|
|
||||||
!modules/pipewire/
|
!modules/pipewire/
|
||||||
!modules/pueue/
|
!modules/pueue/
|
||||||
!modules/python/
|
!modules/python/
|
||||||
|
@ -38,8 +40,8 @@
|
||||||
!modules/rust/
|
!modules/rust/
|
||||||
!modules/ssh/
|
!modules/ssh/
|
||||||
!modules/steam/
|
!modules/steam/
|
||||||
!modules/steck/
|
|
||||||
!modules/sudo/
|
!modules/sudo/
|
||||||
|
!modules/tmp/
|
||||||
!modules/w3m/
|
!modules/w3m/
|
||||||
!modules/waybar/
|
!modules/waybar/
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,7 @@
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = configurations {
|
nixosConfigurations = configurations {
|
||||||
enka = "x86_64-linux";
|
enka = "x86_64-linux";
|
||||||
|
cube = "x86_64-linux";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
43
hosts/cube/default.nix
Normal file
43
hosts/cube/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ lib, ulib, ... }: with ulib; merge3
|
||||||
|
|
||||||
|
(systemConfiguration {
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
|
users.users.nixos = normalUser {
|
||||||
|
description = "NixOS";
|
||||||
|
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" ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
|
(homeConfiguration {
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
programs.git.extraConfig.commit.gpgSign = lib.mkForce false;
|
||||||
|
})
|
||||||
|
|
||||||
|
(importModules [
|
||||||
|
./hardware.nix
|
||||||
|
./packages.nix
|
||||||
|
|
||||||
|
"bat"
|
||||||
|
"btop"
|
||||||
|
"endlessh"
|
||||||
|
"git"
|
||||||
|
"helix"
|
||||||
|
"kernel"
|
||||||
|
"localisation"
|
||||||
|
"networkmanager"
|
||||||
|
"nix"
|
||||||
|
"nushell"
|
||||||
|
"openssh"
|
||||||
|
"pueue"
|
||||||
|
"python"
|
||||||
|
"ripgrep"
|
||||||
|
"rust"
|
||||||
|
"ssh"
|
||||||
|
"sudo"
|
||||||
|
"tmp"
|
||||||
|
])
|
25
hosts/cube/hardware.nix
Normal file
25
hosts/cube/hardware.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ ulib, modulesPath, ... }: with ulib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.grub = enabled {
|
||||||
|
device = "/dev/vda";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"ata_piix"
|
||||||
|
"sr_mod"
|
||||||
|
"uhci_hcd"
|
||||||
|
"virtio_blk"
|
||||||
|
"virtio_pci"
|
||||||
|
];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/a14e3685-693a-4099-a2fe-ce959935dd50";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
}
|
17
hosts/cube/packages.nix
Normal file
17
hosts/cube/packages.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
|
systemPackages (with pkgs; [
|
||||||
|
fastfetch
|
||||||
|
fd
|
||||||
|
hyperfine
|
||||||
|
moreutils
|
||||||
|
nix-index
|
||||||
|
nix-output-monitor
|
||||||
|
p7zip
|
||||||
|
pstree
|
||||||
|
strace
|
||||||
|
tree
|
||||||
|
yt-dlp
|
||||||
|
|
||||||
|
gh
|
||||||
|
])
|
|
@ -3,6 +3,8 @@
|
||||||
(systemConfiguration {
|
(systemConfiguration {
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Istanbul";
|
||||||
|
|
||||||
users.users.nixos = graphicalUser {
|
users.users.nixos = graphicalUser {
|
||||||
description = "NixOS";
|
description = "NixOS";
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
|
@ -19,6 +21,7 @@
|
||||||
|
|
||||||
(importModules [
|
(importModules [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
|
./packages.nix
|
||||||
|
|
||||||
"autofreq"
|
"autofreq"
|
||||||
"bat"
|
"bat"
|
||||||
|
@ -35,15 +38,14 @@
|
||||||
"gtk"
|
"gtk"
|
||||||
"helix"
|
"helix"
|
||||||
"hyprland"
|
"hyprland"
|
||||||
|
"kernel"
|
||||||
"kitty"
|
"kitty"
|
||||||
# "kmscon"
|
|
||||||
"localisation"
|
"localisation"
|
||||||
"logind"
|
"logind"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"nix"
|
"nix"
|
||||||
"nushell"
|
"nushell"
|
||||||
"openttd"
|
"openttd"
|
||||||
"packages"
|
|
||||||
"pipewire"
|
"pipewire"
|
||||||
"pueue"
|
"pueue"
|
||||||
"python"
|
"python"
|
||||||
|
@ -52,8 +54,8 @@
|
||||||
"rust"
|
"rust"
|
||||||
"ssh"
|
"ssh"
|
||||||
"steam"
|
"steam"
|
||||||
"steck"
|
|
||||||
"sudo"
|
"sudo"
|
||||||
|
"tmp"
|
||||||
"w3m"
|
"w3m"
|
||||||
"waybar"
|
"waybar"
|
||||||
])
|
])
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
{ ulib, pkgs, ... }: with ulib;
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.loader = {
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
systemd-boot.editor = false;
|
systemd-boot.editor = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.tmp.cleanOnBoot = true;
|
|
||||||
}
|
}
|
||||||
|
|
7
modules/endlessh/default.nix
Normal file
7
modules/endlessh/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
services.endlessh = enabled {
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
5
modules/kernel/default.nix
Normal file
5
modules/kernel/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ ulib, pkgs, ... }: with ulib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
}
|
|
@ -1,9 +0,0 @@
|
||||||
{ ulib, theme, ... }: with ulib;
|
|
||||||
|
|
||||||
systemConfiguration {
|
|
||||||
services.kmscon = enabled {
|
|
||||||
extraConfig = "xkb-layout=tr";
|
|
||||||
fonts = [ theme.font.mono ];
|
|
||||||
hwRender = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,10 +1,8 @@
|
||||||
{ ulib, ... }: with ulib;
|
{ lib, ulib, ... }: with ulib;
|
||||||
|
|
||||||
systemConfiguration {
|
systemConfiguration {
|
||||||
console.keyMap = "trq";
|
console.keyMap = "trq";
|
||||||
|
|
||||||
time.timeZone = "Europe/Istanbul";
|
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
i18n.extraLocaleSettings = let
|
i18n.extraLocaleSettings = let
|
||||||
locale = "tr_TR.UTF-8";
|
locale = "tr_TR.UTF-8";
|
||||||
|
|
11
modules/openssh/default.nix
Normal file
11
modules/openssh/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, ulib, ... }: with ulib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
services.openssh = enabled {
|
||||||
|
ports = if config.services.endlessh.enable then [ 2222 ] else [ 22 ];
|
||||||
|
settings = {
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,6 +4,13 @@ homeConfiguration {
|
||||||
programs.ssh = enabled {
|
programs.ssh = enabled {
|
||||||
matchBlocks."*".setEnv.TERM = "xterm-kitty";
|
matchBlocks."*".setEnv.TERM = "xterm-kitty";
|
||||||
|
|
||||||
|
matchBlocks.cube = {
|
||||||
|
hostname = "5.255.78.70";
|
||||||
|
user = "nixos";
|
||||||
|
port = 22;
|
||||||
|
identityFile = "~/.ssh/id_rsa";
|
||||||
|
};
|
||||||
|
|
||||||
matchBlocks.robotic = {
|
matchBlocks.robotic = {
|
||||||
hostname = "86.105.252.189";
|
hostname = "86.105.252.189";
|
||||||
user = "rgbcube";
|
user = "rgbcube";
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{ ulib, pkgs, ... }: with ulib; merge
|
|
||||||
|
|
||||||
(systemPackages (with pkgs; [
|
|
||||||
steck
|
|
||||||
]))
|
|
||||||
|
|
||||||
(homeConfiguration {
|
|
||||||
programs.nushell.shellAliases.share = "steck paste";
|
|
||||||
})
|
|
5
modules/tmp/default.nix
Normal file
5
modules/tmp/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ ulib, ... }: with ulib;
|
||||||
|
|
||||||
|
systemConfiguration {
|
||||||
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue