Switch to lix
This commit is contained in:
parent
764a05c73c
commit
d0c6f19a09
22 changed files with 544 additions and 632 deletions
364
machines/persephone.nix
Normal file
364
machines/persephone.nix
Normal file
|
|
@ -0,0 +1,364 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
let
|
||||
bootUUID = "972a8171-eab9-4d23-889c-f8df6f23b034";
|
||||
efiUUID = "A7B7-5AC1";
|
||||
luuksUUID = "ff905a47-8c35-4112-8321-983012be0f71";
|
||||
cryptrootUUID = "db593235-f14f-45fa-adc3-ee7a550763a4";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./persephone/hardware.nix
|
||||
./persephone/networking.nix
|
||||
];
|
||||
|
||||
nix.package = pkgs.lixPackageSets.stable.lix;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import ../overlays)
|
||||
];
|
||||
# FILE SYSTEM
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/${bootUUID}";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/efi" = {
|
||||
device = "/dev/disk/by-uuid/${efiUUID}";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0137"
|
||||
"dmask=0027"
|
||||
];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/${luuksUUID}";
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@root" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/cache" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@var_cache" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@var_log" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/spool" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@var_spool" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/tmp" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@var_tmp" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/machines" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@var_lib_machines" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/portables" = {
|
||||
device = "/dev/disk/by-uuid/${cryptrootUUID}";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@var_lib_portables" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
sbctl
|
||||
|
||||
libva-utils
|
||||
vdpauinfo
|
||||
|
||||
wget
|
||||
adwaita-icon-theme
|
||||
gsettings-desktop-schemas
|
||||
|
||||
ddcutil
|
||||
mesa-demos
|
||||
];
|
||||
# BOOTLOADER
|
||||
boot.bootspec.enable = true;
|
||||
|
||||
boot.initrd = {
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"nvme"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
|
||||
boot.loader.efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "efi";
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot = {
|
||||
enable = lib.mkForce false;
|
||||
xbootldrMountPoint = "/boot";
|
||||
};
|
||||
|
||||
# CPU
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# GPU
|
||||
boot.kernelParams = [ "i915.enable_guc=3" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
vpl-gpu-rt
|
||||
];
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:2:0:0";
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [
|
||||
"modesetting"
|
||||
"nvidia"
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
LIBVA_DRIVER_NAME = "iHD";
|
||||
VDPAU_DRIVER = "va_gl";
|
||||
};
|
||||
|
||||
# AUDIO
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# BLUETOOTH
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General.Experimental = true;
|
||||
};
|
||||
};
|
||||
|
||||
# MISC
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_6_17;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
time.timeZone = "Europe/Paris";
|
||||
console = {
|
||||
keyMap = "us";
|
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-v28b.psf.gz";
|
||||
};
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
substituters = [ "https://cache.nixos-cuda.org" ];
|
||||
trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ];
|
||||
};
|
||||
|
||||
# Enable required services for Wayland
|
||||
security.polkit.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
programs._1password.enable = true;
|
||||
programs._1password-gui = {
|
||||
enable = true;
|
||||
# Certain features, including CLI integration and system authentication support,
|
||||
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
|
||||
polkitPolicyOwners = [ "pml" ];
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"1password/custom_allowed_browsers" = {
|
||||
text = ''
|
||||
firefox
|
||||
'';
|
||||
mode = "0755";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable regreet
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
font.name = "SF Pro";
|
||||
font.size = 16;
|
||||
font.package = pkgs.apple-fonts.sf-pro;
|
||||
settings = {
|
||||
GTK = {
|
||||
font_name = lib.mkForce "SF Pro 16";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.enable = true;
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# FONTS
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
antialias = true;
|
||||
hinting = {
|
||||
enable = true;
|
||||
style = "slight";
|
||||
};
|
||||
subpixel = {
|
||||
rgba = "rgb";
|
||||
lcdfilter = "default";
|
||||
};
|
||||
defaultFonts = {
|
||||
serif = [
|
||||
"SF Pro"
|
||||
"DejaVu Serif"
|
||||
];
|
||||
sansSerif = [
|
||||
"SF Pro"
|
||||
"DejaVu Sans"
|
||||
];
|
||||
monospace = [
|
||||
"Iosevka Cavalier"
|
||||
"DejaVu Sans Mono"
|
||||
];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
apple-fonts.sf-pro
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
(iosevka.override {
|
||||
set = "cavalier";
|
||||
|
||||
privateBuildPlan = {
|
||||
family = "Iosevka Cavalier";
|
||||
spacing = "normal";
|
||||
serifs = "sans";
|
||||
noCvSs = false;
|
||||
exportGlyphNames = true;
|
||||
|
||||
variants.inherits = "ss08";
|
||||
|
||||
variants.weights.Regular = {
|
||||
shape = 400;
|
||||
menu = 400;
|
||||
css = 400;
|
||||
};
|
||||
|
||||
variants.weights.Bold = {
|
||||
shape = 700;
|
||||
menu = 700;
|
||||
css = 700;
|
||||
};
|
||||
|
||||
variants.weights.Italic = {
|
||||
angle = 9.4;
|
||||
shape = "italic";
|
||||
menu = "italic";
|
||||
css = "italic";
|
||||
};
|
||||
|
||||
variants.weights.Upright = {
|
||||
angle = 0;
|
||||
shape = "upright";
|
||||
menu = "upright";
|
||||
css = "upright";
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
# USERSPACE
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users.users.pml = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [
|
||||
"i2c"
|
||||
"wheel"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
vim
|
||||
(vscode-with-extensions.override {
|
||||
vscode = vscodium;
|
||||
vscodeExtensions = with vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
mkhl.direnv
|
||||
yzhang.markdown-all-in-one
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# DO NOT EDIT
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue