diff --git a/homeManagerModules/desktop/hyprland/default.nix b/homeManagerModules/desktop/hyprland/default.nix index 7457156c..9d5619d3 100644 --- a/homeManagerModules/desktop/hyprland/default.nix +++ b/homeManagerModules/desktop/hyprland/default.nix @@ -5,18 +5,6 @@ ... }: { config = lib.mkIf config.alyraffauf.desktop.hyprland.enable { - alyraffauf = { - desktop = { - waylandComp = lib.mkDefault true; - }; - }; - - xdg.portal = { - enable = true; - configPackages = [pkgs.xdg-desktop-portal-hyprland]; - extraPortals = [pkgs.xdg-desktop-portal-hyprland]; - }; - programs.waybar = { settings = { mainBar = { diff --git a/homeManagerModules/desktop/sway/default.nix b/homeManagerModules/desktop/sway/default.nix index fe0ec8d6..040528db 100644 --- a/homeManagerModules/desktop/sway/default.nix +++ b/homeManagerModules/desktop/sway/default.nix @@ -29,12 +29,6 @@ }; config = lib.mkIf config.alyraffauf.desktop.sway.enable { - alyraffauf = { - desktop = { - waylandComp = lib.mkDefault true; - }; - }; - programs.waybar = { settings = { mainBar = { diff --git a/homeManagerModules/desktop/waylandComp.nix b/homeManagerModules/desktop/waylandComp.nix index 7c5e53f2..43eb3da7 100644 --- a/homeManagerModules/desktop/waylandComp.nix +++ b/homeManagerModules/desktop/waylandComp.nix @@ -5,10 +5,6 @@ ... }: { config = lib.mkIf config.alyraffauf.desktop.waylandComp { - home.packages = with pkgs; [ - swayosd - networkmanagerapplet - ]; alyraffauf = { apps = { fuzzel.enable = lib.mkDefault true; @@ -28,5 +24,18 @@ "org/gnome/nm-applet".disable-connected-notifications = true; }; }; + + home.packages = with pkgs; [ + swayosd + networkmanagerapplet + ]; + + xdg.portal = { + enable = true; + configPackages = + lib.optionals (config.alyraffauf.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; + extraPortals = + lib.optionals (config.alyraffauf.desktop.hyprland.enable) [pkgs.xdg-desktop-portal-hyprland]; + }; }; } diff --git a/homeManagerModules/options.nix b/homeManagerModules/options.nix index 33b5815c..22e3ac11 100644 --- a/homeManagerModules/options.nix +++ b/homeManagerModules/options.nix @@ -216,9 +216,12 @@ }; }; }; - - waylandComp = - lib.mkEnableOption "Shared configuration for wayland compositors."; + waylandComp = lib.mkOption { + description = "Shared defaults for wayland compositors."; + default = + config.alyraffauf.desktop.hyprland.enable || config.alyraffauf.desktop.sway.enable; + type = lib.types.bool; + }; }; scripts = { pp-adjuster.enable = lib.mkEnableOption "pp-adjuster script."; diff --git a/hosts/fallarbor/default.nix b/hosts/fallarbor/default.nix index d057ef3d..5416018f 100644 --- a/hosts/fallarbor/default.nix +++ b/hosts/fallarbor/default.nix @@ -37,7 +37,8 @@ }; tailscale.enable = true; }; - system = { + base = { + enable = true; plymouth.enable = true; zramSwap = {enable = true;}; }; diff --git a/hosts/lavaridge/default.nix b/hosts/lavaridge/default.nix index 61b6e4b4..c135f4ec 100644 --- a/hosts/lavaridge/default.nix +++ b/hosts/lavaridge/default.nix @@ -29,7 +29,8 @@ }; alyraffauf = { - system = { + base = { + enable = true; plymouth.enable = true; zramSwap = {enable = true;}; }; diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index f7ea298a..a1f68f53 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -82,7 +82,8 @@ in { scripts = { hoenn.enable = true; }; - system = { + base = { + enable = true; plymouth.enable = true; zramSwap = { enable = true; diff --git a/hosts/petalburg/default.nix b/hosts/petalburg/default.nix index e166627b..a8d252a8 100644 --- a/hosts/petalburg/default.nix +++ b/hosts/petalburg/default.nix @@ -25,7 +25,8 @@ networking.hostName = "petalburg"; # Define your hostname. alyraffauf = { - system = { + base = { + enable = true; plymouth.enable = true; zramSwap = {enable = true;}; }; diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index 72fa6181..763bb2a3 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -22,7 +22,8 @@ networking.hostName = "rustboro"; # Define your hostname. alyraffauf = { - system = { + base = { + enable = true; plymouth.enable = true; zramSwap = { enable = true; diff --git a/nixosModules/base/default.nix b/nixosModules/base/default.nix new file mode 100644 index 00000000..104f2b1c --- /dev/null +++ b/nixosModules/base/default.nix @@ -0,0 +1,101 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: { + imports = [ + ./networking + ./nix + ./nixpkgs + ./plymouth + ./power-profiles-daemon + ./sound + ./zramSwap + ]; + + config = lib.mkIf config.alyraffauf.base.enable { + console = { + colors = [ + "303446" + "e78284" + "a6d189" + "e5c890" + "8caaee" + "f4b8e4" + "81c8be" + "b5bfe2" + "626880" + "303446" + "e78284" + "a6d189" + "e5c890" + "8caaee" + "f4b8e4" + "81c8be" + "a5adce" + ]; + useXkbConfig = true; + }; + + environment.systemPackages = [inputs.agenix.packages.${pkgs.system}.default]; + + i18n = { + defaultLocale = lib.mkDefault "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = config.i18n.defaultLocale; + LC_IDENTIFICATION = config.i18n.defaultLocale; + LC_MEASUREMENT = config.i18n.defaultLocale; + LC_MONETARY = config.i18n.defaultLocale; + LC_NAME = config.i18n.defaultLocale; + LC_NUMERIC = config.i18n.defaultLocale; + LC_PAPER = config.i18n.defaultLocale; + LC_TELEPHONE = config.i18n.defaultLocale; + LC_TIME = config.i18n.defaultLocale; + }; + }; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + hardware = { + # Add support for logitech unifying receivers. + logitech.wireless = { + enable = true; + enableGraphical = true; + }; + keyboard.qmk.enable = true; + }; + + services = { + logind.extraConfig = '' + # Don't shutdown when power button is short-pressed + HandlePowerKey=suspend + HandlePowerKeyLongPress=poweroff + ''; + }; + + security = { + polkit.enable = true; + rtkit.enable = true; + }; + + system.autoUpgrade = { + allowReboot = true; + dates = "04:00"; + randomizedDelaySec = "20min"; + enable = true; + flake = "github:alyraffauf/nixcfg"; + operation = "boot"; + rebootWindow = { + lower = "02:00"; + upper = "05:00"; + }; + }; + + time.timeZone = "America/New_York"; + }; +} diff --git a/nixosModules/base/networking/default.nix b/nixosModules/base/networking/default.nix new file mode 100644 index 00000000..b47baaeb --- /dev/null +++ b/nixosModules/base/networking/default.nix @@ -0,0 +1,98 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.alyraffauf.base.enable { + age.secrets.wifi.file = ../../../secrets/wifi.age; + + hardware = { + bluetooth.enable = true; + }; + + networking.networkmanager = { + enable = true; + + ensureProfiles = { + environmentFiles = [ + config.age.secrets.wifi.path + ]; + profiles = { + Stargate-Discovery = { + connection = { + id = "Stargate-Discovery"; + type = "wifi"; + }; + wifi.ssid = "Stargate-Discovery"; + wifi-security = { + auth-alg = "open"; + key-mgmt = "wpa-psk"; + psk = "$StargateDiscoveryPSK"; + }; + }; + wattson = { + connection = { + id = "wattson"; + type = "wifi"; + }; + wifi.ssid = "wattson"; + wifi-security = { + auth-alg = "open"; + key-mgmt = "wpa-psk"; + psk = "$wattsonPSK"; + }; + }; + "Dustin’s iPhone" = { + connection = { + id = "Dustin’s iPhone"; + type = "wifi"; + }; + wifi.ssid = "Dustin’s iPhone"; + wifi-security = { + auth-alg = "open"; + key-mgmt = "wpa-psk"; + psk = "$DustinsiPhonePSK"; + }; + }; + WeWorkWiFi = { + "802-1x" = { + eap = "peap;"; + identity = "$WeWorkWiFiIdentity"; + password = "$WeWorkWiFiPassword"; + phase2-auth = "mschapv2"; + }; + connection = { + id = "WeWorkWiFi"; + type = "wifi"; + }; + wifi.ssid = "WeWorkWiFi"; + wifi-security.key-mgmt = "wpa-eap"; + }; + }; + }; + }; + + services = { + avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + publish = { + enable = true; + addresses = true; + userServices = true; + workstation = true; + }; + }; + + openssh = { + enable = true; + openFirewall = true; + }; + + printing.enable = true; + }; + }; +} diff --git a/nixosModules/base/nix/default.nix b/nixosModules/base/nix/default.nix new file mode 100644 index 00000000..32d52a24 --- /dev/null +++ b/nixosModules/base/nix/default.nix @@ -0,0 +1,45 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.alyraffauf.base.enable { + nix = { + gc = { + automatic = true; + dates = "daily"; + options = "--delete-older-than 3d"; + persistent = true; + randomizedDelaySec = "60min"; + }; + + # Run GC when there is less than 100MiB left. + extraOptions = '' + min-free = ${toString (100 * 1024 * 1024)} + max-free = ${toString (1024 * 1024 * 1024)} + ''; + + optimise.automatic = true; + + settings = { + auto-optimise-store = false; + experimental-features = ["nix-command" "flakes"]; + + substituters = [ + "https://nixcache.raffauflabs.com" + "https://hyprland.cachix.org" + "https://cache.nixos.org/" + ]; + + trusted-public-keys = [ + "nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8=" + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + ]; + + trusted-users = ["aly"]; + }; + }; + }; +} diff --git a/nixosModules/base/nixpkgs/default.nix b/nixosModules/base/nixpkgs/default.nix new file mode 100644 index 00000000..c96f4796 --- /dev/null +++ b/nixosModules/base/nixpkgs/default.nix @@ -0,0 +1,62 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.alyraffauf.base.enable { + nixpkgs = let + unstable = import inputs.nixpkgsUnstable { + system = pkgs.system; + config.allowUnfree = true; # Allow unfree packages + }; + in { + config.allowUnfree = true; # Allow unfree packages + + # Overlays over default packages. + overlays = [ + (final: prev: { + audiobookshelf = unstable.audiobookshelf; + brave = prev.brave.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";}; + catppuccin-gtk = prev.catppuccin-gtk.override { + accents = ["mauve"]; + size = "compact"; + variant = "frappe"; + tweaks = ["normal"]; + }; + catppuccin-kvantum = prev.catppuccin-kvantum.override { + accent = "Mauve"; + variant = "Frappe"; + }; + catppuccin-papirus-folders = prev.catppuccin-papirus-folders.override { + flavor = "frappe"; + accent = "mauve"; + }; + catppuccin-plymouth = prev.catppuccin-plymouth.override {variant = "frappe";}; + nerdfonts = prev.nerdfonts.override {fonts = ["Noto"];}; + google-chrome = prev.google-chrome.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";}; + hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland; + hyprnome = unstable.hyprnome; + hyprshot = unstable.hyprshot; + xdg-desktop-portal-hyprland = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; + obsidian = unstable.obsidian.overrideAttrs (old: { + installPhase = + builtins.replaceStrings ["--ozone-platform=wayland"] + ["--ozone-platform=wayland --enable-wayland-ime"] + old.installPhase; + }); + sway = unstable.sway; + swayfx = unstable.swayfx; + vscodium = prev.vscodium.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";}; + webcord = prev.webcord.overrideAttrs (old: { + installPhase = + builtins.replaceStrings ["--ozone-platform-hint=auto"] + ["--ozone-platform-hint=auto --enable-wayland-ime"] + old.installPhase; + }); + }) + ]; + }; + }; +} diff --git a/nixosModules/system/plymouth/default.nix b/nixosModules/base/plymouth/default.nix similarity index 83% rename from nixosModules/system/plymouth/default.nix rename to nixosModules/base/plymouth/default.nix index 5ec661dc..fb662adb 100644 --- a/nixosModules/system/plymouth/default.nix +++ b/nixosModules/base/plymouth/default.nix @@ -1,10 +1,11 @@ { - pkgs, - lib, config, + inputs, + lib, + pkgs, ... }: { - config = lib.mkIf config.alyraffauf.system.plymouth.enable { + config = lib.mkIf config.alyraffauf.base.plymouth.enable { boot = { consoleLogLevel = 0; initrd.verbose = false; diff --git a/nixosModules/system/power-profiles-daemon/default.nix b/nixosModules/base/power-profiles-daemon/default.nix similarity index 62% rename from nixosModules/system/power-profiles-daemon/default.nix rename to nixosModules/base/power-profiles-daemon/default.nix index 05225608..049dc662 100644 --- a/nixosModules/system/power-profiles-daemon/default.nix +++ b/nixosModules/base/power-profiles-daemon/default.nix @@ -1,10 +1,11 @@ { - pkgs, - lib, config, + inputs, + lib, + pkgs, ... }: { - config = lib.mkIf config.alyraffauf.system.power-profiles-daemon.enable { + config = lib.mkIf config.alyraffauf.base.power-profiles-daemon.enable { services = { power-profiles-daemon.enable = true; upower.enable = true; diff --git a/nixosModules/base/sound/default.nix b/nixosModules/base/sound/default.nix new file mode 100644 index 00000000..68e51a46 --- /dev/null +++ b/nixosModules/base/sound/default.nix @@ -0,0 +1,27 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.alyraffauf.base.enable { + hardware.pulseaudio = { + enable = lib.mkForce false; + package = pkgs.pulseaudioFull; + }; + + services = { + pipewire = { + enable = true; + alsa = { + enable = true; + support32Bit = true; + }; + pulse.enable = true; + }; + }; + + sound.enable = true; + }; +} diff --git a/nixosModules/base/zramSwap/default.nix b/nixosModules/base/zramSwap/default.nix new file mode 100644 index 00000000..e0c2bfd2 --- /dev/null +++ b/nixosModules/base/zramSwap/default.nix @@ -0,0 +1,13 @@ +{ + config, + lib, + pkgs, + ... +}: { + config = lib.mkIf config.alyraffauf.base.zramSwap.enable { + zramSwap = { + enable = true; + memoryPercent = config.alyraffauf.base.zramSwap.size; + }; + }; +} diff --git a/nixosModules/default.nix b/nixosModules/default.nix index 86c55d12..47c3557f 100644 --- a/nixosModules/default.nix +++ b/nixosModules/default.nix @@ -3,63 +3,15 @@ inputs: { pkgs, lib, ... -}: let - unstable = import inputs.nixpkgsUnstable { - system = pkgs.system; - config.allowUnfree = true; - }; -in { +}: { imports = [ ./apps + ./base ./containers ./desktop ./options.nix ./scripts ./services - ./system ./users ]; - - nixpkgs.overlays = [ - (final: prev: { - audiobookshelf = unstable.audiobookshelf; - brave = prev.brave.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";}; - catppuccin-gtk = prev.catppuccin-gtk.override { - accents = ["mauve"]; - size = "compact"; - variant = "frappe"; - tweaks = ["normal"]; - }; - catppuccin-kvantum = prev.catppuccin-kvantum.override { - accent = "Mauve"; - variant = "Frappe"; - }; - catppuccin-papirus-folders = prev.catppuccin-papirus-folders.override { - flavor = "frappe"; - accent = "mauve"; - }; - catppuccin-plymouth = prev.catppuccin-plymouth.override {variant = "frappe";}; - nerdfonts = prev.nerdfonts.override {fonts = ["Noto"];}; - google-chrome = prev.google-chrome.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";}; - hyprland = inputs.hyprland.packages.${pkgs.system}.hyprland; - hyprnome = unstable.hyprnome; - hyprshot = unstable.hyprshot; - xdg-desktop-portal-hyprland = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland; - obsidian = unstable.obsidian.overrideAttrs (old: { - installPhase = - builtins.replaceStrings ["--ozone-platform=wayland"] - ["--ozone-platform=wayland --enable-wayland-ime"] - old.installPhase; - }); - sway = unstable.sway; - swayfx = unstable.swayfx; - vscodium = prev.vscodium.override {commandLineArgs = "--gtk-version=4 --enable-wayland-ime";}; - webcord = prev.webcord.overrideAttrs (old: { - installPhase = - builtins.replaceStrings ["--ozone-platform-hint=auto"] - ["--ozone-platform-hint=auto --enable-wayland-ime"] - old.installPhase; - }); - }) - ]; } diff --git a/nixosModules/desktop/hyprland/default.nix b/nixosModules/desktop/hyprland/default.nix index 350b56db..6f232035 100644 --- a/nixosModules/desktop/hyprland/default.nix +++ b/nixosModules/desktop/hyprland/default.nix @@ -5,8 +5,6 @@ ... }: { config = lib.mkIf config.alyraffauf.desktop.hyprland.enable { - alyraffauf.desktop.waylandComp.enable = lib.mkDefault true; - programs = { hyprland = { enable = true; diff --git a/nixosModules/desktop/sway/default.nix b/nixosModules/desktop/sway/default.nix index ecddc778..6b0abb55 100644 --- a/nixosModules/desktop/sway/default.nix +++ b/nixosModules/desktop/sway/default.nix @@ -6,8 +6,6 @@ ... }: { config = lib.mkIf config.alyraffauf.desktop.sway.enable { - alyraffauf.desktop.waylandComp.enable = lib.mkDefault true; - programs = { sway = { enable = true; diff --git a/nixosModules/desktop/waylandComp.nix b/nixosModules/desktop/waylandComp.nix index f753b580..7beb90e8 100644 --- a/nixosModules/desktop/waylandComp.nix +++ b/nixosModules/desktop/waylandComp.nix @@ -5,7 +5,7 @@ config, ... }: { - config = lib.mkIf config.alyraffauf.desktop.waylandComp.enable { + config = lib.mkIf config.alyraffauf.desktop.waylandComp { programs = { gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3; }; diff --git a/nixosModules/options.nix b/nixosModules/options.nix index 21d318b5..32fcb4bb 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -18,6 +18,10 @@ virt-manager.enable = lib.mkEnableOption "Virt-manager with TPM and EFI support."; }; + + base.enable = + lib.mkEnableOption "Basic system configuration and sane defaults."; + containers = { nixos = { audiobookshelf = { @@ -178,8 +182,13 @@ lib.mkEnableOption "Plasma desktop session."; sway.enable = lib.mkEnableOption "Sway wayland session."; - waylandComp.enable = - lib.mkEnableOption "Shared defaults for wayland compositors."; + waylandComp = lib.mkOption { + description = "Shared defaults for wayland compositors."; + default = + config.alyraffauf.desktop.hyprland.enable + || config.alyraffauf.desktop.sway.enable; + type = lib.types.bool; + }; }; scripts.hoenn.enable = lib.mkEnableOption "Hoenn system configuration script"; @@ -220,11 +229,14 @@ }; tailscale.enable = lib.mkEnableOption "Enable Tailscale"; }; - system = { + base = { plymouth.enable = lib.mkEnableOption "Plymouth boot screen with catppuccin theme."; - power-profiles-daemon.enable = - lib.mkEnableOption "Power-profiles-daemon."; + power-profiles-daemon.enable = lib.mkOption { + description = "Power Profiles Daemon for power management."; + default = true; + type = lib.types.bool; + }; zramSwap = { enable = lib.mkEnableOption "Zram swap."; size = lib.mkOption { diff --git a/nixosModules/system/default.nix b/nixosModules/system/default.nix deleted file mode 100644 index 36973041..00000000 --- a/nixosModules/system/default.nix +++ /dev/null @@ -1,160 +0,0 @@ -{ - config, - inputs, - lib, - pkgs, - ... -}: { - imports = [./plymouth ./power-profiles-daemon ./zramSwap ./wifi.nix]; - - alyraffauf.system.power-profiles-daemon.enable = lib.mkDefault true; - - environment.systemPackages = [inputs.agenix.packages.${pkgs.system}.default]; - - console = { - colors = [ - "303446" - "e78284" - "a6d189" - "e5c890" - "8caaee" - "f4b8e4" - "81c8be" - "b5bfe2" - "626880" - "303446" - "e78284" - "a6d189" - "e5c890" - "8caaee" - "f4b8e4" - "81c8be" - "a5adce" - ]; - useXkbConfig = true; - }; - - time.timeZone = "America/New_York"; - - i18n = { - defaultLocale = lib.mkDefault "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = config.i18n.defaultLocale; - LC_IDENTIFICATION = config.i18n.defaultLocale; - LC_MEASUREMENT = config.i18n.defaultLocale; - LC_MONETARY = config.i18n.defaultLocale; - LC_NAME = config.i18n.defaultLocale; - LC_NUMERIC = config.i18n.defaultLocale; - LC_PAPER = config.i18n.defaultLocale; - LC_TELEPHONE = config.i18n.defaultLocale; - LC_TIME = config.i18n.defaultLocale; - }; - }; - - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - - hardware = { - bluetooth.enable = true; - # Add support for logitech unifying receivers. - logitech.wireless = { - enable = true; - enableGraphical = true; - }; - keyboard.qmk.enable = true; - - pulseaudio = { - enable = lib.mkForce false; - package = pkgs.pulseaudioFull; - }; - }; - - sound.enable = true; - - networking = { - networkmanager.enable = true; - }; - - services = { - logind.extraConfig = '' - # Don't shutdown when power button is short-pressed - HandlePowerKey=suspend - HandlePowerKeyLongPress=poweroff - ''; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - avahi = { - enable = true; - nssmdns4 = true; - openFirewall = true; - publish = { - enable = true; - addresses = true; - userServices = true; - workstation = true; - }; - }; - openssh = { - enable = true; - openFirewall = true; - }; - printing.enable = true; - }; - - security = { - polkit.enable = true; - rtkit.enable = true; - }; - - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - - system.autoUpgrade = { - allowReboot = true; - dates = "04:00"; - randomizedDelaySec = "20min"; - enable = true; - flake = "github:alyraffauf/nixcfg"; - operation = "boot"; - rebootWindow = { - lower = "02:00"; - upper = "05:00"; - }; - }; - - nix = { - optimise.automatic = true; - gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 3d"; - persistent = true; - randomizedDelaySec = "60min"; - }; - # Run GC when there is less than 100MiB left. - extraOptions = '' - min-free = ${toString (100 * 1024 * 1024)} - max-free = ${toString (1024 * 1024 * 1024)} - ''; - settings = { - auto-optimise-store = false; - experimental-features = ["nix-command" "flakes"]; - substituters = [ - "https://nixcache.raffauflabs.com" - "https://hyprland.cachix.org" - "https://cache.nixos.org/" - ]; - trusted-public-keys = [ - "nixcache.raffauflabs.com:yFIuJde/izA4aUDI3MZmBLzynEsqVCT1OfCUghOLlt8=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - ]; - trusted-users = ["aly"]; - }; - }; -} diff --git a/nixosModules/system/wifi.nix b/nixosModules/system/wifi.nix deleted file mode 100644 index f3c9e767..00000000 --- a/nixosModules/system/wifi.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - config, - inputs, - lib, - pkgs, - ... -}: { - age.secrets.wifi.file = ../../secrets/wifi.age; - - networking.networkmanager = { - ensureProfiles = { - environmentFiles = [ - config.age.secrets.wifi.path - ]; - profiles = { - Stargate-Discovery = { - connection = { - id = "Stargate-Discovery"; - type = "wifi"; - }; - wifi.ssid = "Stargate-Discovery"; - wifi-security = { - auth-alg = "open"; - key-mgmt = "wpa-psk"; - psk = "$StargateDiscoveryPSK"; - }; - }; - wattson = { - connection = { - id = "wattson"; - type = "wifi"; - }; - wifi.ssid = "wattson"; - wifi-security = { - auth-alg = "open"; - key-mgmt = "wpa-psk"; - psk = "$wattsonPSK"; - }; - }; - "Dustin’s iPhone" = { - connection = { - id = "Dustin’s iPhone"; - type = "wifi"; - }; - wifi.ssid = "Dustin’s iPhone"; - wifi-security = { - auth-alg = "open"; - key-mgmt = "wpa-psk"; - psk = "$DustinsiPhonePSK"; - }; - }; - WeWorkWiFi = { - "802-1x" = { - eap = "peap;"; - identity = "$WeWorkWiFiIdentity"; - password = "$WeWorkWiFiPassword"; - phase2-auth = "mschapv2"; - }; - connection = { - id = "WeWorkWiFi"; - type = "wifi"; - }; - wifi.ssid = "WeWorkWiFi"; - wifi-security.key-mgmt = "wpa-eap"; - }; - }; - }; - }; -} diff --git a/nixosModules/system/zramSwap/default.nix b/nixosModules/system/zramSwap/default.nix deleted file mode 100644 index bcfb6005..00000000 --- a/nixosModules/system/zramSwap/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - config = lib.mkIf config.alyraffauf.system.zramSwap.enable { - zramSwap = { - enable = true; - memoryPercent = config.alyraffauf.system.zramSwap.size; - }; - }; -}