From b9cccd826416438b9deec026cde9b8e329d3dd5a Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Thu, 28 Dec 2023 22:26:25 +0100 Subject: Update desktop & user --- flake.lock | 421 ++++++++++++++++++++++++++++ host/Rory-desktop/configuration.nix | 81 +++--- modules/packages/xdg-desktop-portal-gtk.nix | 58 ++++ modules/users/Rory.nix | 41 ++- 4 files changed, 555 insertions(+), 46 deletions(-) create mode 100644 flake.lock create mode 100644 modules/packages/xdg-desktop-portal-gtk.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..e043486 --- /dev/null +++ b/flake.lock @@ -0,0 +1,421 @@ +{ + "nodes": { + "botcore-v4": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1683656302, + "narHash": "sha256-I2eu+9/i0ktqNzQwkc0NuczQ2UThCBf8L9xnZ8v3NSM=", + "owner": "BotCore-Devs", + "repo": "BotCore-v4", + "rev": "0e8738ba7df060782df050dc733b0bfc8c499830", + "type": "gitlab" + }, + "original": { + "owner": "BotCore-Devs", + "ref": "staging", + "repo": "BotCore-v4", + "type": "gitlab" + } + }, + "conduit": { + "inputs": { + "crane": "crane", + "fenix": "fenix", + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1703432212, + "narHash": "sha256-v/wpbH/xuh9SJjLeCQIDiCeEbyui2WuWvIjOIH+lx80=", + "owner": "famedly", + "repo": "conduit", + "rev": "ca6219723b0d562d86a69824720215f8a1851836", + "type": "gitlab" + }, + "original": { + "owner": "famedly", + "repo": "conduit", + "type": "gitlab" + } + }, + "crane": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": [ + "conduit", + "flake-utils" + ], + "nixpkgs": [ + "conduit", + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "conduit", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1689488573, + "narHash": "sha256-diVASflKCCryTYv0djvMnP2444mFsIG0ge5pa7ahauQ=", + "owner": "nix-community", + "repo": "fenix", + "rev": "39096fe3f379036ff4a5fa198950b8e79defe939", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1703795120, + "narHash": "sha256-Scr4fwfGn03zwFgM7IltT8hqbFDkHvymnF5AaR4eDAg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "ba6b75011b44e85b1b755b6c423f85d0817645f7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "mtxclientSrc": { + "flake": false, + "locked": { + "lastModified": 1700483982, + "narHash": "sha256-xKuY3IxaFdrxlxDH3t3ZmVWWOcqzAZvl/97mQOk1Tek=", + "owner": "Nheko-reborn", + "repo": "mtxclient", + "rev": "901ec5e35f76ebdff732ea28953b772ec7024df3", + "type": "github" + }, + "original": { + "owner": "Nheko-reborn", + "ref": "master", + "repo": "mtxclient", + "type": "github" + } + }, + "nhekoSrc": { + "flake": false, + "locked": { + "lastModified": 1703650822, + "narHash": "sha256-ga9DbE+KlRzOdQvE52tryN1KdCViV2Jvrx9DmClF1CQ=", + "owner": "Nheko-reborn", + "repo": "nheko", + "rev": "9abc44efe9de42ce1b8ff55331064ccd9832bdcd", + "type": "github" + }, + "original": { + "owner": "Nheko-reborn", + "ref": "master", + "repo": "nheko", + "type": "github" + } + }, + "nixos-wsl": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1703646364, + "narHash": "sha256-uCj41nq4hnw5aItXJg4DUNpqLSCNRM3xHZbGo8dwoXs=", + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "d72abaf29c40d8f6f9f527815c6dd24f76a50bd4", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NixOS-WSL", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1683408522, + "narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-RoryNix": { + "locked": { + "lastModified": 1703351344, + "narHash": "sha256-9FEelzftkE9UaJ5nqxidaJJPEhe9TPhbypLHmc2Mysc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7790e078f8979a9fcd543f9a47427eeaba38f268", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-rory": { + "locked": { + "lastModified": 1702491123, + "narHash": "sha256-5cMiUR/tLaPTn9TkVoi0FgOPx3TV5/Wnq8drAtL6NfY=", + "owner": "TheArcaneBrony", + "repo": "nixpkgs", + "rev": "7b65f36cb20ec965a39f6e5e1cd273644adb5293", + "type": "github" + }, + "original": { + "owner": "TheArcaneBrony", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1703255338, + "narHash": "sha256-Z6wfYJQKmDN9xciTwU3cOiOk+NElxdZwy/FiHctCzjU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6df37dc6a77654682fe9f071c62b4242b5342e04", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1703068421, + "narHash": "sha256-WSw5Faqlw75McIflnl5v7qVD/B3S2sLh+968bpOGrWA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d65bceaee0fb1e64363f7871bc43dc1c6ecad99f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1703438236, + "narHash": "sha256-aqVBq1u09yFhL7bj1/xyUeJjzr92fXVvQSSEx6AdB1M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5f64a12a728902226210bf01d25ec6cbb9d9265b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "botcore-v4": "botcore-v4", + "conduit": "conduit", + "home-manager": "home-manager", + "mtxclientSrc": "mtxclientSrc", + "nhekoSrc": "nhekoSrc", + "nixos-wsl": "nixos-wsl", + "nixpkgs": "nixpkgs_4", + "nixpkgs-RoryNix": "nixpkgs-RoryNix", + "nixpkgs-rory": "nixpkgs-rory" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1689441253, + "narHash": "sha256-4MSDZaFI4DOfsLIZYPMBl0snzWhX1/OqR/QHir382CY=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "996e054f1eb1dbfc8455ecabff0f6ff22ba7f7c8", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "conduit", + "crane", + "flake-utils" + ], + "nixpkgs": [ + "conduit", + "crane", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688351637, + "narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "f9b92316727af9e6c7fee4a761242f7f46880329", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix index a34fc1c..5491ae0 100644 --- a/host/Rory-desktop/configuration.nix +++ b/host/Rory-desktop/configuration.nix @@ -53,7 +53,7 @@ enable = true; updateDbusEnvironment = true; videoDrivers = ["nvidia"]; - desktopManager.gnome.enable = true; + #desktopManager.gnome.enable = true; libinput.enable = true; layout = "us"; windowManager.i3.enable = true; @@ -69,24 +69,24 @@ picom.enable = true; picom.vSync = false; picom.backend = "glx"; - gnome = { - core-developer-tools.enable = false; - core-utilities.enable = false; - tracker-miners.enable = false; - tracker.enable = false; - sushi.enable = false; - rygel.enable = false; - gnome-user-share.enable = false; - gnome-remote-desktop.enable = false; - gnome-online-miners.enable = lib.mkForce false; - gnome-online-accounts.enable = false; - gnome-initial-setup.enable = false; - gnome-browser-connector.enable = false; - games.enable = false; - gnome-keyring.enable = lib.mkForce false; - evolution-data-server.enable = lib.mkForce false; - at-spi2-core.enable = lib.mkForce false; - }; + #gnome = { + # core-developer-tools.enable = false; + # core-utilities.enable = false; + # tracker-miners.enable = false; + # tracker.enable = false; + # sushi.enable = false; + # rygel.enable = false; + # gnome-user-share.enable = false; + # gnome-remote-desktop.enable = false; + # gnome-online-miners.enable = lib.mkForce false; + # gnome-online-accounts.enable = false; + # gnome-initial-setup.enable = false; + # gnome-browser-connector.enable = false; + # games.enable = false; + # gnome-keyring.enable = lib.mkForce false; + # evolution-data-server.enable = lib.mkForce false; + # at-spi2-core.enable = lib.mkForce false; + #}; openssh = { enable = true; extraConfig = '' @@ -174,6 +174,10 @@ #(schildichat-desktop.override { electron = electron; }) (callPackage ../../modules/packages/nheko-git.nix { inherit nhekoSrc; inherit mtxclientSrc; voipSupport = false; }) #(callPackage ../../modules/packages/mc/server/modpack/curseforge/techopolis-2/5.4.nix { }) + + vesktop + + (dwarf-fortress-packages.dwarf-fortress-full.override { enableStoneSense = true; enableFPS = true; theme = dwarf-fortress-packages.themes.spacefox; }) ]; programs.steam.enable = true; @@ -184,20 +188,23 @@ # pkgs.gnome-tour # pkgs.gnome-user-docs #]; - #xdg = { - # portal = { - # enable = true; - # extraPortals = with pkgs; [ - # xdg-desktop-portal-gtk - # ]; - # xdgOpenUsePortal = true; - # }; - # sounds.enable = true; - # mime.enable = true; - # menus.enable = true; - # icons.enable = true; - # autostart.enable = true; - #}; + xdg = { + portal = { + + enable = true; + extraPortals = with pkgs; [ + #xdg-desktop-portal-gtk + xdg-desktop-portal-xapp + #(callPackage ../../modules/packages/xdg-desktop-portal-gtk.nix { }) + ]; + xdgOpenUsePortal = true; + }; + #sounds.enable = true; + #mime.enable = true; + #menus.enable = true; + #icons.enable = true; + #autostart.enable = true; + }; fonts = { fonts = with pkgs; [ (nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) @@ -260,6 +267,7 @@ }; programs.system-config-printer.enable = true; services = { + gvfs.enable = true; saned.enable = true; system-config-printer.enable = true; ipp-usb.enable = true; @@ -296,6 +304,13 @@ #}; # }; + + + + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; + + system.stateVersion = "22.11"; # DO NOT EDIT! } diff --git a/modules/packages/xdg-desktop-portal-gtk.nix b/modules/packages/xdg-desktop-portal-gtk.nix new file mode 100644 index 0000000..e44ffe1 --- /dev/null +++ b/modules/packages/xdg-desktop-portal-gtk.nix @@ -0,0 +1,58 @@ +{ stdenv +, lib +, fetchFromGitHub +, meson +, ninja +, pkg-config +, xdg-desktop-portal +, gtk3 +, gnome +, gnome-desktop +, glib +, wrapGAppsHook +, gsettings-desktop-schemas +, buildPortalsInGnome ? true +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "xdg-desktop-portal-gtk"; + version = "1.15.1"; + + src = fetchFromGitHub { + owner = "flatpak"; + repo = "xdg-desktop-portal-gtk"; + rev = finalAttrs.version; + sha256 = "sha256-uXVjKsqoIjqJilJq8ERRzEqGKbkzc+Zl6y+37CAcYro="; + }; + + nativeBuildInputs = [ + meson + ninja + pkg-config + wrapGAppsHook + ]; + + buildInputs = [ + glib + gtk3 + xdg-desktop-portal + ] ++ lib.optionals buildPortalsInGnome [ + gsettings-desktop-schemas # settings exposed by settings portal + gnome-desktop + gnome.gnome-settings-daemon # schemas needed for settings api (mostly useless now that fonts were moved to g-d-s, just mouse and xsettings) + ]; + + mesonFlags = lib.optionals (!buildPortalsInGnome) [ + "-Dwallpaper=disabled" + "-Dsettings=disabled" + "-Dappchooser=disabled" + "-Dlockdown=disabled" + ]; + + meta = with lib; { + description = "Desktop integration portals for sandboxed apps"; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.linux; + license = licenses.lgpl21Plus; + }; +}) diff --git a/modules/users/Rory.nix b/modules/users/Rory.nix index f250863..6a54fe5 100755 --- a/modules/users/Rory.nix +++ b/modules/users/Rory.nix @@ -4,17 +4,32 @@ users.users.Rory = { isNormalUser = true; - extraGroups = [ "wheel" "ocp" ]; + extraGroups = [ "wheel" "libvirtd" "ocp" ]; packages = with pkgs; [ + lnav + age + git + lsd + duf + btop + htop + kitty.terminfo + tmux + jq + dig + + # - zsh + zsh + zsh-powerlevel10k + zsh-nix-shell + zsh-you-should-use + zsh-syntax-highlighting + zsh-completions ]; - initialPassword = "password"; openssh.authorizedKeys.keys = [ - #"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCpmQMHBFOpLfb0Y138VUK1p4FxEPSOz5FRpDK8/eOFwBmEKDjLnT4d/e/Rz2VknCTSKXLMZ4KBMYM014NW3SZR90cDAFwlkdSX638fQlEO3usfALNLWsLbzqzkufw6PKWqrybZvlpwjcacYlRItvit/GH7FLqfiT/G6BdyBErn/lmmcBxF0So0aeba2G/xf7BPPQqqaTqQgE9ml87fdFVw4zVcix823K92SQIx7PkSInpgJwqjLR8cVkL2lkvMdq6IjAEsHAiUYNbAQTUl6xhYa6+Cl8CdvCyINzCpWS3Md2rSH84dZEq0ymZ40orF9JZbHHPgSGFbrg5PUOuJ57iaCPK20z474q2APUJ7aQXiifToZKqcWHFHCj7hqWja1rEt3rQbqRPgttSg5aP3lQ3GXbR/XhdcSYln1QpPTCBxklrfN1P6hF6lWBtGhtGzOvZ5Lt1uofdsK71k5eMwYHTcBnVaMtxbYzR9ihFN6LCNvvnrj+2NvHOiYSCr+y3G4kk= thearcanebrony@DESKTOP-RMRJ2VG" #"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICT+53Hy3wbIlNVIomK2RroaimMWrTlUkndjHt1dFuyh root@pfSense-arcane-home.localdomain" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILF2IuNu//0DP/wKMuDvBgVT3YBS2uULsipbdrhJCTM7 thearcanebrony@tab-linux-desktop" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN/kNkY/E5b6rvCQLMaSbpLQ/xoyywIwVVu9uo2j/B6p Rory@RoryNix" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICNhsYWo5pEilXQGcn2SOuvzIdy67QpdtC7vnmlJB9WX Administrator@nt-6mnnvobcjimo" - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILSJYOygKJIvwhPj+SmTtzOD3eBzwf+kiLeegWQmKGmW TheArcaneBrony@w81vm" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJPRTuz83dVThuDVXhDz3w3uYBGJ+JPzdZFT6wvhQXQ3 Rory@Rory-wsl" # work laptop ]; useDefaultShell = true; @@ -25,12 +40,17 @@ home-manager.users.Rory = { #services.gnome-keyring.enable = true; - + dconf.settings = { + "org/virt-manager/virt-manager/connections" = { + autoconnect = ["qemu:///system"]; + uris = ["qemu:///system"]; + }; + }; programs = { git = { enable = true; - userName = "TheArcaneBrony"; - userEmail = "myrainbowdash949@gmail.com"; + userName = "Rory&"; + userEmail = "root@rory.gay"; extraConfig = { safe = { directory = "/"; @@ -94,11 +114,6 @@ "sudo" ]; }; - #plugins = [ - # "git" - # "zsh-syntax-highlighting" - # "zsh-autosuggestions" - #]; plugins = [ { -- cgit 1.4.1