add gdm and gnome and stuff

This commit is contained in:
MeexReay 2025-09-06 23:48:03 +03:00
parent 1a9aff7545
commit 5f2f8b8983
76 changed files with 100 additions and 140 deletions

56
flake.lock generated
View File

@ -6,27 +6,27 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1756331205, "lastModified": 1757189909,
"narHash": "sha256-zbqFaQ5cfnjurlTu+HxDlAbS3E6lDu7pIhDQkg1CEvw=", "narHash": "sha256-csgWLnQrfvkn/WO4YXy4cGIGIwRW8dah99ZFmnIJ3zM=",
"owner": "MeexReay", "owner": "locomiadev",
"repo": "envfetch", "repo": "envfetch",
"rev": "f923953a6c1c927a8a3b6c2107ec11c0281ff3c1", "rev": "5928ea4b30c43c1a2d001e26a8944f75f8a56e7e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "MeexReay", "owner": "locomiadev",
"repo": "envfetch", "repo": "envfetch",
"type": "github" "type": "github"
} }
}, },
"flake-compat": { "flake-compat": {
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1733328505,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"revCount": 57, "revCount": 69,
"type": "tarball", "type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz?rev=ff81ac966bb2cae68946d5ed5fc4994f96d0ffec&revCount=69"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
@ -38,11 +38,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1753121425, "lastModified": 1749398372,
"narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -76,11 +76,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1750792728, "lastModified": 1756679287,
"narHash": "sha256-Lh3dopA8DdY+ZoaAJPrtkZOZaFEJGSYjOdAYYgOPgE4=", "narHash": "sha256-Xd1vOeY9ccDf5VtVK12yM0FS6qqvfUop8UQlxEB+gTQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "366f00797b1efb70f2882d3da485e3c10fd3d557", "rev": "07fc025fe10487dd80f2ec694f1cd790e752d0e8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -92,11 +92,11 @@
}, },
"nix-flatpak": { "nix-flatpak": {
"locked": { "locked": {
"lastModified": 1736952876, "lastModified": 1754777568,
"narHash": "sha256-dJXuLP2CBkIG333L+Rb3e1D0oXHYbl0MgmKPGuvFuAI=", "narHash": "sha256-0bBqT+3XncgF8F03RFAamw9vdf0VmaDoIJLTGkjfQZs=",
"owner": "gmodena", "owner": "gmodena",
"repo": "nix-flatpak", "repo": "nix-flatpak",
"rev": "b6966d5fa96b0fae99a4da0b5bdfbb0a75f5c058", "rev": "62f636b87ef6050760a8cb325cadb90674d1e23e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -142,11 +142,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1751159883, "lastModified": 1748740939,
"narHash": "sha256-urW/Ylk9FIfvXfliA1ywh75yszAbiTEVgpPeinFyVZo=", "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "14a40a1d7fb9afa4739275ac642ed7301a9ba1ab", "rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -157,11 +157,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1752866191, "lastModified": 1749494155,
"narHash": "sha256-NV4S2Lf2hYmZQ3Qf4t/YyyBaJNuxLPyjzvDma0zPp/M=", "narHash": "sha256-FG4DEYBpROupu758beabUk9lhrblSf5hnv84v1TLqMc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f01fe91b0108a7aff99c99f2e9abbc45db0adc2a", "rev": "88331c17ba434359491e8d5889cce872464052c2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -173,11 +173,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1750622754, "lastModified": 1756886854,
"narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", "narHash": "sha256-6tooT142NLcFjt24Gi4B0G1pgWLvfw7y93sYEfSHlLI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", "rev": "0e6684e6c5755325f801bda1751a8a4038145d7d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -7,7 +7,7 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixcord.url = "github:KaylorBen/nixcord/411d48a6"; nixcord.url = "github:KaylorBen/nixcord/411d48a6";
nix-flatpak.url = "github:gmodena/nix-flatpak"; nix-flatpak.url = "github:gmodena/nix-flatpak";
envfetch.url = "github:MeexReay/envfetch"; envfetch.url = "github:locomiadev/envfetch";
}; };
outputs = inputs@{ nixpkgs, home-manager, ... }: { outputs = inputs@{ nixpkgs, home-manager, ... }: {
@ -30,7 +30,7 @@
inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nix-flatpak.homeManagerModules.nix-flatpak
]; ];
home-manager.backupFileExtension = "backup99"; home-manager.backupFileExtension = "backup90";
} }
]; ];
}; };

View File

@ -5,7 +5,7 @@
./packages ./packages
./sway ./sway
# ./proxies # ./proxies
# ./gnome-quirks ./gnome-quirks
]; ];
home.username = "user"; home.username = "user";

View File

@ -4,17 +4,32 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
libadwaita libadwaita
adwaita-icon-theme adwaita-icon-theme
gnomeExtensions.app-hider
gnomeExtensions.clipboard-indicator
gnomeExtensions.dash-to-dock
gnomeExtensions.gsconnect
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.gtk4-desktop-icons-ng-ding
gnomeExtensions.simple-workspaces-bar
gnomeExtensions.desktop-cube
gnomeExtensions.category-sorted-app-grid
gnomeExtensions.blur-my-shell
dconf-editor
gnome-tweaks
gnome-extension-manager
]; ];
gtk = { # gtk = {
enable = true; # enable = true;
theme.name = "Adwaita-dark"; # theme.name = "Adwaita-dark";
iconTheme.name = "Adwaita"; # iconTheme.name = "Adwaita";
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; # gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
}; # };
qt.enable = true; # qt.enable = true;
qt.style.name = "adwaita-dark"; # qt.style.name = "adwaita-dark";
dconf.settings = { dconf.settings = {
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
@ -32,6 +47,8 @@
"clipboard-indicator@tudmotu.com" "clipboard-indicator@tudmotu.com"
"gtk4-ding@smedius.gitlab.com" "gtk4-ding@smedius.gitlab.com"
"desktop-cube@schneegans.github.com" "desktop-cube@schneegans.github.com"
"blur-my-shell@aunetx"
"category-sorted-app-grid@noobping.dev"
]; ];
}; };
"org/gnome/shell/extensions/dash-to-dock" = { "org/gnome/shell/extensions/dash-to-dock" = {
@ -39,35 +56,39 @@
animate-show-apps = true; animate-show-apps = true;
apply-custom-theme = false; apply-custom-theme = false;
apply-glossy-effect = false; apply-glossy-effect = false;
background-opacity = 0.80000000000000004; background-opacity = 0.8;
custom-theme-customize-running-dots = true; custom-theme-customize-running-dots = true;
custom-theme-running-dots-border-width = 0; custom-theme-running-dots-border-width = 0;
custom-theme-shrink = true; custom-theme-shrink = true;
dance-urgent-applications = true; dance-urgent-applications = true;
dash-max-icon-size = 42; dash-max-icon-size = 48;
dock-fixed = true; dock-fixed = false;
dock-position = "RIGHT"; dock-position = "BOTTOM";
extend-height = true; extend-height = false;
height-fraction = 0.90000000000000002; height-fraction = 0.9;
icon-size-fixed = false;
intellihide-mode = "FOCUS_APPLICATION_WINDOWS";
isolate-locations = true; isolate-locations = true;
max-alpha = 0.8;
preferred-monitor = -2; preferred-monitor = -2;
preferred-monitor-by-connector = "HDMI-0"; preferred-monitor-by-connector = "HDMI-1";
preview-size-scale = 0.0; preview-size-scale = 0.0;
running-indicator-dominant-color = false; running-indicator-dominant-color = true;
running-indicator-style = "DOTS"; running-indicator-style = "DOTS";
show-apps-always-in-the-edge = true; show-apps-always-in-the-edge = true;
show-apps-at-top = false; show-apps-at-top = false;
show-mounts = false; show-mounts = false;
show-mounts-only-mounted = true; show-mounts-only-mounted = true;
transparency-mode = "DEFAULT";
unity-backlit-items = false; unity-backlit-items = false;
}; };
"org/gnome/desktop/background" = { "org/gnome/desktop/background" = {
picture-uri = "file:///${config.home.homeDirectory}/.local/share/backgrounds/2024-09-02-12-25-09-wallpaper.png"; picture-uri = "file:///${../wallpaper.jpg}";
picture-uri-dark = "file:///${config.home.homeDirectory}/.local/share/backgrounds/2024-09-02-12-25-09-wallpaper.png"; picture-uri-dark = "file://${../wallpaper.jpg}";
}; };
"org/gnome/desktop/input-sources" = { "org/gnome/desktop/input-sources" = {
show-all-sources = true; show-all-sources = true;
sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ]; # sources = [ (mkTuple [ "xkb" "us" ]) (mkTuple [ "xkb" "ru" ]) ];
xkb-options = [ "grp:alt_caps_toggle" ]; xkb-options = [ "grp:alt_caps_toggle" ];
}; };
"org/gnome/desktop/wm/preferences" = { "org/gnome/desktop/wm/preferences" = {

View File

@ -109,7 +109,7 @@
# internet # internet
spotify spotify
firefox firefox-bin
telegram-desktop telegram-desktop
(chromium.override { enableWideVine = true; }) (chromium.override { enableWideVine = true; })
revolt-desktop revolt-desktop

View File

@ -0,0 +1 @@

View File

@ -215,8 +215,7 @@
xdg.configFile."sway/idle.sh".source = ./idle.sh; xdg.configFile."sway/idle.sh".source = ./idle.sh;
xdg.configFile."sway/startup.sh".source = ./startup.sh; xdg.configFile."sway/startup.sh".source = ./startup.sh;
xdg.configFile."sway/random-bg.py".source = ./random-bg.py; xdg.configFile."sway/wallpaper.jpg".source = ../wallpaper.jpg;
xdg.configFile."sway/wallpapers" = { source = ./wallpapers; recursive = true; };
xdg.configFile."waybar" = { source = ./waybar; recursive = true; }; xdg.configFile."waybar" = { source = ./waybar; recursive = true; };
xdg.mimeApps.defaultApplications = { xdg.mimeApps.defaultApplications = {

View File

@ -1,72 +0,0 @@
#!/usr/bin/env python
import random
import time
import subprocess
import threading
import sys
import os
import psutil
WALLPAPERS_DIR = os.path.join(os.path.dirname(__file__), "wallpapers/")
INTERVAL_SECONDS = 60 * 10
def get_wallpapers():
return [os.path.join(WALLPAPERS_DIR, i) for i in os.listdir(WALLPAPERS_DIR)]
def get_random_wallpaper():
return random.choice(get_wallpapers())
def create_wallpaper_process(path):
process = subprocess.Popen(
["swaybg", "-m", "fill", "-i", path],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
return process
def send_wallpaper(path, interval):
process = create_wallpaper_process(path)
time.sleep(1)
kill_old_processes(process.pid)
time.sleep(interval-1)
process.kill()
def kill_old_processes(new_pid):
for proc in psutil.process_iter():
if proc.pid != new_pid and proc.name() == "swaybg":
print(proc.name(), proc.pid)
proc.kill()
def main():
args = sys.argv[1:]
if len(args) == 1:
if args[0] == "loop":
while True:
wallpapers = get_wallpapers()
random.shuffle(wallpapers)
for wallpaper in wallpapers:
thread = threading.Thread(
target = lambda: send_wallpaper(
wallpaper,
INTERVAL_SECONDS + 1
)
)
thread.start()
time.sleep(INTERVAL_SECONDS)
return
elif args[0] == "onetime":
process = create_wallpaper_process(get_random_wallpaper())
while process.stdout.read() not in "1234567890-:_":
time.sleep(1/60)
if process.poll() is None:
kill_old_processes(process.pid)
process.wait()
return
print("Usage:", sys.argv[0], "<onetime/loop>")
if __name__ == "__main__":
main()

View File

@ -3,8 +3,7 @@
dunst & dunst &
copyq & copyq &
blueman-applet & blueman-applet &
# ~/.config/sway/random-bg.py loop & swaybg -m fill -i ~/.config/sway/wallpaper.jpg &
swaybg -m fill -i ~/.config/sway/wallpapers/wallhaven-218d7y.jpg &
~/.startup & ~/.startup &
wait wait

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 933 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1010 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 820 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@ -10,6 +10,7 @@
[ [
./hardware-configuration.nix ./hardware-configuration.nix
./sway-quirks.nix ./sway-quirks.nix
./gnome.nix
]; ];
# bootloader stuff # bootloader stuff
@ -80,7 +81,8 @@
# Network settings # Network settings
networking = { networking = {
hostName = "desktop"; hostName = "desktop";
firewall = { firewall = {
enable = true; enable = true;
@ -194,7 +196,7 @@
# system-wide packages # system-wide packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim curl git openssl vim curl git openssl helix
]; ];
# enable xdg portal and flatpak # enable xdg portal and flatpak

8
system/gnome.nix Normal file
View File

@ -0,0 +1,8 @@
{ ... }:
{
services.xserver = {
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
}

View File

@ -3,17 +3,19 @@
{ {
programs.dconf.enable = true; programs.dconf.enable = true;
services.greetd = { # services.greetd = {
enable = true; # enable = true;
settings = { # settings = {
default_session = { # default_session = {
command = "bash -c \"LANG=en_US.UTF-8 ${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway\""; # command = "bash -c \"LANG=en_US.UTF-8 ${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway\"";
user = "greeter"; # user = "greeter";
}; # };
}; # };
}; # };
users.users.greeter = {}; # users.users.greeter = {};
services.displayManager.sessionPackages = [ pkgs.sway ];
security.polkit.enable = true; security.polkit.enable = true;
security.pam.services.swaylock = {}; security.pam.services.swaylock = {};
@ -22,5 +24,5 @@
services.udisks2.enable = true; services.udisks2.enable = true;
services.devmon.enable = true; services.devmon.enable = true;
environment.systemPackages = [ pkgs.sway ]; # environment.systemPackages = [ pkgs.sway ];
} }