moved around dotfiles to focus around nix configuration, as most of my systems already utilize Nix/NixOS in some capacity.
This commit is contained in:
parent
eb01c9561f
commit
890c29afca
28 changed files with 47 additions and 255 deletions
94
nix/hosts/common.nix
Executable file
94
nix/hosts/common.nix
Executable file
|
|
@ -0,0 +1,94 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
# Set default user lunita
|
||||
users.users.lunita = {
|
||||
isNormalUser = true;
|
||||
description = "Lunita";
|
||||
extraGroups = [ "networkmanager" "wheel" "syncthing" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users = {
|
||||
"lunita" = import ./home.nix;
|
||||
};
|
||||
};
|
||||
# Enable automatic system updates
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
flake = inputs.self.outPath;
|
||||
flags = [
|
||||
"--update-input"
|
||||
"nixpkgs"
|
||||
"-L" # print build logs
|
||||
];
|
||||
dates = "weekly";
|
||||
randomizedDelaySec = "45min";
|
||||
};
|
||||
# Automate Nix garbage collection
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
# Allow non-free software (RMS will be mad at me :<)
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# Enable nix-command and flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes"];
|
||||
# using piprewire cuz embrace muh modernity
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
# Basic configuration stuff - WiFi, Xserver keyboard layout, Stylix
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "America/St_Thomas"; # Timezone => AST
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
# Zsh
|
||||
programs.zsh.enable = true;
|
||||
# Browser
|
||||
programs.firefox.enable = true;
|
||||
# Flatpak
|
||||
services.flatpak.enable = true;
|
||||
# Tailscale
|
||||
services.tailscale.enable = true;
|
||||
# GPG
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
# OpenSSH
|
||||
services.openssh.enable = true;
|
||||
# Hardware acceleration support
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
];
|
||||
# Enable udisks2 for removable media support
|
||||
services.udisks2.enable = true;
|
||||
# Can't disable sudo due to dependency for nixos-rebuild
|
||||
# security.sudo.enable = false;
|
||||
# Setup doas
|
||||
security.doas = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
users = ["lunita"];
|
||||
keepEnv = true;
|
||||
noPass = true;
|
||||
}];
|
||||
};
|
||||
|
||||
# System package definitions
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim # Terminal text editor
|
||||
wget # coreutil for some script compatibility
|
||||
wiremix # TUI mixer for pipewire
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue