Migrated from import based to config based

This commit is contained in:
2024-12-23 17:03:36 +01:00
parent c1b12746f5
commit 5edd8b1e01
36 changed files with 503 additions and 308 deletions

View File

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

View File

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

View File

@@ -1,9 +1,24 @@
{ ... }:
{ config, lib, ... }:
{
networking.firewall = {
enable = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
with lib;
let
cfg = config.settings.hardware.firewall;
in {
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,8 +1,23 @@
{ lib, pkgs, ... }:
{ config, lib, ... }:
{
services.fprintd.enable = true;
with lib;
security.pam.services.login.fprintAuth = false;
security.pam.services.cosmic-greeter.fprintAuth = false;
let
cfg = config.settings.hardware.fprint;
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

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

View File

@@ -1,24 +0,0 @@
{ ... }:
{
# 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,21 +1,36 @@
{ ... }:
{ config, lib, ... }:
{
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
with lib;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
let
cfg = config.settings.hardware.locale;
in {
options = {
settings.hardware.locale.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable locale configuration
'';
};
};
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "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";
config = mkIf cfg.enable {
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "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,8 +1,23 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
{
services.printing = {
enable = true;
drivers = [ pkgs.hplip ];
with lib;
let
cfg = config.settings.hardware.printing;
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

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