mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
create Torus config
This commit is contained in:
parent
111b52c236
commit
d0de6f7077
125
provision/nixos/hosts/torus/configuration.nix
Normal file
125
provision/nixos/hosts/torus/configuration.nix
Normal file
@ -0,0 +1,125 @@
|
||||
{ config, pkgs, user, lib, ... }:
|
||||
{
|
||||
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.overlays = import ../../lib/overlays.nix;
|
||||
|
||||
# Use zen kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
|
||||
# Hardware options
|
||||
hardware.bluetooth.enable = true;
|
||||
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 = "kestrel";
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.checkReversePath = "loose";
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware.pulseaudio.support32Bit = true;
|
||||
|
||||
# Add fonts
|
||||
fonts.fonts = with pkgs; [
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
# Enable virtualisation
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
|
||||
# Enable zsh
|
||||
programs.zsh.enable = true;
|
||||
|
||||
# Define user account.
|
||||
users.users.${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "docker" ]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
git
|
||||
killall
|
||||
pciutils
|
||||
syncthing
|
||||
pinentry-curses
|
||||
trash-cli
|
||||
unzip
|
||||
nnn
|
||||
];
|
||||
|
||||
# Enable user services
|
||||
services = {
|
||||
gvfs.enable = true; # USB automount
|
||||
blueman.enable = true;
|
||||
printing.enable = true;
|
||||
printing.drivers = [ pkgs.hplip ];
|
||||
avahi.enable = true;
|
||||
avahi.nssmdns = true;
|
||||
syncthing = {
|
||||
enable = true;
|
||||
user = "${user}";
|
||||
dataDir = "/home/${user}/sync";
|
||||
configDir = "/home/${user}/.config/syncthing";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "curses";
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Enable modules
|
||||
imports = [ ../../modules ];
|
||||
modules = {
|
||||
services = {
|
||||
samba.enable = true;
|
||||
};
|
||||
devel = {
|
||||
tooling.enable = true;
|
||||
python.enable = true;
|
||||
engineering.enable = true;
|
||||
};
|
||||
gaming = {
|
||||
steam.enable = true;
|
||||
};
|
||||
desktop = {
|
||||
sway.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
}
|
49
provision/nixos/hosts/torus/flake.lock
generated
Normal file
49
provision/nixos/hosts/torus/flake.lock
generated
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1687871164,
|
||||
"narHash": "sha256-bBFlPthuYX322xOlpJvkjUBz0C+MOBjZdDOOJJ+G2jU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "07c347bb50994691d7b0095f45ebd8838cf6bc38",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1688939073,
|
||||
"narHash": "sha256-jYhYjeK5s6k8QS3i+ovq9VZqBJaWbxm7awTKNhHL9d0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8df7a67abaf8aefc8a2839e0b48f92fdcf69a38b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
41
provision/nixos/hosts/torus/flake.nix
Normal file
41
provision/nixos/hosts/torus/flake.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
description = "Flake for kestrel configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
home-manager = {
|
||||
url = github:nix-community/home-manager/release-23.05;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
lib = nixpkgs.lib;
|
||||
user = "tstarr";
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
kestrel = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit user; };
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./hardware.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit user; };
|
||||
home-manager.users.${user} = {
|
||||
imports = [ ./home-configuration.nix ];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
62
provision/nixos/hosts/torus/hardware.nix
Normal file
62
provision/nixos/hosts/torus/hardware.nix
Normal file
@ -0,0 +1,62 @@
|
||||
# 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 + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/persist" =
|
||||
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=persist" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" =
|
||||
{ device = "/dev/disk/by-uuid/873ccce0-c706-4ef4-b7d1-748e93e54aae";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=log" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/37EE-81E0";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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.enp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
14
provision/nixos/hosts/torus/home-configuration.nix
Normal file
14
provision/nixos/hosts/torus/home-configuration.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ config, pkgs, user, ... }:
|
||||
{
|
||||
home.username = "${user}";
|
||||
home.homeDirectory = "/home/${user}";
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
chezmoi
|
||||
rbw
|
||||
zk
|
||||
];
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user