From 00d33dad5a9e5c05873a8b0fe3632340e6c51be5 Mon Sep 17 00:00:00 2001 From: Alexander Kobjolke Date: Sat, 14 Dec 2024 19:34:28 +0100 Subject: [PATCH] igor: Switch to disko config --- hosts/igor/default.nix | 30 ++++++++--- hosts/igor/hardware-configuration.nix | 73 ++++++++++++++++----------- 2 files changed, 67 insertions(+), 36 deletions(-) diff --git a/hosts/igor/default.nix b/hosts/igor/default.nix index 29d5793..0c51b03 100644 --- a/hosts/igor/default.nix +++ b/hosts/igor/default.nix @@ -6,7 +6,9 @@ { imports = [ + inputs.disko.nixosModules.disko ./hardware-configuration.nix + ./disko-config.nix ../../modules/security.nix ../../modules/nix-config.nix ../../modules/timezone.nix @@ -23,6 +25,8 @@ # Define on which hard drive you want to install Grub. config.boot.loader.grub.device = "/dev/sdb"; # or "nodev" for efi only + config.security.sudo.wheelNeedsPassword = false; + config.networking = { hostName = "igor"; domain = "failco.de"; @@ -91,8 +95,23 @@ # Enable touchpad support (enabled default in most desktopManager). config.services.libinput.enable = true; + config.services.mysql = { + enable = true; + package = pkgs.mariadb; + ensureUsers = [ + { + name = "mediathekview"; + ensurePermissions = { + "mediathekview.*" = "ALL PERMISSIONS"; + }; + } + ]; + }; + config.programs.firefox.enable = true; config.programs.git.enable = true; + config.programs.mosh.enable = true; + config.programs.nm-applet.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. config.users.users.alex = { @@ -102,12 +121,11 @@ }; config.environment.systemPackages = with pkgs; [ - alacritty - firefox - dolphin - waybar - hyprpaper - wofi + alacritty + dolphin + waybar + hyprpaper + wofi ]; config.programs.hyprland = { diff --git a/hosts/igor/hardware-configuration.nix b/hosts/igor/hardware-configuration.nix index 11478a1..57ea11e 100644 --- a/hosts/igor/hardware-configuration.nix +++ b/hosts/igor/hardware-configuration.nix @@ -1,47 +1,60 @@ # 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, ... }: +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ehci_pci" + "ahci" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; - fsType = "btrfs"; - options = [ "subvol=rootfs" ]; - }; + # fileSystems."/" = + # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; + # fsType = "btrfs"; + # options = [ "subvol=rootfs" ]; + # }; - fileSystems."/.swapvol" = - { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; - fsType = "btrfs"; - options = [ "subvol=swap" ]; - }; + # fileSystems."/.swapvol" = + # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; + # fsType = "btrfs"; + # options = [ "subvol=swap" ]; + # }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/2EDA-47FD"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + # fileSystems."/boot" = + # { device = "/dev/disk/by-uuid/2EDA-47FD"; + # fsType = "vfat"; + # options = [ "fmask=0022" "dmask=0022" ]; + # }; - fileSystems."/home" = - { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; + # fileSystems."/home" = + # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; + # fsType = "btrfs"; + # options = [ "subvol=home" ]; + # }; - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; + # fileSystems."/nix" = + # { device = "/dev/disk/by-uuid/e7720a57-f96a-4f37-a2ad-43527868418c"; + # fsType = "btrfs"; + # options = [ "subvol=nix" ]; + # }; swapDevices = [ ];