mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 07:25: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
|
@ -1,20 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
withUWSM = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
programs.thunar = {
|
|
||||||
enable = true;
|
|
||||||
plugins = with pkgs.xfce; [
|
|
||||||
thunar-volman
|
|
||||||
];
|
|
||||||
};
|
|
||||||
programs.xfconf.enable = true;
|
|
||||||
programs.ssh.startAgent = true;
|
|
||||||
programs.ydotool.enable = true;
|
|
||||||
programs.steam.enable = true;
|
|
||||||
}
|
|
13
hosts/nixos/modules/programs/default.nix
Normal file
13
hosts/nixos/modules/programs/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./zsh.nix
|
||||||
|
./hyprland.nix
|
||||||
|
./thunar.nix
|
||||||
|
./xfconf.nix
|
||||||
|
./ssh.nix
|
||||||
|
./ydotool.nix
|
||||||
|
./steam.nix
|
||||||
|
];
|
||||||
|
}
|
9
hosts/nixos/modules/programs/hyprland.nix
Normal file
9
hosts/nixos/modules/programs/hyprland.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
}
|
5
hosts/nixos/modules/programs/ssh.nix
Normal file
5
hosts/nixos/modules/programs/ssh.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
}
|
5
hosts/nixos/modules/programs/steam.nix
Normal file
5
hosts/nixos/modules/programs/steam.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.steam.enable = true;
|
||||||
|
}
|
12
hosts/nixos/modules/programs/thunar.nix
Normal file
12
hosts/nixos/modules/programs/thunar.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.thunar = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.xfce; [
|
||||||
|
thunar-volman
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
||||||
|
services.tumbler.enable = true; # Thumbnail support for images
|
||||||
|
}
|
5
hosts/nixos/modules/programs/xfconf.nix
Normal file
5
hosts/nixos/modules/programs/xfconf.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.xfconf.enable = true;
|
||||||
|
}
|
5
hosts/nixos/modules/programs/ydotool.nix
Normal file
5
hosts/nixos/modules/programs/ydotool.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.ydotool.enable = true;
|
||||||
|
}
|
5
hosts/nixos/modules/programs/zsh.nix
Normal file
5
hosts/nixos/modules/programs/zsh.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
}
|
|
@ -1,47 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.xserver = {
|
|
||||||
xkb.layout = "us";
|
|
||||||
videoDrivers = [ "nvidia" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
|
||||||
services.tumbler.enable = true; # Thumbnail support for images
|
|
||||||
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
default_session = {
|
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --remember --remember-session";
|
|
||||||
user = "greeter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.tailscale = {
|
|
||||||
enable = true;
|
|
||||||
authKeyFile = config.sops.secrets."tailscale/authkey".path;
|
|
||||||
};
|
|
||||||
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"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
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" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,6 +5,4 @@
|
||||||
sops.defaultSopsFormat = "yaml";
|
sops.defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
sops.age.keyFile = "/home/toast/.config/sops/age/keys.txt";
|
sops.age.keyFile = "/home/toast/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
sops.secrets."tailscale/authkey" = { };
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue