Add ryanpandya.com host
This commit is contained in:
parent
51ffa800ae
commit
45f253e7b6
31
flake.nix
31
flake.nix
@ -257,6 +257,37 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
# Ryanpandya.com
|
||||||
|
starship = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs username;
|
||||||
|
vars = vars;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
./hosts/ryanpandya.com
|
||||||
|
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
backupFileExtension = "hmbak";
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs vars username;
|
||||||
|
};
|
||||||
|
sharedModules = with inputs; [
|
||||||
|
nix-index-database.hmModules.nix-index
|
||||||
|
nur.modules.homeManager.default
|
||||||
|
sops-nix.homeManagerModules.sops
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
152
hosts/ryanpandya.com/default.nix
Normal file
152
hosts/ryanpandya.com/default.nix
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
host,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
# Profiles
|
||||||
|
../../modules
|
||||||
|
# Users
|
||||||
|
../../users
|
||||||
|
];
|
||||||
|
|
||||||
|
# Users
|
||||||
|
ryan.enable = true;
|
||||||
|
|
||||||
|
# Custom modules
|
||||||
|
unfree.enable = true;
|
||||||
|
server.enable = true;
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = lib.mkDefault [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kernelModules = lib.mkDefault [
|
||||||
|
"dm-snapshot"
|
||||||
|
"kvm-amd"
|
||||||
|
"tcp_bbr"
|
||||||
|
"uinput"
|
||||||
|
];
|
||||||
|
kernelParams = lib.mkDefault [
|
||||||
|
"amd_iommu=on"
|
||||||
|
"amd_pstate=active"
|
||||||
|
];
|
||||||
|
# loader = {
|
||||||
|
# systemd-boot = {
|
||||||
|
# windows = {
|
||||||
|
# "11" = {
|
||||||
|
# title = "Windows 11";
|
||||||
|
# efiDeviceHandle = "HD3b";
|
||||||
|
# sortKey = "z_windows";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# tmp.tmpfsSize = "100%";
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
amdgpu.initrd.enable = true;
|
||||||
|
cpu.amd.updateMicrocode = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "orion";
|
||||||
|
wireless.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = "ondemand";
|
||||||
|
|
||||||
|
# services = {
|
||||||
|
# beesd = {
|
||||||
|
# filesystems = {
|
||||||
|
# games = {
|
||||||
|
# spec = "/home/${username}/Games";
|
||||||
|
# verbosity = "crit";
|
||||||
|
# extraOptions = [
|
||||||
|
# "--loadavg-target"
|
||||||
|
# "5.0"
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# pipewire = {
|
||||||
|
# extraConfig = {
|
||||||
|
# pipewire = {
|
||||||
|
# "10-clock-rate" = {
|
||||||
|
# "context.properties" = {
|
||||||
|
# # To make DAC properly work
|
||||||
|
# "default.clock.allowed-rates" = [
|
||||||
|
# 44100
|
||||||
|
# 48000
|
||||||
|
# 88200
|
||||||
|
# 96000
|
||||||
|
# 176400
|
||||||
|
# 192000
|
||||||
|
# ];
|
||||||
|
# "default.clock.quantum" = 512;
|
||||||
|
# "default.clock.min-quantum" = 512;
|
||||||
|
# "default.clock.max-quantum" = 512;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# # Create mono-only microphone output
|
||||||
|
# "10-loopback-mono-mic" = {
|
||||||
|
# "context.modules" = [
|
||||||
|
# {
|
||||||
|
# "name" = "libpipewire-module-loopback";
|
||||||
|
# "args" = {
|
||||||
|
# "node.description" = "Samson G-Track Pro [MONO]";
|
||||||
|
# "capture.props" = {
|
||||||
|
# "node.name" = "capture.mono-microphone";
|
||||||
|
# "audio.position" = [ "FL" ];
|
||||||
|
# "target.object" =
|
||||||
|
# "alsa_input.usb-Samson_Technologies_Samson_G-Track_Pro_D0B3381619112B00-00.analog-stereo";
|
||||||
|
# "stream.dont-remix" = true;
|
||||||
|
# "node.passive" = true;
|
||||||
|
# };
|
||||||
|
# "playback.props" = {
|
||||||
|
# "media.class" = "Audio/Source";
|
||||||
|
# "node.name" = "mono-microphone";
|
||||||
|
# "audio.position" = [ "MONO" ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# ucodenix = {
|
||||||
|
# enable = true;
|
||||||
|
# cpuModelId = "00A60F12";
|
||||||
|
# };
|
||||||
|
# udev = {
|
||||||
|
# # TODO: Remove when Linux 6.13 is out: https://www.phoronix.com/news/AMDGPU-More-Aggressive-Power
|
||||||
|
# extraRules = ''
|
||||||
|
# # https://reddit.com/r/linux_gaming/comments/196tz6v/psa_amdgpu_power_management_may_fix_your/khxs3q3/?context=3 https://gitlab.freedesktop.org/drm/amd/-/issues/1500#note_825883
|
||||||
|
# # https://gitlab.freedesktop.org/drm/amd/-/issues/1500#note_1854170
|
||||||
|
# KERNEL=="card1", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="manual", ATTR{device/pp_power_profile_mode}="1"
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
systemd.targets = {
|
||||||
|
hibernate.enable = false;
|
||||||
|
hybrid-sleep.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
52
hosts/ryanpandya.com/hardware-configuration.nix
Normal file
52
hosts/ryanpandya.com/hardware-configuration.nix
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "tmpfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/iso" =
|
||||||
|
{ device = "/dev/disk/by-uuid/1980-01-01-00-00-00-00";
|
||||||
|
fsType = "iso9660";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix/.ro-store" =
|
||||||
|
{ device = "/iso/nix-store.squashfs";
|
||||||
|
fsType = "squashfs";
|
||||||
|
options = [ "loop" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix/.rw-store" =
|
||||||
|
{ device = "tmpfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/nix/store" =
|
||||||
|
{ device = "overlay";
|
||||||
|
fsType = "overlay";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
@ -43,6 +43,7 @@ with lib;
|
|||||||
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
|
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
|
||||||
env = SDL_VIDEODRIVER, x11
|
env = SDL_VIDEODRIVER, x11
|
||||||
env = MOZ_ENABLE_WAYLAND, 1
|
env = MOZ_ENABLE_WAYLAND, 1
|
||||||
|
env = ANKI_WAYLAND, 1
|
||||||
exec-once = dbus-update-activation-environment --systemd --all
|
exec-once = dbus-update-activation-environment --systemd --all
|
||||||
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
exec-once = killall -q swww;sleep .5 && swww init
|
exec-once = killall -q swww;sleep .5 && swww init
|
||||||
|
|||||||
@ -54,7 +54,7 @@ in
|
|||||||
enableExtensionUpdateCheck = false;
|
enableExtensionUpdateCheck = false;
|
||||||
enableUpdateCheck = false;
|
enableUpdateCheck = false;
|
||||||
extensions = marketplace-extensions;
|
extensions = marketplace-extensions;
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscode; # pkgs.vscodium
|
||||||
userSettings = {
|
userSettings = {
|
||||||
"ansible.ansible.path" = "ansible";
|
"ansible.ansible.path" = "ansible";
|
||||||
"ansible.python.interpreterPath" = "python";
|
"ansible.python.interpreterPath" = "python";
|
||||||
@ -82,10 +82,10 @@ in
|
|||||||
"nix.serverSettings"."nixd"."formatting"."command" = [ "nixfmt" ];
|
"nix.serverSettings"."nixd"."formatting"."command" = [ "nixfmt" ];
|
||||||
"nix.serverSettings"."nixd"."formatting"."options" = {
|
"nix.serverSettings"."nixd"."formatting"."options" = {
|
||||||
"enable" = [ true ];
|
"enable" = [ true ];
|
||||||
"nixos" = {
|
# "nixos" = {
|
||||||
"expr" =
|
# "expr" =
|
||||||
"(builtins.getFlake \"github:keenanweaver/nix-config\").nixosConfigurations.${config.networking.hostName}.options";
|
# "(builtins.getFlake \"github:keenanweaver/nix-config\").nixosConfigurations.${config.networking.hostName}.options";
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
"powershell.powerShellAdditionalExePaths"."exePath" = "${pkgs.powershell}/bin/pwsh";
|
"powershell.powerShellAdditionalExePaths"."exePath" = "${pkgs.powershell}/bin/pwsh";
|
||||||
"powershell.integratedConsole.focusConsoleOnExecute" = false;
|
"powershell.integratedConsole.focusConsoleOnExecute" = false;
|
||||||
@ -101,8 +101,10 @@ in
|
|||||||
"terminal.integrated.minimumContrastRatio" = 1;
|
"terminal.integrated.minimumContrastRatio" = 1;
|
||||||
"terminal.integrated.shellIntegration.enabled" = true;
|
"terminal.integrated.shellIntegration.enabled" = true;
|
||||||
"window.titleBarStyle" = "custom";
|
"window.titleBarStyle" = "custom";
|
||||||
"workbench.editorAssociations"."git-rebase-todo" = "gitlens.rebase";
|
|
||||||
"workbench.sideBar.location" = "right";
|
"workbench.sideBar.location" = "right";
|
||||||
|
"[dockerfile]" = {
|
||||||
|
"editor.defaultFormatter" = "ms-azuretools.vscode-docker";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
35
modules/profiles/server.nix
Normal file
35
modules/profiles/server.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.server;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ./base.nix ];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
server = {
|
||||||
|
enable = lib.mkEnableOption "Enable server in NixOS";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Custom modules
|
||||||
|
base.enable = true;
|
||||||
|
catppuccinTheming.enable = lib.mkForce false;
|
||||||
|
packages.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
# Server tweaks
|
||||||
|
boxxy.enable = lib.mkForce false;
|
||||||
|
distrobox.enable = lib.mkForce false;
|
||||||
|
mullvad.enable = lib.mkForce false;
|
||||||
|
office.enable = lib.mkForce false;
|
||||||
|
pipewire.enable = lib.mkForce false;
|
||||||
|
tailscale.enable = lib.mkForce false;
|
||||||
|
#virtualization.enable = lib.mkForce false;
|
||||||
|
|
||||||
|
home-manager.users.${username} = { };
|
||||||
|
};
|
||||||
|
}
|
||||||
4
todo
4
todo
@ -7,11 +7,11 @@ DONE boot into Hyprland
|
|||||||
DONE zsh error
|
DONE zsh error
|
||||||
DONE sync with thalia (sops, ssh, etc)
|
DONE sync with thalia (sops, ssh, etc)
|
||||||
DONE thalia sunshine output
|
DONE thalia sunshine output
|
||||||
TODO autologin on boot
|
DONE autologin on boot
|
||||||
TODO displayManager theming
|
TODO displayManager theming
|
||||||
TODO ags
|
TODO ags
|
||||||
TODO sudo nopasswd
|
TODO sudo nopasswd
|
||||||
TODO brightness controls
|
TODO brightness controls
|
||||||
TODO sounds (disable bell!!!)
|
TODO sounds (disable bell!!!)
|
||||||
TODO KDEConnect
|
TODO KDEConnect
|
||||||
TODO Numlock
|
DONE Numlock
|
||||||
Loading…
Reference in New Issue
Block a user