Create host-specific folder

This commit is contained in:
2024-02-27 09:47:30 +01:00
parent 539464e12a
commit 78992b130b
8 changed files with 25 additions and 10 deletions

View File

@@ -0,0 +1,69 @@
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
# Bootloader stuff
boot.loader.systemd-boot = {
enable = true;
};
boot.loader.efi = {
canTouchEfiVariables = true;
};
# Networking stuff
networking.hostName = "prismo"; # Define your hostname.
networking.networkmanager.enable = true;
# Set time stuff
time.timeZone = "Europe/Oslo";
# Setup hyprland
services.xserver.enable = true;
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Setup common XDG env vars
environment.sessionVariables = rec {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
XDG_BIN_HOME = "$HOME/.local/bin";
PATH = [
"${XDG_BIN_HOME}"
];
};
# Enable sudo
security.sudo.enable = true;
# Enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
# Install system-wide packages
environment.systemPackages = with pkgs; [
vim
wget
curl
neovim
alacritty
greetd.tuigreet
git
];
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}

7
hosts/prismo/default.nix Normal file
View File

@@ -0,0 +1,7 @@
{ inputs, self, pks, ...}: {
imports = [
./configuration.nix
./hardware-configuration.nix
../../system
];
}

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 = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/91a0dbc4-426f-4b7b-a49e-063d1d0e59fb";
fsType = "xfs";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/f71b0ace-f38f-435f-a07a-007f9cfe4919";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/AF2D-FAD0";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/67da36a8-69df-4541-88cd-cba7cbc40b4c"; }
];
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}