mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 19:17:45 +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/enka/
|
||||
!hosts/cube/
|
||||
|
||||
!modules/
|
||||
!modules/autofreq/
|
||||
|
@ -13,6 +14,7 @@
|
|||
!modules/btop/
|
||||
!modules/discord/
|
||||
!modules/dunst/
|
||||
!modules/endlessh/
|
||||
!modules/firefox/
|
||||
!modules/fonts/
|
||||
!modules/fuzzel/
|
||||
|
@ -21,15 +23,15 @@
|
|||
!modules/gtk/
|
||||
!modules/helix/
|
||||
!modules/hyprland/
|
||||
!modules/kernel/
|
||||
!modules/kitty/
|
||||
!modules/kmscon/
|
||||
!modules/localisation/
|
||||
!modules/logind/
|
||||
!modules/networkmanager/
|
||||
!modules/nix/
|
||||
!modules/nushell/
|
||||
!modules/openssh/
|
||||
!modules/openttd/
|
||||
!modules/packages/
|
||||
!modules/pipewire/
|
||||
!modules/pueue/
|
||||
!modules/python/
|
||||
|
@ -38,8 +40,8 @@
|
|||
!modules/rust/
|
||||
!modules/ssh/
|
||||
!modules/steam/
|
||||
!modules/steck/
|
||||
!modules/sudo/
|
||||
!modules/tmp/
|
||||
!modules/w3m/
|
||||
!modules/waybar/
|
||||
|
||||
|
|
|
@ -149,6 +149,7 @@
|
|||
in {
|
||||
nixosConfigurations = configurations {
|
||||
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 {
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
time.timeZone = "Europe/Istanbul";
|
||||
|
||||
users.users.nixos = graphicalUser {
|
||||
description = "NixOS";
|
||||
extraGroups = [ "wheel" ];
|
||||
|
@ -19,6 +21,7 @@
|
|||
|
||||
(importModules [
|
||||
./hardware.nix
|
||||
./packages.nix
|
||||
|
||||
"autofreq"
|
||||
"bat"
|
||||
|
@ -35,15 +38,14 @@
|
|||
"gtk"
|
||||
"helix"
|
||||
"hyprland"
|
||||
"kernel"
|
||||
"kitty"
|
||||
# "kmscon"
|
||||
"localisation"
|
||||
"logind"
|
||||
"networkmanager"
|
||||
"nix"
|
||||
"nushell"
|
||||
"openttd"
|
||||
"packages"
|
||||
"pipewire"
|
||||
"pueue"
|
||||
"python"
|
||||
|
@ -52,8 +54,8 @@
|
|||
"rust"
|
||||
"ssh"
|
||||
"steam"
|
||||
"steck"
|
||||
"sudo"
|
||||
"tmp"
|
||||
"w3m"
|
||||
"waybar"
|
||||
])
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
{ ulib, pkgs, ... }: with ulib;
|
||||
|
||||
systemConfiguration {
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.loader = {
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
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 {
|
||||
console.keyMap = "trq";
|
||||
|
||||
time.timeZone = "Europe/Istanbul";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = let
|
||||
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 {
|
||||
matchBlocks."*".setEnv.TERM = "xterm-kitty";
|
||||
|
||||
matchBlocks.cube = {
|
||||
hostname = "5.255.78.70";
|
||||
user = "nixos";
|
||||
port = 22;
|
||||
identityFile = "~/.ssh/id_rsa";
|
||||
};
|
||||
|
||||
matchBlocks.robotic = {
|
||||
hostname = "86.105.252.189";
|
||||
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