split configurations between pc and laptop
This commit is contained in:
parent
60a075fe02
commit
f8242f5542
6 changed files with 115 additions and 88 deletions
|
@ -1,51 +1,26 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
boot = {
|
||||||
# Include the results of the hardware scan.
|
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
|
||||||
./hardware-configuration.nix
|
loader = {
|
||||||
];
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
# Bootloader.
|
};
|
||||||
boot.loader.systemd-boot.enable = true;
|
};
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
# apparently needed for mesa
|
# apparently needed for mesa
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
videoDrivers = ["nvidia"];
|
|
||||||
displayManager.lightdm.enable = false;
|
displayManager.lightdm.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.opengl.enable = true;
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement = {
|
|
||||||
enable = false;
|
|
||||||
finegrained = false;
|
|
||||||
};
|
|
||||||
open = false;
|
|
||||||
nvidiaSettings = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.hostName = "fuji"; # Define your hostname.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
@ -82,16 +57,10 @@
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
# If you want to use JACK applications, uncomment this
|
wireplumber.enable = true;
|
||||||
#jack.enable = true;
|
|
||||||
|
|
||||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
|
||||||
# no need to redefine it in your config for now)
|
|
||||||
#media-session.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
services.udisks2.enable = true;
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.leo = {
|
users.users.leo = {
|
||||||
|
@ -101,8 +70,6 @@
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
neovim
|
|
||||||
git
|
|
||||||
kitty
|
kitty
|
||||||
chezmoi
|
chezmoi
|
||||||
starship
|
starship
|
||||||
|
@ -140,7 +107,6 @@
|
||||||
rustc
|
rustc
|
||||||
cargo
|
cargo
|
||||||
pavucontrol
|
pavucontrol
|
||||||
ungoogled-chromium
|
|
||||||
gnome.gnome-keyring
|
gnome.gnome-keyring
|
||||||
gnome.seahorse
|
gnome.seahorse
|
||||||
obs-studio
|
obs-studio
|
||||||
|
@ -148,12 +114,10 @@
|
||||||
ffmpeg_6
|
ffmpeg_6
|
||||||
vscode
|
vscode
|
||||||
nil
|
nil
|
||||||
nixpkgs-fmt
|
|
||||||
glfw-wayland-minecraft
|
glfw-wayland-minecraft
|
||||||
(prismlauncher.override {
|
(prismlauncher.override {
|
||||||
jdks = [temurin-bin-17];
|
jdks = [temurin-bin-17];
|
||||||
})
|
})
|
||||||
shotcut
|
|
||||||
vesktop
|
vesktop
|
||||||
grimblast
|
grimblast
|
||||||
];
|
];
|
||||||
|
@ -165,10 +129,7 @@
|
||||||
pinentryFlavor = "gnome3";
|
pinentryFlavor = "gnome3";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.hyprland.enable = true;
|
||||||
enable = true;
|
|
||||||
enableNvidiaPatches = true;
|
|
||||||
};
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
programs.command-not-found.enable = false;
|
programs.command-not-found.enable = false;
|
||||||
|
@ -179,28 +140,12 @@
|
||||||
|
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
shotcut = prev.shotcut.overrideAttrs (old: {
|
|
||||||
version = "23.09.29";
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "mltframework";
|
|
||||||
repo = "shotcut";
|
|
||||||
rev = "v23.09.29";
|
|
||||||
sha256 = "1y46n5gmlayfl46l0vhg5g5dbbc0sg909mxb68sia0clkaas8xrh";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
neovim
|
||||||
# wget
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
@ -212,25 +157,6 @@
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
# 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;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
# services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# 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
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
@ -8,7 +8,13 @@
|
||||||
outputs = inputs: {
|
outputs = inputs: {
|
||||||
nixosConfigurations.fuji = inputs.nixpkgs.lib.nixosSystem {
|
nixosConfigurations.fuji = inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [./configuration.nix];
|
modules = [./fuji.nix];
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.kilimandjaro = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [./kilimandjaro.nix];
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
27
fuji.nix
Normal file
27
fuji.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./common.nix
|
||||||
|
./hardware/fuji.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "fuji";
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
hardware.opengl = {
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement = {
|
||||||
|
enable = false;
|
||||||
|
finegrained = false;
|
||||||
|
};
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprland.enableNvidiaPatches = true;
|
||||||
|
}
|
50
hardware/kilimandjaro.nix
Normal file
50
hardware/kilimandjaro.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# 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" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_usb_sdmmc"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e082a535-4b7c-4b24-af1c-0373eefd3c05";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = ["subvol=@"];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/224F-E1A3";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" = {
|
||||||
|
device = "/dev/disk/by-uuid/5fe52c56-54f7-426b-afb7-7cf6a58b7cf0";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{device = "/dev/disk/by-uuid/2a5ce834-4a58-45ab-955f-5b620d503f7b";}
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.wlo1.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;
|
||||||
|
}
|
18
kilimandjaro.nix
Normal file
18
kilimandjaro.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./common.nix
|
||||||
|
./hardware/kilimandjaro.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "kilimandjaro";
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
videoDrivers = ["intel"];
|
||||||
|
libinput.enable = true;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue