another reorg; add options for full or minimal helix install

This commit is contained in:
2025-02-08 17:27:13 +00:00
parent ea4e20e990
commit 99768f0b4a
25 changed files with 265 additions and 394 deletions

69
devices/deck/home.nix Normal file
View File

@@ -0,0 +1,69 @@
{ pkgs, ... }:
{
imports = [
../../home-manager/fonts.nix
../../home-manager/terminal.nix
../../home-manager/gaming.nix
../../home-manager/firefox/firefox.nix
../../home-manager/development/vscode.nix
];
terminal.homeUpdateLocation = "/home/deck/Projects/nixos#deck";
terminal.flakeUpdateLocation = "/home/deck/Projects/nixos";
nixpkgs.config =
{
allowUnfree = true;
};
home.username = "deck";
home.homeDirectory = "/home/deck";
home.stateVersion = "24.05";
home.packages = with pkgs;[
# general
thunderbird
keepassxc
qbittorrent
libreoffice-qt
joplin-desktop
obsidian
# media
strawberry-qt6
jellyfin-media-player
# comms
teamspeak_client
vesktop
];
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
programs = {
home-manager.enable = true;
};
}

View File

@@ -0,0 +1,36 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ inputs, ... }:
{
imports =
[
../../configuration/base.nix
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.disko.nixosModules.default
./disk-config.nix
inputs.home-manager.nixosModules.default
../../configuration/modules/laptop.nix
];
networking.hostName = "starlite"; # Define your hostname.
# Define a user account. Don't forget to set a password with passwd.
users.users.worble = {
initialPassword = "password";
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
linger = true;
};
home-manager.useGlobalPkgs = true;
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
"worble" = import ./home.nix;
};
};
}

View File

@@ -0,0 +1,37 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "128M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,27 @@
# 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, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# 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.enp0s20f0u1u3.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

76
devices/starlite/home.nix Normal file
View File

@@ -0,0 +1,76 @@
{ pkgs, ... }:
{
imports = [
../../home-manager/fonts.nix
../../home-manager/terminal.nix
../../home-manager/firefox/firefox.nix
../../home-manager/development/vscode.nix
];
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#starlite";
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
home.username = "worble";
home.homeDirectory = "/home/worble";
home.stateVersion = "24.05";
home.packages = with pkgs;[
# general
thunderbird
keepassxc
qbittorrent
libreoffice-qt
joplin-desktop
obsidian
# media
strawberry-qt6
jellyfin-media-player
# comms
teamspeak_client
vesktop
];
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
# Let Home Manager install and manage itself.
programs = {
home-manager.enable = true;
chromium = {
enable = true;
package = pkgs.brave;
};
mpv = {
enable = true;
config = {
screenshot-directory = "~/Pictures/";
screenshot-template = "%F/%F_snapshot_%P";
};
};
};
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,55 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ inputs, ... }:
{
imports =
[
../../configuration/base.nix
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.disko.nixosModules.default
./disk-config.nix
inputs.home-manager.nixosModules.default
../../configuration/modules/laptop.nix
../../configuration/modules/virtualisation.nix
../../configuration/modules/gaming.nix
];
networking.hostName = "tuxedo"; # Define your hostname.
fileSystems."/mnt/HDD1" = {
#device = "/dev/disk/by-uuid/35763dc3-c736-4714-ade7-40bf49ad50dd";
fsType = "ext4";
label = "HDD1";
options = [
# If you don't have this options attribute, it'll default to "defaults"
# boot options for fstab. Search up fstab mount options you can use
"users" # Allows any user to mount and unmount
"nofail" # Prevent system from failing if this drive doesn't mount
"exec" # Permit execution of binaries and other executable files
];
};
hardware.tuxedo-drivers.enable = true;
programs.gpu-screen-recorder.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.worble = {
initialPassword = "password";
isNormalUser = true;
extraGroups = [ "wheel" "gamemode" "podman" "cdrom" ]; # Enable sudo for the user.
linger = true;
};
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs; };
sharedModules = [ ];
users = {
"worble" = import ./home.nix;
};
};
}

View File

@@ -0,0 +1,38 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
start = "1M";
end = "128M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,27 @@
# 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, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# 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.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

162
devices/tuxedo/home.nix Normal file
View File

@@ -0,0 +1,162 @@
{ pkgs, ... }:
{
imports = [
../../home-manager/fonts.nix
../../home-manager/terminal.nix
../../home-manager/firefox/firefox.nix
../../home-manager/development/all.nix
../../home-manager/gaming.nix
];
terminal.nixUpdateLocation = "/home/worble/Projects/nixos#tuxedo";
terminal.flakeUpdateLocation = "/home/worble/Projects/nixos";
helix.fullInstall = true;
home.username = "worble";
home.homeDirectory = "/home/worble";
home.stateVersion = "24.05";
home.packages = with pkgs;[
# general
thunderbird
keepassxc
qbittorrent
gimp-with-plugins
joplin-desktop
obsidian
libreoffice-qt
# cmd line tools
rclone
inotify-tools
libnotify
ffmpeg-full
# comms
teamspeak_client
vesktop
teams-for-linux
# media
strawberry-qt6
jellyfin-media-player
haruna
# misc
electrum
gpu-screen-recorder-gtk
];
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
# Let Home Manager install and manage itself.
programs = {
home-manager.enable = true;
firefox = {
profiles.work = import ../../home-manager/firefox/firefox-profile.nix // {
id = 1;
name = "work";
isDefault = false;
settings = {
# allow fonts
"browser.display.use_document_fonts" = 1;
# home page
"browser.startup.homepage" = "https://outlook.office.com|https://teams.microsoft.com/v2|https://dev.azure.com/binhsps/Connect/_boards/board/t/Development%20Team/Stories";
};
};
};
chromium = {
enable = true;
package = pkgs.brave;
};
# install the shaders from anime4k directory for this to work
mpv = {
enable = true;
config = {
profile = "gpu-hq";
vo = "gpu-next";
gpu-api = "vulkan";
hwdec = "vulkan";
screenshot-directory = "/mnt/HDD1/Pictures/";
screenshot-template = "%F/%F_snapshot_%P";
glsl-shaders = "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl";
};
};
mangohud = {
enable = true;
enableSessionWide = true;
settings = {
preset = 1;
};
};
};
systemd.user = {
services = {
rclone-media = {
Unit = {
Description = "rclone-media /mnt/HDD1/Videos/";
After = [ "network.target" "mnt-HDD1.mount" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
Type = "exec";
ExecStart = "${pkgs.writeShellApplication {
name = "rclone-media";
runtimeInputs = [ pkgs.inotify-tools pkgs.libnotify pkgs.rclone ];
text = ''
function rclonecopy {
file=$1
changed_rel=''${file#"/mnt/HDD1/Videos"}
notify-send -a "rclone-media" "rclone for $file triggered"
if rclone copyto "$file" media:"media-7gM2gcrxRjXqfj$changed_rel" ; then
notify-send -a "rclone-media" "rclone complete for $file"
else
notify-send -u critical -a "rclone-media" "rclone failed for $file"
fi
}
inotifywait -mr \
--format '%w%f' \
-e close_write \
/mnt/HDD1/Videos/ |
while read -r file; do
rclonecopy "$file"
done
'';
}}/bin/rclone-media";
};
};
};
};
}