Reformat + swap odin SSD

This commit is contained in:
Filippo Berto 2022-09-01 15:11:16 +02:00
parent 1bc27dde82
commit 2f3d05a802
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
83 changed files with 1448 additions and 931 deletions

View file

@ -1,6 +1,5 @@
{ config, pkgs, lib, ... }:
with lib;
{
with lib; {
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@ -16,9 +15,7 @@ with lib;
hardware.enableRedistributableFirmware = true;
# Use same ACPI identifier as Dell Ubuntu
boot.kernelParams = [
"acpi_osi=Linux-Dell-Video"
];
boot.kernelParams = [ "acpi_osi=Linux-Dell-Video" ];
networking = {
hostName = "odin";
@ -28,7 +25,10 @@ with lib;
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
useDHCP = false;
interfaces = { enp60s0.useDHCP = true; wlp0s20f3.useDHCP = true; };
interfaces = {
enp60s0.useDHCP = true;
wlp0s20f3.useDHCP = true;
};
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
@ -51,7 +51,6 @@ with lib;
keyMap = "it";
};
# X11 windowing system.
services.xserver = {
enable = true;
@ -71,13 +70,17 @@ with lib;
displayManager.sddm = {
enable = true;
autoNumlock = true;
theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
theme =
"${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
};
# Configure keymap in X11
layout = "it";
extraLayouts = {
eng = { languages = [ "eng" ]; description = "English layout for external keyboard"; };
eng = {
languages = [ "eng" ];
description = "English layout for external keyboard";
};
};
xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl";
libinput.enable = true;
@ -86,10 +89,11 @@ with lib;
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = with pkgs; [
gutenprint
# cups-kyocera
];
drivers = with pkgs;
[
gutenprint
# cups-kyocera
];
};
services.fwupd.enable = true;
@ -106,10 +110,14 @@ with lib;
enable = true;
pulse.enable = true;
jack.enable = true;
alsa = { enable = true; support32Bit = true; };
alsa = {
enable = true;
support32Bit = true;
};
# media-session.enable = true;
};
environment.sessionVariables.LD_LIBRARY_PATH = lib.mkForce "${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK
environment.sessionVariables.LD_LIBRARY_PATH = lib.mkForce
"${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK
# # Tablet
# hardware.opentabletdriver = {
@ -120,7 +128,18 @@ with lib;
# Define a user account. Don't forget to set a password with passwd.
users.users.bertof = {
isNormalUser = true;
extraGroups = [ "audio" "input" "docker" "flashrom" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ];
extraGroups = [
"audio"
"input"
"docker"
"flashrom"
"libvirtd"
"network"
"networkmanager"
"usb"
"video"
"wheel"
];
shell = pkgs.zsh;
};
@ -132,18 +151,29 @@ with lib;
# started in user sessions.
# programs.mtr.enable = true;
programs.flashrom.enable = true;
programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.steam.enable = true;
services.joycond.enable = true;
programs.dconf.enable = true;
programs.zsh = { enable = true; syntaxHighlighting.enable = true; };
programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh = { enable = true; openFirewall = true; permitRootLogin = "no"; passwordAuthentication = false; };
services.openssh = {
enable = true;
openFirewall = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
# Cooling management
services.thermald.enable = true;
@ -160,14 +190,21 @@ with lib;
in
{
bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; };
bertof_music = recursiveUpdate common { subvolume = "/home/bertof/Musica"; };
bertof_downloads = recursiveUpdate common { subvolume = "/home/bertof/Scaricati"; };
bertof_images = recursiveUpdate common { subvolume = "/home/bertof/Immagini"; };
bertof_videos = recursiveUpdate common { subvolume = "/home/bertof/Video"; };
bertof_documents = recursiveUpdate common { subvolume = "/home/bertof/Documenti"; };
bertof_games_ssd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/SSD"; };
bertof_music =
recursiveUpdate common { subvolume = "/home/bertof/Musica"; };
bertof_downloads =
recursiveUpdate common { subvolume = "/home/bertof/Scaricati"; };
bertof_images =
recursiveUpdate common { subvolume = "/home/bertof/Immagini"; };
bertof_videos =
recursiveUpdate common { subvolume = "/home/bertof/Video"; };
bertof_documents =
recursiveUpdate common { subvolume = "/home/bertof/Documenti"; };
bertof_games_ssd =
recursiveUpdate common { subvolume = "/home/bertof/Giochi/SSD"; };
# bertof_games_hdd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/HDD"; };
bertof_git = recursiveUpdate common { subvolume = "/home/bertof/Documenti/Git"; };
bertof_git =
recursiveUpdate common { subvolume = "/home/bertof/Documenti/Git"; };
};
};
@ -175,7 +212,10 @@ with lib;
services.gnome.gnome-keyring.enable = true;
hardware.bluetooth.enable = true;
services.blueman.enable = true;
services.gvfs = { enable = true; package = lib.mkForce pkgs.gnome3.gvfs; };
services.gvfs = {
enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
};
# services.tlp.enable = false;
services.avahi = {
enable = true;
@ -194,7 +234,10 @@ with lib;
};
# SMART
services.smartd = { enable = true; notifications.x11.enable = true; };
services.smartd = {
enable = true;
notifications.x11.enable = true;
};
# FPRINTD
# services.fprintd = {
@ -205,7 +248,10 @@ with lib;
security.pam.services.xscreensaver.fprintAuth = true;
# Clamav
services.clamav = { daemon.enable = true; updater.enable = true; };
services.clamav = {
daemon.enable = true;
updater.enable = true;
};
# Power-profiles
services.power-profiles-daemon.enable = true;
@ -233,9 +279,7 @@ with lib;
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
steam = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [ icu ];
};
steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ icu ]; };
};
};
nix = {

View file

@ -4,10 +4,7 @@
{ config, lib, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ];
boot.initrd.kernelModules = [ ];
@ -32,46 +29,46 @@
options = [ "x-gvfs-hide" ];
};
# fileSystems."/var/lib/docker/btrfs" =
# { device = "/nix/@root/var/lib/docker/btrfs";
# fsType = "none";
# options = [ "bind" ];
# };
fileSystems."/home/bertof" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "subvol=@bertof/@home" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Documenti" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "subvol=@bertof/@documents" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Documenti/Git" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
options = [ "subvol=@bertof/@git" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Musica" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fileSystems."/home/bertof/Immagini" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@music" "x-gvfs-hide" ];
options = [ "subvol=@bertof/@images" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Video" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@videos" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Immagini" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fileSystems."/home/bertof/Documenti" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@images" "x-gvfs-hide" ];
options = [ "subvol=@bertof/@documents" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Musica" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@music" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Scaricati" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@downloads" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Giochi/SSD" = {
@ -80,10 +77,10 @@
options = [ "subvol=@bertof/@games" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Scaricati" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fileSystems."/home/bertof/Giochi/SATA" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@downloads" "x-gvfs-hide" ];
options = [ "subvol=@bertof/@games" "x-gvfs-hide" ];
};
swapDevices =
@ -100,5 +97,6 @@
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{ pkgs, ... }: {
home = {
language.base = "it_IT.UTF-8";
keyboard = {
@ -43,7 +42,9 @@
# gnome.quadrapassel
# gnome.seahorse
# gnome.sushi
(google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; })
(google-chrome.override {
commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ];
})
gucharmap
handbrake
htop
@ -123,7 +124,6 @@
../hm_modules/python.nix
../hm_modules/rust.nix
../hm_modules/any_nix_shell.nix
../hm_modules/alacritty.nix
../hm_modules/autorandr.nix
../hm_modules/bspwm.nix