Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
06f997c5ef
|
||
|
|
4251ae2da5
|
||
|
|
b42b873eb1
|
||
|
|
4effe953c8 | ||
|
|
645a4163f5
|
||
|
|
4845485547
|
||
|
|
ac74b85231
|
||
|
|
42da578f75 |
+1
-1
@@ -75,7 +75,7 @@ fileSystems."/" =
|
|||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-label/nixboot";
|
{ device = "/dev/disk/by-label/nixboot";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0077" "dmask=0077" ]; # only root may read /boot
|
||||||
};
|
};
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
{ device = "/dev/disk/by-label/nixhome";
|
{ device = "/dev/disk/by-label/nixhome";
|
||||||
|
|||||||
Generated
+21
@@ -41,6 +41,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1790948122,
|
||||||
|
"narHash": "sha256-fDMYyzY1lI5b8RuCMrvoaIgTeRwNnTG4dNk1ucROlQE=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "0953bb1a609df63013176e3463393f8df993d3ef",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1790689126,
|
"lastModified": 1790689126,
|
||||||
@@ -102,6 +122,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"noctalia": "noctalia"
|
"noctalia": "noctalia"
|
||||||
|
|||||||
@@ -11,6 +11,10 @@
|
|||||||
url = "github:noctalia-dev/noctalia-shell";
|
url = "github:noctalia-dev/noctalia-shell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nixos-hardware = {
|
||||||
|
url = "github:NixOS/nixos-hardware";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
nixvim = {
|
nixvim = {
|
||||||
url = "github:nix-community/nixvim";
|
url = "github:nix-community/nixvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -52,6 +56,7 @@
|
|||||||
default = mkHost "default";
|
default = mkHost "default";
|
||||||
neon = mkHost "neon";
|
neon = mkHost "neon";
|
||||||
argon = mkHost "argon";
|
argon = mkHost "argon";
|
||||||
|
krypton = mkHost "krypton";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,7 @@
|
|||||||
# argon: desktop with an amd gpu and three luks-encrypted data drives.
|
# argon: desktop with an amd gpu and three luks-encrypted data drives.
|
||||||
# The drives are unlocked in the initrd with keyfiles from /etc/nixos/keys.
|
|
||||||
|
|
||||||
{ lib, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
# luks name -> partition uuid, mounted at /mnt/<name>
|
|
||||||
drives = {
|
|
||||||
data1 = "dfae62cc-bad1-4879-bf9a-461bde833625";
|
|
||||||
data2 = "8312edae-9247-481b-a313-52a7f848f027";
|
|
||||||
nvmecache = "2352250e-4ebe-4f9a-bf66-0d4aaa961bd8";
|
|
||||||
};
|
|
||||||
key = name: "/etc/nixos/keys/${name}.key";
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/nixos/appimage.nix
|
../../modules/nixos/appimage.nix
|
||||||
@@ -19,6 +9,7 @@ in
|
|||||||
../../modules/nixos/audio.nix
|
../../modules/nixos/audio.nix
|
||||||
../../modules/nixos/bootloader.nix
|
../../modules/nixos/bootloader.nix
|
||||||
../../modules/nixos/certificates.nix
|
../../modules/nixos/certificates.nix
|
||||||
|
../../modules/nixos/data-drives.nix
|
||||||
../../modules/nixos/gnupg.nix
|
../../modules/nixos/gnupg.nix
|
||||||
../../modules/nixos/greetd.nix
|
../../modules/nixos/greetd.nix
|
||||||
../../modules/nixos/locales.nix
|
../../modules/nixos/locales.nix
|
||||||
@@ -46,22 +37,12 @@ in
|
|||||||
};
|
};
|
||||||
hardware.amdgpu.initrd.enable = true;
|
hardware.amdgpu.initrd.enable = true;
|
||||||
|
|
||||||
# encrypted data drives
|
# encrypted data drives, see data-drives.nix
|
||||||
boot.initrd.secrets = lib.mapAttrs' (name: _: lib.nameValuePair (key name) (key name)) drives;
|
local.dataDrives = {
|
||||||
boot.initrd.luks.devices = lib.mapAttrs (name: uuid: {
|
data1 = "dfae62cc-bad1-4879-bf9a-461bde833625";
|
||||||
device = "/dev/disk/by-uuid/${uuid}";
|
data2 = "8312edae-9247-481b-a313-52a7f848f027";
|
||||||
keyFile = key name;
|
nvmecache = "2352250e-4ebe-4f9a-bf66-0d4aaa961bd8";
|
||||||
# trim for ssds, ignored by drives without discard support
|
};
|
||||||
allowDiscards = true;
|
|
||||||
}) drives;
|
|
||||||
fileSystems = lib.mapAttrs' (
|
|
||||||
name: _:
|
|
||||||
lib.nameValuePair "/mnt/${name}" {
|
|
||||||
device = "/dev/mapper/${name}";
|
|
||||||
fsType = "ext4";
|
|
||||||
options = [ "nofail" ];
|
|
||||||
}
|
|
||||||
) drives;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
amdgpu_top
|
amdgpu_top
|
||||||
|
|||||||
@@ -39,8 +39,8 @@
|
|||||||
device = "/dev/disk/by-label/nixboot";
|
device = "/dev/disk/by-label/nixboot";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [
|
options = [
|
||||||
"fmask=0022"
|
"fmask=0077"
|
||||||
"dmask=0022"
|
"dmask=0077"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
device = "/dev/disk/by-label/nixboot";
|
device = "/dev/disk/by-label/nixboot";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [
|
options = [
|
||||||
"fmask=0022"
|
"fmask=0077"
|
||||||
"dmask=0022"
|
"dmask=0077"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# krypton: framework 13 pro, intel core ultra x7 358H
|
||||||
|
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.nixos-hardware.nixosModules.framework-intel-core-ultra-series3
|
||||||
|
../../modules/nixos/appimage.nix
|
||||||
|
../../modules/nixos/astro.nix
|
||||||
|
../../modules/nixos/audio.nix
|
||||||
|
../../modules/nixos/bootloader.nix
|
||||||
|
../../modules/nixos/certificates.nix
|
||||||
|
../../modules/nixos/docker.nix
|
||||||
|
../../modules/nixos/gnupg.nix
|
||||||
|
../../modules/nixos/locales.nix
|
||||||
|
../../modules/nixos/networking.nix
|
||||||
|
../../modules/nixos/niri.nix
|
||||||
|
../../modules/nixos/noctalia.nix
|
||||||
|
../../modules/nixos/openssh.nix
|
||||||
|
../../modules/nixos/packages.nix
|
||||||
|
../../modules/nixos/protonvpn.nix
|
||||||
|
../../modules/nixos/sddm.nix
|
||||||
|
../../modules/nixos/services.nix
|
||||||
|
../../modules/nixos/settings.nix
|
||||||
|
../../modules/nixos/steam.nix
|
||||||
|
../../modules/nixos/users.nix
|
||||||
|
../../modules/nixos/vial.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# host-specific niri config (input devices, laptop binds)
|
||||||
|
home-manager.users.aaron.imports = [ ./niri.nix ];
|
||||||
|
|
||||||
|
networking.hostName = "krypton";
|
||||||
|
system.stateVersion = "26.05"; # don't change
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
# 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,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.initrd.luks.devices."cryptroot" = {
|
||||||
|
device = "/dev/disk/by-label/nixcrypt";
|
||||||
|
allowDiscards = true;
|
||||||
|
bypassWorkqueues = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixroot";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/nixboot";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" = {
|
||||||
|
device = "/dev/disk/by-label/nixhome";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-label/nixswap"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
hardware.cpu.intel.npu.enable = true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# krypton: framework 13 laptop, the built-in display is auto-configured by niri
|
||||||
|
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
wayland.windowManager.niri.settings = {
|
||||||
|
input.touchpad = {
|
||||||
|
tap = { };
|
||||||
|
natural-scroll = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
layout.gaps = lib.mkForce 10;
|
||||||
|
|
||||||
|
binds = {
|
||||||
|
"Print".screenshot = { };
|
||||||
|
"Ctrl+Print".screenshot-screen = { };
|
||||||
|
"Mod+Shift+P".power-off-monitors = { };
|
||||||
|
|
||||||
|
# finer brightness steps
|
||||||
|
"XF86MonBrightnessUp".spawn-sh = lib.mkForce "brightnessctl --class=backlight set +1%";
|
||||||
|
"XF86MonBrightnessDown".spawn-sh = lib.mkForce "brightnessctl --class=backlight set 1%-";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,5 +1,15 @@
|
|||||||
|
# neon: thinkpad t14 gen1 (intel)
|
||||||
|
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-intel-gen1
|
||||||
../../modules/nixos/appimage.nix
|
../../modules/nixos/appimage.nix
|
||||||
../../modules/nixos/astro.nix
|
../../modules/nixos/astro.nix
|
||||||
../../modules/nixos/audio.nix
|
../../modules/nixos/audio.nix
|
||||||
@@ -25,6 +35,16 @@
|
|||||||
# host-specific niri config (input devices, laptop binds)
|
# host-specific niri config (input devices, laptop binds)
|
||||||
home-manager.users.aaron.imports = [ ./niri.nix ];
|
home-manager.users.aaron.imports = [ ./niri.nix ];
|
||||||
|
|
||||||
|
# nixos-hardware's intel module adds intel-compute-runtime-legacy1 (opencl),
|
||||||
|
# which isn't cached and currently fails to build; not needed on neon
|
||||||
|
hardware.graphics.extraPackages = lib.mkForce (
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
|
intel-media-driver
|
||||||
|
vpl-gpu-rt
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
networking.hostName = "neon";
|
networking.hostName = "neon";
|
||||||
system.stateVersion = "25.11"; # don't change
|
system.stateVersion = "25.11"; # don't change
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,8 +43,8 @@
|
|||||||
device = "/dev/disk/by-label/nixboot";
|
device = "/dev/disk/by-label/nixboot";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [
|
options = [
|
||||||
"fmask=0022"
|
"fmask=0077"
|
||||||
"dmask=0022"
|
"dmask=0077"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# luks-encrypted data drives, unlocked after boot via /etc/crypttab with
|
||||||
|
# keyfiles from /etc/nixos/keys/<name>.key on the encrypted root.
|
||||||
|
# Not in boot.initrd.luks on purpose: keyfiles there end up in the initrd
|
||||||
|
# on the unencrypted /boot.
|
||||||
|
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
drives = config.local.dataDrives;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.local.dataDrives = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
default = { };
|
||||||
|
example = {
|
||||||
|
data1 = "dfae62cc-bad1-4879-bf9a-461bde833625";
|
||||||
|
};
|
||||||
|
description = "luks name -> luks partition uuid, mounted at /mnt/<name>";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (drives != { }) {
|
||||||
|
environment.etc.crypttab.text = lib.concatStrings (
|
||||||
|
lib.mapAttrsToList (
|
||||||
|
name: uuid: "${name} /dev/disk/by-uuid/${uuid} /etc/nixos/keys/${name}.key luks,discard,nofail\n"
|
||||||
|
) drives
|
||||||
|
);
|
||||||
|
|
||||||
|
fileSystems = lib.mapAttrs' (
|
||||||
|
name: _:
|
||||||
|
lib.nameValuePair "/mnt/${name}" {
|
||||||
|
device = "/dev/mapper/${name}";
|
||||||
|
fsType = "ext4";
|
||||||
|
options = [ "nofail" ];
|
||||||
|
}
|
||||||
|
) drives;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user