mirror of
https://github.com/bartvdbraak/dotfiles.git
synced 2025-04-27 14:41:20 +00:00
Add back some old config
This commit is contained in:
parent
79de3e1fc2
commit
f87cbd8ad9
7 changed files with 219 additions and 4 deletions
54
nixos/configuration.nix
Normal file
54
nixos/configuration.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
# Bootloader and EFI settings
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Hostname and networking
|
||||
networking.hostName = "tongfang";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Time and locale settings
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Fonts configuration
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
jetbrains-mono
|
||||
];
|
||||
};
|
||||
|
||||
# Optimization & Garbage Collection
|
||||
|
||||
# Optimize Nix-Store During Rebuilds
|
||||
# NOTE: Optimizes during builds - results in slower builds
|
||||
nix.settings.auto-optimise-store = true;
|
||||
|
||||
# Purge Unused Nix-Store Entries
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
# Enable Nix Flakes and experimental features
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# System state version
|
||||
system.stateVersion = "24.11";
|
||||
}
|
|
@ -9,6 +9,17 @@
|
|||
outputs = { nixpkgs, ... } @ inputs:
|
||||
{
|
||||
nixosConfigurations = {
|
||||
default = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hardware/tongfang.nix
|
||||
./configuration.nix
|
||||
./users.nix
|
||||
./packages.nix
|
||||
./services.nix
|
||||
];
|
||||
};
|
||||
|
||||
tongfang = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable Gnome
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
};
|
||||
}
|
34
nixos/packages.nix
Normal file
34
nixos/packages.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, inputs, config, ... }:
|
||||
|
||||
let
|
||||
customWallpaper = pkgs.fetchurl {
|
||||
url = "https://w.wallhaven.cc/full/2y/wallhaven-2y2wg6.png";
|
||||
sha256 = "9c5a0d7e4ed8fc218a5adb1c384e463b1b212397859a9a56be1c47cce27a9820";
|
||||
};
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; with inputs; [
|
||||
inputs.zen-browser.packages."${system}".default
|
||||
firefox
|
||||
git
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
fzf
|
||||
jq
|
||||
silver-searcher
|
||||
ranger
|
||||
ripgrep
|
||||
networkmanager-openvpn
|
||||
(pkgs.writeTextDir "share/sddm/themes/breeze/theme.conf.user" ''
|
||||
[General]
|
||||
background=${customWallpaper}
|
||||
'')
|
||||
dig
|
||||
caligula
|
||||
zig
|
||||
zls
|
||||
spotify
|
||||
texlive.combined.scheme-full
|
||||
];
|
||||
}
|
43
nixos/services.nix
Normal file
43
nixos/services.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Desktop, display and greeter configuration
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Audio system with PipeWire
|
||||
# Enable PipeWire and ALSA support
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true; # Enable ALSA support
|
||||
alsa.support32Bit = true; # Support for 32-bit applications
|
||||
pulse.enable = true; # Enable PulseAudio compatibility layer
|
||||
};
|
||||
|
||||
# Enable libinput for input device handling
|
||||
services.libinput.enable = true;
|
||||
|
||||
# Enable security-related service for realtime audio tasks
|
||||
security.rtkit.enable = true;
|
||||
|
||||
# Enable to update some devices' firmware
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Steam, Tailscale, and other programs/services
|
||||
programs.steam.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
programs.partition-manager.enable = true;
|
||||
|
||||
# Environment variables
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
# Printing and Bluetooth
|
||||
# Disable browsed: https://discourse.nixos.org/t/newly-announced-vulnerabilities-in-cups
|
||||
services.printing.enable = true;
|
||||
services.printing.browsed.enable = false;
|
||||
hardware.bluetooth.enable = true;
|
||||
}
|
71
nixos/users.nix
Normal file
71
nixos/users.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.bart = {
|
||||
isNormalUser = true;
|
||||
description = "Bart van der Braak";
|
||||
extraGroups = [ "networkmanager" "wheel" "libvirtd" "docker" ];
|
||||
packages = with pkgs; [
|
||||
vscodium
|
||||
thunderbird
|
||||
fastfetch
|
||||
wezterm
|
||||
neovim
|
||||
logseq
|
||||
element-desktop
|
||||
go-task
|
||||
opentofu
|
||||
python3
|
||||
gnumake
|
||||
gccgo
|
||||
# nodejs_22
|
||||
# corepack_22
|
||||
azure-cli
|
||||
sops
|
||||
blender
|
||||
inkscape
|
||||
gimp
|
||||
nixfmt-rfc-style
|
||||
];
|
||||
};
|
||||
|
||||
# Enable discovery of Google Cast and Spotify Connect devices
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
# Workaround for electron dependency in Logseq
|
||||
"electron-27.3.11"
|
||||
];
|
||||
|
||||
programs._1password.enable = true;
|
||||
programs._1password-gui = {
|
||||
enable = true;
|
||||
# Certain features, including CLI integration and system authentication support,
|
||||
# require enabling PolKit integration on some desktop environments (e.g. Plasma).
|
||||
polkitPolicyOwners = [ "bart" ];
|
||||
};
|
||||
|
||||
# SSH agent configuration
|
||||
programs.ssh.startAgent = true;
|
||||
programs.ssh.extraConfig = ''
|
||||
Host *
|
||||
AddKeysToAgent yes
|
||||
ServerAliveInterval 60
|
||||
ServerAliveCountMax 3
|
||||
'';
|
||||
|
||||
# GPG agent configuration
|
||||
programs.gnupg.agent.enable = true;
|
||||
programs.gnupg.dirmngr.enable = true;
|
||||
|
||||
# Add KVM support
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
# Add Docker support
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue