refactor: flake dir -> outputs/sys -> nixos

This commit is contained in:
ooks-io 2024-06-08 23:06:08 +12:00
parent 3615bb010f
commit a6d5e892a1
73 changed files with 9 additions and 2 deletions

View file

@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
inherit (lib.lists) any elem;
hasFunction = f: elem f config.ooknet.host.function;
in
{
config = mkIf (any hasFunction ["workstation" "gaming"]) {
services.dbus = {
enable = true;
packages = with pkgs; [ dconf gcr udisks2 ];
implementation = "broker";
};
};
}

View file

@ -0,0 +1,8 @@
{
imports = [
./system76Scheduler.nix
./dbus.nix
./gnome.nix
./gvfs.nix
];
}

View file

@ -0,0 +1,18 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
host = config.ooknet.host;
in
{
config = mkIf (host.type != "phone" && host.type != "server") {
services = {
gnome = {
glib-networking.enable = true;
gnome-keyring.enable = true;
};
udev.packages = [ pkgs.gnome.gnome-settings-daemon ];
};
};
}

View file

@ -0,0 +1,12 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
host = config.ooknet.host;
in
{
config = mkIf ( host.type != "phone") {
services.gvfs.enable = true;
};
}

View file

@ -0,0 +1,20 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
host = config.ooknet.host;
in
{
config = mkIf (host.type != "phone") {
services.system76-scheduler = {
enable = true;
};
# fix suspend issues
powerManagement = {
powerDownCommands = "systemctl stop system76-scheduler";
resumeCommands = "systemctl start system76-scheduler";
};
};
}