From 5976e25e81a41779a44ffc39fa10c5bd147cc370 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 18 Sep 2022 18:16:34 +0200 Subject: [PATCH] turns out i needed to use flakes --- .gitignore | 1 - configuration.nix | 8 +------- flake.nix | 16 +++++++++++++++- hardware-configuration/iota.nix | 6 ++++++ hardware-configuration/tau.nix | 6 ++++++ 5 files changed, 28 insertions(+), 9 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 577b0a0..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index 00dd909..baadb98 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,7 +7,6 @@ { imports = [ - ./hardware-configuration.nix ./kakoune.nix ]; @@ -18,12 +17,7 @@ ''; }; - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.efi.efiSysMountPoint = "/boot/efi"; - networking.hostName = "iota"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary @@ -238,7 +232,7 @@ $NEW_PROMPT_COMMAND" toupper = "tr [:lower:] [:upper:]"; tolower = "tr [:upper:] [:lower:]"; rebuild = '' - sudo sh -c "cd $HOME/.local/os && nixos-rebuild switch --flake .#iota --use-remote-sudo" + sudo sh -c "cd $HOME/.local/os && nixos-rebuild switch --flake .# --use-remote-sudo" ''; }; programs.bash.sessionVariables = { diff --git a/flake.nix b/flake.nix index 07ba640..966296c 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,21 @@ modules = [ home.nixosModules.home-manager { - imports = [./configuration.nix]; + imports = [ + ./configuration.nix + ./hardware-configuration/iota.nix + ]; + }]; + }; + nixosConfigurations.tau = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + home.nixosModules.home-manager + { + imports = [ + ./configuration.nix + ./hardware-configuration/tau.nix + ]; }]; }; diff --git a/hardware-configuration/iota.nix b/hardware-configuration/iota.nix index b12ed31..31d0870 100644 --- a/hardware-configuration/iota.nix +++ b/hardware-configuration/iota.nix @@ -33,7 +33,13 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true; + networking.hostName = "iota"; # Define your hostname. powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; } diff --git a/hardware-configuration/tau.nix b/hardware-configuration/tau.nix index 54f1bcd..18ea2a2 100644 --- a/hardware-configuration/tau.nix +++ b/hardware-configuration/tau.nix @@ -35,7 +35,13 @@ # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; # networking.interfaces.wlp58s0.useDHCP = lib.mkDefault true; # networking.interfaces.wwp0s20f0u6i12.useDHCP = lib.mkDefault true; + networking.hostName = "tau"; # Define your hostname. powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; }