Update
This commit is contained in:
parent
31ac58592e
commit
849eb5dd11
@ -8,11 +8,12 @@ The laptop configuration is used by an Omen 16 laptop w/ nvidia and an amd gpu r
|
|||||||
The configurations files can be found in the `hosts/laptop` directory.
|
The configurations files can be found in the `hosts/laptop` directory.
|
||||||
|
|
||||||
| Category | Name |
|
| Category | Name |
|
||||||
|-----------------------------------------|----------------|
|
| --------------------------------------- | -------------- |
|
||||||
| WM | Hyprland |
|
| WM | Hyprland |
|
||||||
| | hyprlock |
|
| | hyprlock |
|
||||||
| | hyprpaper |
|
| | hyprpaper |
|
||||||
| | hypridle |
|
| | hypridle |
|
||||||
|
| | hyprcursor |
|
||||||
| | wlogout |
|
| | wlogout |
|
||||||
| Bar | waybar |
|
| Bar | waybar |
|
||||||
| Terminal | kitty |
|
| Terminal | kitty |
|
||||||
@ -49,7 +50,6 @@ I exposed some services to the internet using a reverse proxy (Nginx) and cloudf
|
|||||||
- Nextcloud
|
- Nextcloud
|
||||||
- Vaultwarden
|
- Vaultwarden
|
||||||
- Adguard Home
|
- Adguard Home
|
||||||
- Unifi Controler
|
|
||||||
- Uptime Kuma
|
- Uptime Kuma
|
||||||
- "Jackflix"
|
- "Jackflix"
|
||||||
- Jellyfin, Transmission, *arr
|
- Jellyfin, Transmission, *arr
|
||||||
|
@ -17,7 +17,7 @@ It's a simple way to manage your system configuration and dotfiles.
|
|||||||
- 🏠 `home` are the dotfiles and configuration files for the users
|
- 🏠 `home` are the dotfiles and configuration files for the users
|
||||||
- 'programs' is a collection of apps configured with home-manager
|
- 'programs' is a collection of apps configured with home-manager
|
||||||
- 'scripts' is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
- 'scripts' is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
||||||
- 'system' is some desktop environment like configuration
|
- 'system' is some "desktop environment" configuration
|
||||||
- 'wallpapers' are... wallpapers
|
- 'wallpapers' are... wallpapers
|
||||||
- 💻 `hosts` are the system configuration files
|
- 💻 `hosts` are the system configuration files
|
||||||
- 'laptop' is my configuration for my laptop with Nvidia that you can copy
|
- 'laptop' is my configuration for my laptop with Nvidia that you can copy
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
nurpkgs.url = "github:nix-community/NUR";
|
nurpkgs.url = "github:nix-community/NUR"; # TODO: test to remove
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/laptop/configuration.nix # CHANGEME
|
./hosts/laptop/configuration.nix # CHANGEME
|
||||||
inputs.nixos-hardware.nixosModules.omen-16-n0005ne # CHANGE ME
|
inputs.nixos-hardware.nixosModules.omen-16-n0280nd # CHANGEME
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ inputs.nurpkgs.overlay ];
|
nixpkgs.overlays = [ inputs.nurpkgs.overlay ];
|
||||||
|
@ -5,49 +5,20 @@
|
|||||||
../modules/nvidia.nix
|
../modules/nvidia.nix
|
||||||
# ../modules/prime.nix
|
# ../modules/prime.nix
|
||||||
../modules/tuigreet.nix
|
../modules/tuigreet.nix
|
||||||
|
../modules/timezone.nix
|
||||||
../modules/usb.nix
|
../modules/usb.nix
|
||||||
|
../modules/systemd-boot.nix
|
||||||
|
../modules/users.nix
|
||||||
|
../modules/audio.nix
|
||||||
|
../modules/bluetooth.nix
|
||||||
./variables.nix
|
./variables.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
|
||||||
boot = {
|
|
||||||
loader.efi.canTouchEfiVariables = true;
|
|
||||||
loader.systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
consoleMode = "auto";
|
|
||||||
};
|
|
||||||
tmp.cleanOnBoot = true;
|
|
||||||
kernelPackages =
|
|
||||||
pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
|
||||||
};
|
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.hostName = config.var.hostname;
|
networking.hostName = config.var.hostname;
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
|
||||||
# Timezone and locale
|
|
||||||
time.timeZone = config.var.timeZone;
|
|
||||||
i18n.defaultLocale = config.var.defaultLocale;
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = config.var.extraLocale;
|
|
||||||
LC_IDENTIFICATION = config.var.extraLocale;
|
|
||||||
LC_MEASUREMENT = config.var.extraLocale;
|
|
||||||
LC_MONETARY = config.var.extraLocale;
|
|
||||||
LC_NAME = config.var.extraLocale;
|
|
||||||
LC_NUMERIC = config.var.extraLocale;
|
|
||||||
LC_PAPER = config.var.extraLocale;
|
|
||||||
LC_TELEPHONE = config.var.extraLocale;
|
|
||||||
LC_TIME = config.var.extraLocale;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Users
|
|
||||||
users.users.${config.var.username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "${config.var.username} account";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
tailscale.enable = config.var.tailscale;
|
tailscale.enable = config.var.tailscale;
|
||||||
xserver = {
|
xserver = {
|
||||||
@ -69,11 +40,6 @@
|
|||||||
};
|
};
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
XDG_DATA_HOME = "$HOME/.local/share";
|
XDG_DATA_HOME = "$HOME/.local/share";
|
||||||
@ -85,25 +51,6 @@
|
|||||||
NIXOS_OZONE_WL = "1";
|
NIXOS_OZONE_WL = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
wireplumber = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = {
|
|
||||||
"10-disable-camera" = {
|
|
||||||
"wireplumber.profiles" = { main."monitor.libcamera" = "disabled"; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
warn-dirty = false
|
warn-dirty = false
|
||||||
@ -126,7 +73,8 @@
|
|||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
||||||
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
|
nixpkgs.config.permittedInsecurePackages =
|
||||||
|
[ "electron-25.9.0" ]; # TODO: test to remove
|
||||||
|
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = config.var.autoUpgrade;
|
enable = config.var.autoUpgrade;
|
||||||
@ -136,7 +84,7 @@
|
|||||||
allowReboot = false;
|
allowReboot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = { # TODO: test to remove
|
||||||
enable = true;
|
enable = true;
|
||||||
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
|
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# change the nvim's obsidian configuration if you want to enable that:
|
# change the nvim's obsidian configuration if you want to enable that:
|
||||||
obsidian = true;
|
obsidian = true;
|
||||||
tailscale = true;
|
tailscale = true;
|
||||||
usbguard = false;
|
usbguard = false; # TODO: Add the allow list variable
|
||||||
|
|
||||||
theme = import ../themes/nixy.nix; # select your theme here
|
theme = import ../themes/nixy.nix; # select your theme here
|
||||||
};
|
};
|
||||||
|
20
hosts/modules/audio.nix
Normal file
20
hosts/modules/audio.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
wireplumber = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
"10-disable-camera" = {
|
||||||
|
"wireplumber.profiles" = { main."monitor.libcamera" = "disabled"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
hosts/modules/bluetooth.nix
Normal file
6
hosts/modules/bluetooth.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
}
|
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
enableDefaultPackages = false;
|
enableDefaultPackages = false;
|
||||||
|
|
||||||
# this fixes emoji stuff
|
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
defaultFonts = {
|
defaultFonts = {
|
||||||
monospace = [ "FiraCode Nerd Font Mono" "Noto Color Emoji" ];
|
monospace = [ "FiraCode Nerd Font Mono" "Noto Color Emoji" ];
|
||||||
@ -37,6 +36,5 @@
|
|||||||
emoji = [ "Noto Color Emoji" ];
|
emoji = [ "Noto Color Emoji" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ lib, pkgs, config, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
nvidiaDriverChannel =
|
nvidiaDriverChannel =
|
||||||
config.boot.kernelPackages.nvidiaPackages.beta; # stable, latest, etc.
|
config.boot.kernelPackages.nvidiaPackages.beta; # stable, latest, beta, etc.
|
||||||
in {
|
in {
|
||||||
# Load nvidia driver for Xorg and Wayland
|
# Load nvidia driver for Xorg and Wayland
|
||||||
services.xserver.videoDrivers =
|
services.xserver.videoDrivers =
|
||||||
@ -14,7 +14,6 @@ in {
|
|||||||
];
|
];
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
GBM_BACKEND = "nvidia-drm";
|
GBM_BACKEND = "nvidia-drm";
|
||||||
WLR_NO_HARDWARE_CURSORS = "1";
|
|
||||||
LIBVA_DRIVER_NAME = "nvidia"; # hardware acceleration
|
LIBVA_DRIVER_NAME = "nvidia"; # hardware acceleration
|
||||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
};
|
};
|
||||||
|
12
hosts/modules/systemd-boot.nix
Normal file
12
hosts/modules/systemd-boot.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
boot = {
|
||||||
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
loader.systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
consoleMode = "auto";
|
||||||
|
};
|
||||||
|
tmp.cleanOnBoot = true;
|
||||||
|
kernelPackages =
|
||||||
|
pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
||||||
|
};
|
||||||
|
}
|
15
hosts/modules/timezone.nix
Normal file
15
hosts/modules/timezone.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
time.timeZone = config.var.timeZone;
|
||||||
|
i18n.defaultLocale = config.var.defaultLocale;
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = config.var.extraLocale;
|
||||||
|
LC_IDENTIFICATION = config.var.extraLocale;
|
||||||
|
LC_MEASUREMENT = config.var.extraLocale;
|
||||||
|
LC_MONETARY = config.var.extraLocale;
|
||||||
|
LC_NAME = config.var.extraLocale;
|
||||||
|
LC_NUMERIC = config.var.extraLocale;
|
||||||
|
LC_PAPER = config.var.extraLocale;
|
||||||
|
LC_TELEPHONE = config.var.extraLocale;
|
||||||
|
LC_TIME = config.var.extraLocale;
|
||||||
|
};
|
||||||
|
}
|
7
hosts/modules/users.nix
Normal file
7
hosts/modules/users.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
users.users.${config.var.username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "${config.var.username} account";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
};
|
||||||
|
}
|
@ -9,7 +9,6 @@
|
|||||||
./modules/internal/openssh.nix
|
./modules/internal/openssh.nix
|
||||||
./modules/internal/adguard.nix
|
./modules/internal/adguard.nix
|
||||||
./modules/internal/cockpit.nix
|
./modules/internal/cockpit.nix
|
||||||
# ./modules/internal/unifi.nix # FIXME: unifi5 is deprecated
|
|
||||||
|
|
||||||
# exposed
|
# exposed
|
||||||
./modules/exposed/ntfy-sh.nix
|
./modules/exposed/ntfy-sh.nix
|
||||||
@ -19,7 +18,6 @@
|
|||||||
./modules/exposed/nginx.nix
|
./modules/exposed/nginx.nix
|
||||||
./modules/exposed/nextcloud.nix
|
./modules/exposed/nextcloud.nix
|
||||||
./modules/exposed/vaultwarden.nix
|
./modules/exposed/vaultwarden.nix
|
||||||
# ./modules/exposed/bitcoin-git.nix # FIXME: bitcoin-git is deprecated
|
|
||||||
./modules/www
|
./modules/www
|
||||||
|
|
||||||
# jackflix
|
# jackflix
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
# unifi controller service
|
|
||||||
{
|
|
||||||
services.unifi = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true; # 8443(webui) and other port use by AP
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user