summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-10-13 06:14:11 +0200
committerRory& <root@rory.gay>2024-10-13 06:14:11 +0200
commitc5e9651eb722c9b3063777342c98cc38997d62a6 (patch)
tree11adcd80c9a5ea551cd79eef8ba366c82ac15128
parentSmall updates, fix grapevine (diff)
downloadRory-Open-Architecture-c5e9651eb722c9b3063777342c98cc38997d62a6.tar.xz
Desktop changes, build script changes
-rwxr-xr-x.gitignore1
-rwxr-xr-xbuild.sh27
-rw-r--r--flake.lock78
-rw-r--r--host/Rory-desktop/configuration.nix22
-rwxr-xr-xhost/Rory-desktop/hooks/post-rebuild.sh7
-rwxr-xr-xhost/Rory-desktop/hooks/pre-rebuild.sh7
-rw-r--r--host/Rory-desktop/printing.nix4
-rwxr-xr-xhost/Rory-nginx/hooks/post-rebuild.sh (renamed from host/Rory-nginx/post-rebuild.sh)0
-rw-r--r--modules/packages/xdg-desktop-portal-gtk.nix4
9 files changed, 85 insertions, 65 deletions
diff --git a/.gitignore b/.gitignore
index d5f6e74..f50ed43 100755
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ nixpkgs/
 result
 wg/
 opensuse/
