diff --git a/flake.nix b/flake.nix index df6433c..72635fa 100644 --- a/flake.nix +++ b/flake.nix @@ -6,12 +6,13 @@ let inspiron-laptop = import ./hosts/inspiron-laptop/flakeConfiguration.nix inputs; zollsoft-mac = import ./hosts/zollsoft-mac/flakeConfiguration.nix inputs; + barbara-laptop = import ./hosts/barbara-laptop/flakeConfiguration.nix inputs; in { # insert other configurations by merging (need to be imported in let/in) - nixosConfigurations = inspiron-laptop; # // ; + nixosConfigurations = inspiron-laptop // barbara-laptop; # // ; darwinConfigurations = zollsoft-mac; # // ; - homeConfigurations = inspiron-laptop // zollsoft-mac; # // ; + homeConfigurations = inspiron-laptop // zollsoft-mac // barbara-laptop; # // ; }; inputs = { diff --git a/hosts/barbara-laptop/configuration.nix b/hosts/barbara-laptop/configuration.nix new file mode 100644 index 0000000..93b30c5 --- /dev/null +++ b/hosts/barbara-laptop/configuration.nix @@ -0,0 +1,33 @@ +{ inputs, pkgs, ... }: + +{ + imports = [ + inputs.sops-nix.nixosModules.sops + ./hardware-configuration.nix + ../../modules/system/basic/locale.nix + ../../modules/system/basic/nh.nix + ../../modules/system/basic/settings.nix + ../../modules/system/basic/users.nix + ../../modules/system/apps/cli-apps.nix + ../../modules/system/apps/virtualisation.nix + ../../modules/system/boot/grub.nix + ../../modules/system/fonts/fonts.nix + ../../modules/system/hardware/accelerated_video_playback.nix + ../../modules/system/hardware/automount.nix + ../../modules/system/hardware/bluetooth.nix + ../../modules/system/hardware/intel.nix + ../../modules/system/hardware/networking.nix + ../../modules/system/hardware/pipewire.nix + ../../modules/system/hardware/printing.nix + ../../modules/system/security/remote.nix + ../../modules/system/security/location_information.nix + ../../modules/system/security/run_binaries.nix + ../../modules/system/wm/sddm.nix + ../../modules/system/wm/hyprland.nix + ../../modules/system/wm/kde.nix # home-managers qt theming (in theming.nix) will fuck up plasma6 so you need to disable it if you want to try plasma6 + ]; + + boot.kernelPackages = pkgs.linuxPackages_latest; + + system.stateVersion = "23.11"; # Do not modify +} diff --git a/hosts/barbara-laptop/flakeConfiguration.nix b/hosts/barbara-laptop/flakeConfiguration.nix new file mode 100644 index 0000000..1cc22ab --- /dev/null +++ b/hosts/barbara-laptop/flakeConfiguration.nix @@ -0,0 +1,72 @@ +{ self, ... }@inputs: + +let + systemSettings = { + hostname = "mamas-laptop"; # hostname, unique identifier for building the flake + timezone = "Europe/Vienna"; # timezone + defaultLocale = "de_AT.UTF-8"; # default locale + extraLocale = "de_AT.UTF-8"; # extra locale (for measurement, numeric, time, ...) + kblayout = "de"; # keyboard layout + users = { + "1" = { + username = userSettings1.username; # username + name = userSettings1.name; + extraGroups = [ + "networkmanager" + "scanner" + "wheel" + "video" + "libvirtd" + ]; + }; + }; + }; + + userSettings1 = rec { + username = "barbara"; # username + name = "Leon"; # name/identifier (used for certain configurations i.e. git) + email = "leonvincenterd@web.de"; # email (used for certain configurations i.e. git) + flakeDirectory = "/home/${username}/dotfiles"; + kblayout = "de"; + systemConfigurationName = systemSettings.hostname; + userConfigurationName = "${username}@${systemConfigurationName}"; + isLinux = myPkgs.stdenv.isLinux; + }; + + myPkgs = import inputs.nixpkgs { + overlays = [ + inputs.nur.overlays.default + inputs.nix-vscode-extensions.overlays.default + (import ../../overlays) + ]; + system = "x86_64-linux"; # system arch (checkout hardware-configuration.nix -> nixpkgs.hostPlatform); + config.allowUnfree = true; + }; + + #pkgsLocal = import inputs.nixpkgsLocal { + # system = "x86_64-linux"; # system arch (checkout hardware-configuration.nix -> nixpkgs.hostPlatform); + # config.allowUnfree = true; + #}; +in + +{ + ${systemSettings.hostname} = inputs.nixpkgs.lib.nixosSystem { + modules = [ ./configuration.nix ]; + specialArgs = { + inherit inputs; + inherit myPkgs; + inherit systemSettings; + }; + }; + + ${userSettings1.userConfigurationName} = inputs.home-manager.lib.homeManagerConfiguration { + pkgs = myPkgs; + modules = [ ./home.nix ]; + extraSpecialArgs = { + # pass config variables from above + inherit inputs; + userSettings = userSettings1; + #inherit pkgsLocal; + }; + }; +} diff --git a/hosts/barbara-laptop/hardware-configuration.nix b/hosts/barbara-laptop/hardware-configuration.nix new file mode 100644 index 0000000..f071590 --- /dev/null +++ b/hosts/barbara-laptop/hardware-configuration.nix @@ -0,0 +1,48 @@ +# 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" + "thunderbolt" + "nvme" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/6f61779e-4fde-4c3b-a034-2fb20d952e98"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/CC93-2794"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/2d14d1e5-3db7-402c-a272-9a2d2e380106"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/barbara-laptop/home.nix b/hosts/barbara-laptop/home.nix new file mode 100644 index 0000000..6726a75 --- /dev/null +++ b/hosts/barbara-laptop/home.nix @@ -0,0 +1,46 @@ +{ + lib, + inputs, + userSettings, + ... +}: + +{ + imports = [ + inputs.sops-nix.homeManagerModules.sops + ./mamas-packages.nix + ../../modules/home-manager/basic/basic.nix + ../../modules/home-manager/apps/office.nix + ../../modules/home-manager/apps/qt-apps.nix + ../../modules/home-manager/apps/social.nix + ../../modules/home-manager/apps/submodules/firefox.nix + ../../modules/home-manager/devel/alacritty.nix + ../../modules/home-manager/devel/shell + ../../modules/home-manager/devel/git.nix + ../../modules/home-manager/devel/vscode + ../../modules/home-manager/devel/wezterm.nix + ../../modules/home-manager/theming/theming.nix + ../../modules/home-manager/wm/hyprland # needs hyprland.nix import in configuration.nix + ../../modules/home-manager/wm/kde + ]; + + home.activation = { + myScripts = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + run ln -Tsf ${userSettings.flakeDirectory}/scripts ~/scripts + ''; + }; + + programs.firefox.profiles.${userSettings.username} = { + bookmarks = lib.mkForce { }; + }; + + services.network-manager-applet.enable = true; + services.blueman-applet.enable = true; + + wayland.windowManager.hyprland.settings = { + # Fallback rule + monitor = lib.mkForce ", preferred, auto, 1.25"; + }; + + home.stateVersion = "23.11"; # Do not modify +} diff --git a/hosts/barbara-laptop/mamas-packages.nix b/hosts/barbara-laptop/mamas-packages.nix new file mode 100644 index 0000000..fa9b4b3 --- /dev/null +++ b/hosts/barbara-laptop/mamas-packages.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # Halle Mama! Hier deine Packages untereinander hinschreiben und danach diesen Befehl ausführen im Terminal (Strg+Alt+T): "homie" + # Die Namen der packages findest du auf: https://search.nixos.org/packages?channel=unstable& + bitwarden-desktop + gimp + krita + handbrake + gthumb + mpv + qpwgraph + spotify + vlc + signal-desktop + kdePackages.audiocd-kio + ]; +} diff --git a/modules/home-manager/wm/hyprland/hyprland_conf/input.nix b/modules/home-manager/wm/hyprland/hyprland_conf/input.nix index bbbce9f..c9710b3 100644 --- a/modules/home-manager/wm/hyprland/hyprland_conf/input.nix +++ b/modules/home-manager/wm/hyprland/hyprland_conf/input.nix @@ -16,6 +16,10 @@ output = "eDP-1"; }; + cursor = { + no_hardware_cursors = 1; + }; + gesture = [ "3, horizontal, workspace" "3, vertical, scale:1.5, fullscreen" diff --git a/modules/system/hardware/automount.nix b/modules/system/hardware/automount.nix index fdc5da0..26b2999 100644 --- a/modules/system/hardware/automount.nix +++ b/modules/system/hardware/automount.nix @@ -1,7 +1,10 @@ -{ ... }: +{ pkgs, ... }: { services.devmon.enable = true; services.gvfs.enable = true; services.udisks2.enable = true; + environment.systemPackages = with pkgs; [ + ntfs3g + ]; }