From 5b01a13f3e083f75788bc38d80efa10e0ff12d6d Mon Sep 17 00:00:00 2001 From: randomuser Date: Sun, 7 Jan 2024 22:16:14 -0600 Subject: [PATCH] please work --- boxes/virtbox/home.nix | 9 +++++++ boxes/x230t/default.nix | 18 ++++++++++++++ boxes/x230t/hardware-configuration.nix | 33 ++++++++++++++++++++++++++ boxes/x230t/home.nix | 9 +++++++ flake.lock | 4 ++-- flake.nix | 14 +++++++++++ 6 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 boxes/virtbox/home.nix create mode 100644 boxes/x230t/default.nix create mode 100644 boxes/x230t/hardware-configuration.nix create mode 100644 boxes/x230t/home.nix diff --git a/boxes/virtbox/home.nix b/boxes/virtbox/home.nix new file mode 100644 index 0000000..144dd0e --- /dev/null +++ b/boxes/virtbox/home.nix @@ -0,0 +1,9 @@ +{ lib, inputs, config, pkgs, home, ... }: + +{ + imports = [ + ../../home/x11.nix + ]; + + home.stateVersion = "23.11"; +} diff --git a/boxes/x230t/default.nix b/boxes/x230t/default.nix new file mode 100644 index 0000000..52ff85b --- /dev/null +++ b/boxes/x230t/default.nix @@ -0,0 +1,18 @@ +{ lib, config, pkgs, ...}: + +{ + imports = [ + ./hardware-configuration.nix + ../../modules/bootstrap.nix + ../../modules/common.nix + ../../modules/x11.nix + ../../modules/discord.nix + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + + networking.hostName = "x230t"; + + system.stateVersion = "23.11"; +} diff --git a/boxes/x230t/hardware-configuration.nix b/boxes/x230t/hardware-configuration.nix new file mode 100644 index 0000000..8cdbf9a --- /dev/null +++ b/boxes/x230t/hardware-configuration.nix @@ -0,0 +1,33 @@ +# 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" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/99d9f4ba-5781-4f2d-aa15-f1f911658913"; + fsType = "ext4"; + }; + + 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.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/boxes/x230t/home.nix b/boxes/x230t/home.nix new file mode 100644 index 0000000..144dd0e --- /dev/null +++ b/boxes/x230t/home.nix @@ -0,0 +1,9 @@ +{ lib, inputs, config, pkgs, home, ... }: + +{ + imports = [ + ../../home/x11.nix + ]; + + home.stateVersion = "23.11"; +} diff --git a/flake.lock b/flake.lock index bd34f52..de0501b 100644 --- a/flake.lock +++ b/flake.lock @@ -92,11 +92,11 @@ "locked": { "lastModified": 1, "narHash": "sha256-xCQE9SSKWjmoYOaIkzdlGULeGbEF9Gau5TPgYJxalmw=", - "path": "/nix/store/ngxkaia0jmb6bfn1i5blvqaggxb8sy3f-source/builds", + "path": "/nix/store/rg6mp8f9i9grfp47chg801vxzz4w564f-source/builds", "type": "path" }, "original": { - "path": "/nix/store/ngxkaia0jmb6bfn1i5blvqaggxb8sy3f-source/builds", + "path": "/nix/store/rg6mp8f9i9grfp47chg801vxzz4w564f-source/builds", "type": "path" } } diff --git a/flake.nix b/flake.nix index f1964c5..b1c801b 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,20 @@ } ]; }; + x230t = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./boxes/x230t + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.users.usr = import ./boxes/x230t/home.nix; + } + ]; + }; mainsail = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; };