From 0acb9c52eb8e2aac02393951babdd38fd4615d15 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Wed, 29 Jan 2025 19:47:50 -0600 Subject: [PATCH] task | nix-anywhere - further fixes --- deploy-host | 9 +++++---- nixos-anywhere/configuration-vm.nix | 2 +- nixos-anywhere/configuration-vps.nix | 13 ++++++++++++- nixos-anywhere/configuration.nix | 9 ++++++--- nixos-anywhere/flake.lock | 12 ++++++------ nixos-anywhere/flake.nix | 2 +- 6 files changed, 31 insertions(+), 16 deletions(-) diff --git a/deploy-host b/deploy-host index 457d250..5b932ef 100755 --- a/deploy-host +++ b/deploy-host @@ -25,6 +25,7 @@ fi cd ${nixanywhere} ssh-keygen -R ${ip} +nix flake update nix run github:nix-community/nixos-anywhere -- --flake .#${host} root@${ip} cd ${nixsrc} sleep 5 @@ -36,10 +37,10 @@ do notify-send --urgency=critical --icon=rocket "Log onto ${host} root/changeme and run nmcli if on WiFi" sleep 5 done -ssh-keygen -R ${ip} -ssh -o StrictHostKeyChecking=accept-new root@${ip} nixos-generate-config -# scp root@${ip}:/etc/nixos/hardware-configuration.nix hosts/${host}/hardware-configuration.nix -# git add hosts/${host}/hardware-configuration.nix +ssh-keygen -R ${ip} +ssh -o StrictHostKeyChecking=accept-new root@${ip} nixos-generate-config +scp root@${ip}:/etc/nixos/hardware-configuration.nix hosts/${host}/hardware-configuration.nix +git add hosts/${host}/hardware-configuration.nix # nixos-rebuild switch --flake .#${host} --target-host root@${ip} notify-send --urgency=critical --expire-time=0 --icon=cdrom "Remove boot iso" read -p 'remove iso from target' foo diff --git a/nixos-anywhere/configuration-vm.nix b/nixos-anywhere/configuration-vm.nix index 2b609d8..6d3f868 100644 --- a/nixos-anywhere/configuration-vm.nix +++ b/nixos-anywhere/configuration-vm.nix @@ -42,5 +42,5 @@ ]; }; - system.stateVersion = "23.11"; + system.stateVersion = "24.11"; } diff --git a/nixos-anywhere/configuration-vps.nix b/nixos-anywhere/configuration-vps.nix index 06baf59..14eee16 100644 --- a/nixos-anywhere/configuration-vps.nix +++ b/nixos-anywhere/configuration-vps.nix @@ -30,8 +30,19 @@ }; kernel = { sysctl = { "vm.swappiness" = 10; }; }; }; + +# Enable networking + networking.networkmanager.enable = true; + networking.enableIPv6 = true; + networking.useDHCP = false; services.openssh.enable = true; + # Set your time zone. + time = { + timeZone = "America/Chicago"; + hardwareClockInLocalTime = false; + }; + environment.systemPackages = map lib.lowPrio [ pkgs.curl pkgs.git pkgs.git-crypt ]; @@ -42,5 +53,5 @@ ]; }; - system.stateVersion = "23.11"; + system.stateVersion = "24.11"; } diff --git a/nixos-anywhere/configuration.nix b/nixos-anywhere/configuration.nix index 9b6af89..ed1b867 100644 --- a/nixos-anywhere/configuration.nix +++ b/nixos-anywhere/configuration.nix @@ -6,7 +6,7 @@ ]; disko.devices.disk.main.device = "/dev/nvme0n1"; boot = { - kernelPackages = pkgs.linuxPackages_latest; + kernelPackages = pkgs.linuxPackages_zen; kernelParams = [ "consoleblank=60" ]; # extraModulePackages = [config.boot.kernelPackages.ddcci-driver]; # kernelModules = ["i2c-dev" "ddcci_backlight"]; @@ -20,7 +20,10 @@ grub.enable = false; generic-extlinux-compatible.enable = true; }; - plymouth = { enable = true; }; + plymouth = { + enable = true; + theme = "breeze"; + }; kernel = { sysctl = { "vm.swappiness" = 10; }; }; }; @@ -50,5 +53,5 @@ ]; }; - system.stateVersion = "24.05"; + system.stateVersion = "24.11"; } diff --git a/nixos-anywhere/flake.lock b/nixos-anywhere/flake.lock index b6adc33..fa91afb 100644 --- a/nixos-anywhere/flake.lock +++ b/nixos-anywhere/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1726396892, - "narHash": "sha256-KRGuT5nGRAOT3heigRWg41tbYpTpapGhsWc+XjnIx0w=", + "lastModified": 1738148035, + "narHash": "sha256-KYOATYEwaKysL3HdHdS5kbQMXvzS4iPJzJrML+3TKAo=", "owner": "nix-community", "repo": "disko", - "rev": "51e3a7e51279fedfb6669a00d21dc5936c78a6ce", + "rev": "18d0a984cc2bc82cf61df19523a34ad463aa7f54", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726436956, - "narHash": "sha256-a3rP7uafX/qBFX0y4CGS8vvTPvxsLl9eZQ85DkIn3DI=", + "lastModified": 1738136902, + "narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "039b72d0c738c934e2e36d7fc5520d1b425287a6", + "rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c", "type": "github" }, "original": { diff --git a/nixos-anywhere/flake.nix b/nixos-anywhere/flake.nix index f0cf63f..a85f77d 100644 --- a/nixos-anywhere/flake.nix +++ b/nixos-anywhere/flake.nix @@ -4,7 +4,7 @@ inputs.disko.inputs.nixpkgs.follows = "nixpkgs"; outputs = { nixpkgs, disko, ... }: { - nixosConfigurations.smaug = nixpkgs.lib.nixosSystem { + nixosConfigurations.book = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ disko.nixosModules.disko ./configuration.nix ]; };