Major changes
This commit is contained in:
@@ -2,10 +2,9 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
programs.ssh = lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||
startAgent = true;
|
||||
startAgent = false;
|
||||
enableAskPassword = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
11
hosts/common/optional/flatpak.nix
Normal file
11
hosts/common/optional/flatpak.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity
|
||||
{pkgs, ...}: {
|
||||
services.flatpak.enable = true;
|
||||
systemd.services.flatpak-repo = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
path = [pkgs.flatpak];
|
||||
script = ''
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
'';
|
||||
};
|
||||
}
|
||||
7
hosts/common/optional/gdm.nix
Normal file
7
hosts/common/optional/gdm.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity
|
||||
{
|
||||
services.displayManager = {
|
||||
gdm.enable = true;
|
||||
gdm.wayland = true;
|
||||
};
|
||||
}
|
||||
29
hosts/common/optional/gnome.nix
Normal file
29
hosts/common/optional/gnome.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{pkgs, ...}: {
|
||||
services.desktopManager.gnome.enable = true;
|
||||
#environment.sessionVariables.GTK_USE_PORTAL = "1";
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
atomix # puzzle game
|
||||
cheese # webcam tool
|
||||
epiphany # web browser
|
||||
evince # document viewer
|
||||
geary # email reader
|
||||
gedit # text editor
|
||||
gnome-characters
|
||||
gnome-shell-extensions
|
||||
gnome-music
|
||||
gnome-photos
|
||||
gnome-terminal
|
||||
gnome-tour
|
||||
hitori # sudoku game
|
||||
iagno # go game
|
||||
tali # poker game
|
||||
totem # video player
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnomeExtensions.appindicator
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
}
|
||||
8
hosts/common/optional/services/docker.nix
Normal file
8
hosts/common/optional/services/docker.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
# Enable bluetooth
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
virtualisation.docker.enable = true;
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
enable = true;
|
||||
environmentVariables = {
|
||||
OLLAMA_INTEL_GPU = "1";
|
||||
OLLAMA_ORIGINS = "moz-extension://*";
|
||||
};
|
||||
loadModels = [
|
||||
];
|
||||
|
||||
@@ -39,4 +39,19 @@ in {
|
||||
terminal = 10;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
programs.vscode = {
|
||||
extensions = pkgs.nix4vscode.forVscode [
|
||||
"huytd.tokyo-city"
|
||||
"vscode-icons-team.vscode-icons"
|
||||
];
|
||||
userSettings = {
|
||||
"workbench.colorTheme" = "Tokyo City Darker";
|
||||
"workbench.iconTheme" = "vscode-icons";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = lib.flatten [
|
||||
@@ -15,11 +16,13 @@
|
||||
# ========== Hardware ==========
|
||||
#
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-hidpi
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
|
||||
./hardware-configuration.nix
|
||||
./duo-configuration.nix
|
||||
|
||||
#
|
||||
# ========== Disk Layout ==========
|
||||
@@ -67,9 +70,11 @@
|
||||
#"hosts/common/optional/services/openssh.nix" # allow remote SSH access
|
||||
"hosts/common/optional/services/bluetooth.nix"
|
||||
"hosts/common/optional/services/ollama.nix"
|
||||
"hosts/common/optional/services/docker.nix"
|
||||
"hosts/common/optional/audio.nix" # pipewire and cli controls
|
||||
"hosts/common/optional/kde.nix"
|
||||
"hosts/common/optional/sddm.nix"
|
||||
"hosts/common/optional/gnome.nix"
|
||||
"hosts/common/optional/gdm.nix"
|
||||
"hosts/common/optional/flatpak.nix"
|
||||
"hosts/common/optional/thermal-management.nix"
|
||||
|
||||
# Theming
|
||||
@@ -110,6 +115,9 @@
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
vpl-gpu-rt # or intel-media-sdk for QSV
|
||||
];
|
||||
};
|
||||
# https://wiki.nixos.org/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
61
hosts/nixos/Bellerophon/duo-configuration.nix
Normal file
61
hosts/nixos/Bellerophon/duo-configuration.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{pkgs, ...}: let
|
||||
# Clone the repository
|
||||
duoRepo = builtins.fetchGit {
|
||||
url = "https://github.com/alesya-h/zenbook-duo-2024-ux8406ma-linux";
|
||||
# Specify a specific commit or branch if needed
|
||||
rev = "2b8be1840f38f92e6626da7a442245b74ed0715f"; # Uncomment this line to specify a branch or commit
|
||||
};
|
||||
|
||||
# Path to the duo script
|
||||
duoScript = "${duoRepo}/duo";
|
||||
|
||||
# Read and modify the script content
|
||||
modifiedScriptContent =
|
||||
builtins.replaceStrings [
|
||||
"#!/usr/bin/env bash"
|
||||
"prefered_resolution=\"2880x1800@120.000\""
|
||||
] [
|
||||
"#!${pkgs.bash}/bin/bash"
|
||||
"prefered_resolution=\"2880x1800@120.000+vrr\""
|
||||
] (builtins.readFile duoScript);
|
||||
|
||||
# Write the modifications to a patched duo file
|
||||
patchedDuoScript = pkgs.writeShellScript "patched-duo" modifiedScriptContent;
|
||||
in {
|
||||
systemd.services.watchBacklight = {
|
||||
description = "synchronize screen brightness";
|
||||
wantedBy = ["default.target"];
|
||||
path = [pkgs.inotify-tools pkgs.sudo];
|
||||
serviceConfig = {
|
||||
ExecStart = "${patchedDuoScript} watch-backlight";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.watchDisplays = {
|
||||
description = "set screens on keyboard event";
|
||||
wantedBy = ["default.target"];
|
||||
after = ["graphical-session.target"];
|
||||
|
||||
path = [pkgs.gnome-monitor-config pkgs.usbutils pkgs.inotify-tools];
|
||||
serviceConfig = {
|
||||
preStart = "${patchedDuoScript} normal";
|
||||
ExecStart = "${patchedDuoScript} watch-displays";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.watchRotation = {
|
||||
description = "rotate screens";
|
||||
wantedBy = ["default.target"];
|
||||
after = ["graphical-session.target"];
|
||||
path = [pkgs.gnome-monitor-config pkgs.iio-sensor-proxy];
|
||||
serviceConfig = {
|
||||
ExecStart = "${patchedDuoScript} watch-rotation";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user