Initial Setup for Rune

Added vscode as welll
This commit is contained in:
Chris Toph 2025-01-10 01:14:12 -05:00
parent ed852e320b
commit 4f0961448f
11 changed files with 556 additions and 184 deletions

View file

@ -0,0 +1,13 @@
[?25l ▄▄▄ ▄▄▄ ▄▄▄ 
▄▄▄▄ ▄▄▄▄▄▄▄ 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄ 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄░▄ 
▄▄▄▄▄ ▄▄▄▄▄▄ 
▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄░
▄▄▄▄▄▄ ▄▄▄ 
░▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ 
▄ ▄▄▄▄▄▄▄▄▄░░▄▄▄▄ 
▄▄▄▄▄▄▄ ▄░▄ 
▄▄▄ ▄▄▄▄ ▄▄▄ 
[?25h

10
common/vscode/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
# bbenoist.Nix
# brettm12345.nixfmt-vscode
];
};
}

151
flake.nix
View file

@ -7,19 +7,33 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser.url = "github:0xc000022070/zen-browser-flake";
};
outputs = { self, nixpkgs, home-manager, ... }: let
outputs =
{
self,
nixpkgs,
home-manager,
zen-browser,
...
}:
let
ARM = "aarch64-linux"; # ARM systems
X86 = "x86_64-linux"; # x86_64 systems
lib = nixpkgs.lib;
in {
in
{
nixosConfigurations = {
caenus = let
caenus =
let
hostName = "caenus";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = ARM;
modules = [
./nix
@ -27,11 +41,15 @@
];
};
cloud = let
cloud =
let
hostName = "cloud";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
@ -39,11 +57,15 @@
];
};
komodo = let
komodo =
let
hostName = "komodo";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
@ -51,11 +73,15 @@
];
};
nix = let
nix =
let
hostName = "nix";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
@ -63,11 +89,31 @@
];
};
proxy = let
proxy =
let
hostName = "proxy";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
default
];
};
rune =
let
hostName = "rune";
default = ./. + "/host/${hostName}";
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
@ -76,7 +122,8 @@
};
};
homeConfigurations = let
homeConfigurations =
let
armPkgs = import nixpkgs {
system = ARM;
config.allowUnfree = true;
@ -86,54 +133,90 @@
config.allowUnfree = true;
# overlays = [ (import ./nixos/overlays) ];
};
in {
"toph@caenus" = let
in
{
"toph@caenus" =
let
hostName = "caenus";
pkgs = armPkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@cloud" = let
"toph@cloud" =
let
hostName = "cloud";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@komodo" = let
"toph@komodo" =
let
hostName = "komodo";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@nix" = let
"toph@nix" =
let
hostName = "nix";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@proxy" = let
"toph@proxy" =
let
hostName = "proxy";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@rune" =
let
hostName = "rune";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
zen = zen-browser.packages."${X86}".beta;
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit hostName zen;
};
modules = [ home ];
};
};

57
host/rune/default.nix Normal file
View file

@ -0,0 +1,57 @@
{
modulesPath,
config,
pkgs,
hostName,
...
}:
{
## MODULES & IMPORTS ##
imports = [
# Common Modules
../../common/ssh
# Import hardware configuration.
./hardware.nix
# Modules
./modules/steam
./modules/gnome
];
## NETWORKING ##
networking.networkmanager.enable = true;
## ENVIORMENT & PACKAGES ##
environment.systemPackages = with pkgs; [
git
micro
nixfmt-rfc-style
openssh
ranger
sshfs
wget
];
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.java = {
enable = true;
package = pkgs.jdk;
};
environment.variables = {
HOSTNAME = hostName;
};
}

67
host/rune/hardware.nix Normal file
View file

@ -0,0 +1,67 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
programs.fuse.userAllowOther = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/28a9ac4d-1e87-4731-9c06-916711d83cb2";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/B182-E50E";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
"/pool" = {
device = "toph@104.40.4.24:/pool";
fsType = "sshfs";
options = [
"defaults"
"reconnect"
"_netdev"
"allow_other"
"identityfile=/home/toph/.ssh/pve"
];
};
# "/home/toph/git" = {
# fsType = "none";
# device = "/pool/git";
# options = ["bind" "nofail"];
# };
};
swapDevices = [ { device = "/dev/disk/by-uuid/81b6fa27-af94-41d4-9070-8754087a4c26"; } ];
networking.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1,34 @@
{ pkgs, zen, config, ... }:
{
# Module imports
imports = [
# Common Modules
../../../common/home
../../../common/git
../../../common/vscode
# Modules
../modules/gnome/home.nix
];
# Enables app shorcuts
targets.genericLinux.enable = true;
xdg.mime.enable = true;
xdg.systemDirs.data = [ "${config.home.homeDirectory}/.nix-profile/share/applications" ];
home.packages = with pkgs; [
chafa
fastfetch
fish
fishPlugins.grc
fishPlugins.tide
grc
nodejs_22
pnpm
prettierd
spotify
telegram-desktop
vesktop
zen
];
}

View file

@ -0,0 +1,47 @@
{ pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver = {
enable = true;
# Enable the GNOME Desktop Environment.
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
# Configure keymap in X11
xkb = {
layout = "us";
variant = "";
};
};
services.udev.packages = with pkgs; [ gnome-settings-daemon ];
environment.systemPackages = with pkgs; [
gnome-tweaks
gnomeExtensions.appindicator
gnomeExtensions.tiling-shell
gnomeExtensions.dash-to-panel
gnomeExtensions.blur-my-shell
];
environment.gnome.excludePackages = (
with pkgs;
[
atomix # puzzle game
epiphany # web browser
evince # document viewer
gedit # text editor
gnome-help
gnome-maps
gnome-music
gnome-photos
gnome-terminal
gnome-tour
hitori # sudoku game
iagno # go game
tali # poker game
]
);
}

View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
{
dconf = {
enable = true;
settings."org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = with pkgs.gnomeExtensions; [
appindicator.extensionUuid
blur-my-shell.extensionUuid
dash-to-panel.extensionUuid
tiling-shell.extensionUuid
];
};
};
}

View file

@ -0,0 +1,8 @@
{
programs.steam = {
enable = true;
# remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
# localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
}

View file

@ -1,4 +1,10 @@
{ modulesPath, config, pkgs, hostName, ... }:
{
modulesPath,
config,
pkgs,
hostName,
...
}:
let
@ -7,20 +13,36 @@ let
timeZone = "America/New_York";
defaultLocale = "en_US.UTF-8";
in {
in
{
## TIMEZONE & LOCALE ##
time.timeZone = timeZone;
i18n.defaultLocale = defaultLocale;
i18n.extraLocaleSettings = {
LC_ADDRESS = defaultLocale;
LC_IDENTIFICATION = defaultLocale;
LC_MEASUREMENT = defaultLocale;
LC_MONETARY = defaultLocale;
LC_NAME = defaultLocale;
LC_NUMERIC = defaultLocale;
LC_PAPER = defaultLocale;
LC_TELEPHONE = defaultLocale;
LC_TIME = defaultLocale;
};
## USERS ##
users.mutableUsers = false;
users.users."${admin}" = {
isNormalUser = true;
createHome = true;
description = "Toph";
homeMode = "750";
home = "/home/${admin}";
password = password;
extraGroups = [ "wheel" ];
extraGroups = [
"networkmanager"
"wheel"
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIClZstYoT64zHnGfE7LMYNiQPN5/gmCt382lC+Ji8lrH PVE"
@ -28,17 +50,24 @@ in {
};
# INFO: Enable passwordless sudo.
security.sudo.extraRules = [{
security.sudo.extraRules = [
{
users = [ admin ];
commands = [{
command = "ALL" ;
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}];
}];
}
];
}
];
## PROGRAMS & SERVICES ##
# Shells
environment.shells = with pkgs; [ bash fish ];
environment.shells = with pkgs; [
bash
fish
];
programs.fish.enable = true;
## NETWORKING ##
@ -55,9 +84,16 @@ in {
systemd.tmpfiles.rules = [
"d /home/toph/git 0750 toph users -"
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# forces interfaces to be named predictably
# This value determines the NixOS release with which your system is to be
system.stateVersion = "24.11";
# Enable Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}