mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 19:45:40 +00:00
refactor: modularize programs and services
This commit is contained in:
parent
191d3c3392
commit
f74e59d56b
16 changed files with 126 additions and 69 deletions
10
hosts/nixos/modules/services/default.nix
Normal file
10
hosts/nixos/modules/services/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./xserver.nix
|
||||
./greetd.nix
|
||||
./tailscale.nix
|
||||
./flatpak.nix
|
||||
];
|
||||
}
|
26
hosts/nixos/modules/services/flatpak.nix
Normal file
26
hosts/nixos/modules/services/flatpak.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
packages = [
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
"org.vinegarhq.Sober"
|
||||
"org.vinegarhq.Vinegar"
|
||||
"com.spotify.Client"
|
||||
];
|
||||
overrides = {
|
||||
"org.prismlauncher.PrismLauncher".Context = {
|
||||
filesystems = [
|
||||
"home"
|
||||
];
|
||||
};
|
||||
"org.vinegarhq.Sober".Context = {
|
||||
filesystems = [
|
||||
"xdg-run/app/com.discordapp.Discord:create"
|
||||
"xdg-run/discord-ipc-0"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
13
hosts/nixos/modules/services/greetd.nix
Normal file
13
hosts/nixos/modules/services/greetd.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
10
hosts/nixos/modules/services/tailscale.nix
Normal file
10
hosts/nixos/modules/services/tailscale.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
sops.secrets."tailscale/authkey" = { };
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = config.sops.secrets."tailscale/authkey".path;
|
||||
};
|
||||
}
|
8
hosts/nixos/modules/services/xserver.nix
Normal file
8
hosts/nixos/modules/services/xserver.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.xserver = {
|
||||
xkb.layout = "us";
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue