From 8bbdb28d329964b2e794f31e7750de0a17024045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 2 Jun 2023 17:55:54 -0300 Subject: [PATCH] gnome: update config --- flake.lock | 112 ++++++++++++++++++++++++++++++++++++++++++-- flake.nix | 8 +++- system/boot.nix | 4 +- system/gnome.nix | 10 ++-- user/gnome.nix | 31 +++++++++--- user/sway/theme.nix | 3 +- 6 files changed, 146 insertions(+), 22 deletions(-) diff --git a/flake.lock b/flake.lock index 091ab0a..05ea433 100644 --- a/flake.lock +++ b/flake.lock @@ -549,6 +549,44 @@ "type": "github" } }, + "nix-software-center": { + "inputs": { + "nixpkgs": "nixpkgs_4", + "utils": "utils_2" + }, + "locked": { + "lastModified": 1680477702, + "narHash": "sha256-1KUe0zlXCeBpqTDHPWBBMjkGnRLthJEpQc+82Q7Pp1w=", + "owner": "vlinkz", + "repo": "nix-software-center", + "rev": "8c66618ebb85263e58c4b1b5e46bc954d55a418b", + "type": "github" + }, + "original": { + "owner": "vlinkz", + "repo": "nix-software-center", + "type": "github" + } + }, + "nixos-conf-editor": { + "inputs": { + "nixpkgs": "nixpkgs_5", + "utils": "utils_3" + }, + "locked": { + "lastModified": 1680749298, + "narHash": "sha256-QOigD8CaueznOKjjTpz1+lwiOX1o6qPTgZE6GmrCL/o=", + "owner": "vlinkz", + "repo": "nixos-conf-editor", + "rev": "9be2ed1183ca1cdf9c3a7a437032f41241d7a3b5", + "type": "github" + }, + "original": { + "owner": "vlinkz", + "repo": "nixos-conf-editor", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1675698036, @@ -612,6 +650,38 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1685655444, + "narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e635192892f5abbc2289eaac3a73cdb249abaefd", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1685655444, + "narHash": "sha256-6EujQNAeaUkWvpEZZcVF8qSfQrNVWFNNGbUJxv/A5a8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e635192892f5abbc2289eaac3a73cdb249abaefd", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1684171562, "narHash": "sha256-BMUWjVWAUdyMWKk0ATMC9H0Bv4qAV/TXwwPUvTiC5IQ=", @@ -626,7 +696,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1684498716, "narHash": "sha256-PSdaOLRJc5I0SrkYAduNmPaOIex7tvhyJUGkUJl98hM=", @@ -642,7 +712,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_8": { "locked": { "lastModified": 1684242266, "narHash": "sha256-uaCQ2k1bmojHKjWQngvnnnxQJMY8zi1zq527HdWgQf8=", @@ -735,7 +805,9 @@ "maildir-notify-daemon": "maildir-notify-daemon", "material-wifi-icons": "material-wifi-icons", "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_4", + "nix-software-center": "nix-software-center", + "nixos-conf-editor": "nixos-conf-editor", + "nixpkgs": "nixpkgs_6", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", "plymouth-themes": "plymouth-themes", @@ -897,7 +969,7 @@ "tlauncher": { "inputs": { "flake-utils": "flake-utils_6", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1684504342, @@ -928,6 +1000,36 @@ "type": "github" } }, + "utils_2": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_3": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "wegank": { "inputs": { "nixpkgs": [ @@ -951,7 +1053,7 @@ "wl-crosshair": { "inputs": { "flake-utils": "flake-utils_7", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1685576039, diff --git a/flake.nix b/flake.nix index cf1a552..006b74c 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,10 @@ demoji.url = "github:lelgenio/demoji"; maildir-notify-daemon.url = "github:lelgenio/maildir-notify-daemon"; wl-crosshair.url = "github:lelgenio/wl-crosshair"; + + # gnome stuff + nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor"; + nix-software-center.url = "github:vlinkz/nix-software-center"; }; outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager, nur, ... }: let @@ -134,8 +138,8 @@ inherit pkgs; extraSpecialArgs = { - inherit inputs; - osConfig = {}; + inherit inputs; + osConfig = { }; }; modules = [ ./user/home.nix ]; diff --git a/system/boot.nix b/system/boot.nix index 453ccd9..0a83f8e 100644 --- a/system/boot.nix +++ b/system/boot.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, ... }: { +{ config, pkgs, lib, inputs, ... }: { console = { font = "ter-120n"; packages = [ pkgs.terminus_font ]; @@ -36,7 +36,7 @@ }; plymouth = { enable = true; - theme = "red_loader"; + theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader"; themePackages = [ pkgs.plymouth-theme-red ]; diff --git a/system/gnome.nix b/system/gnome.nix index a856af6..db84c6d 100644 --- a/system/gnome.nix +++ b/system/gnome.nix @@ -8,9 +8,9 @@ services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; # services.xserver.displayManager.autologin.user = "lelgenio"; - environment.systemPackages = with pkgs; - with gnome; [ - gnome-tweaks - dconf-editor - ]; + environment.systemPackages = with pkgs; with gnome; [ + gnome-tweaks + dconf-editor + gnomeExtensions.gsconnect + ]; } diff --git a/user/gnome.nix b/user/gnome.nix index 30f9879..29e937f 100644 --- a/user/gnome.nix +++ b/user/gnome.nix @@ -1,15 +1,32 @@ -{ pkgs, lib, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") { +{ pkgs, lib, inputs, ... }: lib.mkIf (pkgs.uservars.desktop == "gnome") { - dconf.settings = with pkgs; with uservars.theme; { + dconf.settings = { "org/gnome/desktop/interface" = { - gtk-theme = gtk_theme; - icon-theme = icon_theme; - cursor-theme = cursor_theme; - color-scheme = "prefer-${color.type}"; + # gtk-theme = "Adwaita"; + # icon-theme = "Adwaita"; + # cursor-theme = "Adwaita"; + # color-scheme = "default"; }; "org/gnome/desktop/wm/preferences" = lib.mkForce { - button-layout = "menu:close"; + button-layout = "appmenu:close"; }; }; + home.sessionVariables = { + LD_PRELOAD = ""; + GTK_CSD = "1"; + }; + + home.packages = with pkgs; [ + inputs.nixos-conf-editor.packages.${pkgs.system}.nixos-conf-editor + inputs.nix-software-center.packages.${pkgs.system}.nix-software-center + + adw-gtk3 + + newsflash + foliate + lollypop + pitivi + ]; + } diff --git a/user/sway/theme.nix b/user/sway/theme.nix index 83693d4..74b6157 100644 --- a/user/sway/theme.nix +++ b/user/sway/theme.nix @@ -1,8 +1,9 @@ { config, pkgs, lib, inputs, ... }: let - inherit (pkgs.uservars) theme font; + inherit (pkgs.uservars) theme font desktop; inherit (theme) color gtk_theme icon_theme cursor_theme; in +lib.mkIf (desktop == "sway") { home.pointerCursor = { name = cursor_theme;