diff --git a/common.nix b/common.nix index 3cd000d..7eb494e 100644 --- a/common.nix +++ b/common.nix @@ -145,8 +145,5 @@ with builtins; networking.firewall.allowedTCPPorts = [ 8384 22000 ]; networking.firewall.allowedUDPPorts = [ 8080 22000 21027 ]; systemd.services."NetworkManager-wait-online".enable = false; - - # release channel - system.stateVersion = "22.05"; # Did you read the comment? } diff --git a/flake.lock b/flake.lock index 12f0417..5debe74 100644 --- a/flake.lock +++ b/flake.lock @@ -19,6 +19,21 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1661947070, + "narHash": "sha256-o6PhPKlvgJ+mbSex3GbzR+raySh7Q9f9XPrzfMQrIxU=", + "owner": "kekrby", + "repo": "nixos-hardware", + "rev": "82de3f3c0910307dd3c665c87a8659c94a1200fa", + "type": "github" + }, + "original": { + "owner": "kekrby", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1654953433, @@ -54,6 +69,7 @@ "root": { "inputs": { "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2" } }, diff --git a/flake.nix b/flake.nix index a934c08..2d57201 100644 --- a/flake.nix +++ b/flake.nix @@ -10,7 +10,7 @@ nixos-hardware.url = github:kekrby/nixos-hardware; }; - outputs = { self, nixpkgs, home-manager, ... }: { + outputs = { self, nixpkgs, home-manager, nixos-hardware, ... }: { nixosConfigurations = { monosodium-glutamate-g = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; diff --git a/potatobook-g/configuration.nix b/potatobook-g/configuration.nix index c124f99..a7d668c 100644 --- a/potatobook-g/configuration.nix +++ b/potatobook-g/configuration.nix @@ -1,9 +1,8 @@ { config, pkgs, ... }: { imports = [ - - # ./t2.nix + ./hardware-configuration.nix ../common.nix ]; @@ -23,6 +22,10 @@ desktop.compositing = true; }; +boot.loader.systemd-boot.enable = true; +boot.loader.efi.canTouchEfiVariables = true; + +networking.networkmanager.enable = true; networking.hostName = "potatobook-g"; @@ -55,7 +58,7 @@ # networking.firewall.allowedTCPPorts = [ 4713 ]; systemd.services."NetworkManager-wait-online".enable = false; - # release channel - system.stateVersion = "22.05"; # Did you read the comment? + # i rly should put that important big comment back here + system.stateVersion = "22.11"; # Did you read the comment? } diff --git a/potatobook-g/hardware-configuration.nix b/potatobook-g/hardware-configuration.nix new file mode 100644 index 0000000..130ce65 --- /dev/null +++ b/potatobook-g/hardware-configuration.nix @@ -0,0 +1,54 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "uas" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5F66-17ED"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0f1u1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlan0.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; + # high-resolution display + hardware.video.hidpi.enable = lib.mkDefault true; +}