Configuration is more flexible
Add new host must be easier
This commit is contained in:
parent
431c99a58e
commit
51fdbb4a87
16 changed files with 91 additions and 79 deletions
|
@ -19,7 +19,7 @@ in rec {
|
||||||
hostname = "mrmeeseeks";
|
hostname = "mrmeeseeks";
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/mrmeeseeks/configuration.nix
|
./nixos/default.nix
|
||||||
home-manager.nixosModule
|
home-manager.nixosModule
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,74 +0,0 @@
|
||||||
{ config, pkgs, lib, stateVersion, hostname, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../../common/locales.nix
|
|
||||||
../../common/flakes.nix
|
|
||||||
../../common/user.nix
|
|
||||||
../../modules/nixos/pipewire.nix
|
|
||||||
../../modules/nixos/steam.nix
|
|
||||||
../../modules/nixos/xdg-portal.nix
|
|
||||||
../../modules/nixos/doas.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
#CPU
|
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
|
||||||
# GPU
|
|
||||||
hardware.opengl.driSupport = true;
|
|
||||||
hardware.opengl.driSupport32Bit = true;
|
|
||||||
|
|
||||||
# Bluetooth
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.xpadneo.enable = true;
|
|
||||||
networking.hostName = hostname;
|
|
||||||
|
|
||||||
console = {
|
|
||||||
earlySetup = true;
|
|
||||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
|
||||||
packages = with pkgs; [terminus_font];
|
|
||||||
# keyMap = "us";
|
|
||||||
useXkbConfig = true; # use xkbOptions in tty.
|
|
||||||
};
|
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
security.pam.services.swaylock = {};
|
|
||||||
services.udisks2.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
zsh
|
|
||||||
lvm2_dmeventd
|
|
||||||
];
|
|
||||||
|
|
||||||
services.lvm.enable = true;
|
|
||||||
services.lvm.dmeventd.enable = true;
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users.ephase = {
|
|
||||||
home.stateVersion = stateVersion;
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
imports = [
|
|
||||||
../../modules/home/desktop
|
|
||||||
../../modules/home/webcord.nix
|
|
||||||
../../modules/home/cli
|
|
||||||
../../modules/home/firefox
|
|
||||||
../../modules/home/foot.nix
|
|
||||||
../../modules/home/lutris.nix
|
|
||||||
../../modules/home/zathura.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
}
|
|
|
@ -61,7 +61,11 @@
|
||||||
# networking.interfaces.enp34s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp34s0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp37s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp37s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
services.lvm.boot.thin.enable = true;
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
hardware.opengl.driSupport = true;
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.xpadneo.enable = true;
|
||||||
}
|
}
|
||||||
|
|
60
nixos/default.nix
Normal file
60
nixos/default.nix
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
{ config, pkgs, lib, stateVersion, hostname, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
../hosts/${hostname}/hardware-configuration.nix
|
||||||
|
./includes/hardware/bootloader.nix
|
||||||
|
./includes/system/locales.nix
|
||||||
|
./includes/system/flakes.nix
|
||||||
|
./includes/system/user.nix
|
||||||
|
./includes/system/udisks2.nix
|
||||||
|
./includes/system/lvm.nix
|
||||||
|
./includes/system/doas.nix
|
||||||
|
./includes/system/neovim.nix
|
||||||
|
./includes/desktop/swaylock.nix
|
||||||
|
./includes/desktop/pipewire.nix
|
||||||
|
./includes/desktop/xdg-portal.nix
|
||||||
|
./includes/gaming/steam.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
networking.hostName = hostname;
|
||||||
|
|
||||||
|
console = {
|
||||||
|
earlySetup = true;
|
||||||
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
||||||
|
packages = with pkgs; [terminus_font];
|
||||||
|
# keyMap = "us";
|
||||||
|
useXkbConfig = true; # use xkbOptions in tty.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
zsh
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.ephase = {
|
||||||
|
home.stateVersion = stateVersion;
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
imports = [
|
||||||
|
../modules/home/desktop
|
||||||
|
../modules/home/webcord.nix
|
||||||
|
../modules/home/cli
|
||||||
|
../modules/home/firefox
|
||||||
|
../modules/home/foot.nix
|
||||||
|
../modules/home/lutris.nix
|
||||||
|
../modules/home/zathura.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.05";
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ config, pkgs, ...}:
|
_: {
|
||||||
{
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
3
nixos/includes/desktop/swaylock.nix
Normal file
3
nixos/includes/desktop/swaylock.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
|
}
|
6
nixos/includes/hardware/bootloader.nix
Normal file
6
nixos/includes/hardware/bootloader.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
_: {
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.systemd-boot.configurationLimit = 10;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
}
|
10
nixos/includes/system/lvm.nix
Normal file
10
nixos/includes/system/lvm.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
lvm2_dmeventd
|
||||||
|
];
|
||||||
|
|
||||||
|
services.lvm.enable = true;
|
||||||
|
services.lvm.dmeventd.enable = true;
|
||||||
|
services.lvm.boot.thin.enable = true;
|
||||||
|
}
|
3
nixos/includes/system/udisks2.nix
Normal file
3
nixos/includes/system/udisks2.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
_: {
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue