Compare commits

..

No commits in common. "5edd8b1e01c8bf67c8d8b9685dc6645f99a0a66a" and "a093970262412e22bca8faff66bbcb69071a66a9" have entirely different histories.

36 changed files with 344 additions and 530 deletions

42
flake.lock generated
View File

@ -39,11 +39,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734366194, "lastModified": 1733572789,
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=", "narHash": "sha256-zjO6m5BqxXIyjrnUziAzk4+T4VleqjstNudSqWcpsHI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f", "rev": "c7ffc9727d115e433fd884a62dc164b587ff651d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -80,11 +80,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1734745015, "lastModified": 1733708804,
"narHash": "sha256-HGl0yR/qfGTO99NfiB5bqTe2nPKmD57opzB/TwhJSW0=", "narHash": "sha256-PiUrztTiR4aVRC2fMdNcOWYWF1ojvqbrSUYmhtp3970=",
"owner": "lilyinstarlight", "owner": "lilyinstarlight",
"repo": "nixos-cosmic", "repo": "nixos-cosmic",
"rev": "1c922245aec471610533c7a225bf9c20e7002ff2", "rev": "1531210f371ecf966ff67e87975f684553bdbbf7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -95,11 +95,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1734352517, "lastModified": 1733481457,
"narHash": "sha256-mfv+J/vO4nqmIOlq8Y1rRW8hVsGH3M+I2ESMjhuebDs=", "narHash": "sha256-IS3bxa4N1VMSh3/P6vhEAHQZecQ3oAlKCDvzCQSO5Is=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "b12e314726a4226298fe82776b4baeaa7bcf3dcd", "rev": "e563803af3526852b6b1d77107a81908c66a9fcf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -111,11 +111,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1734424634, "lastModified": 1733581040,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -142,11 +142,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1734600368, "lastModified": 1733412085,
"narHash": "sha256-nbG9TijTMcfr+au7ZVbKpAhMJzzE2nQBYmRvSdXUD8g=", "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b47fd6fa00c6afca88b8ee46cfdb00e104f50bca", "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -158,11 +158,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1734424634, "lastModified": 1733581040,
"narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", "rev": "22c3f2cf41a0e70184334a958e6b124fb0ce3e01",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -192,11 +192,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734661750, "lastModified": 1733625333,
"narHash": "sha256-BI58NBdimxu1lnpOrG9XxBz7Cwqy+qIf99zunWofX5w=", "narHash": "sha256-tIML2axjm4AnlKP29upVJxzBpj4Cy4ak+PKonqQtXmc=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "7d3d910d5fd575e6e8c5600d83d54e5c47273bfe", "rev": "430c8b054e45ea44fd2c9521a378306ada507a6c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,38 +2,29 @@
{ {
imports = [ imports = [
# Import hardware configuration
./hardware-configuration.nix ./hardware-configuration.nix
# Import modules # GUI
../../modules/system/default.nix ../../modules/system/gui/hyprland.nix
]; ../../modules/system/gui/steam.nix
../../modules/system/gui/thunar.nix
# ../../modules/system/gui/plasma.nix
# CLI
../../modules/system/cli/common.nix
../../modules/system/cli/docker.nix
settings = { # Hardware
display-manager = "cosmic-greeter"; # ../../modules/system/hardware/amd.nix
desktop-environments = { ../../modules/system/hardware/bluetooth.nix
cosmic.enable = true; ../../modules/system/hardware/firewall.nix
hyprland.enable = true; ../../modules/system/hardware/garbage-collection.nix
}; ../../modules/system/hardware/laptop.nix
applications = { ../../modules/system/hardware/locale.nix
common.enable = true; ../../modules/system/hardware/printing.nix
steam.enable = true; ../../modules/system/hardware/fprint.nix
thunar.enable = true; ../../modules/system/hardware/virt.nix
}; ];
services = {
docker.enable = true;
quickemu.enable = true;
sunshine.enable = false;
garbage-collection.enable = true;
};
hardware = {
fprint.enable = true;
printing.enable = true;
bluetooth.enable = true;
firewall.enable = true;
locale.enable = true;
};
};
nix.settings = { nix.settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
@ -49,7 +40,6 @@
}; };
# Configure hardware # Configure hardware
services.ratbagd.enable = true;
# Bootloader. # Bootloader.
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
@ -70,6 +60,10 @@
nix.settings.trusted-users = [ "root" "xeovalyte" ]; nix.settings.trusted-users = [ "root" "xeovalyte" ];
# Enable cosmic desktop eenvironment
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
# Prevent system freeze on high load # Prevent system freeze on high load
services.earlyoom = { services.earlyoom = {
enable = true; enable = true;

View File

@ -46,8 +46,10 @@
# Desktop Applications # Desktop Applications
kdenlive kdenlive
prismlauncher prismlauncher
unstable.modrinth-app
unstable.joplin-desktop unstable.joplin-desktop
unstable.prusa-slicer unstable.prusa-slicer
unstable.font-manager
signal-desktop signal-desktop
unstable.vesktop unstable.vesktop
unstable.webcord unstable.webcord
@ -56,6 +58,7 @@
loupe loupe
unstable.rnote unstable.rnote
unstable.bottles unstable.bottles
resources
# Office # Office
libreoffice libreoffice
@ -75,6 +78,15 @@
# Enable home-manager # Enable home-manager
programs.home-manager.enable = true; programs.home-manager.enable = true;
# Enable default applications
xdg.mimeApps = {
enable = true;
defaultApplications = {
"application/pdf" = "firefox.desktop";
"application/rnote" = "rnote.desktop";
};
};
home.stateVersion = "24.05"; home.stateVersion = "24.05";
}; };

View File

@ -23,11 +23,11 @@
keybinds { keybinds {
normal { normal {
bind "Ctrl e" { ToggleFloatingPanes; SwitchToMode "normal"; } bind "Ctrl e" { ToggleFloatingPanes; SwitchToMode "normal"; }
bind "Alt 1" { GoToTab 1; } bind "Ctrl 1" { GoToTab 1; }
bind "Alt 2" { GoToTab 2; } bind "Ctrl 2" { GoToTab 2; }
bind "Alt 3" { GoToTab 3; } bind "Ctrl 3" { GoToTab 3; }
bind "Alt 4" { GoToTab 4; } bind "Ctrl 4" { GoToTab 4; }
bind "Alt 5" { GoToTab 5; } bind "Ctrl 5" { GoToTab 5; }
} }
} }
''; '';

View File

@ -1,34 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.settings.applications.common;
in {
options = {
settings.applications.common.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable common applications
'';
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
usbutils
tree
fastfetch
btop
git
yazi
just
];
environment.pathsToLink = [ "/share/zsh" ];
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
};
}

