working on towering
This commit is contained in:
parent
0fb297b57d
commit
9f8084c1cf
7 changed files with 212 additions and 155 deletions
20
flake.nix
20
flake.nix
|
|
@ -21,13 +21,29 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
electra = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
}
|
}
|
||||||
./hosts/laptop/configuration.nix
|
./hosts/electra/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.alisceon = import ./home/users/alisceon.nix;
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
tower = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
}
|
||||||
|
./hosts/tower/configuration.nix
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@
|
||||||
grep = "rg";
|
grep = "rg";
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
||||||
nixos-switch = "sudo nixos-rebuild switch --flake .#";
|
nixos-switch = "sudo nixos-rebuild switch --flake .#${config.networking.hostName}";
|
||||||
nixos-test = "sudo nixos-rebuild build-vm --flake .#";
|
nixos-test = "sudo nixos-rebuild build-vm --flake .#${config.networking.hostName}";
|
||||||
pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/";
|
pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,76 +4,138 @@
|
||||||
imports =
|
imports =
|
||||||
[ ./hardware-configuration.nix ];
|
[ ./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" ];
|
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.hostName = "electra";
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
services.xserver = {
|
i18n.extraLocaleSettings = {
|
||||||
enable = true;
|
LC_ADDRESS = "sv_SE.UTF-8";
|
||||||
displayManager.gdm.enable = true;
|
LC_IDENTIFICATION = "sv_SE.UTF-8";
|
||||||
desktopManager.gnome.enable = true;
|
LC_MEASUREMENT = "sv_SE.UTF-8";
|
||||||
xkb.layout = "us";
|
LC_MONETARY = "sv_SE.UTF-8";
|
||||||
displayManager.gdm.wayland = true;
|
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.printing.enable = true;
|
nix.settings.auto-optimise-store = true;
|
||||||
sound.enable = true;
|
nix.gc = {
|
||||||
hardware.pulseaudio.enable = false;
|
automatic = true;
|
||||||
services.pipewire = {
|
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;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
services.fwupd.enable = true;
|
displayManager = {
|
||||||
|
gdm.enable = true;
|
||||||
users.users.dummy = {
|
gdm.wayland = true;
|
||||||
isNormalUser = true;
|
};
|
||||||
extraGroups = [ "wheel" "networkmanager" "podman" ];
|
desktopManager.gnome.enable = true;
|
||||||
shell = pkgs.fish;
|
xserver.xkb.layout = "se";
|
||||||
hashedPassword = "!" ; # placeholder
|
|
||||||
};
|
};
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
programs.fish.enable = true;
|
fish.enable = true;
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
# NIX Tools
|
||||||
|
vulnix
|
||||||
|
|
||||||
|
# CLI tools
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
podman
|
|
||||||
firefox
|
|
||||||
discord
|
|
||||||
signal-desktop
|
|
||||||
vscode
|
|
||||||
obsidian
|
|
||||||
alacritty
|
|
||||||
gnome.gnome-tweaks
|
|
||||||
gnome.dconf-editor
|
|
||||||
gnomeExtensions.pop-shell
|
|
||||||
tlp
|
|
||||||
bat
|
|
||||||
btop
|
btop
|
||||||
ripgrep
|
ripgrep
|
||||||
|
bat
|
||||||
fd
|
fd
|
||||||
eza
|
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 = {
|
virtualisation.podman = {
|
||||||
|
|
@ -82,11 +144,18 @@
|
||||||
defaultNetwork.settings.dns_enabled = true;
|
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";
|
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 = {
|
boot = {
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
loader.efi.canTouchEfiVariables = true;
|
loader.efi.canTouchEfiVariables = true;
|
||||||
initrd = {
|
initrd.enable = true;
|
||||||
enable = true;
|
|
||||||
luks.devices."luks-654125f4-7b26-408d-b1b5-d31648ec8770".device = "/dev/disk/by-uuid/654125f4-7b26-408d-b1b5-d31648ec8770";
|
|
||||||
verbose = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
plymouth = {
|
plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "rings";
|
theme = "rings";
|
||||||
|
|
@ -39,7 +33,7 @@
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
networking.hostName = "electra";
|
networking.hostName = "tower";
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
time.timeZone = "Europe/Stockholm";
|
time.timeZone = "Europe/Stockholm";
|
||||||
|
|
@ -57,6 +51,15 @@
|
||||||
LC_TIME = "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.settings.auto-optimise-store = true;
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
|
|
@ -66,40 +69,25 @@
|
||||||
|
|
||||||
console.keyMap = "sv-latin1";
|
console.keyMap = "sv-latin1";
|
||||||
|
|
||||||
services= {
|
services.printing.enable = true;
|
||||||
printing.enable = true;
|
services.pulseaudio.enable = false;
|
||||||
fwupd.enable = true;
|
services.pipewire = {
|
||||||
thermald.enable = true;
|
|
||||||
pulseaudio.enable = false;
|
|
||||||
gnome.gnome-keyring.enable = true;
|
|
||||||
pipewire = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.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";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
services.fwupd.enable = true;
|
||||||
dconf.enable = true;
|
|
||||||
fish.enable = true;
|
|
||||||
steam = {
|
programs.fish.enable = true;
|
||||||
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# NIX Tools
|
|
||||||
vulnix
|
|
||||||
|
|
||||||
# CLI tools
|
# CLI tools
|
||||||
git
|
git
|
||||||
wget
|
wget
|
||||||
|
|
@ -118,10 +106,9 @@
|
||||||
# Browser
|
# Browser
|
||||||
firefox
|
firefox
|
||||||
|
|
||||||
# Development
|
# Editor
|
||||||
vscode
|
vscode
|
||||||
devenv
|
obsidian
|
||||||
direnv
|
|
||||||
|
|
||||||
# Virtualization
|
# Virtualization
|
||||||
podman
|
podman
|
||||||
|
|
@ -132,10 +119,10 @@
|
||||||
gnomeExtensions.ddterm
|
gnomeExtensions.ddterm
|
||||||
gnomeExtensions.unpanel
|
gnomeExtensions.unpanel
|
||||||
|
|
||||||
|
|
||||||
# Other
|
# Other
|
||||||
syncthing
|
syncthing
|
||||||
steam
|
steam
|
||||||
obsidian
|
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.podman = {
|
virtualisation.podman = {
|
||||||
|
|
@ -151,11 +138,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
environment.shells = with pkgs; [
|
environment.shells = with pkgs; [ fish ];
|
||||||
fish
|
|
||||||
bash
|
|
||||||
];
|
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
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