mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-28 15:29:17 -05:00
flake: onboard petalburg (#174)
This commit is contained in:
parent
f6f916162b
commit
751dada59c
16
.github/workflows/nix-build.yml
vendored
16
.github/workflows/nix-build.yml
vendored
|
@ -127,6 +127,22 @@ jobs:
|
||||||
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
- name: Build pacifidlog
|
- name: Build pacifidlog
|
||||||
run: nix build --accept-flake-config .#nixosConfigurations.pacifidlog.config.system.build.toplevel
|
run: nix build --accept-flake-config .#nixosConfigurations.pacifidlog.config.system.build.toplevel
|
||||||
|
petalburg-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Free Disk Space (Ubuntu)
|
||||||
|
uses: jlumbroso/free-disk-space@main
|
||||||
|
- uses: actions/checkout@main
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- uses: cachix/cachix-action@master
|
||||||
|
with:
|
||||||
|
name: alyraffauf
|
||||||
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
||||||
|
- name: Build petalburg
|
||||||
|
run: nix build --accept-flake-config .#nixosConfigurations.petalburg.config.system.build.toplevel
|
||||||
rustboro-build:
|
rustboro-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -100,6 +100,7 @@
|
||||||
"lavaridge"
|
"lavaridge"
|
||||||
"mauville"
|
"mauville"
|
||||||
"pacifidlog"
|
"pacifidlog"
|
||||||
|
"petalburg"
|
||||||
"rustboro"
|
"rustboro"
|
||||||
"slateport"
|
"slateport"
|
||||||
];
|
];
|
||||||
|
@ -156,6 +157,8 @@
|
||||||
hw-common-laptop = import ./hwModules/common/laptop;
|
hw-common-laptop = import ./hwModules/common/laptop;
|
||||||
hw-common-laptop-intel-cpu = import ./hwModules/common/laptop/intel-cpu.nix;
|
hw-common-laptop-intel-cpu = import ./hwModules/common/laptop/intel-cpu.nix;
|
||||||
hw-common-ssd = import ./hwModules/common/ssd;
|
hw-common-ssd = import ./hwModules/common/ssd;
|
||||||
|
|
||||||
|
hw-asus-tuf-a16-amd-7030 = import ./hwModules/asus/tuf/a16/amd-7030/default.nix;
|
||||||
hw-framework-13-amd-7000 = import ./hwModules/framework/13/amd-7000;
|
hw-framework-13-amd-7000 = import ./hwModules/framework/13/amd-7000;
|
||||||
hw-framework-13-intel-11th = import ./hwModules/framework/13/intel-11th;
|
hw-framework-13-intel-11th = import ./hwModules/framework/13/intel-11th;
|
||||||
hw-lenovo-legion-go = import ./hwModules/lenovo/legion/go;
|
hw-lenovo-legion-go = import ./hwModules/lenovo/legion/go;
|
||||||
|
|
24
hosts/petalburg/README.md
Normal file
24
hosts/petalburg/README.md
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# petalburg
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Asus TUF A16 AMD Advantage Edition (2023) with AMD Ryzen 7 7735HS and RX77000S dGPU.
|
||||||
|
|
||||||
|
## Todo
|
||||||
|
|
||||||
|
## Specs
|
||||||
|
|
||||||
|
| Model | Asus TUF A16 |
|
||||||
|
|---------|-------------------------|
|
||||||
|
| Display | 16.0" 1920x1200 165Hz |
|
||||||
|
| CPU | AMD Ryzen 7735HS |
|
||||||
|
| RAM | 16GB 8GBx2 DDR5-4800Mhz |
|
||||||
|
| iGPU | AMD Radeon 680M |
|
||||||
|
| dGPU | AMD Radeon RX 7700S |
|
||||||
|
| Disks | 512GB NVMe SSD |
|
||||||
|
|
||||||
|
## Filesystems
|
||||||
|
|
||||||
|
### /
|
||||||
|
|
||||||
|
Encrypted LUKS btrfs volume.
|
96
hosts/petalburg/default.nix
Normal file
96
hosts/petalburg/default.nix
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
# Asus TUF A16 AMD Advantage Edition (2023) with AMD Ryzen 7 7735HS, 16GB RAM, RX7700S, 512GB SSD.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./home.nix
|
||||||
|
./secrets.nix
|
||||||
|
./stylix.nix
|
||||||
|
(import ./../../disko/luks-btrfs-subvolumes.nix {disks = ["/dev/nvme0n1"];})
|
||||||
|
self.nixosModules.common-auto-upgrade
|
||||||
|
self.nixosModules.common-base
|
||||||
|
self.nixosModules.common-locale
|
||||||
|
self.nixosModules.common-mauville-share
|
||||||
|
self.nixosModules.common-nix
|
||||||
|
self.nixosModules.common-pkgs
|
||||||
|
self.nixosModules.common-tailscale
|
||||||
|
self.nixosModules.common-wifi-profiles
|
||||||
|
self.nixosModules.hw-asus-tuf-a16-amd-7030
|
||||||
|
self.nixosModules.hw-common-gaming
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/etc/secureboot";
|
||||||
|
};
|
||||||
|
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = lib.mkForce false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.variables.GDK_SCALE = "1";
|
||||||
|
networking.hostName = "petalburg";
|
||||||
|
|
||||||
|
services.udev.extraRules = let
|
||||||
|
hyprlandDynamicRes = pkgs.writeShellScript "hyprland-dynamic-resolution" ''
|
||||||
|
MON="eDP-1"
|
||||||
|
RES="1920x1200"
|
||||||
|
|
||||||
|
for dir in /run/user/*; do
|
||||||
|
for hypr_dir in "$dir/hypr/"*/; do
|
||||||
|
socket="''${hypr_dir}.socket.sock"
|
||||||
|
if [[ -S $socket ]]; then
|
||||||
|
monitor_info=$(echo -e "monitors" | ${lib.getExe pkgs.socat} - UNIX-CONNECT:"$socket")
|
||||||
|
|
||||||
|
if echo "$monitor_info" | grep -q "$MON"; then
|
||||||
|
echo -e "keyword monitor $MON, $RES@$1, 0x0, 2, vrr, $2" | ${lib.getExe pkgs.socat} - UNIX-CONNECT:"$socket"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="ACAD", ATTR{online}=="1", ACTION=="change", RUN+="${hyprlandDynamicRes} 165 1"
|
||||||
|
SUBSYSTEM=="power_supply", ENV{POWER_SUPPLY_NAME}=="ACAD", ATTR{online}=="0", ACTION=="change", RUN+="${hyprlandDynamicRes} 60 0"
|
||||||
|
'';
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
|
||||||
|
ar = {
|
||||||
|
apps = {
|
||||||
|
firefox.enable = true;
|
||||||
|
podman.enable = true;
|
||||||
|
steam.enable = true;
|
||||||
|
virt-manager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
desktop = {
|
||||||
|
greetd.enable = true;
|
||||||
|
hyprland.enable = true;
|
||||||
|
sway.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
laptopMode = true;
|
||||||
|
|
||||||
|
users.aly = {
|
||||||
|
enable = true;
|
||||||
|
password = "$y$j9T$NSS7QcEtN4yiigPyofwlI/$nxdgz0lpySa0heDMjGlHe1gX3BWf48jK6Tkfg4xMEs6";
|
||||||
|
syncthing = {
|
||||||
|
enable = true;
|
||||||
|
certFile = config.age.secrets.syncthingCert.path;
|
||||||
|
keyFile = config.age.secrets.syncthingKey.path;
|
||||||
|
syncROMs = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
18
hosts/petalburg/home.nix
Normal file
18
hosts/petalburg/home.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{self, ...}: {
|
||||||
|
home-manager = {
|
||||||
|
sharedModules = [
|
||||||
|
{
|
||||||
|
wayland.windowManager.sway.config.output = {
|
||||||
|
"eDP-1" = {
|
||||||
|
adaptive_sync = "on";
|
||||||
|
scale = "2.0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ar.home.desktop.hyprland.laptopMonitors = ["eDP-1,1920x1200@165, 0x0, 2, vrr, 0"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
users.aly = self.homeManagerModules.aly;
|
||||||
|
};
|
||||||
|
}
|
6
hosts/petalburg/secrets.nix
Normal file
6
hosts/petalburg/secrets.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
age.secrets = {
|
||||||
|
syncthingCert.file = ../../secrets/aly/syncthing/petalburg/cert.age;
|
||||||
|
syncthingKey.file = ../../secrets/aly/syncthing/petalburg/key.age;
|
||||||
|
};
|
||||||
|
}
|
50
hosts/petalburg/stylix.nix
Normal file
50
hosts/petalburg/stylix.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
stylix = {
|
||||||
|
enable = true;
|
||||||
|
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
|
||||||
|
image = "${self.inputs.wallpapers}/wallhaven-3lyrvy.png";
|
||||||
|
imageScalingMode = "fill";
|
||||||
|
polarity = "dark";
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
name = "Bibata-Modern-Classic";
|
||||||
|
package = pkgs.bibata-cursors;
|
||||||
|
size = 24;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
monospace = {
|
||||||
|
name = "CaskaydiaCove Nerd Font";
|
||||||
|
package = pkgs.nerdfonts.override {fonts = ["CascadiaCode"];};
|
||||||
|
};
|
||||||
|
|
||||||
|
sansSerif = {
|
||||||
|
name = "UbuntuSans Nerd Font";
|
||||||
|
package = pkgs.nerdfonts.override {fonts = ["UbuntuSans"];};
|
||||||
|
};
|
||||||
|
|
||||||
|
serif = {
|
||||||
|
name = "Source Serif Pro";
|
||||||
|
package = pkgs.source-serif-pro;
|
||||||
|
};
|
||||||
|
|
||||||
|
sizes = {
|
||||||
|
applications = 12;
|
||||||
|
desktop = 11;
|
||||||
|
popups = 12;
|
||||||
|
terminal = 13;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
opacity = {
|
||||||
|
applications = 1.0;
|
||||||
|
desktop = 0.8;
|
||||||
|
terminal = 0.8;
|
||||||
|
popups = 0.8;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
35
hwModules/asus/tuf/a16/amd-7030/default.nix
Normal file
35
hwModules/asus/tuf/a16/amd-7030/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.hw-common
|
||||||
|
self.nixosModules.hw-common-amd-cpu
|
||||||
|
self.nixosModules.hw-common-amd-gpu
|
||||||
|
self.nixosModules.hw-common-bluetooth
|
||||||
|
self.nixosModules.hw-common-laptop
|
||||||
|
self.nixosModules.hw-common-ssd
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
|
||||||
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
supergfxctl
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
wifi = {
|
||||||
|
backend = "iwd";
|
||||||
|
powersave = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.supergfxd.enable = true;
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
boot.kernel.sysctl = {
|
boot.kernel.sysctl = {
|
||||||
"kernel.nmi_watchdog" = 0;
|
"kernel.nmi_watchdog" = lib.mkDefault 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
|
@ -31,6 +31,8 @@ in {
|
||||||
"aly/syncthing/mauville/key.age".publicKeys = keys;
|
"aly/syncthing/mauville/key.age".publicKeys = keys;
|
||||||
"aly/syncthing/pacifidlog/cert.age".publicKeys = keys;
|
"aly/syncthing/pacifidlog/cert.age".publicKeys = keys;
|
||||||
"aly/syncthing/pacifidlog/key.age".publicKeys = keys;
|
"aly/syncthing/pacifidlog/key.age".publicKeys = keys;
|
||||||
|
"aly/syncthing/petalburg/cert.age".publicKeys = keys;
|
||||||
|
"aly/syncthing/petalburg/key.age".publicKeys = keys;
|
||||||
"aly/syncthing/rustboro/cert.age".publicKeys = keys;
|
"aly/syncthing/rustboro/cert.age".publicKeys = keys;
|
||||||
"aly/syncthing/rustboro/key.age".publicKeys = keys;
|
"aly/syncthing/rustboro/key.age".publicKeys = keys;
|
||||||
"aly/syncthing/slateport/cert.age".publicKeys = keys;
|
"aly/syncthing/slateport/cert.age".publicKeys = keys;
|
||||||
|
|
Loading…
Reference in a new issue