hostconfig: Introduce laptop (name TBD)

This commit is contained in:
traxys 2024-07-24 13:00:46 +02:00
parent ed136a6177
commit 6533a0d992
6 changed files with 129 additions and 0 deletions

View file

@ -56,5 +56,6 @@
./ZeNixComputa
./minus
./thinkpad-nixos
./laptop
];
}

View file

@ -0,0 +1,27 @@
{ self, makeMachine, ... }:
{
flake.nixosConfigurations.laptop = makeMachine {
system = "x86_64-linux";
user = "traxys";
nixosModules = with self.nixosModules; [
./extra_info.nix
./nixos.nix
./hardware-configuration.nix
minimal
personal-cli
personal-gui
];
hmModules = with self.hmModules; [
./extra_info.nix
./hm.nix
minimal
personal-cli
personal-gui
];
unfreePackages = [
"cnijfilter2"
"spotify"
"discord"
];
};
}

View file

@ -0,0 +1,4 @@
{
extraInfo.username = "traxys";
extraInfo.email = "quentin+dev@familleboyer.net";
}

View file

@ -0,0 +1,42 @@
# 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" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/881aed94-7e35-4db1-9237-33635e6b1c4f";
fsType = "btrfs";
options = [ "subvol=@" ];
};
boot.initrd.luks.devices."luks-3415853c-c124-4dc1-9ca4-f980ae3a732b".device = "/dev/disk/by-uuid/3415853c-c124-4dc1-9ca4-f980ae3a732b";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/79DC-3378";
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.enp1s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
hostconfig/laptop/hm.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, ... }:
{
programs.git = {
userName = "Quentin Boyer";
userEmail = config.extraInfo.email;
};
traxys.waybar.modules.battery.enable = true;
home.stateVersion = "24.11";
}

View file

@ -0,0 +1,45 @@
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "laptop";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Paris";
services.automatic-timezoned.enable = true;
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8";
};
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.users.traxys = {
isNormalUser = true;
description = "Quentin Boyer";
extraGroups = [
"networkmanager"
"wheel"
];
};
system.stateVersion = "24.05";
}