mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
autotiling: init module
This commit is contained in:
committed by
Austin Horstman
parent
7afeff9d81
commit
ac16cc25c6
27
tests/flake.lock
generated
Normal file
27
tests/flake.lock
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1760038930,
|
||||
"narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.autotiling = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { outPath = "@autotiling@"; };
|
||||
extraArgs = [
|
||||
"--outputs"
|
||||
"DP-1"
|
||||
"--workspaces"
|
||||
"8"
|
||||
"9"
|
||||
"--limit"
|
||||
"2"
|
||||
];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
serviceFile=home-files/.config/systemd/user/autotiling.service
|
||||
|
||||
assertFileExists "$serviceFile"
|
||||
|
||||
serviceFileNormalized="$(normalizeStorePaths "$serviceFile")"
|
||||
|
||||
assertFileContent "$serviceFileNormalized" ${builtins.toFile "expected.service" ''
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@autotiling@/bin/dummy --outputs DP-1 --workspaces 8 9 --limit 2
|
||||
Restart=always
|
||||
Type=simple
|
||||
|
||||
[Unit]
|
||||
After=graphical-session.target
|
||||
Description=Split orientation manager
|
||||
PartOf=graphical-session.target
|
||||
''}
|
||||
'';
|
||||
}
|
||||
5
tests/modules/services/autotiling/default.nix
Normal file
5
tests/modules/services/autotiling/default.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
autotiling-basic-config = ./autotiling-basic-config.nix;
|
||||
}
|
||||
Reference in New Issue
Block a user