diff --git a/flake.nix b/flake.nix index b98a51d..f3aab68 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ ./common/locale.nix ./common/remote-access.nix ./roles/graphical.nix + ./roles/latex.nix #./roles/gaming.nix ./roles/devel.nix ./roles/yggdrasil-client.nix @@ -32,6 +33,26 @@ ]; }; + # Vetus = iMac 27" 2017, i5, 64 GB RAM + nixosConfigurations."vetus" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + home-manager.nixosModules.home-manager + ./common/base.nix + ./common/user.nix + ./common/laptop.nix + ./common/networking.nix + ./common/locale.nix + ./common/remote-access.nix + ./roles/graphical.nix + ./roles/latex.nix + #./roles/gaming.nix + ./roles/devel.nix + ./roles/yggdrasil-client.nix + ./machines/vetus/configuration.nix + ./machines/vetus/hardware.nix + ]; + }; /* These machines will be configured later. */ /* # Celerrime = MacBook Air M2 @@ -57,18 +78,6 @@ ./machines/effundam/hardware.nix ]; }; - # Vetus = iMac 27" 2017, i5, 64 GB RAM - nixosConfigurations."vetus" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./common/base.nix - ./common/user.nix - ./roles/graphical.nix - ./roles/gaming.nix - ./machines/vetus/configuration.nix - ./machines/vetus/hardware.nix - ]; - }; */ }; } \ No newline at end of file diff --git a/machines/vetus/configuration.nix b/machines/vetus/configuration.nix new file mode 100644 index 0000000..800cf08 --- /dev/null +++ b/machines/vetus/configuration.nix @@ -0,0 +1,14 @@ + +{ config, pkgs, ... }: + +{ + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "vetus"; + time.timeZone = "Europe/Moscow"; + + system.stateVersion = "23.05"; +} + diff --git a/machines/vetus/hardware.nix b/machines/vetus/hardware.nix new file mode 100644 index 0000000..fdebbdd --- /dev/null +++ b/machines/vetus/hardware.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/hardware/network/broadcom-43xx.nix") + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = ["amdgpu"]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/nvme0n1p2"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B167-E1D3"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} \ No newline at end of file diff --git a/roles/latex.nix b/roles/latex.nix new file mode 100644 index 0000000..4607602 --- /dev/null +++ b/roles/latex.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + texlive.combined.scheme-full + ]; +} \ No newline at end of file