moved config
This commit is contained in:
70
config/hosts/aspects/doloro-desktop/disko.nix
Normal file
70
config/hosts/aspects/doloro-desktop/disko.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.desktop = {
|
||||
includes = [ modules.disko ];
|
||||
nixos =
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = lib.mkDefault "/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
priority = 1;
|
||||
size = "4G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"@blackhole" = {
|
||||
mountpoint = "/var/blackhole";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
config/hosts/aspects/doloro-desktop/home.nix
Normal file
24
config/hosts/aspects/doloro-desktop/home.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-desktop = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.sops
|
||||
modules.fish
|
||||
];
|
||||
nixos =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.doloro = {
|
||||
shell = pkgs.fish;
|
||||
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
98
config/hosts/aspects/doloro-desktop/host.nix
Normal file
98
config/hosts/aspects/doloro-desktop/host.nix
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
pkgs,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.desktop = {
|
||||
includes = [
|
||||
modules.nix
|
||||
modules.hyprland
|
||||
];
|
||||
nixos =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "nodev";
|
||||
boot.loader.grub.devices = [
|
||||
"/dev/disk/by-id/nvme-CT1000P2SSD8_2221E632CD1F"
|
||||
"nodev"
|
||||
];
|
||||
#boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
networking.hostName = "doloroo-main"; # Define your hostname.
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# Enable "Silent boot"
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = false;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
fileSystems."/mnt/2tb" = {
|
||||
device = "/dev/disk/by-uuid/0f49aec7-4af2-4f4f-b475-3f4fad2b59c2";
|
||||
fsType = "ext4";
|
||||
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
|
||||
"defaults"
|
||||
"users" # Allows any user to mount and unmount
|
||||
"nofail" # Prevent system from failing if this drive doesn't mount
|
||||
"exec"
|
||||
];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
# prime.offload.enable = true;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
15
config/hosts/aspects/doloro-shared.nix
Normal file
15
config/hosts/aspects/doloro-shared.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
den.aspects.doloro-shared = {
|
||||
includes = [
|
||||
modules.nixvim
|
||||
modules.nix
|
||||
];
|
||||
homeManager = {
|
||||
home = {
|
||||
username = "doloro";
|
||||
homeDirectory = "/home/doloro";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
75
config/hosts/aspects/laptop/disko.nix
Normal file
75
config/hosts/aspects/laptop/disko.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.laptop = {
|
||||
includes = [ modules.disko ];
|
||||
nixos =
|
||||
{ lib, ... }:
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = "/dev/nvme0n1";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
priority = 1;
|
||||
size = "4G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
plainSwap = {
|
||||
size = "48G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both"; # Both "once" and page discard policies
|
||||
resumeDevice = true; # Use for hibernation resume device
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"@" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
25
config/hosts/aspects/laptop/home.nix
Normal file
25
config/hosts/aspects/laptop/home.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
den,
|
||||
__findFile,
|
||||
modules,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.doloro-laptop = {
|
||||
includes = [
|
||||
<den/primary-user>
|
||||
den.aspects.doloro-shared
|
||||
modules.user.doloro
|
||||
modules.sops
|
||||
modules.fish
|
||||
];
|
||||
nixos =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
users.users.doloro = {
|
||||
shell = pkgs.fish;
|
||||
hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
169
config/hosts/aspects/laptop/host.nix
Normal file
169
config/hosts/aspects/laptop/host.nix
Normal file
@@ -0,0 +1,169 @@
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
__findFile,
|
||||
...
|
||||
}:
|
||||
{
|
||||
den.aspects.laptop = {
|
||||
includes = [
|
||||
modules.nix
|
||||
];
|
||||
nixos =
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_6_12; # Hibernate works on 6.12 but not on latest
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest; # Unpinned the linux version for now.. as i am not using hibernate that often
|
||||
networking.hostName = "doloro-nixos-laptop"; # Define your hostname.
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# Configure network connections interactively with nmcli or nmtui.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/London";
|
||||
services.automatic-timezoned.enable = true;
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
"https://attic.scug.io/pkgs"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"pkgs:+sRbfiZMMX5R3PuAPtIRz/emowDoGZNpozibrnrAvuc="
|
||||
];
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
];
|
||||
trusted-users = [
|
||||
"doloro"
|
||||
];
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
hardware = {
|
||||
firmware = [ pkgs.intel-npu-driver ];
|
||||
cpu.intel = {
|
||||
# npu.enable = true;
|
||||
};
|
||||
graphics = {
|
||||
enable = true;
|
||||
# https://github.com/intel/libvpl?tab=readme-ov-file#dispatcher-behavior-when-targeting-intel-gpus
|
||||
extraPackages = with pkgs; [
|
||||
vpl-gpu-rt
|
||||
intel-media-driver # VA-API (iHD) userspace
|
||||
intel-vaapi-driver
|
||||
# vpl-gpu-rt # oneVPL (QSV) runtime
|
||||
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
|
||||
];
|
||||
};
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
PermitRootLogin = "prohibit-password";
|
||||
};
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7"
|
||||
];
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# useXkbConfig = true; # use xkb.options in tty.
|
||||
# };
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.doloro = {
|
||||
# isNormalUser = true;
|
||||
# shell = pkgs.fish;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# packages = with pkgs; [
|
||||
# tree
|
||||
# ];
|
||||
# hashedPasswordFile = config.sops.secrets."doloro-hashed_password".path;
|
||||
# openssh.authorizedKeys.keys = [
|
||||
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBaa6Z5qtBSLEz+A4fQGYPfkOISsRQlmKkVbcx2zxML7" # pc public key
|
||||
# ];
|
||||
# # initialPassword = "sex";
|
||||
# };
|
||||
users.mutableUsers = false;
|
||||
services.system76-scheduler.enable = true;
|
||||
|
||||
# programs.firefox.enable = true;
|
||||
|
||||
# List packages installed in system profile.
|
||||
# You can use https://search.nixos.org/ to find more packages (and options).
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# git
|
||||
# wget
|
||||
# # tlp-pd
|
||||
# brightnessctl
|
||||
# nvtopPackages.intel
|
||||
# seahorse
|
||||
# ];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
||||
# to actually do that.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user