mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-05-18 18:36:05 -07:00
initial try for shivan laptop install
This commit is contained in:
parent
b773c64e3b
commit
d8e63f5099
119
provision/hosts/shivan/configuration.nix
Normal file
119
provision/hosts/shivan/configuration.nix
Normal file
@ -0,0 +1,119 @@
|
||||
{ config, pkgs, user, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./syncthing.nix
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
|
||||
settings.auto-optimise-store = true;
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
# Add non-free packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" "openssl-1.1.1w" ];
|
||||
nixpkgs.overlays = import ../../lib/overlays.nix;
|
||||
|
||||
# Use zen kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Hardware options
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.package = pkgs.bluez;
|
||||
hardware.sensor.iio.enable = true;
|
||||
hardware.opengl.enable = true;
|
||||
hardware.opengl.driSupport = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Set networking options
|
||||
networking.hostName = "shivan";
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Add fonts
|
||||
fonts.packages = with pkgs; [
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
# Enable docker
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
|
||||
# Define user account.
|
||||
users.users.${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
# Password-less root
|
||||
security.sudo.extraRules = [{
|
||||
users = [ "${user}" ];
|
||||
commands = [{
|
||||
command = "ALL" ;
|
||||
options= [ "NOPASSWD" ];
|
||||
}];
|
||||
}];
|
||||
|
||||
# List packages installed in system profile.
|
||||
environment.systemPackages = with pkgs; [
|
||||
# One-off stable packages
|
||||
distrobox
|
||||
] ++ [
|
||||
# One-off unstable packages
|
||||
];
|
||||
|
||||
# Enable modules
|
||||
modules = {
|
||||
desktop = {
|
||||
sway.enable = true;
|
||||
browser.enable = true;
|
||||
};
|
||||
devel = {
|
||||
engineering.enable = true;
|
||||
notes.enable = true;
|
||||
python.enable = true;
|
||||
tooling.enable = true;
|
||||
};
|
||||
gaming = {
|
||||
steam.enable = false;
|
||||
emulation.enable = false;
|
||||
misc.enable = false;
|
||||
};
|
||||
services = {
|
||||
jellyfin.enable = false;
|
||||
peripherals.enable = true;
|
||||
samba-client.enable = true;
|
||||
virt-manager.enable = false;
|
||||
};
|
||||
system = {
|
||||
secrets.enable = true;
|
||||
ssh.enable = true;
|
||||
terminal.enable = true;
|
||||
wireguard-client = {
|
||||
enable = false;
|
||||
#privateKeyFile = "/run/secrets/wireguard/kestrel";
|
||||
#address = [ "192.168.3.3/24" ];
|
||||
#publicKey = "bd7bbZOngl/FTdBlnbIhgCLNf6yx5X8WjiRB7E1NEQQ=";
|
||||
#endpoint = "66.218.43.87";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Did you read the comment?
|
||||
system.stateVersion = "23.11";
|
||||
}
|
32
provision/hosts/shivan/home-configuration.nix
Normal file
32
provision/hosts/shivan/home-configuration.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ config, pkgs, user, ... }:
|
||||
{
|
||||
home.username = "${user}";
|
||||
home.homeDirectory = "/home/${user}";
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Setup direnv
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# Setup git
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "starr-dusT";
|
||||
userEmail = "starrtyler88@gmail.com";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
];
|
||||
|
||||
# Enable home modules
|
||||
modules = {
|
||||
desktop = {
|
||||
kitty.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
}
|
21
provision/hosts/shivan/syncthing.nix
Normal file
21
provision/hosts/shivan/syncthing.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ config, lib, pkgs, user, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
|
||||
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
||||
|
||||
environment.systemPackages = with pkgs; [ syncthing ];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "${user}";
|
||||
dataDir = "/home/${user}/.local/share/syncthing";
|
||||
configDir = "/home/${user}/.config/syncthing";
|
||||
guiAddress = "0.0.0.0:8384";
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings.devices = {
|
||||
};
|
||||
settings.folders = {
|
||||
};
|
||||
};
|
||||
}
|
BIN
resources/img/shivan.png
Normal file
BIN
resources/img/shivan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 143 KiB |
Loading…
x
Reference in New Issue
Block a user