1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-07-01 19:02:19 +02:00
parent a026867c03
commit d1d7dd9c01
No known key found for this signature in database
22 changed files with 427 additions and 103 deletions

View file

@ -1,3 +1,11 @@
{ {
services.fwupd.enable = true; services.fwupd.enable = true;
hardware = {
steam-hardware.enable = true;
xone.enable = true;
xpadneo.enable = true;
gcadapter.enable = true;
enableAllFirmware = true;
};
} }

3
common/xdg.nix Normal file
View file

@ -0,0 +1,3 @@
{
xdg.portal.xdgOpenUsePortal = true;
}

325
flake.lock generated
View file

@ -8,11 +8,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1747575206, "lastModified": 1750173260,
"narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=", "narHash": "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "4835b1dc898959d8547a871ef484930675cb47f1", "rev": "531beac616433bac6f9e2a19feb8e99a22a66baf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -107,6 +107,22 @@
} }
}, },
"flake-compat_4": { "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, "flake": false,
"locked": { "locked": {
"lastModified": 1733328505, "lastModified": 1733328505,
@ -122,7 +138,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_5": { "flake-compat_6": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1746162366, "lastModified": 1746162366,
@ -138,6 +154,22 @@
"type": "github" "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": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -179,11 +211,11 @@
"nixpkgs-lib": "nixpkgs-lib_3" "nixpkgs-lib": "nixpkgs-lib_3"
}, },
"locked": { "locked": {
"lastModified": 1743550720, "lastModified": 1749398372,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5", "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -267,6 +299,24 @@
"type": "github" "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": { "forgesync": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_2",
@ -335,6 +385,28 @@
} }
}, },
"gitignore_3": { "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": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
@ -356,13 +428,35 @@
"type": "github" "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": { "hardware": {
"locked": { "locked": {
"lastModified": 1749195551, "lastModified": 1751379130,
"narHash": "sha256-W5GKQHgunda/OP9sbKENBZhMBDNu2QahoIPwnsF6CeM=", "narHash": "sha256-TObxiGbuX/4FbOnzDRvznfMUjIgS+d71+BetT35EOB8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "4602f7e1d3f197b3cb540d5accf5669121629628", "rev": "8b1f894089789eb39eacf0d6891d1e17cc3a84ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -424,11 +518,57 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747372754, "lastModified": 1750779888,
"narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "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" "type": "github"
}, },
"original": { "original": {
@ -440,14 +580,16 @@
"hxwrap": { "hxwrap": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_3" "hooks": "hooks_3",
"nixpkgs": "nixpkgs_3",
"treefmt": "treefmt_2"
}, },
"locked": { "locked": {
"lastModified": 1745088587, "lastModified": 1749852670,
"narHash": "sha256-85AYHWayJVq/dxgk/S4RH7u6w59Akyr1fVttR8KBh8g=", "narHash": "sha256-MveNAj05dpNfOiK9uK6el6eWNG7r1SlMq45uZWgt20k=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "8fa5d5d550add7bf6cfd0a619dfac0e8a03b2bae", "rev": "1564605890b844183c2a9be9d3d7e71a0d12e367",
"revCount": 21, "revCount": 23,
"type": "git", "type": "git",
"url": "https://codeberg.org/helvetica/hxwrap.git" "url": "https://codeberg.org/helvetica/hxwrap.git"
}, },
@ -459,7 +601,7 @@
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"flake-compat": "flake-compat_3", "flake-compat": "flake-compat_4",
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_4",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -547,11 +689,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1749355504, "lastModified": 1751170039,
"narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", "narHash": "sha256-3EKpUmyGmHYA/RuhZjINTZPU+OFWko0eDwazUOW64nw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", "rev": "9c932ae632d6b5150515e5749b198c175d8565db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -562,17 +704,17 @@
}, },
"nixos-cosmic": { "nixos-cosmic": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_6",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_8",
"nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-stable": "nixpkgs-stable_2",
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
"lastModified": 1749338348, "lastModified": 1751281697,
"narHash": "sha256-IBLKyOU55Kt1gSXL4dFQUQUVcYd5+qfSrVAL8lcE8QY=", "narHash": "sha256-abHhTXGEGYhCKOc9vQbqHFG7dxwJ6AudIy1h4MUsjm0=",
"owner": "lilyinstarlight", "owner": "lilyinstarlight",
"repo": "nixos-cosmic", "repo": "nixos-cosmic",
"rev": "f2ac592313c51c9be981e45f56dc00714e103477", "rev": "78b86e37713a1111d9e37c62b242d60be3013bd1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -629,11 +771,11 @@
}, },
"nixpkgs-lib_3": { "nixpkgs-lib_3": {
"locked": { "locked": {
"lastModified": 1743296961, "lastModified": 1748740939,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", "rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -687,6 +829,21 @@
"type": "github" "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": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1730741070, "lastModified": 1730741070,
@ -705,11 +862,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1748995628, "lastModified": 1751048012,
"narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=", "narHash": "sha256-MYbotu4UjWpTsq01wglhN5xDRfZYLFtNk7SBY0BcjkU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8eb3b6a2366a7095939cd22f0dc0e9991313294b", "rev": "a684c58d46ebbede49f280b653b9e56100aa3877",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -737,11 +894,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1744932701, "lastModified": 1749285348,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=", "narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef", "rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -817,11 +974,27 @@
}, },
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1749143949, "lastModified": 1751011381,
"narHash": "sha256-QuUtALJpVrPnPeozlUG/y+oIMSLdptHxb3GK6cpSVhA=", "narHash": "sha256-krGXKxvkBhnrSC/kGBmg5MyupUUT5R6IBCLEzx9jhMM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "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" "type": "github"
}, },
"original": { "original": {
@ -833,7 +1006,7 @@
}, },
"phps": { "phps": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_4", "flake-compat": "flake-compat_5",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_6",
"utils": "utils" "utils": "utils"
}, },
@ -857,7 +1030,7 @@
"lanzaboote", "lanzaboote",
"flake-compat" "flake-compat"
], ],
"gitignore": "gitignore_3", "gitignore": "gitignore_4",
"nixpkgs": [ "nixpkgs": [
"lanzaboote", "lanzaboote",
"nixpkgs" "nixpkgs"
@ -946,7 +1119,8 @@
"nixos-cosmic", "nixos-cosmic",
"nixpkgs" "nixpkgs"
], ],
"treefmt": "treefmt_2" "treefmt": "treefmt_3",
"xenumenu": "xenumenu"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -978,11 +1152,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1749263796, "lastModified": 1751251399,
"narHash": "sha256-m52UsUrcNjAzgc0cwcg94INkiFyVPTn6KbFGr4x4cu8=", "narHash": "sha256-y+viCuy/eKKpkX1K2gDvXIJI/yzvy6zA3HObapz9XZ0=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "6e1d910306edfe6e4b718878f222c5672500d6b2", "rev": "b22d5ee8c60ed1291521f2dde48784edd6bf695b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1045,6 +1219,48 @@
"treefmt_2": { "treefmt_2": {
"inputs": { "inputs": {
"nixpkgs": [ "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" "nixpkgs"
] ]
}, },
@ -1104,6 +1320,27 @@
"repo": "uv2nix", "repo": "uv2nix",
"type": "github" "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", "root": "root",

View file

@ -26,6 +26,7 @@
myphps.url = "git+https://codeberg.org/helvetica/myphps.git"; myphps.url = "git+https://codeberg.org/helvetica/myphps.git";
forgesync.url = "git+https://codeberg.org/helvetica/forgesync.git"; forgesync.url = "git+https://codeberg.org/helvetica/forgesync.git";
nini.url = "git+https://codeberg.org/helvetica/nini.git"; nini.url = "git+https://codeberg.org/helvetica/nini.git";
xenumenu.url = "git+https://codeberg.org/helvetica/xenumenu.git";
lanzaboote = { lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.2"; url = "github:nix-community/lanzaboote/v0.4.2";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View file

@ -1,6 +1,8 @@
{ {
profiles = { profiles = {
desktop.enable = true; desktop.enable = true;
dynamic.enable = true;
headful.enable = true;
emulation.enable = true; emulation.enable = true;
gaming.enable = true; gaming.enable = true;
piracy.enable = true; piracy.enable = true;

View file

@ -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

47
hosts/insomniac/cage.nix Normal file
View file

@ -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";
};
};
}

View file

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.freetube
];
}

View file

@ -1,9 +1,5 @@
{ {
profiles = { profiles = {
desktop.enable = true; desktop.enable = true;
emulation.enable = true;
gaming.enable = true;
piracy.enable = true;
productivity.enable = true;
}; };
} }

11
hosts/insomniac/steam.nix Normal file
View file

@ -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
};
}