View File

@ -1,31 +0,0 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.applications.steam;
in {
options = {
settings.applications.steam.enable = lib.mkOption {
type = with lib.types; bool;
description = ''
Enable steam
'';
};
};
config = mkIf cfg.enable {
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
};
}

View File

@ -1,30 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.settings.applications.thunar;
in {
options = {
settings.applications.thunar.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable thunar file manager
'';
};
};
config = mkIf cfg.enable {
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
services.gvfs.enable = true;
services.tumbler.enable = true;
programs.file-roller.enable = true;
};
}

View File

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
usbutils
tree
fastfetch
btop
git
yazi
just
];
environment.pathsToLink = [ "/share/zsh" ];
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
}

View File

@ -0,0 +1,22 @@
{ pkgs, ... }:
{
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
users.users.xeovalyte.extraGroups = [ "docker" ];
security.wrappers = {
docker-rootlesskit = {
owner = "root";
group = "root";
capabilities = "cap_net_bind_service+ep";
source = "${pkgs.rootlesskit}/bin/rootlesskit";
};
};
}

View File

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.oci-containers.backend = "podman";
environment.systemPackages = with pkgs; [
dive
podman-tui
podman-compose
];
}

View File

@ -1,26 +0,0 @@
{ ... }:
{
imports = [
./applications/common.nix
./applications/steam.nix
./applications/thunar.nix
./services/docker.nix
./services/quickemu.nix
./services/sunshine.nix
./services/garbage-collection.nix
./hardware/bluetooth.nix
./hardware/fprint.nix
./hardware/locale.nix
# ./hardware/nvidia.nix
./hardware/firewall.nix
./hardware/printing.nix
./desktop-environments/cosmic.nix
./desktop-environments/hyprland.nix
./display-managers/default.nix
];
}

View File

@ -1,24 +0,0 @@
{ lib, config, ... }:
with lib;
let
cfg = config.settings.desktop-environments.cosmic;
in {
options = {
settings.desktop-environments.cosmic.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable cosmic desktop environment
'';
};
};
config = mkIf cfg.enable {
services.desktopManager.cosmic.enable = true;
environment.sessionVariables = {
COSMIC_DISABLE_DIRECT_SCANOUT = "true";
};
};
}

