diff --git a/flake.lock b/flake.lock index bb082a3..14f7efc 100644 --- a/flake.lock +++ b/flake.lock @@ -918,11 +918,11 @@ ] }, "locked": { - "lastModified": 1747183784, - "narHash": "sha256-IVzf+PtiZYhCTSqG6wNxcIyZXIO78fDPWu/Rkwtm4Uk=", + "lastModified": 1747257007, + "narHash": "sha256-84q5eLj6QM0oUj1YvrT8TZH+RYIf/L/GJQDQ/tTvkR8=", "owner": "notashelf", "repo": "superfreq", - "rev": "78490f7c08146c037e414aec95c9a22364f70590", + "rev": "5531358da2b85cb4e3218ffb4b70373429e7c09e", "type": "github" }, "original": { diff --git a/hosts/default.nix b/hosts/default.nix index 820c9b6..e2001df 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -61,4 +61,8 @@ in { system = "aarch64-linux"; hostname = "tower"; }; + world = mkSystem { + system = "x86_64-linux"; + hostname = "world"; + }; } diff --git a/hosts/hermit/programs.nix b/hosts/hermit/programs.nix index 45ae53f..7009c3d 100644 --- a/hosts/hermit/programs.nix +++ b/hosts/hermit/programs.nix @@ -76,6 +76,7 @@ wireguard-tools wordgrinder xournalpp + zellij ; }; } diff --git a/hosts/world/configuration.nix b/hosts/world/configuration.nix new file mode 100644 index 0000000..a90fc5d --- /dev/null +++ b/hosts/world/configuration.nix @@ -0,0 +1,51 @@ +{ + lib, + pkgs, + ... +}: { + # Time Zone + time.timeZone = "Europe/Zurich"; + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + console.keyMap = "uk"; + security.polkit.enable = true; + programs.nix-ld.enable = false; + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + services = { + fstrim.enable = lib.mkDefault true; + thermald.enable = true; + }; + + modules = { + desktops.hyprland.enable = true; + + system = { + boot.systemd-boot.enable = true; + impermanence.enable = false; + hardware = { + intel.enable = true; + }; + programs = { + editors = { + helix.enable = true; + }; + terminals = { + foot.enable = true; + }; + }; + }; + services = { + kanata.enable = true; + }; + other = { + system.username = "cr"; + }; + programs = { + ssh.enable = true; + btop.enable = true; + nh.enable = true; + thunar.enable = true; + }; + }; + system.stateVersion = "23.11"; +} diff --git a/hosts/world/default.nix b/hosts/world/default.nix new file mode 100644 index 0000000..0312dc8 --- /dev/null +++ b/hosts/world/default.nix @@ -0,0 +1,8 @@ +_: { + imports = [ + ./configuration.nix + ./programs.nix + ./hardware-configuration.nix + ./hardware + ]; +} diff --git a/hosts/world/filesystem/default.nix b/hosts/world/filesystem/default.nix new file mode 100644 index 0000000..cef9c16 --- /dev/null +++ b/hosts/world/filesystem/default.nix @@ -0,0 +1,33 @@ +{ + config = { + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581"; + fileSystems = { + "/boot" = { + device = "/dev/disk/by-uuid/5D7D-FC52"; + fsType = "vfat"; + }; + + "/" = { + device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e"; + fsType = "btrfs"; + options = ["compress=zstd" "noatime"]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e"; + fsType = "btrfs"; + options = ["subvol=nix" "compress=zstd" "noatime"]; + }; + "/home" = { + device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e"; + fsType = "btrfs"; + options = ["subvol=home" "compress=zstd" "noatime"]; + }; + }; + # swapDevices = [ + # { + # device = "/swap/swapfile"; + # size = (1024 * 16) + (1024 * 2); + # } + # ]; + }; +} diff --git a/hosts/world/hardware-configuration.nix b/hosts/world/hardware-configuration.nix new file mode 100644 index 0000000..904ed89 --- /dev/null +++ b/hosts/world/hardware-configuration.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + modulesPath, + ... +}: { + imports = [ + # (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix") + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + initrd = { + availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; + kernelModules = []; + }; + kernelModules = ["kvm-intel"]; + blacklistedKernelModules = ["nouveau" "nvidia" "nvidia_drm" "nvidia_modeset"]; + + kernelParams = ["mem_sleep_default=deep"]; + extraModulePackages = []; + extraModprobeConfig = '' + blacklist nouveau + options nouveau modeset=0 + ''; + }; + + # Earlier font setup + console.earlySetup = true; + + # Enable firmware updates via `fwupdmgr`. + services.fwupd.enable = lib.mkDefault true; + + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/world/hardware/default.nix b/hosts/world/hardware/default.nix new file mode 100644 index 0000000..715273e --- /dev/null +++ b/hosts/world/hardware/default.nix @@ -0,0 +1 @@ +_: {imports = [./monitors.nix];} diff --git a/hosts/world/hardware/monitors.nix b/hosts/world/hardware/monitors.nix new file mode 100644 index 0000000..f29ff41 --- /dev/null +++ b/hosts/world/hardware/monitors.nix @@ -0,0 +1,16 @@ +_: { + modules.system.hardware.monitors = { + eDP-1 = { + resolution = { + x = 1920; + y = 1080; + }; + scale = 1; + refreshRate = 60; + position = { + x = 1920; + y = 0; + }; + }; + }; +} diff --git a/hosts/world/programs.nix b/hosts/world/programs.nix new file mode 100644 index 0000000..1400402 --- /dev/null +++ b/hosts/world/programs.nix @@ -0,0 +1,42 @@ +{ + self, + pkgs, + ... +}: { + environment.systemPackages = builtins.attrValues { + inherit + (pkgs) + calc + comma + difftastic + evince + eza + gcc + gh + grc + gparted + git + httpie + imagemagick + img2pdf + imv + inetutils + jujutsu + just + lazygit + libtool + librewolf + linuxHeaders + mpv + networkmanagerapplet + microfetch + nmap + pfetch + polkit + ripgrep + smartmontools + util-linux + wireguard-tools + ; + }; +} diff --git a/modules/system/boot/module.nix b/modules/system/boot/module.nix index 89b5b43..2da4a6b 100644 --- a/modules/system/boot/module.nix +++ b/modules/system/boot/module.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - inherit (lib.modules) mkForce; + inherit (lib.modules) mkForce mkDefault; inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) int; @@ -52,7 +52,7 @@ in { }; loader = { efi.canTouchEfiVariables = true; - timeout = cfg.timeout; + timeout = mkDefault cfg.timeout; systemd-boot = { enable = cfg.systemd-boot.enable; # INFO: Leaving this enabled is a security vulneratibility, diff --git a/modules/system/hardware/power.nix b/modules/system/hardware/power.nix index 47bb412..3b5ab91 100644 --- a/modules/system/hardware/power.nix +++ b/modules/system/hardware/power.nix @@ -29,6 +29,7 @@ in { hardware.acpilight.enable = false; + programs.superfreq.enable = true; services = { upower = { enable = true; @@ -50,7 +51,7 @@ in { }; auto-cpufreq = { - enable = true; + enable = false; settings = { charger = { governor = "performance"; diff --git a/packages/shell/packages.nix b/packages/shell/packages.nix index 8673a97..e11eef6 100644 --- a/packages/shell/packages.nix +++ b/packages/shell/packages.nix @@ -63,5 +63,6 @@ builtins.attrValues { figlet unzip zip + trash-cli ; }