mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-02-14 12:32:42 +00:00
feat: aero
This commit is contained in:
38
flake.nix
38
flake.nix
@@ -62,7 +62,7 @@
|
|||||||
username,
|
username,
|
||||||
system,
|
system,
|
||||||
}:
|
}:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem rec {
|
||||||
pkgs = legacyPackages.${system};
|
pkgs = legacyPackages.${system};
|
||||||
modules = [
|
modules = [
|
||||||
./modules/nixos
|
./modules/nixos
|
||||||
@@ -70,9 +70,24 @@
|
|||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
nix-flatpak.nixosModules.nix-flatpak
|
nix-flatpak.nixosModules.nix-flatpak
|
||||||
{
|
{
|
||||||
_module.args = {
|
_module.args =
|
||||||
inherit username;
|
let
|
||||||
};
|
patchDesktop =
|
||||||
|
pkg: appName: from: to:
|
||||||
|
pkgs.lib.hiPrio (
|
||||||
|
pkgs.runCommand "$patched-desktop-entry-for-${appName}" { } ''
|
||||||
|
${pkgs.coreutils}/bin/mkdir -p $out/share/applications
|
||||||
|
${pkgs.gnused}/bin/sed 's#${from}#${to}#g' < ${pkg}/share/applications/${appName}.desktop > $out/share/applications/${appName}.desktop
|
||||||
|
''
|
||||||
|
);
|
||||||
|
GPUOffloadApp = pkg: desktopName: patchDesktop pkg desktopName "^Exec=" "Exec=nvidia-offload ";
|
||||||
|
gpu-offload =
|
||||||
|
config: pkg: desktopName:
|
||||||
|
if config.hardware.nvidia.prime.offload.enable then GPUOffloadApp pkg desktopName else pkg;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit username gpu-offload;
|
||||||
|
};
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
home-manager = {
|
home-manager = {
|
||||||
@@ -96,10 +111,17 @@
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations.MONSTER = mkHost {
|
nixosConfigurations = {
|
||||||
hostname = "MONSTER";
|
MONSTER = mkHost {
|
||||||
username = "theaninova";
|
hostname = "MONSTER";
|
||||||
system = "x86_64-linux";
|
username = "theaninova";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
|
aero = mkHost {
|
||||||
|
hostname = "aero";
|
||||||
|
username = "theaninova";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModules.theaninovos = import ./modules/nixos;
|
nixosModules.theaninovos = import ./modules/nixos;
|
||||||
|
|||||||
196
hosts/aero/default.nix
Normal file
196
hosts/aero/default.nix
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
randomizedDelaySec = "14m";
|
||||||
|
options = "--deleteOlderThan 10d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
quiet.enable = true;
|
||||||
|
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
loader = {
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 10;
|
||||||
|
};
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [ "tpm_tis" ];
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
tpm2.enable = true;
|
||||||
|
};
|
||||||
|
luks.devices."luks-52ef6970-af53-43e6-8b2f-0ff95dad2d23".device =
|
||||||
|
"/dev/disk/by-uuid/52ef6970-af53-43e6-8b2f-0ff95dad2d23";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.forced-compliance.enable = true;
|
||||||
|
|
||||||
|
usecases = {
|
||||||
|
gaming.enable = true;
|
||||||
|
"3d-printing".enable = true;
|
||||||
|
development = {
|
||||||
|
enable = true;
|
||||||
|
svelte.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
shell.components = {
|
||||||
|
firefox-pip.enable = true;
|
||||||
|
flameshot.enable = true;
|
||||||
|
gnome-keyring.enable = true;
|
||||||
|
hyprpicker.enable = true;
|
||||||
|
kde-connect.enable = true;
|
||||||
|
kitty.enable = true;
|
||||||
|
swaync.enable = true;
|
||||||
|
walker.enable = true;
|
||||||
|
waybar = {
|
||||||
|
enable = true;
|
||||||
|
mobile = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
desktops = {
|
||||||
|
hyprland.enable = true;
|
||||||
|
};
|
||||||
|
locale.preset.theaninova.enable = true;
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
xkb = {
|
||||||
|
#variant = "altgr-intl";
|
||||||
|
#layout = "us";
|
||||||
|
layout = "de";
|
||||||
|
};
|
||||||
|
videoDrivers = [ "nvidia" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
audio.preset.pipewire.enable = true;
|
||||||
|
cc1.enable = true;
|
||||||
|
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
open = true;
|
||||||
|
nvidiaSettings = false;
|
||||||
|
nvidiaPersistenced = false;
|
||||||
|
prime = {
|
||||||
|
/*
|
||||||
|
offload = {
|
||||||
|
enable = true;
|
||||||
|
enableOffloadCmd = true;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
sync.enable = true;
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
libvdpau-va-gl
|
||||||
|
nvidia-vaapi-driver
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
enableAllFirmware = true;
|
||||||
|
bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
fira-code = {
|
||||||
|
enable = true;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
noto-sans = {
|
||||||
|
enable = true;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
nerd-fonts.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
security.sudo.configFile = ''
|
||||||
|
Defaults env_reset,pwfeedback,passprompt=" "
|
||||||
|
'';
|
||||||
|
security.tpm2.enable = true;
|
||||||
|
users.defaultUserShell = pkgs.zsh;
|
||||||
|
users.users.${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"scanner"
|
||||||
|
"lp"
|
||||||
|
"storage"
|
||||||
|
"networkmanager"
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"plugdev"
|
||||||
|
"cdrom"
|
||||||
|
"kvm"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Essential utils
|
||||||
|
usbutils
|
||||||
|
usbimager
|
||||||
|
uhubctl
|
||||||
|
bluetuith
|
||||||
|
pciutils
|
||||||
|
htop
|
||||||
|
unar
|
||||||
|
gnupg
|
||||||
|
libdrm
|
||||||
|
alsa-utils
|
||||||
|
graphicsmagick
|
||||||
|
ffmpeg
|
||||||
|
nfs-utils
|
||||||
|
opensc
|
||||||
|
openssl
|
||||||
|
# secure boot / tmp2
|
||||||
|
sbctl
|
||||||
|
tpm2-tss
|
||||||
|
# Essential command line apps
|
||||||
|
neovim
|
||||||
|
mc
|
||||||
|
git
|
||||||
|
p7zip
|
||||||
|
fzf
|
||||||
|
eza
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall.allowedUDPPorts = [ 50765 ];
|
||||||
|
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs; [ networkmanager-openconnect ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
||||||
43
hosts/aero/hardware-configuration.nix
Normal file
43
hosts/aero/hardware-configuration.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# 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" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/506db548-b5c2-400e-97b1-80bdae8064cf";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-c1e282d7-eae2-4795-b813-558f3124de2f".device = "/dev/disk/by-uuid/c1e282d7-eae2-4795-b813-558f3124de2f";
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/17E0-415A";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/8ddc2620-3dd8-4a7b-83b9-00afac84428f"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
37
hosts/aero/home.nix
Executable file
37
hosts/aero/home.nix
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
theme.md3-evo = {
|
||||||
|
enable = true;
|
||||||
|
auto-dark = {
|
||||||
|
enable = true;
|
||||||
|
lat = 52.52;
|
||||||
|
lon = 13.40;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.zoxide.enable = true;
|
||||||
|
home.packages = with pkgs; [ blueman ];
|
||||||
|
systemd.user.services = {
|
||||||
|
nm-applet = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Network manager applet";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
blueman-applet = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Bluetooth manager applet";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${pkgs.blueman}/bin/blueman-applet";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
0
modules/home-manager/default.nix
Normal file → Executable file
0
modules/home-manager/default.nix
Normal file → Executable file
@@ -54,7 +54,11 @@ in
|
|||||||
];
|
];
|
||||||
misc = {
|
misc = {
|
||||||
layers_hog_keyboard_focus = false;
|
layers_hog_keyboard_focus = false;
|
||||||
|
disable_hyprland_logo = true;
|
||||||
|
disable_splash_rendering = true;
|
||||||
};
|
};
|
||||||
|
input.touchpad.natural_scroll = true;
|
||||||
|
gestures.workspace_swipe = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -26,22 +26,24 @@ in
|
|||||||
|
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot = {
|
||||||
"fbdev=1"
|
kernelParams = [
|
||||||
"nvidia_drm.fbdev=1"
|
"fbdev=1"
|
||||||
];
|
"nvidia_drm.fbdev=1"
|
||||||
boot.kernelModules = [
|
];
|
||||||
"nvidia"
|
kernelModules = [
|
||||||
"nvidia_modeset"
|
"nvidia"
|
||||||
"nvidia_uvm"
|
"nvidia_modeset"
|
||||||
"nvidia_drm"
|
"nvidia_uvm"
|
||||||
];
|
"nvidia_drm"
|
||||||
boot.initrd.kernelModules = [
|
];
|
||||||
"nvidia"
|
initrd.kernelModules = [
|
||||||
"nvidia_modeset"
|
"nvidia"
|
||||||
"nvidia_uvm"
|
"nvidia_modeset"
|
||||||
"nvidia_drm"
|
"nvidia_uvm"
|
||||||
];
|
"nvidia_drm"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ in
|
|||||||
{
|
{
|
||||||
options.shell.components.waybar = {
|
options.shell.components.waybar = {
|
||||||
enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured waybar setup");
|
enable = lib.mkEnableOption (lib.mdDoc "Enable a pre-configured waybar setup");
|
||||||
|
mobile = lib.mkEnableOption (lib.mdDoc "Mobile PC");
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
@@ -23,21 +24,36 @@ in
|
|||||||
reload_style_on_change = true;
|
reload_style_on_change = true;
|
||||||
exclusive = true;
|
exclusive = true;
|
||||||
|
|
||||||
modules-left = [
|
modules-left = (
|
||||||
# "hyprland/workspaces"
|
if cfg.mobile then
|
||||||
];
|
[
|
||||||
|
"battery"
|
||||||
|
]
|
||||||
|
else
|
||||||
|
[ ]
|
||||||
|
);
|
||||||
modules-center = [
|
modules-center = [
|
||||||
"clock"
|
"clock"
|
||||||
"systemd-failed-units"
|
|
||||||
];
|
|
||||||
modules-right = [
|
|
||||||
"privacy"
|
|
||||||
"gamemode"
|
|
||||||
"tray"
|
|
||||||
"pulseaudio"
|
|
||||||
"custom/brightness"
|
|
||||||
"custom/theme"
|
|
||||||
];
|
];
|
||||||
|
modules-right =
|
||||||
|
[
|
||||||
|
"privacy"
|
||||||
|
"gamemode"
|
||||||
|
"tray"
|
||||||
|
"pulseaudio"
|
||||||
|
]
|
||||||
|
++ (
|
||||||
|
if cfg.mobile then
|
||||||
|
[ "backlight" ]
|
||||||
|
else
|
||||||
|
[
|
||||||
|
"custom/brightness"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
++ [
|
||||||
|
# "custom/theme"
|
||||||
|
# "network"
|
||||||
|
];
|
||||||
|
|
||||||
"pulseaudio" = {
|
"pulseaudio" = {
|
||||||
format = "{icon} {volume}%";
|
format = "{icon} {volume}%";
|
||||||
@@ -52,6 +68,20 @@ in
|
|||||||
on-click = "pavucontrol --tab=3";
|
on-click = "pavucontrol --tab=3";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"backlight" = {
|
||||||
|
"format" = "{icon}";
|
||||||
|
"format-icons" = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
|
"tooltip-format" = "{percent}%";
|
||||||
|
};
|
||||||
|
|
||||||
"hyprland/workspaces" = {
|
"hyprland/workspaces" = {
|
||||||
format = "{windows}";
|
format = "{windows}";
|
||||||
window-rewrite = {
|
window-rewrite = {
|
||||||
@@ -66,6 +96,39 @@ in
|
|||||||
window-rewrite-default = "";
|
window-rewrite-default = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"network" = {
|
||||||
|
"format-icons" = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
|
"format" = "";
|
||||||
|
"format-wifi" = "{icon}";
|
||||||
|
"format-ethernet" = "";
|
||||||
|
"format-disconnected" = if cfg.mobile then "" else "";
|
||||||
|
};
|
||||||
|
|
||||||
|
"battery" = {
|
||||||
|
"format-icons" = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
|
"format" = "{icon}";
|
||||||
|
"format-time" = "{H}:{m}";
|
||||||
|
"tooltip-format" = "{capacity}%";
|
||||||
|
};
|
||||||
|
|
||||||
"custom/theme" = {
|
"custom/theme" = {
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
exec-on-event = true;
|
exec-on-event = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user