+modules/opensuse/
\ No newline at end of file
diff --git a/build.sh b/build.sh
index 27d0e11..a5abb3c 100755
--- a/build.sh
+++ b/build.sh
@@ -7,21 +7,28 @@ if [ $# -ne 2 ]; then
     cat flake.nix | grep '.lib.nixosSystem' | sed 's/ =.*//' | sed 's/^[ \t]*//;s/[ \t]*$//' | while read cfg; do echo " - $cfg"; done
     exit 1
 fi
-if [ "$1" = "/" ]; then
-    [ -f "host/${2}/pre-rebuild.sh" ] && host/$2/pre-rebuild.sh
-    nixos-generate-config --show-hardware-config > hardware-configuration.nix
+
+ROOT=$1
+CONFIG=$2
+
+DERIVATION=".#nixosConfigurations.${CONFIG}.config.system.build.toplevel"
+EXTRA_NIX_FLAGS="-L --accept-flake-config"
+
+if [ "${ROOT}" = "/" ]; then
+    [ -f "host/${CONFIG}/hooks/pre-rebuild.sh" ] && host/${CONFIG}/hooks/pre-rebuild.sh
+    [ ! -f "hardware-configuration.nix" ] && nixos-generate-config --show-hardware-config > hardware-configuration.nix
     git add -f hardware-configuration.nix
-    nom build .#nixosConfigurations.${2}.config.system.build.toplevel && sudo nixos-rebuild switch --flake .#${HOSTNAME} || exit 1
-    nixos-rebuild switch --flake ".#${2}" -j`nproc` --upgrade-all -L || exit 1
-    [ -f "host/${2}/post-rebuild.sh" ] && host/$2/post-rebuild.sh
+    nom build $DERIVATION $EXTRA_NIX_FLAGS && sudo nixos-rebuild switch --flake .#${CONFIG} --upgrade-all $EXTRA_NIX_FLAGS || exit 1
+    #nixos-rebuild switch --flake ".#${CONFIG}" -j`nproc` --upgrade-all -L || exit 1
+    [ -f "host/${CONFIG}/hooks/post-rebuild.sh" ] && host/${CONFIG}/hooks/post-rebuild.sh
     git rm --cached hardware-configuration.nix
     exit
 else
-    nixos-generate-config --show-hardware-config --root "${1}" > hardware-configuration.nix
+    nixos-generate-config --show-hardware-config --root "${ROOT}" > hardware-configuration.nix
     git add -f hardware-configuration.nix
-    nom build .#nixosConfigurations.${2}.config.system.build.toplevel || exit 1
-    nixos-install --root "${1}" --flake ".#${2}" 
+    nom build $DERIVATION $EXTRA_NIX_FLAGS || exit 1
+    nixos-install --root "${ROOT}" --flake ".#${CONFIG}" --no-channel-copy
     git rm --cached hardware-configuration.nix
-    cp . "${1}/Rory-Open-Architecture" -r
+    cp . "${ROOT}/Rory-Open-Architecture" -r
     exit
 fi
diff --git a/flake.lock b/flake.lock
index c18bbfc..789d9b6 100644
--- a/flake.lock
+++ b/flake.lock
@@ -78,11 +78,11 @@
         "nixpkgs": "nixpkgs_2"
       },
       "locked": {
-        "lastModified": 1727265185,
-        "narHash": "sha256-h8Pq1tOyN3y/fvEQTN4zglNg6tSflb8qX9MHyh3l4SY=",
+        "lastModified": 1728653546,
+        "narHash": "sha256-1lrQEr0mNEs8L2GAm+2tOwLCdHVOuYEGOgoN6O409Dw=",
         "owner": "famedly",
         "repo": "conduit",
-        "rev": "bca8d1f70f88d78cd9c68dade2d94a9e668bddd3",
+        "rev": "12ada1c86abee99dbe333c88a68f0ceb65ba6fc8",
         "type": "gitlab"
       },
       "original": {
@@ -183,11 +183,11 @@
     "draupnirSrc": {
       "flake": false,
       "locked": {
-        "lastModified": 1726859688,
-        "narHash": "sha256-zBC6TOHfaVLXopLyihNxjz9T4qij1xkr30c9OIY4oNY=",
+        "lastModified": 1728642588,
+        "narHash": "sha256-PMz1f/5C/nCubUkbGbAmJJLcv4QcCV6D21DyO8tMCJY=",
         "owner": "the-draupnir-project",
         "repo": "Draupnir",
-        "rev": "56cdc480f1a66c56076099041eb6729fe1020775",
+        "rev": "57071b93695486d3b1814969a19da6c71a638f36",
         "type": "github"
       },
       "original": {
@@ -439,11 +439,11 @@
       },
       "locked": {
         "host": "gitlab.computer.surgery",
-        "lastModified": 1727402475,
-        "narHash": "sha256-2VjV5WhKxqFU1UXRg76/F7V5g2OUzB4xDqXtBzyjUo4=",
+        "lastModified": 1727994504,
+        "narHash": "sha256-FC6M1KKX58HbU9LG+cG6EJRr02J9lE/o0iiDi6m1gv8=",
         "owner": "matrix",
         "repo": "grapevine-fork",
-        "rev": "6ab87f97dd30b1146d18443b8ea66844567399e5",
+        "rev": "5a490a4397f0c6a36dab1cb631dadc67a849deab",
         "type": "gitlab"
       },
       "original": {
@@ -458,11 +458,11 @@
         "nixpkgs": "nixpkgs_5"
       },
       "locked": {
-        "lastModified": 1727383923,
-        "narHash": "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=",
+        "lastModified": 1728685293,
+        "narHash": "sha256-1WowL96pksT/XCi+ZXHgqiQ9NiU5oxWuNIQYWqOoEYc=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "ffe2d07e771580a005e675108212597e5b367d2d",
+        "rev": "2b13611eaed8326789f76f70d21d06fbb14e3e47",
         "type": "github"
       },
       "original": {
@@ -492,11 +492,11 @@
     "nhekoSrc": {
       "flake": false,
       "locked": {
-        "lastModified": 1727259061,
-        "narHash": "sha256-oF8gOHvTOrjAPtjm4AWh8t2H5swY3gPNsyWbZaQWQ4I=",
+        "lastModified": 1728437959,
+        "narHash": "sha256-4Lfwoc3M/ofRkpJTbqt8AHyrgGuoi+v/WEcXKrIw+o0=",
         "owner": "Nheko-reborn",
         "repo": "nheko",
-        "rev": "048af42780af7177bc57cc1d83cf48ef09ca1e1e",
+        "rev": "27683bedc41375ac97ddf87ce430fd98aac9fc7c",
         "type": "github"
       },
       "original": {
@@ -544,11 +544,11 @@
         "nixpkgs": "nixpkgs_6"
       },
       "locked": {
-        "lastModified": 1727382972,
-        "narHash": "sha256-p7D01ngjyK4AWlXc4iAYQbd/XGQerkSuGpHvFfn2X38=",
+        "lastModified": 1728588346,
+        "narHash": "sha256-P1j+Nf+pzxPYK2Qe7lF2yB0vR3YvW8Td5sD0ZvrKIq8=",
         "owner": "nix-community",
         "repo": "NixOS-WSL",
-        "rev": "13e2ab916367789447fda4c612257736000d92d5",
+        "rev": "0fc8d9bb51cc46b31d950513df6d088905c8fe55",
         "type": "github"
       },
       "original": {
@@ -607,11 +607,11 @@
     },
     "nixpkgs-master": {
       "locked": {
-        "lastModified": 1727452998,
-        "narHash": "sha256-yTgoBM9nKPITaAsydbUD0m6l1gRWcsrNws5lt7wpd7c=",
+        "lastModified": 1728694577,
+        "narHash": "sha256-BsBprsoB5v+BUlhkO3g9/jpRhoXxuU/UiBRT3zLdZaE=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "1c0f09449569952da1ff0d83ba2967fce72084e9",
+        "rev": "299a94a7edbe8d29264013b2f983004580463737",
         "type": "github"
       },
       "original": {
@@ -655,11 +655,11 @@
     },
     "nixpkgs-stable_3": {
       "locked": {
-        "lastModified": 1725762081,
-        "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
+        "lastModified": 1728156290,
+        "narHash": "sha256-uogSvuAp+1BYtdu6UWuObjHqSbBohpyARXDWqgI12Ss=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
+        "rev": "17ae88b569bb15590549ff478bab6494dde4a907",
         "type": "github"
       },
       "original": {
@@ -719,11 +719,11 @@
     },
     "nixpkgs_5": {
       "locked": {
-        "lastModified": 1726937504,
-        "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
+        "lastModified": 1728241625,
+        "narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "9357f4f23713673f310988025d9dc261c20e70c6",
+        "rev": "c31898adf5a8ed202ce5bea9f347b1c6871f32d1",
         "type": "github"
       },
       "original": {
@@ -735,11 +735,11 @@
     },
     "nixpkgs_6": {
       "locked": {
-        "lastModified": 1726838390,
-        "narHash": "sha256-NmcVhGElxDbmEWzgXsyAjlRhUus/nEqPC5So7BOJLUM=",
+        "lastModified": 1728193676,
+        "narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "944b2aea7f0a2d7c79f72468106bc5510cbf5101",
+        "rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6",
         "type": "github"
       },
       "original": {
@@ -751,11 +751,11 @@
     },
     "nixpkgs_7": {
       "locked": {
-        "lastModified": 1727122398,
-        "narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=",
+        "lastModified": 1728492678,
+        "narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093",
+        "rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
         "type": "github"
       },
       "original": {
@@ -767,11 +767,11 @@
     },
     "nixpkgs_8": {
       "locked": {
-        "lastModified": 1725534445,
-        "narHash": "sha256-Yd0FK9SkWy+ZPuNqUgmVPXokxDgMJoGuNpMEtkfcf84=",
+        "lastModified": 1728093190,
+        "narHash": "sha256-CAZF2NRuHmqTtRTNAruWpHA43Gg2UvuCNEIzabP0l6M=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "9bb1e7571aadf31ddb4af77fc64b2d59580f9a39",
+        "rev": "e2f08f4d8b3ecb5cf5c9fd9cb2d53bb3c71807da",
         "type": "github"
       },
       "original": {
@@ -851,11 +851,11 @@
         "nixpkgs-stable": "nixpkgs-stable_3"
       },
       "locked": {
-        "lastModified": 1727423009,
-        "narHash": "sha256-+4B/dQm2EnORIk0k2wV3aHGaE0WXTBjColXjj7qWh10=",
+        "lastModified": 1728345710,
+        "narHash": "sha256-lpunY1+bf90ts+sA2/FgxVNIegPDKCpEoWwOPu4ITTQ=",
         "owner": "Mic92",
         "repo": "sops-nix",
-        "rev": "127a96f49ddc377be6ba76964411bab11ae27803",
+        "rev": "06535d0e3d0201e6a8080dd32dbfde339b94f01b",
         "type": "github"
       },
       "original": {
diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix
index 654b245..db6615d 100644
--- a/host/Rory-desktop/configuration.nix
+++ b/host/Rory-desktop/configuration.nix
@@ -39,13 +39,13 @@ args@{
         efiInstallAsRemovable = true;
       };
     };
-    kernelPatches = [
-      {
-        # FIXME: https://gitlab.freedesktop.org/drm/amd/-/issues/3437
-        name = "drm-amd-3437-hack";
-        patch = ./hacks/drm-amd-3437.patch;
-      }
-    ];
+    #kernelPatches = [
+    #  {
+    #    # FIXME: https://gitlab.freedesktop.org/drm/amd/-/issues/3437
+    #    name = "drm-amd-3437-hack";
+    #    patch = ./hacks/drm-amd-3437.patch;
+    #  }
+    #];
 
     #readOnlyNixStore = false;
   };
@@ -86,7 +86,7 @@ args@{
     ];
 
     defaultGateway = "192.168.0.1";
-    # useDHCP = true;
+    #useDHCP = true; # Doesn't work with NetworkManager, investigate
   };
 
   time.timeZone = "Europe/Brussels";
@@ -120,6 +120,7 @@ args@{
     };
   };
 
+  services.xserver.desktopManager.gnome.enable = false;
   environment.systemPackages = with pkgs; [
     eog
     mpv
@@ -194,12 +195,11 @@ args@{
 
   xdg = {
     portal = {
-
       enable = true;
       extraPortals = with pkgs; [
         #xdg-desktop-portal-gtk
         xdg-desktop-portal-xapp
-        (callPackage ../../modules/packages/xdg-desktop-portal-gtk.nix { })
+#        (callPackage ../../modules/packages/xdg-desktop-portal-gtk.nix { })
       ];
       config = {
         common = {
@@ -207,8 +207,6 @@ args@{
         };
       };
       xdgOpenUsePortal = true;
-      #gtkUsePortal = true; # deprecated
-
     };
     #sounds.enable = true;
     #mime.enable = true;
diff --git a/host/Rory-desktop/hooks/post-rebuild.sh b/host/Rory-desktop/hooks/post-rebuild.sh
new file mode 100755
index 0000000..30733ad
--- /dev/null
+++ b/host/Rory-desktop/hooks/post-rebuild.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+set -x
+
+git restore --staged hardware-configuration.nix
+git restore --staged Ran.ca
+git restore --staged modules/opensuse/
+git restore --staged opensuse/
\ No newline at end of file
diff --git a/host/Rory-desktop/hooks/pre-rebuild.sh b/host/Rory-desktop/hooks/pre-rebuild.sh
new file mode 100755
index 0000000..d4ec9d3
--- /dev/null
+++ b/host/Rory-desktop/hooks/pre-rebuild.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+set -x
+
+git add -f hardware-configuration.nix
+git add -f Ran.ca
+git add -f modules/opensuse/
+git add -f opensuse/
\ No newline at end of file
diff --git a/host/Rory-desktop/printing.nix b/host/Rory-desktop/printing.nix
index f25580f..351b59f 100644
--- a/host/Rory-desktop/printing.nix
+++ b/host/Rory-desktop/printing.nix
@@ -14,7 +14,7 @@
 
   environment.systemPackages = with pkgs; [
     xsane
-    gnome.simple-scan
+    simple-scan
   ];
 
   hardware = {
@@ -39,7 +39,7 @@
     };
     avahi = {
       enable = true;
-      nssmdns = true;
+      nssmdns4 = true;
       reflector = true;
       publish = {
         workstation = true;
diff --git a/host/Rory-nginx/post-rebuild.sh b/host/Rory-nginx/hooks/post-rebuild.sh
index 9b0c17c..9b0c17c 100755
--- a/host/Rory-nginx/post-rebuild.sh
+++ b/host/Rory-nginx/hooks/post-rebuild.sh
diff --git a/modules/packages/xdg-desktop-portal-gtk.nix b/modules/packages/xdg-desktop-portal-gtk.nix
index cfe48d4..c849b17 100644
--- a/modules/packages/xdg-desktop-portal-gtk.nix
+++ b/modules/packages/xdg-desktop-portal-gtk.nix
@@ -7,7 +7,7 @@
   pkg-config,
   xdg-desktop-portal,
   gtk3,
-  gnome,
+  gnome-settings-daemon,
   gnome-desktop,
   glib,
   wrapGAppsHook,
@@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
     ++ 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)
+      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) [