View File

@ -1,44 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.settings.desktop-environments.hyprland;
in {
options = {
settings.desktop-environments.hyprland.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable hyprland window manager
'';
};
};
config = mkIf cfg.enable {
programs.hyprland = {
enable = true;
package = pkgs.unstable.hyprland;
xwayland.enable = true;
};
# Sound configuration
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Keyring configuration
security.polkit.enable = true;
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
programs.ssh.startAgent = true;
# Configure networking
networking.networkmanager.enable = true;
networking.wireless.iwd.enable = true;
};
}

View File

@ -1,11 +0,0 @@
{ lib, config, ... }:
with lib;
let
cfg = config.settings.display-manager;
in {
config = mkIf (cfg == "cosmic-greeter") {
services.displayManager.cosmic-greeter.enable = true;
};
}

View File

@ -1,21 +0,0 @@
{ lib, ... }:
with lib;
let
cfg = config.settings.display-manager;
in {
options = {
settings.display-manager = lib.mkOption {
type = lib.types.enum ["sddm" "cosmic-greeter"];
description = ''
Specify which display manager to use
'';
};
};
imports = [
./sddm.nix
./cosmic-greeter.nix
];
}

View File

@ -1,20 +0,0 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.settings.display-manager;
in {
config = mkIf (cfg == "sddm") {
environment.systemPackages = with pkgs; [
libsForQt5.qt5.qtquickcontrols2
libsForQt5.qt5.qtgraphicaleffects
];
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
};
};
}

View File

@ -0,0 +1,52 @@
{ config, pkgs, ... }:
{
programs.hyprland = {
enable = true;
package = pkgs.unstable.hyprland;
xwayland.enable = true;
};
# Configure display manager
# services.greetd = {
# enable = true;
# settings = {
# default_session = {
# command = "${pkgs.greetd.tuigreet}/bin/tuigreet --remember --time --cmd Hyprland";
# user = "xeovalyte";
# };
# };
# };
# SDDM configuration
# environment.systemPackages = with pkgs; [
# libsForQt5.qt5.qtquickcontrols2
# libsForQt5.qt5.qtgraphicaleffects
# ];
# services.displayManager.sddm = {
# enable = true;
# wayland.enable = true;
# theme = "${import ./sddm-theme.nix { inherit pkgs; }}";
# };
# Sound configuration
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Keyring configuration
security.polkit.enable = true;
services.gnome.gnome-keyring.enable = true;
security.pam.services.greetd.enableGnomeKeyring = true;
programs.ssh.startAgent = true;
# Configure networking
networking.networkmanager.enable = true;
networking.wireless.iwd.enable = true;
}

View File

@ -0,0 +1,5 @@
{ ... }:
{
programs.noisetorch.enable = true;
}

View File

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
services.desktopManager.plasma6.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View File

@ -0,0 +1,16 @@
{ config, lib, nixpkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
}

View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
services.sunshine = {
enable = true;
package = pkgs.unstable.sunshine.override { cudaSupport = true; };
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
}

View File

@ -0,0 +1,15 @@
{ pkgs, ... }:
{
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
services.gvfs.enable = true;
services.tumbler.enable = true;
programs.file-roller.enable = true;
}

View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
hardware.graphics = {
enable = true;
enable32Bit = true;
};
hardware.graphics.extraPackages = with pkgs; [
amdvlk
];
hardware.graphics.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
}

View File

@ -1,30 +1,15 @@
{ config, lib, ... }: { pkgs, ... }:
with lib; {
hardware.bluetooth = {
let enable = true;
cfg = config.settings.hardware.bluetooth; powerOnBoot = true;
in { settings = {
options = { General = {
settings.hardware.bluetooth.enable = lib.mkOption { Enable = "Source,Sink,Media,Socket";
type = lib.types.bool;
description = ''
Enable bluetooth
'';
};
};
config = mkIf cfg.enable {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
}; };
}; };
services.blueman.enable = true;
}; };
services.blueman.enable = true;
} }

View File

@ -1,24 +1,9 @@
{ config, lib, ... }: { ... }:
with lib; {
networking.firewall = {
let enable = true;
cfg = config.settings.hardware.firewall; allowedTCPPorts = [ ];
in { allowedUDPPorts = [ ];
options = {
settings.hardware.firewall.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable firewall
'';
};
};
config = mkIf cfg.enable {
networking.firewall = {
enable = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
};
}; };
} }

