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

View file

@ -1,10 +1,10 @@
{ pkgs, hostName, ... }: { pkgs, hostName, ... }:
{ {
# Module imports # Module imports
imports = [ imports = [
# Common Modules # Common Modules
../fish ../fish
../fastfetch ../fastfetch
]; ];
home = { home = {
@ -17,7 +17,7 @@
VISUAL = "micro"; VISUAL = "micro";
XDG_CONFIG_HOME = "$HOME/.config"; XDG_CONFIG_HOME = "$HOME/.config";
}; };
}; };
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;

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

329
flake.nix
View file

@ -7,135 +7,218 @@
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; 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 ARM = "aarch64-linux"; # ARM systems
X86 = "x86_64-linux"; # x86_64 systems X86 = "x86_64-linux"; # x86_64 systems
lib = nixpkgs.lib; lib = nixpkgs.lib;
in { in
nixosConfigurations = { {
caenus = let nixosConfigurations = {
hostName = "caenus"; caenus =
default = ./. + "/host/${hostName}"; let
in lib.nixosSystem { hostName = "caenus";
specialArgs = { inherit hostName; }; default = ./. + "/host/${hostName}";
system = ARM; in
modules = [ lib.nixosSystem {
./nix specialArgs = {
default inherit hostName;
]; };
}; system = ARM;
modules = [
cloud = let ./nix
hostName = "cloud"; default
default = ./. + "/host/${hostName}"; ];
in lib.nixosSystem { };
specialArgs = { inherit hostName; };
system = X86;
modules = [
./nix
default
];
};
komodo = let
hostName = "komodo";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
system = X86;
modules = [
./nix
default
];
};
nix = let
hostName = "nix";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
system = X86;
modules = [
./nix
default
];
};
proxy = let
hostName = "proxy";
default = ./. + "/host/${hostName}";
in lib.nixosSystem {
specialArgs = { inherit hostName; };
system = X86;
modules = [
./nix
default
];
};
};
homeConfigurations = let cloud =
armPkgs = import nixpkgs { let
system = ARM; hostName = "cloud";
config.allowUnfree = true; default = ./. + "/host/${hostName}";
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
default
];
};
komodo =
let
hostName = "komodo";
default = ./. + "/host/${hostName}";
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
default
];
};
nix =
let
hostName = "nix";
default = ./. + "/host/${hostName}";
in
lib.nixosSystem {
specialArgs = {
inherit hostName;
};
system = X86;
modules = [
./nix
default
];
};
proxy =
let
hostName = "proxy";
default = ./. + "/host/${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
default
];
};
};
homeConfigurations =
let
armPkgs = import nixpkgs {
system = ARM;
config.allowUnfree = true;
};
x86Pkgs = import nixpkgs {
system = X86;
config.allowUnfree = true;
# overlays = [ (import ./nixos/overlays) ];
};
in
{
"toph@caenus" =
let
hostName = "caenus";
pkgs = armPkgs;
home = ./. + "/host/${hostName}/home";
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@cloud" =
let
hostName = "cloud";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@komodo" =
let
hostName = "komodo";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@nix" =
let
hostName = "nix";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit hostName;
};
modules = [ home ];
};
"toph@proxy" =
let
hostName = "proxy";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
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 ];
};
}; };
x86Pkgs = import nixpkgs {
system = X86;
config.allowUnfree = true;
# overlays = [ (import ./nixos/overlays) ];
};
in {
"toph@caenus" = let
hostName = "caenus";
pkgs = armPkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
modules = [ home ];
};
"toph@cloud" = let
hostName = "cloud";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
modules = [ home ];
};
"toph@komodo" = let
hostName = "komodo";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
modules = [ home ];
};
"toph@nix" = let
hostName = "nix";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
modules = [ home ];
};
"toph@proxy" = let
hostName = "proxy";
pkgs = x86Pkgs;
home = ./. + "/host/${hostName}/home";
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit hostName; };
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,63 +1,99 @@
{ modulesPath, config, pkgs, hostName, ... }: {
modulesPath,
config,
pkgs,
hostName,
...
}:
let let
admin = "toph"; admin = "toph";
password = "[REDACTED]"; password = "[REDACTED]";
timeZone = "America/New_York"; timeZone = "America/New_York";
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
in { in
## TIMEZONE & LOCALE ## {
time.timeZone = timeZone; ## TIMEZONE & LOCALE ##
i18n.defaultLocale = defaultLocale; 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 ##
users.mutableUsers = false; users.mutableUsers = false;
users.users."${admin}" = { users.users."${admin}" = {
isNormalUser = true; isNormalUser = true;
createHome = true; createHome = true;
homeMode = "750"; description = "Toph";
home = "/home/${admin}"; homeMode = "750";
password = password; home = "/home/${admin}";
extraGroups = [ "wheel" ]; password = password;
shell = pkgs.fish; extraGroups = [
openssh.authorizedKeys.keys = [ "networkmanager"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIClZstYoT64zHnGfE7LMYNiQPN5/gmCt382lC+Ji8lrH PVE" "wheel"
];
};
# INFO: Enable passwordless sudo.
security.sudo.extraRules = [{
users = [ admin ];
commands = [{
command = "ALL" ;
options = [ "NOPASSWD" ];
}];
}];
## PROGRAMS & SERVICES ##
# Shells
environment.shells = with pkgs; [ bash fish ];
programs.fish.enable = true;
## NETWORKING ##
networking = {
dhcpcd.enable = false;
hostName = hostName;
networkmanager.enable = true;
useDHCP = true;
useHostResolvConf = false;
usePredictableInterfaceNames = true;
};
## NIXOS ##
systemd.tmpfiles.rules = [
"d /home/toph/git 0750 toph users -"
]; ];
# forces interfaces to be named predictably shell = pkgs.fish;
# This value determines the NixOS release with which your system is to be openssh.authorizedKeys.keys = [
system.stateVersion = "24.11"; "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIClZstYoT64zHnGfE7LMYNiQPN5/gmCt382lC+Ji8lrH PVE"
# Enable Flakes ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; };
}
# INFO: Enable passwordless sudo.
security.sudo.extraRules = [
{
users = [ admin ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
## PROGRAMS & SERVICES ##
# Shells
environment.shells = with pkgs; [
bash
fish
];
programs.fish.enable = true;
## NETWORKING ##
networking = {
dhcpcd.enable = false;
hostName = hostName;
networkmanager.enable = true;
useDHCP = true;
useHostResolvConf = false;
usePredictableInterfaceNames = true;
};
## NIXOS ##
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"
];
}