View file

@ -13,6 +13,14 @@ in
assertion = !config.profiles.server.enable; assertion = !config.profiles.server.enable;
message = "The desktop profile is not compatible with the server profile."; 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.";
}
]; ];
}; };
} }

View file

@ -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;
};
};
}

View file

@ -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;
};
}

View file

@ -4,10 +4,10 @@
... ...
}: }:
let let
cfg = config.profiles.desktop; cfg = config.profiles.dynamic;
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
xdg.portal.xdgOpenUsePortal = true; hardware.bluetooth.enable = true;
}; };
} }

View file

@ -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.";
}
];
};
}

View file

@ -4,7 +4,7 @@
... ...
}: }:
let let
cfg = config.profiles.desktop; cfg = config.profiles.dynamic;
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {

View file

@ -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;
};
}

View file

@ -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.";
}
];
};
}

View file

@ -5,7 +5,7 @@
... ...
}: }:
let let
cfg = config.profiles.desktop; cfg = config.profiles.headful;
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {

View file

@ -4,7 +4,7 @@
... ...
}: }:
let let
cfg = config.profiles.desktop; cfg = config.profiles.headful;
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {

View file

@ -4,13 +4,13 @@
... ...
}: }:
let let
cfg = config.profiles.desktop; cfg = config.profiles.headful;
in in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.sessionVariables = { environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
SDL_VIDEODRIVER = "wayland"; SDL_VIDEODRIVER = "wayland,x11";
}; };
}; };
} }