From 85b42dc6d7e475b1794f5d669738f2ff28a9f69e Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Mon, 1 Apr 2024 15:12:39 +0000 Subject: [PATCH] conf --- flake.nix | 9 ++++++-- machines/laptop/update-config.sh | 6 ----- machines/{laptop => luna}/configuration.nix | 4 ++-- .../hardware-configuration.nix | 9 ++++---- machines/pc/update-config.sh | 6 ----- machines/{pc => terra}/configuration.nix | 22 ++----------------- .../{pc => terra}/hardware-configuration.nix | 0 7 files changed, 15 insertions(+), 41 deletions(-) delete mode 100644 machines/laptop/update-config.sh rename machines/{laptop => luna}/configuration.nix (97%) rename machines/{laptop => luna}/hardware-configuration.nix (81%) delete mode 100644 machines/pc/update-config.sh rename machines/{pc => terra}/configuration.nix (93%) rename machines/{pc => terra}/hardware-configuration.nix (100%) diff --git a/flake.nix b/flake.nix index 44521f2..b850f14 100644 --- a/flake.nix +++ b/flake.nix @@ -62,8 +62,13 @@ luna = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - # > Our main nixos configuration file < - ./nixos/configuration.nix + ./machines/luna/configuration.nix + ]; + }; + terra = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs;}; + modules = [ + ./machines/terra/configuration.nix ]; }; }; diff --git a/machines/laptop/update-config.sh b/machines/laptop/update-config.sh deleted file mode 100644 index d66c57b..0000000 --- a/machines/laptop/update-config.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!bin/bash - -cd /home/horseman/nix-config -git pull -sudo nixos-rebuild switch --flake .#laptop-koen -exit 0 diff --git a/machines/laptop/configuration.nix b/machines/luna/configuration.nix similarity index 97% rename from machines/laptop/configuration.nix rename to machines/luna/configuration.nix index 9708e4c..960f5b2 100644 --- a/machines/laptop/configuration.nix +++ b/machines/luna/configuration.nix @@ -31,7 +31,7 @@ extraSpecialArgs = { inherit inputs outputs; }; users = { # Import your home-manager configuration - horseman = import ../home-manager/home.nix; + horseman = import ../../home-manager/home.nix; }; }; @@ -82,7 +82,7 @@ auto-optimise-store = true; }; - networking.hostName = "laptop-koen"; + networking.hostName = "luna"; # time.timeZone = "Europe/Amsterdam"; diff --git a/machines/laptop/hardware-configuration.nix b/machines/luna/hardware-configuration.nix similarity index 81% rename from machines/laptop/hardware-configuration.nix rename to machines/luna/hardware-configuration.nix index c1cbcb0..2c7eff5 100644 --- a/machines/laptop/hardware-configuration.nix +++ b/machines/luna/hardware-configuration.nix @@ -8,23 +8,23 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/4c50d5fb-2734-4acf-9aa9-daa4dbd8c982"; + { device = "/dev/disk/by-uuid/5b1cef65-3c1b-4c46-b117-20271902390f"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7FE8-93C8"; + { device = "/dev/disk/by-uuid/0433-B98A"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/1a5004e0-dfcb-4986-aa3d-e2cc9e81f70b"; } + [ { device = "/dev/disk/by-uuid/6fbb72cf-415f-48f8-a850-5d91f6e7dae7"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -36,6 +36,5 @@ # networking.interfaces.wlo1.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; } diff --git a/machines/pc/update-config.sh b/machines/pc/update-config.sh deleted file mode 100644 index 6f231e7..0000000 --- a/machines/pc/update-config.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!bin/bash - -cd /home/horseman/nix-config -git pull -sudo nixos-rebuild switch --flake .#pc-koen -exit 0 diff --git a/machines/pc/configuration.nix b/machines/terra/configuration.nix similarity index 93% rename from machines/pc/configuration.nix rename to machines/terra/configuration.nix index a5a6a9f..6a1e0cc 100644 --- a/machines/pc/configuration.nix +++ b/machines/terra/configuration.nix @@ -74,7 +74,7 @@ extraSpecialArgs = { inherit inputs outputs; }; users = { # Import your home-manager configuration - horseman = import ../home-manager/home.nix; + horseman = import ../../home-manager/home.nix; }; }; @@ -125,7 +125,7 @@ auto-optimise-store = true; }; - networking.hostName = "pc-koen"; + networking.hostName = "terra"; # time.timeZone = "Europe/Amsterdam"; @@ -136,24 +136,6 @@ services.xserver.displayManager.gdm.enable = true; boot.loader.systemd-boot.enable = true; - systemd.timers."update-config" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "1m"; - Unit = "update-config.service"; - }; - }; - - systemd.services."update-config" = { - script = '' - ''; - serviceConfig = { - Type = "oneshot"; - User = "root"; - }; - }; - - # TODO: Configure your system-wide user settings (groups, etc), add more users as needed. users.users = { horseman = { diff --git a/machines/pc/hardware-configuration.nix b/machines/terra/hardware-configuration.nix similarity index 100% rename from machines/pc/hardware-configuration.nix rename to machines/terra/hardware-configuration.nix