1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-07 17:41:03 +01:00

glance: add module

This commit is contained in:
Gutyina Gergő 2024-06-28 08:24:13 -07:00 committed by GitHub
parent f50e2779ed
commit 7e68e55d2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 167 additions and 0 deletions

View file

@ -241,6 +241,7 @@ in import nmtSrc {
./modules/services/fnott
./modules/services/fusuma
./modules/services/git-sync
./modules/services/glance
./modules/services/gpg-agent
./modules/services/gromit-mpx
./modules/services/home-manager-auto-upgrade

View file

@ -0,0 +1,15 @@
{ ... }:
{
services.glance.enable = true;
test.stubs.glance = { };
nmt.script = ''
configFile=home-files/.config/glance/glance.yml
serviceFile=home-files/.config/systemd/user/glance.service
assertFileContent $configFile ${./glance-default-config.yml}
assertFileContent $serviceFile ${./glance.service}
'';
}

View file

@ -0,0 +1,4 @@
{
glance-default-settings = ./default-settings.nix;
glance-example-settings = ./example-settings.nix;
}

View file

@ -0,0 +1,33 @@
{ ... }:
{
services.glance = {
enable = true;
settings = {
server.port = 5678;
pages = [{
name = "Home";
columns = [{
size = "full";
widgets = [
{ type = "calendar"; }
{
type = "weather";
location = "London, United Kingdom";
}
];
}];
}];
};
};
test.stubs.glance = { };
nmt.script = ''
configFile=home-files/.config/glance/glance.yml
serviceFile=home-files/.config/systemd/user/glance.service
assertFileContent $configFile ${./glance-example-config.yml}
assertFileContent $serviceFile ${./glance.service}
'';
}

View file

@ -0,0 +1,6 @@
pages:
- columns:
- size: full
widgets:
- type: calendar
name: Calendar

View file

@ -0,0 +1,10 @@
pages:
- columns:
- size: full
widgets:
- type: calendar
- location: London, United Kingdom
type: weather
name: Home
server:
port: 5678

View file

@ -0,0 +1,9 @@
[Install]
WantedBy=graphical-session.target
[Service]
ExecStart=@glance@/bin/dummy --config /home/hm-user/.config/glance/glance.yml
[Unit]
Description=Glance feed dashboard server
PartOf=graphical-session.target