From d69c9c2a10936c0c843281d7db26fc0c793fe87d Mon Sep 17 00:00:00 2001 From: GitButler Date: Sat, 2 Nov 2024 16:29:56 +0100 Subject: [PATCH 01/10] GitButler Integration Commit This is an integration commit for the virtual branches that GitButler is tracking. Due to GitButler managing multiple virtual branches, you cannot switch back and forth between git branches and virtual branches easily. If you switch to another branch, GitButler will need to be reinitialized. If you commit on this branch, GitButler will throw it away. Here are the branches that are currently applied: - factorio-latest (refs/gitbutler/factorio-latest) - flake.lock - flake.nix - modules/nixos/archetypes/gaming/default.nix - hyprpanel (refs/gitbutler/hyprpanel) branch head: acde84ab10891f923177d3dde85b826296a1b4bc - modules/nixos/desktop/addons/hyprpanel/options.json - modules/nixos/desktop/addons/hyprpanel/default.nix - modules/nixos/desktop/addons/hypridle/default.nix - fix hyprland nvidia issue (refs/gitbutler/fix-hyprland-nvidia-issue) branch head: 5158f2a21e773e01f3d4f296db87517bf167c7b7 For more information about what we're doing here, check out our docs: https://docs.gitbutler.com/features/virtual-branches/integration-branch --- .../nixos/desktop/addons/hypridle/default.nix | 5 +- .../desktop/addons/hyprpanel/default.nix | 60 +++++++++++++++++++ .../desktop/addons/hyprpanel/options.json | 2 +- .../system/hardware/gpu/nvidia/default.nix | 9 +++ 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 modules/nixos/desktop/addons/hyprpanel/default.nix diff --git a/modules/nixos/desktop/addons/hypridle/default.nix b/modules/nixos/desktop/addons/hypridle/default.nix index 2f2e99c..260fddb 100644 --- a/modules/nixos/desktop/addons/hypridle/default.nix +++ b/modules/nixos/desktop/addons/hypridle/default.nix @@ -23,14 +23,15 @@ in settings = { general = { after_sleep_cmd = "hyprctl dispatch dpms on"; + before_sleep_cmd = "loginctl lock-session"; ignore_dbus_inhibit = false; - lock_cmd = "hyprlock"; + lock_cmd = "pidof hyprlock || hyprlock"; }; listener = [ { timeout = 900; - on-timeout = "hyprlock"; + on-timeout = "loginctl lock-session"; } { timeout = 1200; diff --git a/modules/nixos/desktop/addons/hyprpanel/default.nix b/modules/nixos/desktop/addons/hyprpanel/default.nix new file mode 100644 index 0000000..664624a --- /dev/null +++ b/modules/nixos/desktop/addons/hyprpanel/default.nix @@ -0,0 +1,60 @@ +{ + config, + lib, + namespace, + pkgs, + ... +}: +let + inherit (lib) + mkIf + mkEnableOption + mkMerge + mkOption + literalExpression + ; + + cfg = config.${namespace}.desktop.addons.hyprpanel; + + settingsFormat = pkgs.formats.json { }; + settings = { + bar = { + layouts = { + "0" = { + left = [ + "workspaces" + ]; + middle = [ + "windowtitle" + ]; + }; + }; + }; + }; +in +{ + options.${namespace}.desktop.addons.hyprpanel = { + enable = mkEnableOption "Enable HyprIdle"; + extraSettings = mkOption { + default = { }; + inherit (settingsFormat) type; + description = '' + Additional Options to pass to hyprpanel + ''; + example = literalExpression '' + { + + } + ''; + }; + }; + + config = mkIf cfg.enable { + ${namespace}.home.file = { + ".cache/ags/options_test.json".source = settingsFormat.generate "options.json" mkMerge [ + settings + cfg.extraSettings + ]; + }; + }; +} diff --git a/modules/nixos/desktop/addons/hyprpanel/options.json b/modules/nixos/desktop/addons/hyprpanel/options.json index 448ecab..f93f95c 100644 --- a/modules/nixos/desktop/addons/hyprpanel/options.json +++ b/modules/nixos/desktop/addons/hyprpanel/options.json @@ -456,4 +456,4 @@ "bar.windowtitle.title_map": [], "bar.windowtitle.truncation": false, "bar.workspaces.hideUnoccupied": true -} \ No newline at end of file +} diff --git a/modules/nixos/system/hardware/gpu/nvidia/default.nix b/modules/nixos/system/hardware/gpu/nvidia/default.nix index d2c4e74..5074f6d 100644 --- a/modules/nixos/system/hardware/gpu/nvidia/default.nix +++ b/modules/nixos/system/hardware/gpu/nvidia/default.nix @@ -32,5 +32,14 @@ in }; services.xserver.videoDrivers = [ "nvidia" ]; + + boot.kernelParams = [ + "nvidia_drm.fbdev=1" + + # TODO: remove after https://github.com/NVIDIA/open-gpu-kernel-modules/pull/692 + # and similar are merged and build in nixpkgs-unstable. + # WARNING: this disables tty output and thus hides boot logs. + "initcall_blacklist=simpledrm_platform_driver_init" + ]; }; } From a1eb889f504028ddd809caaf4104918893df70f2 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 4 Nov 2024 21:23:24 +0100 Subject: [PATCH 02/10] introduce new host --- modules/nixos/submodules/basics/default.nix | 4 +-- modules/nixos/tools/git/default.nix | 2 +- modules/nixos/user/default.nix | 7 ++++ systems/x86_64-linux/loptland/default.nix | 37 +++++++++++++++++++++ systems/x86_64-linux/loptland/hardware.nix | 35 +++++++++++++++++++ 5 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 systems/x86_64-linux/loptland/default.nix create mode 100644 systems/x86_64-linux/loptland/hardware.nix diff --git a/modules/nixos/submodules/basics/default.nix b/modules/nixos/submodules/basics/default.nix index 9200885..bdc697b 100644 --- a/modules/nixos/submodules/basics/default.nix +++ b/modules/nixos/submodules/basics/default.nix @@ -13,7 +13,7 @@ let in { options.${namespace}.submodules.basics = with types; { - enable = mkBoolOpt false "Whether or not to enable basic configuration."; + enable = mkEnableOption "Whether or not to enable basic configuration."; }; config = mkIf cfg.enable { @@ -29,7 +29,7 @@ in #optional pciutils usbutils - htop + btop ]; ${namespace} = { diff --git a/modules/nixos/tools/git/default.nix b/modules/nixos/tools/git/default.nix index ad7eb11..8b37b71 100644 --- a/modules/nixos/tools/git/default.nix +++ b/modules/nixos/tools/git/default.nix @@ -24,7 +24,7 @@ in environment.systemPackages = with pkgs; [ git gitAndTools.gh - gitbutler + # gitbutler ]; ${namespace}.home.extraOptions = { diff --git a/modules/nixos/user/default.nix b/modules/nixos/user/default.nix index efdc078..62fb307 100644 --- a/modules/nixos/user/default.nix +++ b/modules/nixos/user/default.nix @@ -48,6 +48,11 @@ in icon = mkOpt (nullOr package) defaultIcon "The profile picture to use for the user."; extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned."; extraOptions = mkOpt attrs { } (mdDoc "Extra options passed to `users.users.`."); + trustedPublicKeys = mkOption { + default = [ ]; + type = nullOr (listOf str); + description = "Trusted public keys for this user for the machine"; + }; }; config = { @@ -92,6 +97,8 @@ in # system to select). uid = 1000; + openssh.authorizedKeys.keys = cfg.trustedPublicKeys; + extraGroups = [ "steamcmd" ] ++ cfg.extraGroups; } // cfg.extraOptions; }; diff --git a/systems/x86_64-linux/loptland/default.nix b/systems/x86_64-linux/loptland/default.nix new file mode 100644 index 0000000..241b786 --- /dev/null +++ b/systems/x86_64-linux/loptland/default.nix @@ -0,0 +1,37 @@ +{ + lib, + namespace, + pkgs, + ... +}: +let + inherit (lib.${namespace}) enabled; +in +{ + imports = [ ./hardware.nix ]; + + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + KbdInteractiveAuthentication = false; + }; + }; + + ${namespace} = { + submodules = { + basics = enabled; + }; + + services = { + factorio-server = enabled; + }; + + user.trustedPublicKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0" + ]; + + }; + + system.stateVersion = "24.11"; +} diff --git a/systems/x86_64-linux/loptland/hardware.nix b/systems/x86_64-linux/loptland/hardware.nix new file mode 100644 index 0000000..38d1a1f --- /dev/null +++ b/systems/x86_64-linux/loptland/hardware.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: + +{ + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "sr_mod" + "virtio_blk" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + swapDevices = [ ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostplatform = lib.mkDefault "x86_64-linux"; +} From 48387d88d27b48ab7c147d5aa917120b8b20d660 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 4 Nov 2024 22:10:21 +0100 Subject: [PATCH 03/10] update hardware.nix --- systems/x86_64-linux/loptland/default.nix | 2 +- systems/x86_64-linux/loptland/hardware.nix | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/systems/x86_64-linux/loptland/default.nix b/systems/x86_64-linux/loptland/default.nix index 241b786..a3c3daf 100644 --- a/systems/x86_64-linux/loptland/default.nix +++ b/systems/x86_64-linux/loptland/default.nix @@ -24,7 +24,7 @@ in }; services = { - factorio-server = enabled; + # factorio-server = enabled; }; user.trustedPublicKeys = [ diff --git a/systems/x86_64-linux/loptland/hardware.nix b/systems/x86_64-linux/loptland/hardware.nix index 38d1a1f..6f1c5cb 100644 --- a/systems/x86_64-linux/loptland/hardware.nix +++ b/systems/x86_64-linux/loptland/hardware.nix @@ -23,13 +23,20 @@ boot.extraModulePackages = [ ]; fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; + device = "/dev/disk/by-uuid/26b098dd-0a15-49c5-9998-75f43d17eb26"; fsType = "ext4"; }; - swapDevices = [ ]; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/30AB-7309"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ { device = "/dev/disk/by-uuid/b9bcb425-cb1c-40a1-89bb-d7fe6b421834"; } ]; networking.useDHCP = lib.mkDefault true; - - nixpkgs.hostplatform = lib.mkDefault "x86_64-linux"; } From 9e5b856a18f0d4d8da97fb495215692e005275d3 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 4 Nov 2024 23:05:29 +0100 Subject: [PATCH 04/10] add home.nix --- .../x86_64-linux/cholli@loptland/default.nix | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 homes/x86_64-linux/cholli@loptland/default.nix diff --git a/homes/x86_64-linux/cholli@loptland/default.nix b/homes/x86_64-linux/cholli@loptland/default.nix new file mode 100644 index 0000000..5f2a75c --- /dev/null +++ b/homes/x86_64-linux/cholli@loptland/default.nix @@ -0,0 +1,22 @@ +{ + lib, + pkgs, + config, + osConfig ? { }, + format ? "unknown", + ... +}: +with lib.wyrdgard; +{ + wyrdgard = { + apps = { + kitty = enabled; + }; + + tools = { + direnv = enabled; + }; + }; + + home.stateVersion = "24.11"; +} From b694d6b08199f4afbf7b708e812b9c5cae9b0c22 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 4 Nov 2024 23:14:41 +0100 Subject: [PATCH 05/10] add desktop refactors so dconf is disabled by default --- .../nixos/desktop/addons/hypridle/default.nix | 2 +- .../desktop/addons/hyprpanel/default.nix | 562 +++++++++++++++++- .../desktop/addons/hyprpanel/options.json | 7 +- modules/nixos/desktop/default.nix | 9 +- modules/nixos/desktop/hyprland/default.nix | 20 +- 5 files changed, 582 insertions(+), 18 deletions(-) diff --git a/modules/nixos/desktop/addons/hypridle/default.nix b/modules/nixos/desktop/addons/hypridle/default.nix index 260fddb..5c9d814 100644 --- a/modules/nixos/desktop/addons/hypridle/default.nix +++ b/modules/nixos/desktop/addons/hypridle/default.nix @@ -30,7 +30,7 @@ in listener = [ { - timeout = 900; + timeout = 60; on-timeout = "loginctl lock-session"; } { diff --git a/modules/nixos/desktop/addons/hyprpanel/default.nix b/modules/nixos/desktop/addons/hyprpanel/default.nix index 664624a..32b62da 100644 --- a/modules/nixos/desktop/addons/hyprpanel/default.nix +++ b/modules/nixos/desktop/addons/hyprpanel/default.nix @@ -15,10 +15,48 @@ let ; cfg = config.${namespace}.desktop.addons.hyprpanel; + username = config.${namespace}.user.name; settingsFormat = pkgs.formats.json { }; + + iconColor = "#242438"; + + light-cyan = "#73daca"; + lightBlue = "#414868"; + medium-blue = "#9aa5ce"; + cyan-blue = "#7dcfff"; + navy-blue = "#24283b"; + dark-blue = "#1a1b26"; + dark-blue-gray = "565f89"; + dark-blue-yankees = "#272a3d"; + blue-magenta = "#181825"; + + lightPurple = "#bb9af7"; + + lightRed = "#f7768e"; + red = "#c0caf5"; + + lightGreen = "#9ece6a"; + yellow = "#e0af68"; + settings = { + tear = true; + scalingPriority = "hyprland"; + font.name = "CodeNewRoman Nerd Font Mono"; + bar = { + customModules = { + updates.pollingInterval = 1440000; + ram = { + labelType = "used/total"; + icon = " "; + }; + cpu = { + label = true; + leftClick = "kitty --hold btop"; + icon = " "; + }; + }; layouts = { "0" = { left = [ @@ -27,8 +65,516 @@ let middle = [ "windowtitle" ]; + right = [ + "clock" + ]; + }; + "1" = { + left = [ + "dashboard" + "workspaces" + ]; + middle = [ + "windowtitle" + ]; + right = [ + "volume" + "bluetooth" + "battery" + "systray" + "cpu" + "ram" + "clock" + "notifications" + ]; }; }; + workspaces = { + showAllActive = true; + show_icons = false; + numbered_active_indicator = "underline"; + show_numbered = true; + showWsIcons = false; + showApplicationIcons = false; + hideUnoccupied = true; + }; + launcher = { + icon = "󱄅"; + rightClick = "hyprpanel -t settings-dialog"; + }; + scrollSpeed = 0; + windowtitle = { + class_name = false; + custom_title = false; + icon = false; + label = true; + title_map = [ + + ]; + truncation = true; + }; + network = { + label = false; + truncation = false; + }; + clock.format = "%a %b %d %H:%M:%S"; + notifications.show_total = true; + }; + + menus = { + clock.time.military = true; + dashboard = { + powermenu.avatar.image = "/home/cholli/Pictures/profile.png"; + + shortcuts.enabled = false; + directories.left = { + directory1.command = "kitty $HOME/Downloads"; + directory3.command = "kitty $HOME/projects"; + }; + + stats = { + enable_gpu = true; + enabled = false; + }; + controls.enabled = false; + }; + bluetooth = { + showBattery = true; + batteryState = "always"; + }; + transition = "crossfade"; + }; + + theme = { + bar = { + floating = true; + outer_spacing = "0.2em"; + buttons = { + enableBorders = true; + + workspaces = { + enableBorder = false; + fontSize = "1.2em"; + smartHighlight = false; + active = "#f7768e"; + occupied = "#f7768e"; + available = "#7dcfff"; + hover = "#f7768e"; + background = "#272a3d"; + numbered_active_highlighted_text_color = "#181825"; + numbered_active_underline_color = "#c678dd"; + border = "#f7768e"; + }; + modules = { + power = { + icon = "#181825"; + icon_background = "#f7768e"; + background = "#272a3d"; + border = "#f7768e"; + }; + ram = { + enableBorder = false; + spacing = "0.45em"; + icon = "#181825"; + icon_background = "#e0af68"; + text = "#e0af68"; + background = "#272a3d"; + border = "#e0af68"; + }; + cpu = { + enableBorder = false; + background = "#272a3d"; + icon = "#181825"; + icon_background = "#f7768e"; + text = "#f7768e"; + border = "#f7768e"; + }; + submap = { + background = "#272a3d"; + text = "#73daca"; + border = "#73daca"; + icon = "#181825"; + icon_background = "#73daca"; + }; + }; + + style = "split"; + icon = "#242438"; + icon_background = "#bb9af7"; + text = "#bb9af7"; + hover = "#414868"; + background = "#272a3d"; + dashboard = { + enableBorder = false; + icon = "#272a3d"; + background = "#e0af68"; + border = "#e0af68"; + }; + volume = { + icon = "#272a3d"; + text = "#f7768e"; + background = "#272a3d"; + icon_background = "#f7768e"; + border = "#f7768e"; + }; + notifications = { + total = "#bb9af7"; + icon = "#272a3d"; + background = "#272a3d"; + icon_background = "#bb9af7"; + border = "#bb9af7"; + }; + clock = { + icon = "#272a3d"; + text = "#f7768e"; + background = "#272a3d"; + icon_background = "#f7768e"; + border = "#f7768e"; + }; + systray = { + background = "#272a3d"; + border = "#414868"; + customIcon = "#c0caf5"; + }; + bluetooth = { + icon = "#272a3d"; + text = "#7dcfff"; + background = "#272a3d"; + icon_background = "#7dcfff"; + border = "#7dcfff"; + }; + windowtitle = { + icon = "#272a3d"; + text = "#f7768e"; + background = "#272a3d"; + icon_background = "#f7768e"; + border = "#f7768e"; + enableBorder = false; + }; + radius = "0.3em"; + borderSize = "0.0em"; + padding_x = "0.7rem"; + padding_y = "0.2rem"; + }; + + menus = { + monochrome = false; + opacity = 95; + menu = { + dashboard = { + powermenu = { + shutdown = "#f7768e"; + confirmation = { + deny = "#f7768e"; + confirm = "#9ece6a"; + button_text = "#1a1b26"; + body = "#c0caf5"; + label = "#bb9af7"; + border = "#414868"; + background = "#1a1b26"; + card = "#24283b"; + }; + sleep = "#7dcfff"; + logout = "#9ece6a"; + restart = "#e0af68"; + }; + monitors = { + ram = { + label = "#e0af68"; + bar = "#e0af68"; + icon = "#e0af68"; + }; + cpu = { + label = "#f7768e"; + bar = "#f7768e"; + icon = "#f7768e"; + }; + bar_background = "#414868"; + }; + directories = { + right = { + bottom.color = "#bb9af7"; + middle.color = "#bb9af7"; + top.color = "#73daca"; + }; + left = { + bottom.color = "#f7768e"; + middle.color = "#e0af68"; + top.color = "#f7768e"; + }; + }; + controls = { + input = { + text = "#1a1b26"; + background = "#f7768e"; + }; + volume = { + text = "#1a1b26"; + background = "#f7768e"; + }; + notifications = { + text = "#1a1b26"; + background = "#e0af68"; + }; + bluetooth = { + text = "#1a1b26"; + background = "#7dcfff"; + }; + disabled = "#414868"; + }; + profile.name = "#f7768e"; + border.color = "#414868"; + background.color = "#1a1b26"; + card.color = "#24283b"; + }; + notifications = { + switch = { + puck = "#565f89"; + disabled = "#565f89"; + enabled = "#bb9af7"; + }; + clear = "#f7768e"; + switch_divider = "#414868"; + border = "#414868"; + card = "#24283b"; + background = "#1a1b26"; + no_notifications_label = "#414868"; + label = "#bb9af7"; + scrollbar.color = "#bb9af7"; + pager = { + button = "#bb9af7"; + label = "#565f89"; + background = "#1a1b26"; + }; + }; + clock = { + text = "#c0caf5"; + border.color = "#414868"; + background.color = "#1a1b26"; + card.color = "#24283b"; + + calendar = { + contextdays = "#414868"; + days = "#c0caf5"; + currentday = "#f7768e"; + paginator = "#f7768e"; + weekdays = "#f7768e"; + yearmonth = "#73daca"; + }; + time = { + timeperiod = "#73daca"; + time = "#f7768e"; + }; + }; + systray = { + dropdownmenu.divider = "#24283b"; + dropdownmenu.text = "#c0caf5"; + dropdownmenu.background = "#1a1b26"; + }; + bluetooth = { + iconbutton = { + active = "#7dcfff"; + passive = "#c0caf5"; + }; + icons = { + active = "#7dcfff"; + passive = "#565f89"; + }; + listitems = { + active = "#7dcfff"; + passive = "#c0caf5"; + }; + switch = { + puck = "#565f89"; + disabled = "#565f89"; + enabled = "#7dcfff"; + }; + switch_divider = "#414868"; + status = "#565f89"; + text = "#c0caf5"; + label.color = "#7dcfff"; + border.color = "#414868"; + background.color = "#1a1b26"; + card.color = "#24283b"; + }; + volume = { + text = "#c0caf5"; + card.color = "#24283b"; + label.color = "#f7768e"; + input_slider = { + puck = "#414868"; + backgroundhover = "#414868"; + background = "#565f89"; + primary = "#f7768e"; + }; + audio_slider = { + puck = "#414868"; + backgroundhover = "#414868"; + background = "#565f89"; + primary = "#f7768e"; + }; + icons = { + active = "#f7768e"; + passive = "#565f89"; + }; + iconbutton = { + active = "#f7768e"; + passive = "#c0caf5"; + }; + listitems = { + active = "#f7768e"; + passive = "#c0caf5"; + }; + border.color = "#414868"; + background.color = "#1a1b26"; + }; + media = { + card.color = "#24283b"; + slider = { + puck = "#565f89"; + backgroundhover = "#414868"; + background = "#565f89"; + primary = "#f7768e"; + }; + buttons = { + text = "#1a1b26"; + background = "#bb9af7"; + enabled = "#73daca"; + inactive = "#414868"; + }; + border.color = "#414868"; + background.color = "#1a1b26"; + album = "#f7768e"; + artist = "#73daca"; + song = "#bb9af7"; + }; + power = { + border.color = "#414868"; + buttons = { + sleep = { + icon_background = "#7dcfff"; + text = "#7dcfff"; + background = "#24283b"; + icon = "#1a1b26"; + }; + restart = { + text = "#e0af68"; + icon_background = "#e0af68"; + icon = "#1a1b26"; + background = "#24283b"; + }; + shutdown = { + icon = "#1a1b26"; + background = "#24283b"; + icon_background = "#f7768e"; + text = "#f7768e"; + }; + logout = { + icon = "#1a1b26"; + background = "#24283b"; + text = "#9ece6a"; + icon_background = "#9ece6a"; + }; + }; + background.color = "#1a1b26"; + scaling = 90; + }; + }; + background = "#1a1b26"; + text = "#c0caf5"; + border.color = "#414868"; + popover = { + text = "#bb9af7"; + background = "#1a1b26"; + border = "#1a1b26"; + }; + tooltip = { + text = "#c0caf5"; + background = "#1a1b26"; + }; + dropdownmenu = { + divider = "#24283b"; + text = "#c0caf5"; + background = "#1a1b26"; + }; + slider = { + puck = "#565f89"; + backgroundhover = "#414868"; + background = "#565f89"; + primary = "#bb9af7"; + }; + progressbar = { + background = "#414868"; + foreground = "#bb9af7"; + }; + iconbuttons = { + active = "#bb9af7"; + passive = "#c0caf5"; + }; + buttons = { + text = "#1a1b26"; + disabled = "#565f89"; + active = "#f7768e"; + default = "#bb9af7"; + }; + switch = { + puck = "#565f89"; + disabled = "#565f89"; + enabled = "#bb9af7"; + }; + icons = { + active = "#bb9af7"; + passive = "#414868"; + }; + listitems = { + active = "#bb9af7"; + passive = "#c0caf5"; + }; + label = "#bb9af7"; + feinttext = "#414868"; + dimtext = "#414868"; + cards = "#24283b"; + check_radio_button.background = "#3b4261"; + check_radio_button.active = "#bb9af7"; + }; + transparent = true; + background = "#1a1b26"; + margin_sides = "0.0em"; + location = "top"; + }; + osd = { + monitor = 1; + muted_zero = true; + label = "#bb9af7"; + icon = "#1a1b26"; + bar_overflow_color = "#f7768e"; + bar_empty_color = "#414868"; + bar_color = "#bb9af7"; + icon_container = "#bb9af7"; + bar_container = "#1a1b26"; + }; + notification = { + close_button.label = "#1a1b26"; + close_button.background = "#f7768e"; + labelicon = "#bb9af7"; + text = "#c0caf5"; + time = "#9aa5ce"; + border = "#565f89"; + label = "#bb9af7"; + actions.text = "#24283b"; + actions.background = "#bb9af7"; + background = "#1a1b26"; + }; + font.size = "1.3rem"; + }; + notifications = { + monitor = 1; + active_monitor = false; + }; + wallpaper = { + pywal = false; + image = "/home/cholli/Pictures/firewatch.jpg"; + enable = false; }; }; in @@ -50,11 +596,19 @@ in }; config = mkIf cfg.enable { - ${namespace}.home.file = { - ".cache/ags/options_test.json".source = settingsFormat.generate "options.json" mkMerge [ - settings - cfg.extraSettings + + snowfallorg.users.${username}.home.config = { + wayland.windowManager.hyprland.settings.exec-once = [ + "${pkgs.hyprpanel}/bin/hyprpanel" ]; }; + + ${namespace}.home.file = { + ".cache/ags/hyprpanel/options_test.json" = { + + # source = pkgs.formats.json.generate "options.json" settings; + text = builtins.toJSON settings; + }; + }; }; } diff --git a/modules/nixos/desktop/addons/hyprpanel/options.json b/modules/nixos/desktop/addons/hyprpanel/options.json index f93f95c..c38e309 100644 --- a/modules/nixos/desktop/addons/hyprpanel/options.json +++ b/modules/nixos/desktop/addons/hyprpanel/options.json @@ -46,7 +46,7 @@ "bar.workspaces.numbered_active_indicator": "underline", "bar.scrollSpeed": 0, "menus.dashboard.powermenu.avatar.image": "/home/cholli/Pictures/profile.png", - "menus.dashboard.shortcuts.enabled": true, + "menus.dashboard.shortcuts.enabled": false, "menus.dashboard.directories.left.directory3.command": "bash -c \"xdg-open $HOME/projects/\"", "menus.dashboard.directories.left.directory1.command": "bash -c \"xdg-open $HOME/Downloads/\"", "menus.dashboard.stats.enable_gpu": true, @@ -455,5 +455,6 @@ "bar.windowtitle.label": true, "bar.windowtitle.title_map": [], "bar.windowtitle.truncation": false, - "bar.workspaces.hideUnoccupied": true -} + "bar.workspaces.hideUnoccupied": true, + "bar.launcher.rightClick": "hyprpanel -t settings-dialog" +} \ No newline at end of file diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 090ab58..06bfffd 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -6,10 +6,17 @@ ... }: let + inherit (lib) mkIf mkEnableOption; user = config.${namespace}.user.name; + + cfg = config.${namespace}.desktop.hyprland; in { - config = { + options.${namespace}.desktop = { + enable = mkEnableOption "Whether to enable desktop theming"; + }; + + config = mkIf cfg.enable { ${namespace}.home.extraOptions = { dconf.settings = { "org/gnome/desktop/interface" = { diff --git a/modules/nixos/desktop/hyprland/default.nix b/modules/nixos/desktop/hyprland/default.nix index 339ce00..465b045 100644 --- a/modules/nixos/desktop/hyprland/default.nix +++ b/modules/nixos/desktop/hyprland/default.nix @@ -55,7 +55,6 @@ in # Wayland Utilities wl-clipboard - wl-screenrec wlr-randr # Screenshot Utility @@ -91,14 +90,18 @@ in }; ${namespace} = { - desktop.addons = { - rofi = { - enable = true; - package = pkgs.rofi-wayland-unwrapped; + desktop = { + enable = true; + addons = { + rofi = { + enable = true; + package = pkgs.rofi-wayland-unwrapped; + }; + hypridle = enabled; + hyprlock = enabled; + hyprpanel = enabled; + hyprpaper = enabled; }; - hypridle = enabled; - hyprlock = enabled; - hyprpaper = enabled; }; nix.extra-substituters.${cachix-url} = { @@ -121,7 +124,6 @@ in ]; exec-once = [ - "${pkgs.hyprpanel}/bin/hyprpanel" "systemctl --user start hyprpolkitagent" "[workspace 2 silent] steam --disable-gpu-compositing" # nvidia pls let me have nice things From 8ffaac44ebc0b4b074d0439ee0428a9d0cf0d4cc Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 4 Nov 2024 23:18:11 +0100 Subject: [PATCH 06/10] loptland enable factorio server --- systems/x86_64-linux/loptland/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systems/x86_64-linux/loptland/default.nix b/systems/x86_64-linux/loptland/default.nix index a3c3daf..241b786 100644 --- a/systems/x86_64-linux/loptland/default.nix +++ b/systems/x86_64-linux/loptland/default.nix @@ -24,7 +24,7 @@ in }; services = { - # factorio-server = enabled; + factorio-server = enabled; }; user.trustedPublicKeys = [ From 99403760545fb4dff9e2475d9c8436d2447d8166 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Mon, 4 Nov 2024 23:51:24 +0100 Subject: [PATCH 07/10] update flake --- flake.lock | 246 ++++++++++++++++++++++++++++++++++++----------------- flake.nix | 2 +- 2 files changed, 167 insertions(+), 81 deletions(-) diff --git a/flake.lock b/flake.lock index cf6666e..2107ae1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,24 @@ { "nodes": { + "ags": { + "inputs": { + "nixpkgs": "nixpkgs_3", + "systems": "systems_4" + }, + "locked": { + "lastModified": 1728326430, + "narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=", + "owner": "Aylur", + "repo": "ags", + "rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d", + "type": "github" + }, + "original": { + "owner": "Aylur", + "repo": "ags", + "type": "github" + } + }, "aquamarine": { "inputs": { "hyprutils": [ @@ -56,11 +75,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1730097176, - "narHash": "sha256-ufvRff76Y19mkRsmx+mAnxKE9A9VaNWC2mVY6TwumOw=", + "lastModified": 1730702146, + "narHash": "sha256-a657FU8MS5m0Y4pQvcmQPfvXYOPpxih7u2hU57Bn2i4=", "owner": "nix-community", "repo": "fenix", - "rev": "482b57f3f27a9336e0fbc62fa99ee0f624ccf4d0", + "rev": "fa3610f841725c8e20fc0fab070ee60609fdd5ee", "type": "github" }, "original": { @@ -226,7 +245,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1710146030, @@ -244,7 +263,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1726560853, @@ -277,7 +296,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_6" + "systems": "systems_7" }, "locked": { "lastModified": 1694529238, @@ -296,7 +315,7 @@ "gen-luarc": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1718922730, @@ -360,11 +379,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1729690460, - "narHash": "sha256-x8qkGujBPuOefXPyjcaB8Ot0IYkQBy6O2ZYb8NrnB3k=", + "lastModified": 1730313564, + "narHash": "sha256-1RBs/WOH3gp2ETDruEbM2vq2tPiJmqQ3wrjiKREE5NU=", "owner": "helix-editor", "repo": "helix", - "rev": "101a74bf6edbbfdf9b0628a0bdbbc307ebe10ff2", + "rev": "38faf74febf3332fb119302324bfd21229d39e14", "type": "github" }, "original": { @@ -380,11 +399,11 @@ ] }, "locked": { - "lastModified": 1730016908, - "narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=", + "lastModified": 1730633670, + "narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=", "owner": "nix-community", "repo": "home-manager", - "rev": "e83414058edd339148dc142a8437edb9450574c8", + "rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661", "type": "github" }, "original": { @@ -457,11 +476,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1730072482, - "narHash": "sha256-3Aotvc0dFS9J2iDnrSVjjngdZcaD9ghfroVU3jl84Gk=", + "lastModified": 1730749523, + "narHash": "sha256-TWGd3+hjDcwEDE2YzIXWFUWkDFWr5r6KcBADc4Dxiik=", "ref": "refs/heads/main", - "rev": "6cf193e1662f6f750e964a3e174ae017246b4d48", - "revCount": 5385, + "rev": "88e9e0394541a853600bc2c910005c05fa156269", + "revCount": 5410, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -489,11 +508,11 @@ ] }, "locked": { - "lastModified": 1729596320, - "narHash": "sha256-sBPr6O2Ad916f+L7biAjmJVx4TLDITC4joKgeOT47V8=", + "lastModified": 1730755630, + "narHash": "sha256-IA5U8lHx/lnHwbx25dpPpeLbaALqNNjalYCf19tIoj0=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219", + "rev": "44859f877739c05d031fcab4a2991ec004fa9bc4", "type": "github" }, "original": { @@ -593,11 +612,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1730053985, - "narHash": "sha256-jh7PhejwT+XqkkYnpZ6K/Gkqy4tvjN7g/ZBTvlS+Q9Y=", + "lastModified": 1730590959, + "narHash": "sha256-ss3lT96WFdiNxI4mtrmRtV1XsfxIs2BtYLiU9BKu7Uo=", "owner": "hyprwm", "repo": "hyprlock", - "rev": "edbecc87081756b45bdbea16b63e413473659dcd", + "rev": "f225e23e5b275dd5b3f7b2cc007ab4b559d8a9d9", "type": "github" }, "original": { @@ -606,6 +625,25 @@ "type": "github" } }, + "hyprpanel": { + "inputs": { + "ags": "ags", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1730716171, + "narHash": "sha256-Zk3rFDpwnceOMnpUCXWMYqG3yLL05bo7bS76tOfwZAU=", + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", + "rev": "155b9bb1f703aede9dfa9e17ad19eaa9767f5eb1", + "type": "github" + }, + "original": { + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -725,11 +763,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1730068391, - "narHash": "sha256-jlAGtfMuI8pUUoUmNkm2P/38pOtHZdcAf3Az8XQLAf4=", + "lastModified": 1730537918, + "narHash": "sha256-GJB1/aaTnAtt9sso/EQ77TAGJ/rt6uvlP0RqZFnWue8=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "6906ac67a1078cf950b8527341e229eeecb5bc30", + "rev": "f6e0cd5c47d150c4718199084e5764f968f1b560", "type": "github" }, "original": { @@ -747,11 +785,11 @@ ] }, "locked": { - "lastModified": 1730106248, - "narHash": "sha256-xicJnAvJ/8nJ6Ojwz6tWk+EcMjcW+M9ozlvfgjFQ+UQ=", + "lastModified": 1730453870, + "narHash": "sha256-d+kIgz4BvTXb7emjSFV3zjNydGmLUmuluQjdBb51R9o=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "24ab2f9ad309b1bba89644116656139dde706833", + "rev": "adb6bc4b661a43328752b4575be4968a4990c033", "type": "github" }, "original": { @@ -762,11 +800,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1729413321, - "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=", + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", "type": "github" }, "original": { @@ -778,17 +816,17 @@ }, "nixpkgs-latest-factorio": { "locked": { - "lastModified": 1729881984, - "narHash": "sha256-GbM6MN8X46nlHFdwCPMS7VG50nI9hJ65FTofa09e6sY=", + "lastModified": 1730638571, + "narHash": "sha256-z9Wy1jmhFrABK3cEyiVmQtUwOuQW1YPwA8+HMnbEpnE=", "owner": "Daholli", "repo": "nixpkgs", - "rev": "19493dc0ad16ffd5414ac9b4e12179d0e1b98468", + "rev": "d941e9aa2d89f377d45516c5edd765fef15ea90a", "type": "github" }, "original": { "owner": "Daholli", "repo": "nixpkgs", - "rev": "19493dc0ad16ffd5414ac9b4e12179d0e1b98468", + "rev": "d941e9aa2d89f377d45516c5edd765fef15ea90a", "type": "github" } }, @@ -806,11 +844,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1730110089, - "narHash": "sha256-yfKsL/0ZMxmy8wE9lgNt5DMwUhgqhYUmKTR5Te6HF9A=", + "lastModified": 1730758219, + "narHash": "sha256-/ZDUbjpoP6rhXGzD0s6YGQcKRGX1C6gLn5zxe1npkiQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "730e5fa135993f57f2013d911ce5b98d020365f3", + "rev": "5d608d235a0cb6b142410286169e7857e4f115a2", "type": "github" }, "original": { @@ -838,11 +876,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1729973466, - "narHash": "sha256-knnVBGfTCZlQgxY1SgH0vn2OyehH9ykfF8geZgS95bk=", + "lastModified": 1730602179, + "narHash": "sha256-efgLzQAWSzJuCLiCaQUCDu4NudNlHdg2NzGLX5GYaEY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cd3e8833d70618c4eea8df06f95b364b016d4950", + "rev": "3c2f1c4ca372622cb2f9de8016c9a0b1cbd0f37c", "type": "github" }, "original": { @@ -854,11 +892,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1729880355, - "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", "type": "github" }, "original": { @@ -886,15 +924,15 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1718714799, - "narHash": "sha256-FUZpz9rg3gL8NVPKbqU8ei1VkPLsTIfAJ2fdAf5qjak=", - "owner": "nixos", + "lastModified": 1725634671, + "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "c00d587b1a1afbf200b1d8f0b0e4ba9deb1c7f0e", + "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -918,11 +956,43 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1729951556, - "narHash": "sha256-bpb6r3GjzhNW8l+mWtRtLNg5PhJIae041sPyqcFNGb4=", + "lastModified": 1718714799, + "narHash": "sha256-FUZpz9rg3gL8NVPKbqU8ei1VkPLsTIfAJ2fdAf5qjak=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c00d587b1a1afbf200b1d8f0b0e4ba9deb1c7f0e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1730531603, + "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1730272153, + "narHash": "sha256-B5WRZYsRlJgwVHIV6DvidFN7VX7Fg9uuwkRW9Ha8z+w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4e0eec54db79d4d0909f45a88037210ff8eaffee", + "rev": "2d2a9ddbe3f2c00747398f3dc9b05f7f2ebb0f53", "type": "github" }, "original": { @@ -932,13 +1002,13 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_8": { "locked": { - "lastModified": 1729880355, - "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", "type": "github" }, "original": { @@ -982,11 +1052,12 @@ "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "hyprlock": "hyprlock", + "hyprpanel": "hyprpanel", "kickstartnvim": "kickstartnvim", "nix-ld": "nix-ld", "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_6", "nixpkgs-latest-factorio": "nixpkgs-latest-factorio", "nixpkgs-master": "nixpkgs-master", "nixpkgs-unstable": "nixpkgs-unstable", @@ -999,11 +1070,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1730028316, - "narHash": "sha256-FsPsSjqnqMHBgDdM24DFLw4YOw0mFKYFJBcLaI6CvI8=", + "lastModified": 1730645367, + "narHash": "sha256-RnmBO+9zmZ3NpU6+NfYUDRg31dsPZ17xUqXVw/ZOKZ8=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "3b3a87fe9bd3f2a79942babc1d1e385b6805c384", + "rev": "e44691a60443f1246a077df659607ca89f2ddc58", "type": "github" }, "original": { @@ -1089,11 +1160,11 @@ ] }, "locked": { - "lastModified": 1719005984, - "narHash": "sha256-mpFl3Jv4fKnn+5znYXG6SsBjfXHJdRG5FEqNSPx0GLA=", + "lastModified": 1730136121, + "narHash": "sha256-tfVayj13Zw+zzOKrmJhnvBod7Hdb9ixBR6/4GUlyMA0=", "owner": "snowfallorg", "repo": "lib", - "rev": "c6238c83de101729c5de3a29586ba166a9a65622", + "rev": "dd348182c1a010993e68004eada86cf0341fe2c4", "type": "github" }, "original": { @@ -1104,15 +1175,15 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_7", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1729999681, - "narHash": "sha256-qm0uCtM9bg97LeJTKQ8dqV/FvqRN+ompyW4GIJruLuw=", + "lastModified": 1730746162, + "narHash": "sha256-ZGmI+3AbT8NkDdBQujF+HIxZ+sWXuyT6X8B49etWY2g=", "owner": "Mic92", "repo": "sops-nix", - "rev": "1666d16426abe79af5c47b7c0efa82fd31bf4c56", + "rev": "59d6988329626132eaf107761643f55eb979eef1", "type": "github" }, "original": { @@ -1168,16 +1239,16 @@ }, "systems_4": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1211,6 +1282,21 @@ "type": "github" } }, + "systems_7": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -1239,11 +1325,11 @@ ] }, "locked": { - "lastModified": 1728166987, - "narHash": "sha256-w6dVTguAn9zJ+7aPOhBQgDz8bn6YZ7b56cY8Kg5HJRI=", + "lastModified": 1730743262, + "narHash": "sha256-iTLqj3lU8kFehPm5tXpctzkD274t/k1nwSSq3qCWXeg=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "fb9c8d665af0588bb087f97d0f673ddf0d501787", + "rev": "09b23cef06fe248e61cec8862c04b9bcb62f4b6d", "type": "github" }, "original": { @@ -1254,14 +1340,14 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1730084618, - "narHash": "sha256-gZyHBeo21uZPi7QzzRPlUo3te1HO+aNxYsRo+LzDokg=", + "lastModified": 1730444716, + "narHash": "sha256-WtqSpYQyG5ad+GK7B0ViDSl0NolHp7yM24TacUslBXE=", "owner": "ch4og", "repo": "zen-browser-flake", - "rev": "f36474f335ea16534da68715d1f5ae27a5642c94", + "rev": "d3c639ee7bff20f799f443e18fffa6331a71cd3a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0fe16d4..3f0ed80 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-master.url = "github:nixos/nixpkgs/master"; - nixpkgs-latest-factorio.url = "github:Daholli/nixpkgs/19493dc0ad16ffd5414ac9b4e12179d0e1b98468"; + nixpkgs-latest-factorio.url = "github:Daholli/nixpkgs/d941e9aa2d89f377d45516c5edd765fef15ea90a"; home-manager = { url = "github:nix-community/home-manager/master"; From c06723f7ec950e04024748868538628853d10397 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Tue, 5 Nov 2024 09:27:46 +0100 Subject: [PATCH 08/10] factorio-headless: removed from main PC since the server is now running --- systems/x86_64-linux/yggdrasil/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systems/x86_64-linux/yggdrasil/default.nix b/systems/x86_64-linux/yggdrasil/default.nix index f217373..ec3dff9 100644 --- a/systems/x86_64-linux/yggdrasil/default.nix +++ b/systems/x86_64-linux/yggdrasil/default.nix @@ -5,7 +5,7 @@ ... }: let - inherit (lib.${namespace}) enabled; + inherit (lib.${namespace}) enabled disabled; in { imports = [ ./hardware.nix ]; @@ -79,7 +79,7 @@ in }; services = { - factorio-server = enabled; + factorio-server = disabled; }; system = { From a1c14b5d8ce1f14b7102f9c5227b4c74ae1128d1 Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Tue, 5 Nov 2024 14:49:08 +0100 Subject: [PATCH 09/10] change the way admins are configured --- modules/nixos/services/factorio-server/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/nixos/services/factorio-server/default.nix b/modules/nixos/services/factorio-server/default.nix index a278920..de2d419 100644 --- a/modules/nixos/services/factorio-server/default.nix +++ b/modules/nixos/services/factorio-server/default.nix @@ -40,7 +40,6 @@ in "autosave_slots": 5, "ignore_player_limit_for_returning_players": true, "username" : "${config.sops.placeholder.factorio_username}", - "admins": ["${config.sops.placeholder.factorio_username}"], "token": "${config.sops.placeholder.factorio_token}" } ''; @@ -55,6 +54,11 @@ in nonBlockingSaving = true; autosave-interval = 15; saveName = "SpaceAge"; + admins = [ + "daholli" + "galbrain" + "geigeabc" + ]; extraSettingsFile = config.sops.templates."extraSettingsFile.json".path; }; }; From 897b24e4854891a53461519bdc7f5b890c3216de Mon Sep 17 00:00:00 2001 From: Christoph Hollizeck Date: Wed, 6 Nov 2024 09:45:25 +0100 Subject: [PATCH 10/10] nvidia: move configurations in respective files --- modules/nixos/desktop/hyprland/default.nix | 20 ++++++++++++------- .../system/hardware/gpu/nvidia/default.nix | 10 ++++++++++ systems/x86_64-linux/yggdrasil/default.nix | 8 -------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/modules/nixos/desktop/hyprland/default.nix b/modules/nixos/desktop/hyprland/default.nix index 465b045..264a8ad 100644 --- a/modules/nixos/desktop/hyprland/default.nix +++ b/modules/nixos/desktop/hyprland/default.nix @@ -117,12 +117,6 @@ in { "$mod" = "SUPER"; - env = [ - "QT_AUTO_SCREEN_SCALE_FACTOR,1" - "QT_QPA_PLATFORM,wayland;xcb" - "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" - ]; - exec-once = [ "systemctl --user start hyprpolkitagent" @@ -313,7 +307,19 @@ in }; environment.sessionVariables = { - NIXOS_OZONE_WL = "1"; + NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland + + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + XDG_SESSION_DESKTOP = "Hyprland"; + + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_QPA_PLATFORM = "wayland;xcb"; + + ELECTRON_OZONE_PLATFORM_HINT = "auto"; + + WLR_DRM_NO_ATOMIC = "1"; }; }; } diff --git a/modules/nixos/system/hardware/gpu/nvidia/default.nix b/modules/nixos/system/hardware/gpu/nvidia/default.nix index 5074f6d..7eacb9c 100644 --- a/modules/nixos/system/hardware/gpu/nvidia/default.nix +++ b/modules/nixos/system/hardware/gpu/nvidia/default.nix @@ -41,5 +41,15 @@ in # WARNING: this disables tty output and thus hides boot logs. "initcall_blacklist=simpledrm_platform_driver_init" ]; + + environment.sessionVariables = { + GBM_BACKEND = "nvidia-drm"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + LIBVA_DRIVER_NAME = "nvidia"; + __GL_GSYNC_ALLOWED = "1"; + __GL_VRR_ALLOWED = "0"; + NVD_BACKEND = "direct"; + }; + }; } diff --git a/systems/x86_64-linux/yggdrasil/default.nix b/systems/x86_64-linux/yggdrasil/default.nix index ec3dff9..97aa759 100644 --- a/systems/x86_64-linux/yggdrasil/default.nix +++ b/systems/x86_64-linux/yggdrasil/default.nix @@ -44,14 +44,6 @@ in "Unknown-1, disable" ]; - env = [ - "LIBVA_DRIVER_NAME,nvidia" - "XDG_SESSION_TYPE,wayland" - "GBM_BACKEND,nvidia-drm" - "__GLX_VENDOR_LIBRARY_NAME,nvidia" - "NVD_BACKEND,direct" - ]; - cursor = { no_hardware_cursors = true; };