feat: migrate adrastea to new liminalOS configuration scheme
Some checks are pending
Check flake / check (push) Waiting to run

This commit is contained in:
Youwen Wu 2025-01-05 21:20:31 -08:00
parent fa3f4f1880
commit a2593f33f8
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
4 changed files with 71 additions and 223 deletions

View file

@ -141,9 +141,13 @@
./reference/hosts/callisto ./reference/hosts/callisto
]; ];
}; };
adrastea = buildLiminalOS { adrastea = nixpkgs.lib.nixosSystem {
inherit inputs nixpkgs; specialArgs = {
systemModule = ./reference/hosts/adrastea; inherit inputs self;
};
modules = [
./reference/hosts/adrastea
];
}; };
cassini = buildLiminalOS { cassini = buildLiminalOS {
inherit inputs nixpkgs; inherit inputs nixpkgs;

View file

@ -3,61 +3,50 @@
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ {
config, config,
inputs,
pkgs, pkgs,
lib, inputs,
... ...
}: }:
{ {
imports = [ imports = [ ./hardware-configuration.nix ];
# Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader. networking.hostName = "adrastea";
boot = { liminalOS = {
plymouth = { flakeLocation = "/home/youwen/.config/liminalOS";
config.allowUnfree = true;
defaultEditor = inputs.viminal.packages.${pkgs.system}.default;
formFactor = "desktop";
system = {
audio.prod.enable = true;
networking = {
firewallPresets.vite = true;
cloudflareNameservers.enable = true;
};
graphics.nvidia.enable = true;
};
extras.gaming = {
enable = true; enable = true;
# theme = "rings"; roblox.enable = true;
# themePackages = with pkgs; [ utilities.gamemode = {
# # By default we would install all themes enable = true;
# (adi1090x-plymouth-themes.override { gamemodeUsers = [ "youwen" ];
# selected_themes = [ "rings" ]; };
# }) };
# ]; extras.distrobox.enable = true;
font = "${config.stylix.fonts.monospace.package}/share/fonts/truetype/NerdFonts/CaskaydiaCove/CaskaydiaCoveNerdFontMono-Regular.ttf";
}; };
# Enable "Silent Boot" boot = {
consoleLogLevel = 3;
initrd.verbose = false;
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
# "display=HDMI-A-1:2560x1440@144D"
];
# Hide the OS choice for bootloaders.
# It's still possible to open the bootloader list by pressing any key
# It will just not appear on screen unless a key is pressed
loader = { loader = {
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
# timeout = 15;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
# timeout = 0;
systemd-boot = { systemd-boot = {
enable = true; enable = true;
consoleMode = "auto"; consoleMode = "auto";
}; };
}; };
initrd.systemd.enable = true; kernelPackages = pkgs.linuxPackages_zen;
initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device =
"/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
}; };
services.ucodenix = { services.ucodenix = {
@ -65,101 +54,28 @@
cpuModelId = "00A50F00"; cpuModelId = "00A50F00";
}; };
# boot.lanzaboote = {
# enable = false;
# pkiBundle = "/etc/secureboot";
# };
# services.keyd = {
# enable = true;
# keyboards = {
# default = {
# ids = [ "*" ];
# settings = {
# main = {
# capslock = "esc";
# leftalt = "leftcontrol";
# leftcontrol = "leftalt";
# };
# };
# };
# };
# };
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device =
"/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
services.tlp.enable = true; services.tlp.enable = true;
powerManagement = { powerManagement.cpuFreqGovernor = "performance";
powerDownCommands = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
cpuFreqGovernor = "performance";
};
networking.hostName = "adrastea"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# select kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";
# Select internationalisation properties. # hardware.nvidia = {
i18n.defaultLocale = "en_US.UTF-8"; # modesetting.enable = true;
# powerManagement.enable = true;
i18n.extraLocaleSettings = { # powerManagement.finegrained = false;
LC_ADDRESS = "en_US.UTF-8"; # nvidiaSettings = true;
LC_IDENTIFICATION = "en_US.UTF-8"; # open = true;
LC_MEASUREMENT = "en_US.UTF-8"; # # prime = {
LC_MONETARY = "en_US.UTF-8"; # # amdgpuBusId = "PCI:4:0:0";
LC_NAME = "en_US.UTF-8"; # # nvidiaBusId = "PCI:1:0:0";
LC_NUMERIC = "en_US.UTF-8"; # # # offload = {
LC_PAPER = "en_US.UTF-8"; # # # enable = true;
LC_TELEPHONE = "en_US.UTF-8"; # # # enableOffloadCmd = true;
LC_TIME = "en_US.UTF-8"; # # # };
}; # # sync.enable = true;
systemd.services = {
NetworkManager-wait-online.enable = false;
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
icu
xorg.libXtst
xorg.libXi
];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
nvidiaSettings = true;
open = true;
# prime = {
# amdgpuBusId = "PCI:4:0:0";
# nvidiaBusId = "PCI:1:0:0";
# # offload = {
# # enable = true;
# # enableOffloadCmd = true;
# # }; # # };
# sync.enable = true;
# }; # };
};
hardware.graphics.enable = true; hardware.graphics.enable = true;
@ -167,61 +83,8 @@
services.xserver.videoDrivers = [ "nvidia" ]; services.xserver.videoDrivers = [ "nvidia" ];
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = [ "networkmanager" ];
};
nix.settings = {
trusted-users = [
"root"
"youwen"
];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
# Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wget
git
curl
];
# 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;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave

View file

@ -1,50 +1,24 @@
{ {
inputs, inputs,
self,
... ...
}: }:
{ {
imports = imports =
[ [
./configuration.nix ./configuration.nix
../../modules/linux/gaming ../../modules
../../modules/linux/audio self.nixosModules.liminalOS
../../modules/linux/networking
../../modules/linux/fonts
../../modules/linux/greeter
../../modules/linux/core
../../modules/linux/desktop-portal
../../modules/linux/audio-prod
../../modules/linux/wine
../../modules/linux/stylix
../../modules/linux/distrobox
../../modules/linux/flatpak
../../overlays
{ {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.users.youwen = { home-manager.users.youwen = {
imports = imports = [
[ ./home.nix
./home-manager-extras self.homeManagerModules.default
../../users/youwen/linux/laptop ];
../../users/youwen/linux/packages/x86_64
../../users/youwen/linux/programs
../../users/youwen/common
../../users/youwen/linux/spicetify
(import ../../users/youwen/common/fastfetch { })
]
++ (with inputs; [
nix-index-database.hmModules.nix-index
]);
}; };
} }
] ]
++ (with inputs; [ ++ (with inputs; [
home-manager.nixosModules.home-manager
ucode.nixosModules.default ucode.nixosModules.default
]); ]);
} }

View file

@ -1,6 +1,12 @@
{ pkgs, lib, ... }: { lib, ... }:
{ {
wayland.windowManager.hyprland.settings.monitor = pkgs.lib.mkForce [ imports = [
../../users/youwen/hm.nix
];
home.stateVersion = "24.05";
wayland.windowManager.hyprland.settings.monitor = lib.mkForce [
# "eDP-1,2560x1440@165,0x0,1.6" # "eDP-1,2560x1440@165,0x0,1.6"
"eDP-1, disable" "eDP-1, disable"
"HDMI-A-1,2560x1440@144,0x0,1.0" "HDMI-A-1,2560x1440@144,0x0,1.0"
@ -16,5 +22,6 @@
]; ];
programs.waybar.settings.mainBar.output = "HDMI-A-1"; programs.waybar.settings.mainBar.output = "HDMI-A-1";
programs.hyprlock.settings.background.monitor = lib.mkForce "HDMI-A-1";
liminalOS.desktop.hyprland.screenlocker.monitor = "DP-1";
} }