Finished setup of another host

This commit is contained in:
Rolf Martin Glomsrud 2025-05-20 22:27:12 +02:00
parent 0c2774f089
commit 61cf99cb77
5 changed files with 60 additions and 7 deletions

View file

@ -1,5 +1,5 @@
#!/bin/bash
nixos-rebuild --impure --flake $(pwd)/$2#$2 --build-host $2@$1 --target-host $2@$1 --fast --use-remote-sudo switch
nixos-rebuild --impure --flake $(pwd)/$2#$2 --target-host $2@$1 --fast --use-remote-sudo switch

View file

@ -74,7 +74,7 @@
security.sudo.wheelNeedsPassword = false;
# Define a user account. Don't forget to set a password with passwd.
users.users.ares = {
users.users.hermes = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [

View file

@ -1,7 +1,7 @@
{
disko.devices = {
disk = {
vdb = {
disk0 = {
type = "disk";
device = "/dev/sda";
content = {
@ -37,9 +37,7 @@
};
};
};
};
disk1 = {
vdb = {
disk1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {

49
nixos/hermes/flake.lock Normal file
View file

@ -0,0 +1,49 @@
{
"nodes": {
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1746728054,
"narHash": "sha256-eDoSOhxGEm2PykZFa/x9QG5eTH0MJdiJ9aR00VAofXE=",
"owner": "nix-community",
"repo": "disko",
"rev": "ff442f5d1425feb86344c028298548024f21256d",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "latest",
"repo": "disko",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1747676747,
"narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "72841a4a8761d1aed92ef6169a636872c986c76d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -4,17 +4,23 @@
inputs = {
# NixOS official package source, using the nixos-24.11 branch here
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs: {
outputs = { self, nixpkgs, disko, ... }@inputs: {
# Please replace my-nixos with your hostname
nixosConfigurations.hermes = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# Import the previous configuration.nix we used,
# so the old configuration file still takes effect
disko.nixosModules.disko
./configuration.nix
./disko-config.nix
./hardware-configuration.nix
];
};
};