moved config
This commit is contained in:
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