working on towering
This commit is contained in:
parent
0fb297b57d
commit
9f8084c1cf
7 changed files with 212 additions and 155 deletions
|
|
@ -3,77 +3,139 @@
|
|||
{
|
||||
imports =
|
||||
[ ./hardware-configuration.nix ];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
initrd = {
|
||||
enable = true;
|
||||
luks.devices."luks-654125f4-7b26-408d-b1b5-d31648ec8770".device = "/dev/disk/by-uuid/654125f4-7b26-408d-b1b5-d31648ec8770";
|
||||
verbose = false;
|
||||
};
|
||||
|
||||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "rings";
|
||||
themePackages = with pkgs; [
|
||||
# By default we would install all themes
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "rings" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
consoleLogLevel = 3;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
"mem_sleep_default=s2idle"
|
||||
];
|
||||
loader.timeout = 0;
|
||||
#resumeDevice = "/dev/disk/by-uuid/c49249b9-0d68-44af-97e0-e399c8409408";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-partlabel/luks";
|
||||
|
||||
boot.resumeDevice = "/dev/vg0/swap";
|
||||
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
i18n.defaultLocale = "sv_SE.UTF-8";
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
fileSystems."/".options = [ "compress=zstd" ];
|
||||
|
||||
networking.hostName = "electra";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
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";
|
||||
};
|
||||
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
console.keyMap = "sv-latin1";
|
||||
|
||||
services= {
|
||||
printing.enable = true;
|
||||
fwupd.enable = true;
|
||||
thermald.enable = true;
|
||||
pulseaudio.enable = false;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
power-profiles-daemon.enable = true;
|
||||
displayManager = {
|
||||
gdm.enable = true;
|
||||
gdm.wayland = true;
|
||||
};
|
||||
desktopManager.gnome.enable = true;
|
||||
xkb.layout = "us";
|
||||
displayManager.gdm.wayland = true;
|
||||
xserver.xkb.layout = "se";
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
fish.enable = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
users.users.dummy = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "podman" ];
|
||||
shell = pkgs.fish;
|
||||
hashedPassword = "!" ; # placeholder
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
programs.fish.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# NIX Tools
|
||||
vulnix
|
||||
|
||||
# CLI tools
|
||||
git
|
||||
wget
|
||||
curl
|
||||
podman
|
||||
firefox
|
||||
discord
|
||||
signal-desktop
|
||||
vscode
|
||||
obsidian
|
||||
alacritty
|
||||
gnome.gnome-tweaks
|
||||
gnome.dconf-editor
|
||||
gnomeExtensions.pop-shell
|
||||
tlp
|
||||
bat
|
||||
btop
|
||||
ripgrep
|
||||
bat
|
||||
fd
|
||||
eza
|
||||
bash
|
||||
|
||||
# Chat
|
||||
discord
|
||||
signal-desktop
|
||||
|
||||
# Browser
|
||||
firefox
|
||||
|
||||
# Development
|
||||
vscode
|
||||
devenv
|
||||
direnv
|
||||
|
||||
# Virtualization
|
||||
podman
|
||||
|
||||
# GNOME tweaks and extensions
|
||||
gnome-tweaks
|
||||
dconf-editor
|
||||
gnomeExtensions.ddterm
|
||||
gnomeExtensions.unpanel
|
||||
|
||||
# Other
|
||||
syncthing
|
||||
steam
|
||||
obsidian
|
||||
];
|
||||
|
||||
virtualisation.podman = {
|
||||
|
|
@ -82,11 +144,18 @@
|
|||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
|
||||
services.tlp.enable = true;
|
||||
users.users.alisceon = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "podman" ];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
environment.shells = with pkgs; [
|
||||
fish
|
||||
bash
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,52 +0,0 @@
|
|||
{
|
||||
device = "/dev/nvme0n1";
|
||||
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "512M";
|
||||
type = "EF00"; # EFI system partition
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "vg0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
swap = {
|
||||
size = "32G"; # Adjust to your RAM size
|
||||
content = {
|
||||
type = "swap";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vgs.vg0 = {
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -7,13 +7,7 @@
|
|||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
initrd = {
|
||||
enable = true;
|
||||
luks.devices."luks-654125f4-7b26-408d-b1b5-d31648ec8770".device = "/dev/disk/by-uuid/654125f4-7b26-408d-b1b5-d31648ec8770";
|
||||
verbose = false;
|
||||
};
|
||||
|
||||
|
||||
initrd.enable = true;
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "rings";
|
||||
|
|
@ -39,7 +33,7 @@
|
|||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
networking.hostName = "electra";
|
||||
networking.hostName = "tower";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
|
|
@ -56,7 +50,16 @@
|
|||
LC_TELEPHONE = "sv_SE.UTF-8";
|
||||
LC_TIME = "sv_SE.UTF-8";
|
||||
};
|
||||
|
||||
|
||||
services.displayManager = {
|
||||
gdm.enable = true;
|
||||
gdm.wayland = true;
|
||||
};
|
||||
services.desktopManager.gnome.enable = true;
|
||||
services.xserver.xkb.layout = "se";
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
|
|
@ -66,40 +69,25 @@
|
|||
|
||||
console.keyMap = "sv-latin1";
|
||||
|
||||
services= {
|
||||
printing.enable = true;
|
||||
fwupd.enable = true;
|
||||
thermald.enable = true;
|
||||
pulseaudio.enable = false;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
power-profiles-daemon.enable = true;
|
||||
displayManager = {
|
||||
gdm.enable = true;
|
||||
gdm.wayland = true;
|
||||
};
|
||||
desktopManager.gnome.enable = true;
|
||||
xserver.xkb.layout = "se";
|
||||
services.printing.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
fish.enable = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
services.fwupd.enable = true;
|
||||
|
||||
|
||||
programs.fish.enable = true;
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# NIX Tools
|
||||
vulnix
|
||||
|
||||
# CLI tools
|
||||
git
|
||||
wget
|
||||
|
|
@ -118,10 +106,9 @@
|
|||
# Browser
|
||||
firefox
|
||||
|
||||
# Development
|
||||
# Editor
|
||||
vscode
|
||||
devenv
|
||||
direnv
|
||||
obsidian
|
||||
|
||||
# Virtualization
|
||||
podman
|
||||
|
|
@ -132,10 +119,10 @@
|
|||
gnomeExtensions.ddterm
|
||||
gnomeExtensions.unpanel
|
||||
|
||||
|
||||
# Other
|
||||
syncthing
|
||||
steam
|
||||
obsidian
|
||||
];
|
||||
|
||||
virtualisation.podman = {
|
||||
|
|
@ -151,11 +138,9 @@
|
|||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
environment.shells = with pkgs; [
|
||||
fish
|
||||
bash
|
||||
];
|
||||
environment.shells = with pkgs; [ fish ];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
39
hosts/tower/hardware-configuration.nix
Normal file
39
hosts/tower/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# 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" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/0fd6a4e2-3fa3-4a9a-90fa-8679feb0196d";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/E212-41FD";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.enp10s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue