diff options
Diffstat (limited to 'modules/sys/core')
| -rw-r--r-- | modules/sys/core/audio.nix | 28 | ||||
| -rw-r--r-- | modules/sys/core/bootloader.nix | 36 | ||||
| -rw-r--r-- | modules/sys/core/default.nix | 14 | ||||
| -rw-r--r-- | modules/sys/core/drivers.nix | 56 | ||||
| -rw-r--r-- | modules/sys/core/fonts.nix | 21 | ||||
| -rw-r--r-- | modules/sys/core/greet.nix | 27 | ||||
| -rw-r--r-- | modules/sys/core/home-manager.nix | 30 | ||||
| -rw-r--r-- | modules/sys/core/localization.nix | 39 | ||||
| -rw-r--r-- | modules/sys/core/networking.nix | 29 | ||||
| -rw-r--r-- | modules/sys/core/security.nix | 27 |
10 files changed, 0 insertions, 307 deletions
diff --git a/modules/sys/core/audio.nix b/modules/sys/core/audio.nix deleted file mode 100644 index 0769f8d..0000000 --- a/modules/sys/core/audio.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - options.szpont.audio.enable = lib.mkEnableOption "audio support"; - - config = lib.mkIf config.szpont.audio.enable { - services = { - pipewire = { - enable = true; - audio.enable = true; - pulse.enable = true; - alsa.enable = true; - alsa.support32Bit = true; - jack.enable = true; - wireplumber.enable = true; - }; - - playerctld.enable = true; - spotifyd.enable = true; - }; - - security.rtkit.enable = true; - hardware.enableAllFirmware = true; - - environment.systemPackages = with pkgs; [ - alsa-utils - ]; - }; -} diff --git a/modules/sys/core/bootloader.nix b/modules/sys/core/bootloader.nix deleted file mode 100644 index dabea20..0000000 --- a/modules/sys/core/bootloader.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ config, lib, ... }: -{ - options.szpont.bootloader = lib.mkOption { - type = lib.types.enum [ "systemd-boot" "grub" "none" ]; - description = "which bootloader to use"; - }; - - config = lib.mkMerge [ - { - boot.loader.efi.canTouchEfiVariables = true; - boot.supportedFilesystems = [ "ntfs" ]; - } - - (lib.mkIf (config.szpont.bootloader == "systemd-boot") { - boot = { - kernelParams = [ "quiet" ]; - - loader = { - systemd-boot = { - enable = true; - editor = false; - }; - timeout = 0; - }; - }; - }) - - (lib.mkIf (config.szpont.bootloader == "grub") { - boot.loader.grub = { - enable = true; - device = "nodev"; - efiSupport = true; - }; - }) - ]; -} diff --git a/modules/sys/core/default.nix b/modules/sys/core/default.nix deleted file mode 100644 index da8f277..0000000 --- a/modules/sys/core/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: -{ - imports = [ - ./audio.nix - ./bootloader.nix - ./drivers.nix - ./fonts.nix - ./greet.nix - ./home-manager.nix - ./localization.nix - ./networking.nix - ./security.nix - ]; -} diff --git a/modules/sys/core/drivers.nix b/modules/sys/core/drivers.nix deleted file mode 100644 index f12f6ab..0000000 --- a/modules/sys/core/drivers.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - options.szpont.drivers = { - enable = lib.mkEnableOption "enables hardware drivers"; - - amd.enable = lib.mkEnableOption "AMD specific drivers and microcode"; - - stability = lib.mkOption { - type = lib.types.enum [ "stable" "unstable" ]; - default = "stable"; - }; - }; - - config = lib.mkMerge [ - { - services.smartd.enable = true; - hardware = { - sensor.iio.enable = true; - - enableRedistributableFirmware = true; - graphics = { - enable = true; - enable32Bit = true; - }; - }; - } - - (lib.mkIf config.szpont.drivers.amd.enable (lib.mkMerge [ - { - services.xserver.videoDrivers = [ "amdgpu" ]; - hardware = { - cpu.amd.updateMicrocode = true; - amdgpu = { - initrd.enable = true; - overdrive.enable = true; - }; - }; - } - - (lib.mkIf (config.szpont.drivers.stability == "unstable") { - services.lact.enable = true; - - boot.kernelPackages = pkgs.linuxPackages_cachyos-lto-znver4; - chaotic.mesa-git = { - enable = true; - fallbackSpecialisation = false; - extraPackages = [ pkgs.mesa_git.opencl ]; - }; - }) - - (lib.mkIf (config.szpont.drivers.stability == "stable") { - boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; - }) - ])) - ]; -} diff --git a/modules/sys/core/fonts.nix b/modules/sys/core/fonts.nix deleted file mode 100644 index af2c78d..0000000 --- a/modules/sys/core/fonts.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - options.szpont.fonts = { - enable = lib.mkEnableOption "system-wide fonts and console configuration"; - }; - - config = lib.mkIf config.szpont.fonts.enable { - console = { - keyMap = "pl"; - earlySetup = true; - font = "ter-v32n"; - packages = with pkgs; [ terminus_font ]; - }; - - fonts.packages = with pkgs; [ - nerd-fonts.jetbrains-mono - nerd-fonts.fira-mono - nerd-fonts.fira-code - ]; - }; -} diff --git a/modules/sys/core/greet.nix b/modules/sys/core/greet.nix deleted file mode 100644 index 4f4abf9..0000000 --- a/modules/sys/core/greet.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - options.szpont.greet.enable = lib.mkEnableOption "enables greetd daemon with tuigreet"; - - config = lib.mkIf config.szpont.greet.enable { - services.greetd = { - enable = true; - settings = { - default_session = { - user = "greeter"; - command = '' - ${pkgs.tuigreet}/bin/tuigreet \ - --sessions ${config.services.displayManager.sessionData.desktops}/share/xsessions:${config.services.displayManager.sessionData.desktops}/share/wayland-sessions \ - --remember \ - --remember-user-session \ - --asterisks \ - --greeting 'Welcome to NixOS!' \ - --time - ''; - }; - }; - }; - security.pam.services.greetd.enableGnomeKeyring = true; - - environment.systemPackages = with pkgs; [ tuigreet ]; - }; -} diff --git a/modules/sys/core/home-manager.nix b/modules/sys/core/home-manager.nix deleted file mode 100644 index 06f909f..0000000 --- a/modules/sys/core/home-manager.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, lib, inputs, ... }: -{ - options.szpont.home-manager = { - enable = lib.mkEnableOption "Home Manager configuration manager"; - - users = lib.mkOption { - default = {}; - description = "Attribute set of users and their home-manager configurations"; - type = lib.types.attrsOf (lib.types.submodule { - options = { - path = lib.mkOption { - type = lib.types.path; - description = "Path to the user's home.nix file"; - }; - }; - }); - }; - }; - - config = lib.mkIf config.szpont.home-manager.enable { - home-manager = { - extraSpecialArgs = { inherit inputs; }; - useGlobalPkgs = true; - useUserPackages = true; - backupFileExtension = "bak"; - - users = lib.mapAttrs (name: user: import user.path) config.szpont.home-manager.users; - }; - }; -} diff --git a/modules/sys/core/localization.nix b/modules/sys/core/localization.nix deleted file mode 100644 index 232133d..0000000 --- a/modules/sys/core/localization.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ config, lib, ... }: -{ - options.szpont.locale = { - enable = lib.mkEnableOption "system localization (timezone and language)"; - - timeZone = lib.mkOption { - type = lib.types.str; - default = "Europe/Warsaw"; - description = "the system timezone."; - }; - - format = lib.mkOption { - type = lib.types.str; - default = "pl_PL.UTF-8"; - description = "the locale used for numbers, time, and measurements."; - }; - }; - - config = lib.mkIf config.szpont.locale.enable { - time.timeZone = config.szpont.locale.timeZone; - - i18n = { - defaultLocale = "en_US.UTF-8"; - - extraLocaleSettings = { - LC_TIME = config.szpont.locale.format; - LC_NUMERIC = config.szpont.locale.format; - LC_MONETARY = config.szpont.locale.format; - LC_PAPER = config.szpont.locale.format; - LC_MEASUREMENT = config.szpont.locale.format; - LC_COLLATE = config.szpont.locale.format; - LC_NAME = config.szpont.locale.format; - LC_ADDRESS = config.szpont.locale.format; - LC_TELEPHONE = config.szpont.locale.format; - LC_IDENTIFICATION = config.szpont.locale.format; - }; - }; - }; -} diff --git a/modules/sys/core/networking.nix b/modules/sys/core/networking.nix deleted file mode 100644 index 7964e8b..0000000 --- a/modules/sys/core/networking.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ config, lib, ... }: -{ - options.szpont.network = { - enable = lib.mkEnableOption "system-wide networking setup"; - - hostName = lib.mkOption { - type = lib.types.str; - default = "nixos"; - description = "The hostname for this specific machine."; - }; - }; - - config = lib.mkIf config.szpont.network.enable { - networking = { - hostName = config.szpont.network.hostName; - - networkmanager = { - enable = true; - wifi.macAddress = "stable-ssid"; - ethernet.macAddress = "stable-ssid"; - }; - - firewall = { - enable = true; - }; - }; - systemd.services."NetworkManager-wait-online".enable = false; - }; -} diff --git a/modules/sys/core/security.nix b/modules/sys/core/security.nix deleted file mode 100644 index b2b7827..0000000 --- a/modules/sys/core/security.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - options.szpont.security = { - enable = lib.mkEnableOption "core security services"; - }; - - config = lib.mkIf config.szpont.security.enable { - services.gnome.gnome-keyring.enable = true; - - security = { - polkit.enable = true; - rtkit.enable = true; - }; - - systemd.user.services.polkit-gnome-authentication-agent-1 = { - description = "gnome-polkit-authentication-agent-1"; - wantedBy = [ "graphical-session.target" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; - }; -} |
