fileserver host

This commit is contained in:
Sam 2024-05-15 19:54:39 +01:00
parent dd837fb296
commit 648a4431a5
6 changed files with 17 additions and 39 deletions

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1715563999,
"narHash": "sha256-DDXZOKK0C5YeZ/GTUj7HiT+oqYIt8+qTsldaDvhWHFc=",
"lastModified": 1715756862,
"narHash": "sha256-cNGZK/RNvb29giR2KtnbwU5lx2Kw+wWqAaeWqfYlPts=",
"owner": "nix-community",
"repo": "disko",
"rev": "e972a78f4a49cd92075d64b6feeef64d26bf2996",
"rev": "cb1d6fba694ab3887600d606106f5a044ba1712c",
"type": "github"
},
"original": {

View File

@ -20,7 +20,7 @@
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
enableAutosuggestions = true;
syntaxHighlighting.enable = true;
shellAliases = {
@ -62,7 +62,7 @@
gtk.iconTheme.name = "GruvboxPlus";
qt.enable = true;
qt.platformTheme.name = "gtk";
#qt.platformTheme.name = "gtk";
qt.style.name = "adwaita-dark";
qt.style.package = pkgs.adwaita-qt;

View File

@ -1,6 +1,7 @@
{ pkgs, inputs, config, lib, ... }:
let
pubKeys = lib.filesystem.listFilesRecursive (../keys);
hostname = config.networking.hostName;
in
{
users.users.sam = {
@ -18,12 +19,17 @@ in
];
};
home-manager.users.sam = import ("../../../../home/${config.networking.hostName}.nix");
programs.zsh.enable = true;
#home-manager.users.sam =
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
sam = import ../../../../home/${hostname}.nix;
};
};
environment.systemPackages = [
pkgs.rsync
pkgs.curl

View File

@ -1,31 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/71f3bf73-5464-4a04-b301-b68a62e711a2";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@ -40,6 +40,8 @@
enableIPv6 = false;
};
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";

View File

@ -123,3 +123,4 @@ ssh "$username@$ip" "nix-shell -p git --run 'git clone git@git.bitlab21.com:sam/
ssh "$username@$ip" "nix-shell -p git --run 'git clone git@git.bitlab21.com:sam/nix-secrets.git'"
echo "Successfully installed Nixos on the target host!"
echo "Please remote into the new host and run 'sudo nixos-generate-config && cp /etc/nixos/hardware-configuration.nix /home/$username/nixos/hosts/$hostname/'"