mirror of
https://github.com/thiloho/nixos-config.git
synced 2025-11-22 03:21:35 +01:00
Change configuration structure for second device
This commit is contained in:
11
nixos-configurations/laptop/default.nix
Normal file
11
nixos-configurations/laptop/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../shared.nix
|
||||
];
|
||||
|
||||
networking.hostName = "laptop";
|
||||
}
|
||||
14
nixos-configurations/pc/default.nix
Normal file
14
nixos-configurations/pc/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
../shared.nix
|
||||
];
|
||||
|
||||
services.xserver.windowManager.i3.extraSessionCommands = "xrandr --output DP-0 --left-of DP-4 --mode 1920x1080 --rate 144 --output DP-4 --mode 1920x1080 --rate 144";
|
||||
|
||||
networking.hostName = "pc";
|
||||
}
|
||||
|
||||
40
nixos-configurations/pc/hardware-configuration.nix
Normal file
40
nixos-configurations/pc/hardware-configuration.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/f852c0e5-0987-4be4-bb38-b2038c63c34d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/2BA6-1710";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/e32296ce-bc3c-4b92-97f7-0baed721c9d9"; }
|
||||
];
|
||||
|
||||
# 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.enp39s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp41s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
89
nixos-configurations/shared.nix
Normal file
89
nixos-configurations/shared.nix
Normal file
@@ -0,0 +1,89 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
videoDrivers = [ "nvidia" ];
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
environment.variables = {
|
||||
TERMINAL = "alacritty";
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
noto-fonts-cjk-sans
|
||||
];
|
||||
|
||||
users.users.thiloho = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
# Home manager configuration
|
||||
home-manager.users.thiloho = { pkgs, ... }: {
|
||||
programs = {
|
||||
helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "dark_plus";
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
cursorline = true;
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
alacritty.enable = true;
|
||||
firefox.enable = true;
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "thiloho";
|
||||
userEmail = "123883702+thiloho@users.noreply.github.com";
|
||||
signing = {
|
||||
key = "/home/thiloho/.ssh/id_ed25519.pub";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig.gpg.format = "ssh";
|
||||
};
|
||||
gh.enable = true;
|
||||
};
|
||||
services.flameshot.enable = true;
|
||||
home = {
|
||||
stateVersion = "22.11";
|
||||
packages = with pkgs; [
|
||||
zoom-us
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user