trying to install from deploy

This commit is contained in:
Anish L 2022-04-21 22:57:34 +10:00
parent 496d33cfb2
commit c88fc28da1
3 changed files with 84 additions and 26 deletions

View file

@ -2,60 +2,57 @@
{ {
imports = imports =
[ [ # Include the results of the hardware scan.
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.version = 2; boot.loader.grub.version = 2;
boot.loader.grub.devices = [ "/dev/vda" ]; # or "nodev" for efi only boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
networking.hostName = "cube"; # Define your hostname. networking.hostName = "cube"; # Define your hostname.
# Set your time zone.
time.timeZone = "Australia/Brisbane"; time.timeZone = "Australia/Brisbane";
# Use flakes # Use flakes
nix = { nix = {
trustedUsers = [ "root" "@wheel" ];
package = pkgs.nixFlakes; # or versioned attributes like nix_2_7 package = pkgs.nixFlakes; # or versioned attributes like nix_2_7
extraOptions = '' extraOptions = ''
experimental-features = nix-command flakes experimental-features = nix-command flakes
''; '';
}; };
# Install site
services."anish.lakhwara.com".enable = true;
security.acme.email = "anish+acme@lakhwara.com";
security.acme.acceptTerms = true;
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false; networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true; networking.interfaces.ens3.useDHCP = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.anish = { users.users.anish = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user. extraGroups = [ "wheel" ]; # Enable sudo for the user.
initialPassword = "SuperDuper";
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve" ]; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve" ];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim
gitAndTools.gitFull gitAndTools.gitFull
]; ];
services.openssh.enable = true; # services."anish.lakhwara.com".enable = true;
# security.acme.email = "anish+acme@lakhwara.com";
# security.acme.acceptTerms = true;
# THIS VALUE DETERMINES THE nixOS RELEASE FROM WHICH THE DEFAULT
# SETTINGS FOR STATEFUL DATA, LIKE FILE LOCATIONS AND DATABASE VERSIONS # Enable the OpenSSH daemon.
# ON YOUR SYSTEM WERE TAKEN. iTS PERFECTLY FINE AND RECOMMENDED TO LEAVE services.openssh.enable = true;
# THIS VALUE AT THE RELEASE VERSION OF THE FIRST INSTALL OF THIS SYSTEM. security.sudo.wheelNeedsPassword = false;
# BEFORE CHANGING THIS VALUE READ THE DOCUMENTATION FOR THIS OPTION
# (E.G. MAN CONFIGURATION.NIX OR ON HTTPS://NIXOS.ORG/NIXOS/OPTIONS.HTML). # This value determines the NixOS release from which the default
system.stateVersion = "21.11"; # DID YOU READ THE COMMENT? # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11"; # Did you read the comment?
} }

62
install-simple.sh Normal file
View file

@ -0,0 +1,62 @@
#!/usr/bin/env bash
# partition the files yourself sorry
sudo fatlabel /dev/vda1 NIXBOOT
sudo mkfs.ext4 /dev/vda2 -L NIXROOT
sudo mount /dev/disk/by-label/NIXROOT /mnt
sudo mkdir -p /mnt/boot
sudo mount /dev/disk/by-label/NIXBOOT /mnt/boot
sudo nixos-generate-config --root /mnt
cat > /mnt/etc/nixos/configuration.nix <<'endmsg'
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
# Enable Flakes
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
time.timeZone = "Australia/Brisbane";
networking.useDHCP = false;
networking.interfaces.ens3.useDHCP = true; # TODO you probably want to change this
i18n.defaultLocale = "en_US.UTF-8";
users.users.anish = {
isNormalUser = true;
hashedPassword = "MVHHpy9gbe3ow";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve" ];
};
security.sudo.wheelNeedsPassword = false; # needed for deploy-rs
services.openssh.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11"; # Did you read the comment?
}
endmsg
sudo nixos-install

View file

@ -160,7 +160,6 @@ in
password-background-color = "#1E2029" password-background-color = "#1E2029"
window-color = "#181a23" window-color = "#181a23"
border-color = "#181a23" border-color = "#181a23"
active-monitor=1
''; '';
}; };
windowManager.bspwm.enable = true; windowManager.bspwm.enable = true;