diff --git a/flake.lock b/flake.lock index cad9f34d..dd893651 100644 --- a/flake.lock +++ b/flake.lock @@ -320,6 +320,22 @@ } }, "flake-compat_3": { + "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_4": { "flake": false, "locked": { "lastModified": 1696426674, @@ -335,7 +351,7 @@ "type": "github" } }, - "flake-compat_4": { + "flake-compat_5": { "locked": { "lastModified": 1688025799, "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", @@ -415,6 +431,24 @@ "inputs": { "systems": "systems_3" }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_4" + }, "locked": { "lastModified": 1694529238, "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", @@ -429,9 +463,9 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1701680307, @@ -465,6 +499,28 @@ } }, "gitignore": { + "inputs": { + "nixpkgs": [ + "kde2nix", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_2": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -507,12 +563,34 @@ "type": "github" } }, + "kde2nix": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1703361984, + "narHash": "sha256-3pZJY6h2OsmLi9iA6vHLYrlOcv3OK4ZCX9ljw66Q5xc=", + "owner": "nix-community", + "repo": "kde2nix", + "rev": "cc627fe32d9283205592574208ae4fcdf93d3414", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "kde2nix", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "flake-parts": "flake-parts", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ], @@ -535,7 +613,7 @@ }, "lib-aggregate": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_4", "nixpkgs-lib": "nixpkgs-lib" }, "locked": { @@ -710,6 +788,22 @@ } }, "nixpkgs-stable_2": { + "locked": { + "lastModified": 1685801374, + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_3": { "locked": { "lastModified": 1703950681, "narHash": "sha256-veU5bE4eLOmi7aOzhE7LfZXcSOONRMay0BKv01WHojo=", @@ -727,7 +821,7 @@ }, "nixpkgs-wayland": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "lib-aggregate": "lib-aggregate", "nix-eval-jobs": "nix-eval-jobs", "nixpkgs": "nixpkgs_4" @@ -920,6 +1014,34 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_3", + "flake-utils": [ + "kde2nix", + "flake-utils" + ], + "gitignore": "gitignore", + "nixpkgs": [ + "kde2nix", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1702290759, + "narHash": "sha256-DUPtcei6GJlrC05Y3cqwLLSst+sp07334aAZw4Uk118=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "f99ed8523fc3aef67a7c838ca31f4b94ef902837", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -930,12 +1052,12 @@ "lanzaboote", "flake-utils" ], - "gitignore": "gitignore", + "gitignore": "gitignore_2", "nixpkgs": [ "lanzaboote", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { "lastModified": 1699271226, @@ -975,6 +1097,7 @@ "doom-emacs": "doom-emacs", "firefox-gnome-theme": "firefox-gnome-theme", "home-manager": "home-manager", + "kde2nix": "kde2nix", "lanzaboote": "lanzaboote", "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", @@ -1044,7 +1167,7 @@ "sops-nix": { "inputs": { "nixpkgs": "nixpkgs_5", - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { "lastModified": 1703991717, @@ -1120,6 +1243,21 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index eac1d1ca..faeea4a6 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,9 @@ # compose2nix - Convert docker-compose.yml files to nix syntax compose2nix.url = "github:aksiksi/compose2nix"; compose2nix.inputs.nixpkgs.follows = "nixpkgs"; + # KDE Plasma 6 experimental flake + kde2nix.url = "github:nix-community/kde2nix"; + kde2nix.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, ... } @inputs: let @@ -46,7 +49,7 @@ nixos-vm-01 = libx.mkHost { hostname = "nixos-vm-01"; }; framework-server = libx.mkHost { hostname = "framework-server"; }; nuc-server = libx.mkHost { hostname = "nuc-server"; }; - nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; desktop = "gnome"; gpu = "nvidia"; }; + nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; desktop = "plasma6"; gpu = "nvidia"; }; nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; theme = "green"; }; backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; }; piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; }; @@ -90,4 +93,4 @@ in import ./shell.nix { inherit pkgs sops-nix deploy-rs system; } ); }; -} \ No newline at end of file +} diff --git a/home-manager/common/desktops/plasma6/default.nix b/home-manager/common/desktops/plasma6/default.nix new file mode 100644 index 00000000..0db3279e --- /dev/null +++ b/home-manager/common/desktops/plasma6/default.nix @@ -0,0 +1,3 @@ +{ + +} diff --git a/home-manager/hosts/nixos-desktop/desktops/plasma6/default.nix b/home-manager/hosts/nixos-desktop/desktops/plasma6/default.nix new file mode 100644 index 00000000..0db3279e --- /dev/null +++ b/home-manager/hosts/nixos-desktop/desktops/plasma6/default.nix @@ -0,0 +1,3 @@ +{ + +} diff --git a/nixos/common/desktops/plasma6/default.nix b/nixos/common/desktops/plasma6/default.nix new file mode 100644 index 00000000..b220f431 --- /dev/null +++ b/nixos/common/desktops/plasma6/default.nix @@ -0,0 +1,28 @@ +{ lib, config, pkgs, hostname, gpu, ... }: { + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + # Configure keymap in X11 + services.xserver = { + enable = true; + layout = "us"; + xkbVariant = ""; + autorun = true; + videoDrivers = [ ] ++ lib.optional (builtins.isString gpu) gpu; + }; + + services.xserver = { + # https://nixos.org/manual/nixos/stable/index.html#chap-gnome + # Enable the KDE Plasma 6 Desktop Environment. + displayManager.sddm.enable = true; + desktopManager.plasma6.enable = true; + }; +}