backwards: Add host backwards
This commit is contained in:
93
hosts/backwards/configuration.nix
Normal file
93
hosts/backwards/configuration.nix
Normal file
@@ -0,0 +1,93 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../config-manager/default.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "backwards";
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "sv_SE.UTF-8";
|
||||
LC_IDENTIFICATION = "sv_SE.UTF-8";
|
||||
LC_MEASUREMENT = "sv_SE.UTF-8";
|
||||
LC_MONETARY = "sv_SE.UTF-8";
|
||||
LC_NAME = "sv_SE.UTF-8";
|
||||
LC_NUMERIC = "sv_SE.UTF-8";
|
||||
LC_PAPER = "sv_SE.UTF-8";
|
||||
LC_TELEPHONE = "sv_SE.UTF-8";
|
||||
LC_TIME = "sv_SE.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.xserver.displayManager.autoLogin.enable = true;
|
||||
services.xserver.displayManager.autoLogin.user = "alex";
|
||||
|
||||
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@tty1".enable = false;
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "se";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
console.keyMap = "sv-latin1";
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
users.users.alex = {
|
||||
isNormalUser = true;
|
||||
description = "alex";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = [];
|
||||
};
|
||||
|
||||
environment.variables.EDITOR = "vim";
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.vim
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
config-manager = {
|
||||
flakePath = "/home/alex/config";
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
41
hosts/backwards/hardware-configuration.nix
Normal file
41
hosts/backwards/hardware-configuration.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
# 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" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/bad3d82a-7bb8-490f-bd01-a4b16fe6f33d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/D049-60DD";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/ff4de0e5-2c60-4ee7-a55c-450727efb921"; }
|
||||
];
|
||||
|
||||
# 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.enp2s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
26
hosts/backwards/home.nix
Normal file
26
hosts/backwards/home.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
config = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
users.alex = {
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.username = "alex";
|
||||
home.homeDirectory = "/home/alex";
|
||||
|
||||
home.packages = [
|
||||
pkgs.git
|
||||
pkgs.tig
|
||||
pkgs.vim
|
||||
];
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user