Refactor configuration to be more concise
This commit is contained in:
parent
6a7ed1deaa
commit
f39e1965ba
3 changed files with 53 additions and 45 deletions
7
common.nix
Normal file
7
common.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./gpg.nix ];
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
}
|
|
@ -9,8 +9,8 @@
|
||||||
nixosConfigurations.Mirkwood = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.Mirkwood = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
|
./common.nix
|
||||||
./hosts/Mirkwood/configuration.nix
|
./hosts/Mirkwood/configuration.nix
|
||||||
./gpg.nix
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,60 +3,64 @@
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
networking = {
|
||||||
|
hostName = "Mirkwood";
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.backend = "iwd";
|
||||||
|
};
|
||||||
|
wireless.iwd.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Bootloader.
|
boot = {
|
||||||
boot.loader.systemd-boot.enable = true;
|
initrd.luks.devices."luks-cf2ca44e-d8d1-4ec8-a072-921f29ed693d".device = "/dev/disk/by-uuid/cf2ca44e-d8d1-4ec8-a072-921f29ed693d";
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
boot.initrd.luks.devices."luks-cf2ca44e-d8d1-4ec8-a072-921f29ed693d".device = "/dev/disk/by-uuid/cf2ca44e-d8d1-4ec8-a072-921f29ed693d";
|
efi.canTouchEfiVariables = true;
|
||||||
networking.hostName = "Mirkwood"; # Define your hostname.
|
};
|
||||||
networking.wireless.iwd.enable = true; # Enables wireless support via wpa_supplicant.
|
};
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
networking.networkmanager.wifi.backend = "iwd";
|
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Helsinki";
|
time.timeZone = "Europe/Helsinki";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
i18n = {
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
extraLocaleSettings = {
|
||||||
LC_ADDRESS = "fi_FI.UTF-8";
|
LC_ADDRESS = "fi_FI.UTF-8";
|
||||||
LC_IDENTIFICATION = "fi_FI.UTF-8";
|
LC_IDENTIFICATION = "fi_FI.UTF-8";
|
||||||
LC_MEASUREMENT = "fi_FI.UTF-8";
|
LC_MEASUREMENT = "fi_FI.UTF-8";
|
||||||
LC_MONETARY = "fi_FI.UTF-8";
|
LC_MONETARY = "fi_FI.UTF-8";
|
||||||
LC_NAME = "fi_FI.UTF-8";
|
LC_NAME = "fi_FI.UTF-8";
|
||||||
LC_NUMERIC = "fi_FI.UTF-8";
|
LC_NUMERIC = "fi_FI.UTF-8";
|
||||||
LC_PAPER = "fi_FI.UTF-8";
|
LC_PAPER = "fi_FI.UTF-8";
|
||||||
LC_TELEPHONE = "fi_FI.UTF-8";
|
LC_TELEPHONE = "fi_FI.UTF-8";
|
||||||
LC_TIME = "fi_FI.UTF-8";
|
LC_TIME = "fi_FI.UTF-8";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
services = {
|
||||||
services.xserver.enable = true;
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
xkb = {
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
layout = "us";
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
variant = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Configure keymap in X11
|
pipewire = {
|
||||||
services.xserver.xkb = {
|
enable = true;
|
||||||
layout = "us";
|
alsa.enable = true;
|
||||||
variant = "";
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.functionalhacker = {
|
users.users.functionalhacker = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
@ -67,14 +71,11 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Install firefox.
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nativeMessagingHosts.packages = with pkgs; [ browserpass ];
|
nativeMessagingHosts.packages = [ pkgs.browserpass ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
telegram-desktop
|
telegram-desktop
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue