mirror of
https://github.com/jbowdre/dotfiles.git
synced 2024-11-22 01:12:19 +00:00
Compare commits
5 commits
160ca33d59
...
373afff21c
Author | SHA1 | Date | |
---|---|---|---|
373afff21c | |||
3a9be32cbe | |||
a75028bfdc | |||
ff27e74690 | |||
76034965c8 |
17 changed files with 211 additions and 1 deletions
|
@ -36,6 +36,7 @@ in
|
||||||
ssh = "TERM=xterm command ssh $argv";
|
ssh = "TERM=xterm command ssh $argv";
|
||||||
# Rebuild home-manager
|
# Rebuild home-manager
|
||||||
switch-home = "home-manager switch -b backup --flake ${config.home.homeDirectory}/.dotfiles#$USER@$(hostname -s)";
|
switch-home = "home-manager switch -b backup --flake ${config.home.homeDirectory}/.dotfiles#$USER@$(hostname -s)";
|
||||||
|
switch-nix = "sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.dotfiles";
|
||||||
};
|
};
|
||||||
|
|
||||||
interactiveShellInit =
|
interactiveShellInit =
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
# packages
|
# packages
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
libvirt
|
|
||||||
vagrant
|
vagrant
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
37
hosts/common/global/default.nix
Normal file
37
hosts/common/global/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{ inputs, outputs,... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
./fish.nix
|
||||||
|
./tailscale.nix
|
||||||
|
] ++ (builtins.attrValues outputs.nixosModules);
|
||||||
|
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
overlays = builtins.attrValues outputs.overlays;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.enableAllTerminfo = true;
|
||||||
|
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
networking.domain = "vim.wtf";
|
||||||
|
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
10
hosts/common/global/fish.nix
Normal file
10
hosts/common/global/fish.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
vendor = {
|
||||||
|
completions.enable = true;
|
||||||
|
config.enable = true;
|
||||||
|
functions.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
hosts/common/global/tailscale.nix
Normal file
7
hosts/common/global/tailscale.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
services.tailscale = {
|
||||||
|
enable = true;
|
||||||
|
useRoutingFeatures = lib.mkDefault "client";
|
||||||
|
};
|
||||||
|
}
|
5
hosts/common/optional/docker.nix
Normal file
5
hosts/common/optional/docker.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
5
hosts/common/optional/libvirtd.nix
Normal file
5
hosts/common/optional/libvirtd.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
virtualisation.libvirtd = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
3
hosts/common/optional/sshd.nix
Normal file
3
hosts/common/optional/sshd.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.sshd.enable = true;
|
||||||
|
}
|
6
hosts/common/optional/tailscale-exit-node.nix
Normal file
6
hosts/common/optional/tailscale-exit-node.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [ ../global/tailscale.nix ];
|
||||||
|
services.tailscale = {
|
||||||
|
useRoutingFeatures = "both";
|
||||||
|
};
|
||||||
|
}
|
5
hosts/common/optional/wireshark.nix
Normal file
5
hosts/common/optional/wireshark.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
programs.wireshark = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
27
hosts/common/users/john/default.nix
Normal file
27
hosts/common/users/john/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
let ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
users.users.john = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.fish;
|
||||||
|
extraGroups = [
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"wheel"
|
||||||
|
] ++ ifTheyExist [
|
||||||
|
"docker"
|
||||||
|
"libvirtd"
|
||||||
|
"mysql"
|
||||||
|
"network"
|
||||||
|
"networkmanager"
|
||||||
|
"podman"
|
||||||
|
"wireshark"
|
||||||
|
];
|
||||||
|
|
||||||
|
packages = [ pkgs.home-manager ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.john = import ../../../../home/${config.networking.hostName}.nix;
|
||||||
|
|
||||||
|
}
|
33
hosts/pixnix/default.nix
Normal file
33
hosts/pixnix/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ pkgs, inputs, ... }: {
|
||||||
|
imports = [
|
||||||
|
inputs.hardware.nixosModules.common-cpu-intel
|
||||||
|
inputs.hardware.nixosModules.common-pc-ssd
|
||||||
|
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./services
|
||||||
|
|
||||||
|
../common/global
|
||||||
|
../common/users/john
|
||||||
|
|
||||||
|
../common/optional/docker.nix
|
||||||
|
../common/optional/libvirtd.nix
|
||||||
|
../common/optional/sshd.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "pixnix";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
}
|
40
hosts/pixnix/hardware-configuration.nix
Normal file
40
hosts/pixnix/hardware-configuration.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# 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" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/b2c7656b-2292-4dc9-94f2-a66690a14969";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/495A-C854";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/9cd48b44-07e5-4d0f-aaf0-7ca07e7b7945"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.wlp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
7
hosts/pixnix/services/default.nix
Normal file
7
hosts/pixnix/services/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./pipewire.nix
|
||||||
|
./printing.nix
|
||||||
|
./xserver.nix
|
||||||
|
];
|
||||||
|
}
|
11
hosts/pixnix/services/pipewire.nix
Normal file
11
hosts/pixnix/services/pipewire.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
}
|
5
hosts/pixnix/services/printing.nix
Normal file
5
hosts/pixnix/services/printing.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
9
hosts/pixnix/services/xserver.nix
Normal file
9
hosts/pixnix/services/xserver.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
layout = "us";
|
||||||
|
xkbVariant = "";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue