diff --git a/common/hardware.nix b/common/hardware.nix index a62f709..e0dc596 100644 --- a/common/hardware.nix +++ b/common/hardware.nix @@ -1,3 +1,11 @@ { services.fwupd.enable = true; + + hardware = { + steam-hardware.enable = true; + xone.enable = true; + xpadneo.enable = true; + gcadapter.enable = true; + enableAllFirmware = true; + }; } diff --git a/common/xdg.nix b/common/xdg.nix new file mode 100644 index 0000000..a5a81d9 --- /dev/null +++ b/common/xdg.nix @@ -0,0 +1,3 @@ +{ + xdg.portal.xdgOpenUsePortal = true; +} diff --git a/flake.lock b/flake.lock index d017500..711e5ad 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1747575206, - "narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=", + "lastModified": 1750173260, + "narHash": "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA=", "owner": "ryantm", "repo": "agenix", - "rev": "4835b1dc898959d8547a871ef484930675cb47f1", + "rev": "531beac616433bac6f9e2a19feb8e99a22a66baf", "type": "github" }, "original": { @@ -107,6 +107,22 @@ } }, "flake-compat_4": { + "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-compat_5": { "flake": false, "locked": { "lastModified": 1733328505, @@ -122,7 +138,7 @@ "type": "github" } }, - "flake-compat_5": { + "flake-compat_6": { "flake": false, "locked": { "lastModified": 1746162366, @@ -138,6 +154,22 @@ "type": "github" } }, + "flake-compat_7": { + "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-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -179,11 +211,11 @@ "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", "type": "github" }, "original": { @@ -267,6 +299,24 @@ "type": "github" } }, + "flake-parts_8": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_7" + }, + "locked": { + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "forgesync": { "inputs": { "flake-parts": "flake-parts_2", @@ -335,6 +385,28 @@ } }, "gitignore_3": { + "inputs": { + "nixpkgs": [ + "hxwrap", + "hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gitignore_4": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -356,13 +428,35 @@ "type": "github" } }, + "gitignore_5": { + "inputs": { + "nixpkgs": [ + "xenumenu", + "hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "hardware": { "locked": { - "lastModified": 1749195551, - "narHash": "sha256-W5GKQHgunda/OP9sbKENBZhMBDNu2QahoIPwnsF6CeM=", + "lastModified": 1751379130, + "narHash": "sha256-TObxiGbuX/4FbOnzDRvznfMUjIgS+d71+BetT35EOB8=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "4602f7e1d3f197b3cb540d5accf5669121629628", + "rev": "8b1f894089789eb39eacf0d6891d1e17cc3a84ab", "type": "github" }, "original": { @@ -424,11 +518,57 @@ ] }, "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", + "lastModified": 1750779888, + "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "hooks_3": { + "inputs": { + "flake-compat": "flake-compat_3", + "gitignore": "gitignore_3", + "nixpkgs": [ + "hxwrap", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749636823, + "narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "623c56286de5a3193aa38891a6991b28f9bab056", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "hooks_4": { + "inputs": { + "flake-compat": "flake-compat_7", + "gitignore": "gitignore_5", + "nixpkgs": [ + "xenumenu", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749636823, + "narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "623c56286de5a3193aa38891a6991b28f9bab056", "type": "github" }, "original": { @@ -440,14 +580,16 @@ "hxwrap": { "inputs": { "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_3" + "hooks": "hooks_3", + "nixpkgs": "nixpkgs_3", + "treefmt": "treefmt_2" }, "locked": { - "lastModified": 1745088587, - "narHash": "sha256-85AYHWayJVq/dxgk/S4RH7u6w59Akyr1fVttR8KBh8g=", + "lastModified": 1749852670, + "narHash": "sha256-MveNAj05dpNfOiK9uK6el6eWNG7r1SlMq45uZWgt20k=", "ref": "refs/heads/main", - "rev": "8fa5d5d550add7bf6cfd0a619dfac0e8a03b2bae", - "revCount": 21, + "rev": "1564605890b844183c2a9be9d3d7e71a0d12e367", + "revCount": 23, "type": "git", "url": "https://codeberg.org/helvetica/hxwrap.git" }, @@ -459,7 +601,7 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "flake-parts": "flake-parts_4", "nixpkgs": [ "nixpkgs" @@ -547,11 +689,11 @@ ] }, "locked": { - "lastModified": 1749355504, - "narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", + "lastModified": 1751170039, + "narHash": "sha256-3EKpUmyGmHYA/RuhZjINTZPU+OFWko0eDwazUOW64nw=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", + "rev": "9c932ae632d6b5150515e5749b198c175d8565db", "type": "github" }, "original": { @@ -562,17 +704,17 @@ }, "nixos-cosmic": { "inputs": { - "flake-compat": "flake-compat_5", + "flake-compat": "flake-compat_6", "nixpkgs": "nixpkgs_8", "nixpkgs-stable": "nixpkgs-stable_2", "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1749338348, - "narHash": "sha256-IBLKyOU55Kt1gSXL4dFQUQUVcYd5+qfSrVAL8lcE8QY=", + "lastModified": 1751281697, + "narHash": "sha256-abHhTXGEGYhCKOc9vQbqHFG7dxwJ6AudIy1h4MUsjm0=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "f2ac592313c51c9be981e45f56dc00714e103477", + "rev": "78b86e37713a1111d9e37c62b242d60be3013bd1", "type": "github" }, "original": { @@ -629,11 +771,11 @@ }, "nixpkgs-lib_3": { "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", "type": "github" }, "original": { @@ -687,6 +829,21 @@ "type": "github" } }, + "nixpkgs-lib_7": { + "locked": { + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1730741070, @@ -705,11 +862,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1748995628, - "narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=", + "lastModified": 1751048012, + "narHash": "sha256-MYbotu4UjWpTsq01wglhN5xDRfZYLFtNk7SBY0BcjkU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8eb3b6a2366a7095939cd22f0dc0e9991313294b", + "rev": "a684c58d46ebbede49f280b653b9e56100aa3877", "type": "github" }, "original": { @@ -737,11 +894,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1744932701, - "narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", + "lastModified": 1749285348, + "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", + "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f", "type": "github" }, "original": { @@ -817,11 +974,27 @@ }, "nixpkgs_8": { "locked": { - "lastModified": 1749143949, - "narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=", + "lastModified": 1751011381, + "narHash": "sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d3d2d80a2191a73d1e86456a751b83aa13085d7d", + "rev": "30e2e2857ba47844aa71991daa6ed1fc678bcbb7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1750365781, + "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", "type": "github" }, "original": { @@ -833,7 +1006,7 @@ }, "phps": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "nixpkgs": "nixpkgs_6", "utils": "utils" }, @@ -857,7 +1030,7 @@ "lanzaboote", "flake-compat" ], - "gitignore": "gitignore_3", + "gitignore": "gitignore_4", "nixpkgs": [ "lanzaboote", "nixpkgs" @@ -946,7 +1119,8 @@ "nixos-cosmic", "nixpkgs" ], - "treefmt": "treefmt_2" + "treefmt": "treefmt_3", + "xenumenu": "xenumenu" } }, "rust-overlay": { @@ -978,11 +1152,11 @@ ] }, "locked": { - "lastModified": 1749263796, - "narHash": "sha256-m52UsUrcNjAzgc0cwcg94INkiFyVPTn6KbFGr4x4cu8=", + "lastModified": 1751251399, + "narHash": "sha256-y+viCuy/eKKpkX1K2gDvXIJI/yzvy6zA3HObapz9XZ0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6e1d910306edfe6e4b718878f222c5672500d6b2", + "rev": "b22d5ee8c60ed1291521f2dde48784edd6bf695b", "type": "github" }, "original": { @@ -1045,6 +1219,48 @@ "treefmt_2": { "inputs": { "nixpkgs": [ + "hxwrap", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1749194973, + "narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt_3": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1750931469, + "narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt_4": { + "inputs": { + "nixpkgs": [ + "xenumenu", "nixpkgs" ] }, @@ -1104,6 +1320,27 @@ "repo": "uv2nix", "type": "github" } + }, + "xenumenu": { + "inputs": { + "flake-parts": "flake-parts_8", + "hooks": "hooks_4", + "nixpkgs": "nixpkgs_9", + "treefmt": "treefmt_4" + }, + "locked": { + "lastModified": 1750544859, + "narHash": "sha256-OnSfoCCC6fYjAUdmZLwg3sRfgotO7bj55dUGV1BAKyY=", + "ref": "refs/heads/main", + "rev": "97ddcea8f30ecad4825f77260fa4e40e952262d1", + "revCount": 1, + "type": "git", + "url": "https://codeberg.org/helvetica/xenumenu.git" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/helvetica/xenumenu.git" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 23271ff..c9627a1 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ myphps.url = "git+https://codeberg.org/helvetica/myphps.git"; forgesync.url = "git+https://codeberg.org/helvetica/forgesync.git"; nini.url = "git+https://codeberg.org/helvetica/nini.git"; + xenumenu.url = "git+https://codeberg.org/helvetica/xenumenu.git"; lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.2"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/glacier/profiles.nix b/hosts/glacier/profiles.nix index b2f1fd3..1caf3d3 100644 --- a/hosts/glacier/profiles.nix +++ b/hosts/glacier/profiles.nix @@ -1,6 +1,8 @@ { profiles = { desktop.enable = true; + dynamic.enable = true; + headful.enable = true; emulation.enable = true; gaming.enable = true; piracy.enable = true; diff --git a/hosts/insomniac/README.md b/hosts/insomniac/README.md new file mode 100644 index 0000000..37baf7f --- /dev/null +++ b/hosts/insomniac/README.md @@ -0,0 +1,8 @@ +shell script that loops a launcher +basically + +while true; do +fuzzel with retroarch steam quit +if quit; then exit; fi +else run command (waiting) +done diff --git a/hosts/insomniac/cage.nix b/hosts/insomniac/cage.nix new file mode 100644 index 0000000..076c85f --- /dev/null +++ b/hosts/insomniac/cage.nix @@ -0,0 +1,47 @@ +{ + lib, + inputs, + pkgs, + ... +}: +let + spec = { + entries = [ + { + displayName = "RetroArch"; + program = "retroarch"; + } + { + displayName = "Steam"; + program = "steam"; + args = [ + "-tenfoot" + ]; + } + ]; + }; + + specFormat = pkgs.formats.json { }; + + launcher = pkgs.writeShellApplication { + name = "launcher"; + runtimeInputs = [ + inputs.xenumenu.packages.${pkgs.system}.default + ]; + text = '' + while true; do + xenumenu --rowcols 3 --exit ${specFormat.generate "spec.json" spec} + done + ''; + }; +in +{ + services.cage = { + enable = true; + program = lib.getExe launcher; + user = "insomniac"; + environment = { + WLR_LIBINPUT_NO_DEVICES = "1"; + }; + }; +} diff --git a/hosts/insomniac/freetube.nix b/hosts/insomniac/freetube.nix deleted file mode 100644 index b24fd0d..0000000 --- a/hosts/insomniac/freetube.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = [ - pkgs.freetube - ]; -} diff --git a/hosts/insomniac/profiles.nix b/hosts/insomniac/profiles.nix index b2f1fd3..b0ec401 100644 --- a/hosts/insomniac/profiles.nix +++ b/hosts/insomniac/profiles.nix @@ -1,9 +1,5 @@ { profiles = { desktop.enable = true; - emulation.enable = true; - gaming.enable = true; - piracy.enable = true; - productivity.enable = true; }; } diff --git a/hosts/insomniac/steam.nix b/hosts/insomniac/steam.nix new file mode 100644 index 0000000..d39f536 --- /dev/null +++ b/hosts/insomniac/steam.nix @@ -0,0 +1,11 @@ +{ + programs.steam = { + enable = true; + extest.enable = true; + protontricks.enable = true; + dedicatedServer.openFirewall = true; + remotePlay.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + gamescopeSession.enable = true; # TODO + }; +} diff --git a/profiles/desktop/default.nix b/profiles/desktop/default.nix index 11e024f..2bcea45 100644 --- a/profiles/desktop/default.nix +++ b/profiles/desktop/default.nix @@ -13,6 +13,14 @@ in assertion = !config.profiles.server.enable; message = "The desktop profile is not compatible with the server profile."; } + { + assertion = config.profiles.headful.enable; + message = "The desktop profile depends on the headful profile."; + } + { + assertion = config.profiles.dynamic.enable; + message = "The desktop profile depends on the dynamic profile."; + } ]; }; } diff --git a/profiles/desktop/hardware.nix b/profiles/desktop/hardware.nix deleted file mode 100644 index 13163b5..0000000 --- a/profiles/desktop/hardware.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.profiles.desktop; -in -{ - config = lib.mkIf cfg.enable { - hardware = { - bluetooth.enable = true; - steam-hardware.enable = true; - xone.enable = true; - xpadneo.enable = true; - opentabletdriver.enable = true; - gcadapter.enable = true; - graphics.enable = true; - enableAllFirmware = true; - }; - }; -} diff --git a/profiles/desktop/networking.nix b/profiles/desktop/networking.nix deleted file mode 100644 index bdc6911..0000000 --- a/profiles/desktop/networking.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.profiles.desktop; -in -{ - config = lib.mkIf cfg.enable { - services.resolved.enable = true; - - networking.networkmanager = { - enable = true; - dns = "systemd-resolved"; - }; - - users.groups.networkmanager.members = config.users.normalUsers; - }; -} diff --git a/profiles/desktop/xdg.nix b/profiles/dynamic/bluetooth.nix similarity index 51% rename from profiles/desktop/xdg.nix rename to profiles/dynamic/bluetooth.nix index 892a8dc..07a12d3 100644 --- a/profiles/desktop/xdg.nix +++ b/profiles/dynamic/bluetooth.nix @@ -4,10 +4,10 @@ ... }: let - cfg = config.profiles.desktop; + cfg = config.profiles.dynamic; in { config = lib.mkIf cfg.enable { - xdg.portal.xdgOpenUsePortal = true; + hardware.bluetooth.enable = true; }; } diff --git a/profiles/dynamic/default.nix b/profiles/dynamic/default.nix new file mode 100644 index 0000000..c97dc91 --- /dev/null +++ b/profiles/dynamic/default.nix @@ -0,0 +1,18 @@ +{ config, lib, ... }: +let + cfg = config.profiles.dynamic; +in +{ + options.profiles.dynamic = { + enable = lib.mkEnableOption "dynamic"; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = !config.profiles.server.enable; + message = "The dynamic profile is not compatible with the server profile."; + } + ]; + }; +} diff --git a/profiles/desktop/location.nix b/profiles/dynamic/location.nix similarity index 77% rename from profiles/desktop/location.nix rename to profiles/dynamic/location.nix index fffcb56..508ee6f 100644 --- a/profiles/desktop/location.nix +++ b/profiles/dynamic/location.nix @@ -4,7 +4,7 @@ ... }: let - cfg = config.profiles.desktop; + cfg = config.profiles.dynamic; in { config = lib.mkIf cfg.enable { diff --git a/profiles/dynamic/networking.nix b/profiles/dynamic/networking.nix new file mode 100644 index 0000000..607153c --- /dev/null +++ b/profiles/dynamic/networking.nix @@ -0,0 +1,15 @@ +{ + config, + lib, + ... +}: +let + cfg = config.profiles.dynamic; +in +{ + config = lib.mkIf cfg.enable { + networking.networkmanager.enable = true; + + users.groups.networkmanager.members = config.users.normalUsers; + }; +} diff --git a/profiles/desktop/clipboard.nix b/profiles/headful/clipboard.nix similarity index 100% rename from profiles/desktop/clipboard.nix rename to profiles/headful/clipboard.nix diff --git a/profiles/headful/default.nix b/profiles/headful/default.nix new file mode 100644 index 0000000..b57a2b9 --- /dev/null +++ b/profiles/headful/default.nix @@ -0,0 +1,18 @@ +{ config, lib, ... }: +let + cfg = config.profiles.headful; +in +{ + options.profiles.headful = { + enable = lib.mkEnableOption "headful"; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = !config.profiles.server.enable; + message = "The headful profile is not compatible with the server profile."; + } + ]; + }; +} diff --git a/profiles/desktop/fonts.nix b/profiles/headful/fonts.nix similarity index 96% rename from profiles/desktop/fonts.nix rename to profiles/headful/fonts.nix index 2a528be..1ca0466 100644 --- a/profiles/desktop/fonts.nix +++ b/profiles/headful/fonts.nix @@ -5,7 +5,7 @@ ... }: let - cfg = config.profiles.desktop; + cfg = config.profiles.headful; in { config = lib.mkIf cfg.enable { diff --git a/profiles/desktop/pipewire.nix b/profiles/headful/pipewire.nix similarity index 89% rename from profiles/desktop/pipewire.nix rename to profiles/headful/pipewire.nix index 7e6986f..b9605ff 100644 --- a/profiles/desktop/pipewire.nix +++ b/profiles/headful/pipewire.nix @@ -4,7 +4,7 @@ ... }: let - cfg = config.profiles.desktop; + cfg = config.profiles.headful; in { config = lib.mkIf cfg.enable { diff --git a/profiles/desktop/wayland.nix b/profiles/headful/wayland.nix similarity index 67% rename from profiles/desktop/wayland.nix rename to profiles/headful/wayland.nix index e76d7fc..28fb060 100644 --- a/profiles/desktop/wayland.nix +++ b/profiles/headful/wayland.nix @@ -4,13 +4,13 @@ ... }: let - cfg = config.profiles.desktop; + cfg = config.profiles.headful; in { config = lib.mkIf cfg.enable { environment.sessionVariables = { NIXOS_OZONE_WL = "1"; - SDL_VIDEODRIVER = "wayland"; + SDL_VIDEODRIVER = "wayland,x11"; }; }; }