View File

@ -1,23 +1,8 @@
{ config, lib, ... }: { lib, pkgs, ... }:
with lib; {
services.fprintd.enable = true;
let security.pam.services.login.fprintAuth = false;
cfg = config.settings.hardware.fprint; security.pam.services.cosmic-greeter.fprintAuth = false;
in {
options = {
settings.hardware.fprint.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable fingerprint
'';
};
};
config = mkIf cfg.enable {
services.fprintd.enable = true;
security.pam.services.login.fprintAuth = false;
security.pam.services.cosmic-greeter.fprintAuth = false;
};
} }

View File

@ -0,0 +1,11 @@
{ ... }:
{
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 1w";
};
nix.settings.auto-optimise-store = true;
}

View File

@ -0,0 +1,24 @@
{ ... }:
{
# services.auto-cpufreq.enable = true;
# services.auto-cpufreq.settings = {
# battery = {
# governor = "powersave";
# turbo = "never";
# };
# charger = {
# governor = "performance";
# turbo = "auto";
# };
# };
services.power-profiles-daemon.enable = true;
boot.extraModprobeConfig = ''
options snd_hda_intel power_save=0
'';
# powerManagement.powertop.enable = true;
}

View File

@ -1,36 +1,21 @@
{ config, lib, ... }: { ... }:
with lib; {
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
let # Select internationalisation properties.
cfg = config.settings.hardware.locale; i18n.defaultLocale = "en_US.UTF-8";
in {
options = {
settings.hardware.locale.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable locale configuration
'';
};
};
config = mkIf cfg.enable { i18n.extraLocaleSettings = {
# Set your time zone. LC_ADDRESS = "nl_NL.UTF-8";
time.timeZone = "Europe/Amsterdam"; LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
# Select internationalisation properties. LC_MONETARY = "nl_NL.UTF-8";
i18n.defaultLocale = "en_US.UTF-8"; LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
i18n.extraLocaleSettings = { LC_PAPER = "nl_NL.UTF-8";
LC_ADDRESS = "nl_NL.UTF-8"; LC_TELEPHONE = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8"; LC_TIME = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
}; };
} }

View File

@ -1,23 +1,8 @@
{ config, lib, pkgs, ... }: { pkgs, ... }:
with lib; {
services.printing = {
let enable = true;
cfg = config.settings.hardware.printing; drivers = [ pkgs.hplip ];
in {
options = {
settings.hardware.printing.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable printer configuration
'';
};
};
config = mkIf cfg.enable {
services.printing = {
enable = true;
drivers = [ pkgs.hplip ];
};
}; };
} }

View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
users.users.xeovalyte.extraGroups = [ "libvirtd" ];
environment.systemPackages = with pkgs; [
quickemu
];
}

View File

@ -1,37 +0,0 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.settings.services.docker;
in {
options = {
settings.services.docker.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable docker configuration
'';
};
};
config = mkIf cfg.enable {
virtualisation.docker = {
enable = true;
rootless = {
enable = true;
setSocketVariable = true;
};
};
users.users.xeovalyte.extraGroups = [ "docker" ];
security.wrappers = {
docker-rootlesskit = {
owner = "root";
group = "root";
capabilities = "cap_net_bind_service+ep";
source = "${pkgs.rootlesskit}/bin/rootlesskit";
};
};
};
}

View File

@ -1,26 +0,0 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.services.garbage-collection;
in {
options = {
settings.services.garbage-collection.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable garbage collection of nix store
'';
};
};
config = mkIf cfg.enable {
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 1w";
};
nix.settings.auto-optimise-store = true;
};
}

View File

@ -1,27 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.settings.services.quickemu;
in {
options = {
settings.services.quickemu.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable quickemu virtualisation
'';
};
};
config = mkIf cfg.enable {
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
users.users.xeovalyte.extraGroups = [ "libvirtd" ];
environment.systemPackages = with pkgs; [
quickemu
];
};
}

View File

@ -1,26 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.settings.services.sunshine;
in {
options = {
settings.services.sunshine.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable sunshine service
'';
};
};
config = mkIf cfg.enable {
services.sunshine = {
enable = true;
package = pkgs.unstable.sunshine.override { cudaSupport = true; };
autoStart = true;
capSysAdmin = true;
openFirewall = true;
};
};
}