mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-05 06:03:15 -06:00
clean up even more boilerplate
This commit is contained in:
parent
55f2e625ec
commit
7facf2e749
7 changed files with 62 additions and 83 deletions
|
@ -1,10 +1,12 @@
|
|||
{lib, ...}: {
|
||||
{lib, ...}: let
|
||||
inherit (lib) enabled;
|
||||
in {
|
||||
users.motd = lib.mkRune {
|
||||
number = "6";
|
||||
rune = "algiz";
|
||||
};
|
||||
|
||||
services.resolved.enable = true;
|
||||
services.resolved = enabled;
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
|
@ -19,13 +21,15 @@
|
|||
# networking.nameservers = [ "8.8.8.8"];
|
||||
|
||||
# allow tcp connections for revsere proxy
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
networking.firewall =
|
||||
enabled
|
||||
// {
|
||||
allowedTCPPorts = [80 443];
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PasswordAuthentication = false;
|
||||
services.openssh =
|
||||
enabled
|
||||
// {settings.PasswordAuthentication = false;};
|
||||
|
||||
# users.mutableUsers = false;
|
||||
|
||||
|
@ -33,11 +37,6 @@
|
|||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
# don't delete this you foo bar
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (lib) enabled;
|
||||
in {
|
||||
users.motd = lib.mkRune {
|
||||
number = "2";
|
||||
rune = "mannaz";
|
||||
|
@ -11,7 +13,7 @@
|
|||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot = enabled;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
|
@ -26,8 +28,9 @@
|
|||
}
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
hardware.opengl =
|
||||
enabled
|
||||
// {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
|
@ -40,13 +43,16 @@
|
|||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
modesetting = enabled;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
powerManagement.enable = false;
|
||||
powerManagement =
|
||||
enabled
|
||||
// {
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
finegrained = false;
|
||||
};
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
|
@ -65,8 +71,8 @@
|
|||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
services.openssh.enable = true;
|
||||
programs.nix-ld = enabled;
|
||||
services.openssh = enabled;
|
||||
|
||||
networking.hostName = "mannaz";
|
||||
# networking.wireless.enable = true;
|
||||
|
@ -80,21 +86,6 @@
|
|||
time.timeZone = "America/Chicago";
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
# don't delete this you foo bar
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -2,25 +2,26 @@
|
|||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
networking.networkmanager.enable = true;
|
||||
services.printing.enable = true;
|
||||
services.fwupd.enable = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
}: let
|
||||
inherit (lib) enabled;
|
||||
in {
|
||||
networking.networkmanager = enabled;
|
||||
services.printing = enabled;
|
||||
services.fwupd = enabled;
|
||||
hardware.bluetooth = enabled // {powerOnBoot = true;};
|
||||
|
||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/lenovo/thinkpad/x1/9th-gen/default.nix
|
||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/common/pc/ssd/default.nix
|
||||
services.fstrim.enable = true;
|
||||
services.fstrim = enabled;
|
||||
|
||||
# rtkit is optional but recommended
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
pulse.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
security.rtkit = enabled;
|
||||
services.pipewire =
|
||||
enabled
|
||||
// {
|
||||
audio = enabled;
|
||||
pulse = enabled;
|
||||
alsa = enabled // {support32Bit = true;};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -46,21 +47,6 @@
|
|||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
# don't delete this you foo bar
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
swaylock -c 1e1e2e
|
||||
'';
|
||||
};
|
||||
in mkOizysModule config "hyprland" {
|
||||
in
|
||||
mkOizysModule config "hyprland" {
|
||||
security.pam.services.swaylock = {};
|
||||
# Optional, hint electron apps to use wayland:
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in mkOizysModule config "vpn" {
|
||||
in
|
||||
mkOizysModule config "vpn" {
|
||||
environment.systemPackages = [pkgs.openconnect];
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib) mkOizysModule;
|
||||
in mkOizysModule config "chrome" {
|
||||
in
|
||||
mkOizysModule config "chrome" {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue