laptop: add initial config for Yura-TPX13
This commit is contained in:
parent
eae016b50c
commit
2f85b081ab
20
flake.nix
20
flake.nix
@ -48,6 +48,26 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
Yura-TPX13 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./modules
|
||||
./hosts/common.nix
|
||||
./hosts/Yura-TPX13
|
||||
./users/cazzzer
|
||||
# https://nix-community.github.io/home-manager/index.xhtml#sec-flakes-nixos-module
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
||||
|
||||
home-manager.users.cazzzer = import ./home;
|
||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||
# arguments to home.nix
|
||||
}
|
||||
];
|
||||
};
|
||||
VM = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
210
hosts/Yura-TPX13/default.nix
Normal file
210
hosts/Yura-TPX13/default.nix
Normal file
@ -0,0 +1,210 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
mods.kb-input.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.plymouth.enable = true;
|
||||
# boot.plymouth.theme = "breeze";
|
||||
boot.kernelParams = [
|
||||
"sysrq_always_enabled=1"
|
||||
];
|
||||
|
||||
boot.loader.timeout = 3;
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_14;
|
||||
|
||||
# https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
environment.etc.hosts.mode = "0644";
|
||||
|
||||
networking.hostName = "Yura-TPX13"; # Define your hostname.
|
||||
networking.hostId = "8425e349"; # Required for ZFS.
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = false;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
# services.geoclue2.enable = true;
|
||||
# location.provider = "geoclue2";
|
||||
# services.gnome.gnome-keyring.enable = true;
|
||||
security.pam.services.sddm.enableGnomeKeyring = true;
|
||||
# security.pam.services.sddm.gnupg.enable = true;
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = false;
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
programs.kdeconnect.enable = true;
|
||||
programs.fish.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.git.lfs.enable = true;
|
||||
# https://nixos.wiki/wiki/Git
|
||||
programs.git.package = pkgs.git.override { withLibsecret = true; };
|
||||
programs.lazygit.enable = true;
|
||||
programs.neovim.enable = true;
|
||||
programs.gnupg.agent.enable = true;
|
||||
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-qt;
|
||||
# programs.starship.enable = true;
|
||||
programs.wireshark.enable = true;
|
||||
programs.wireshark.package = pkgs.wireshark; # wireshark-cli by default
|
||||
programs.bat.enable = true;
|
||||
programs.htop.enable = true;
|
||||
|
||||
# https://nixos.wiki/wiki/Docker
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.enableOnBoot = false;
|
||||
virtualisation.docker.package = pkgs.docker_28;
|
||||
|
||||
# https://github.com/flatpak/flatpak/issues/2861
|
||||
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
|
||||
workarounds.flatpak.enable = true;
|
||||
fonts.packages = with pkgs; [
|
||||
fantasque-sans-mono
|
||||
nerd-fonts.fantasque-sans-mono
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
jetbrains-mono
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
dust
|
||||
eza
|
||||
fastfetch
|
||||
fd
|
||||
helix
|
||||
micro
|
||||
openssl
|
||||
ripgrep
|
||||
starship
|
||||
tealdeer
|
||||
transcrypt
|
||||
] ++ [
|
||||
efibootmgr
|
||||
ffmpeg
|
||||
file
|
||||
fq
|
||||
gnumake
|
||||
ijq
|
||||
jq
|
||||
ldns
|
||||
mediainfo
|
||||
rbw
|
||||
restic
|
||||
resticprofile
|
||||
rclone
|
||||
ripgrep-all
|
||||
rustscan
|
||||
whois
|
||||
yt-dlp
|
||||
] ++ [
|
||||
bitwarden-desktop
|
||||
darkman
|
||||
host-spawn # for flatpaks
|
||||
kdePackages.filelight
|
||||
kdePackages.flatpak-kcm
|
||||
kdePackages.kate
|
||||
kdePackages.yakuake
|
||||
# TODO: remove (replace by bitwarden-desktop)
|
||||
gcr
|
||||
gnome-keyring # config for this and some others
|
||||
mpv
|
||||
nextcloud-client
|
||||
lxqt.pavucontrol-qt
|
||||
pinentry
|
||||
tela-circle-icon-theme
|
||||
virt-viewer
|
||||
waypipe
|
||||
] ++ [
|
||||
# jetbrains.rust-rover
|
||||
# jetbrains.goland
|
||||
jetbrains.clion
|
||||
jetbrains.idea-ultimate
|
||||
jetbrains.pycharm-professional
|
||||
jetbrains.webstorm
|
||||
android-studio
|
||||
rustup
|
||||
zed-editor
|
||||
] ++ [
|
||||
# Python
|
||||
python3
|
||||
poetry
|
||||
|
||||
# Haskell
|
||||
haskellPackages.ghc
|
||||
haskellPackages.stack
|
||||
|
||||
# Node
|
||||
nodejs_22
|
||||
pnpm
|
||||
bun
|
||||
|
||||
# Nix
|
||||
nil
|
||||
nixd
|
||||
nixfmt-rfc-style
|
||||
|
||||
# Gleam
|
||||
gleam
|
||||
beamMinimal26Packages.erlang
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.nftables.enable = true;
|
||||
# networking.firewall.allowedTCPPorts = [ ];
|
||||
# networking.firewall.allowedUDPPorts = [ ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
39
hosts/Yura-TPX13/hardware-configuration.nix
Normal file
39
hosts/Yura-TPX13/hardware-configuration.nix
Normal file
@ -0,0 +1,39 @@
|
||||
# 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 = [ "nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "zroot/e/ROOT/nixos/default";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C6A4-8931";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
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.enp2s0f0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user