task | nix-anywhere - further fixes

This commit is contained in:
Don Harper 2025-01-29 19:47:50 -06:00
parent 3d6b6ca751
commit 0acb9c52eb
6 changed files with 31 additions and 16 deletions

View file

@ -25,6 +25,7 @@ fi
cd ${nixanywhere} cd ${nixanywhere}
ssh-keygen -R ${ip} ssh-keygen -R ${ip}
nix flake update
nix run github:nix-community/nixos-anywhere -- --flake .#${host} root@${ip} nix run github:nix-community/nixos-anywhere -- --flake .#${host} root@${ip}
cd ${nixsrc} cd ${nixsrc}
sleep 5 sleep 5
@ -36,10 +37,10 @@ do
notify-send --urgency=critical --icon=rocket "Log onto ${host} root/changeme and run nmcli if on WiFi" notify-send --urgency=critical --icon=rocket "Log onto ${host} root/changeme and run nmcli if on WiFi"
sleep 5 sleep 5
done done
ssh-keygen -R ${ip} ssh-keygen -R ${ip}
ssh -o StrictHostKeyChecking=accept-new root@${ip} nixos-generate-config ssh -o StrictHostKeyChecking=accept-new root@${ip} nixos-generate-config
# scp root@${ip}:/etc/nixos/hardware-configuration.nix hosts/${host}/hardware-configuration.nix scp root@${ip}:/etc/nixos/hardware-configuration.nix hosts/${host}/hardware-configuration.nix
# git add hosts/${host}/hardware-configuration.nix git add hosts/${host}/hardware-configuration.nix
# nixos-rebuild switch --flake .#${host} --target-host root@${ip} # nixos-rebuild switch --flake .#${host} --target-host root@${ip}
notify-send --urgency=critical --expire-time=0 --icon=cdrom "Remove boot iso" notify-send --urgency=critical --expire-time=0 --icon=cdrom "Remove boot iso"
read -p 'remove iso from target' foo read -p 'remove iso from target' foo

View file

@ -42,5 +42,5 @@
]; ];
}; };
system.stateVersion = "23.11"; system.stateVersion = "24.11";
} }

View file

@ -30,8 +30,19 @@
}; };
kernel = { sysctl = { "vm.swappiness" = 10; }; }; kernel = { sysctl = { "vm.swappiness" = 10; }; };
}; };
# Enable networking
networking.networkmanager.enable = true;
networking.enableIPv6 = true;
networking.useDHCP = false;
services.openssh.enable = true; services.openssh.enable = true;
# Set your time zone.
time = {
timeZone = "America/Chicago";
hardwareClockInLocalTime = false;
};
environment.systemPackages = environment.systemPackages =
map lib.lowPrio [ pkgs.curl pkgs.git pkgs.git-crypt ]; map lib.lowPrio [ pkgs.curl pkgs.git pkgs.git-crypt ];
@ -42,5 +53,5 @@
]; ];
}; };
system.stateVersion = "23.11"; system.stateVersion = "24.11";
} }

View file

@ -6,7 +6,7 @@
]; ];
disko.devices.disk.main.device = "/dev/nvme0n1"; disko.devices.disk.main.device = "/dev/nvme0n1";
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_zen;
kernelParams = [ "consoleblank=60" ]; kernelParams = [ "consoleblank=60" ];
# extraModulePackages = [config.boot.kernelPackages.ddcci-driver]; # extraModulePackages = [config.boot.kernelPackages.ddcci-driver];
# kernelModules = ["i2c-dev" "ddcci_backlight"]; # kernelModules = ["i2c-dev" "ddcci_backlight"];
@ -20,7 +20,10 @@
grub.enable = false; grub.enable = false;
generic-extlinux-compatible.enable = true; generic-extlinux-compatible.enable = true;
}; };
plymouth = { enable = true; }; plymouth = {
enable = true;
theme = "breeze";
};
kernel = { sysctl = { "vm.swappiness" = 10; }; }; kernel = { sysctl = { "vm.swappiness" = 10; }; };
}; };
@ -50,5 +53,5 @@
]; ];
}; };
system.stateVersion = "24.05"; system.stateVersion = "24.11";
} }

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726396892, "lastModified": 1738148035,
"narHash": "sha256-KRGuT5nGRAOT3heigRWg41tbYpTpapGhsWc+XjnIx0w=", "narHash": "sha256-KYOATYEwaKysL3HdHdS5kbQMXvzS4iPJzJrML+3TKAo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "51e3a7e51279fedfb6669a00d21dc5936c78a6ce", "rev": "18d0a984cc2bc82cf61df19523a34ad463aa7f54",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1726436956, "lastModified": 1738136902,
"narHash": "sha256-a3rP7uafX/qBFX0y4CGS8vvTPvxsLl9eZQ85DkIn3DI=", "narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "039b72d0c738c934e2e36d7fc5520d1b425287a6", "rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -4,7 +4,7 @@
inputs.disko.inputs.nixpkgs.follows = "nixpkgs"; inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
outputs = { nixpkgs, disko, ... }: { outputs = { nixpkgs, disko, ... }: {
nixosConfigurations.smaug = nixpkgs.lib.nixosSystem { nixosConfigurations.book = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ disko.nixosModules.disko ./configuration.nix ]; modules = [ disko.nixosModules.disko ./configuration.nix ];
}; };