From a61957211ce7a2663b11b0f9200c390365f144e8 Mon Sep 17 00:00:00 2001 From: lorenzhohermuth Date: Sun, 24 Nov 2024 18:33:41 +0100 Subject: [PATCH] lot of changes --- configuration.nix | 114 +++++++++++++++++---------- flake.lock | 194 ++++++++++++++++++++++++++++++++++++++++++---- flake.nix | 14 +++- home.nix | 45 ++++++++++- 4 files changed, 308 insertions(+), 59 deletions(-) diff --git a/configuration.nix b/configuration.nix index c92f7f1..70fe85f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,27 +2,28 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ config, lib, pkgs, callPackage, catppuccinFlavor, ... }: +{ pkgs, inputs, catppuccinFlavor, ... }: { imports = [ ./hardware-configuration.nix ]; + environment.variables.HYPRCURSOR_THEME = "McMojave"; + programs.steam = { enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers + gamescopeSession.enable = true; }; catppuccin.flavor = catppuccinFlavor; catppuccin.enable = true; programs.dconf.enable = true; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; networking.hostName = "hp-laptop-lho"; # Define your hostname. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. @@ -41,47 +42,43 @@ displayManager = { sddm = { enable = true; + wayland.enable = true; package = pkgs.kdePackages.sddm; }; }; - xserver = { - enable = true; - desktopManager = { - xterm.enable = false; - }; - - windowManager.i3 = { - enable = true; - extraPackages = with pkgs; [ - rofi-calc - rofimoji - rofi - polybar - polybar-pulseaudio-control - pavucontrol - dunst - i3lock-color # locksreen - arandr # manager monitor - lxqt.lxqt-sudo - ]; - }; - }; }; + + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + + # git freeze fix + programs.ssh = { + enableAskPassword = true; + askPassword = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass"; + }; + # Configure keymap in X11 services.xserver.xkb.layout = "ch"; - services.displayManager.defaultSession = "none+i3"; + services.displayManager.defaultSession = "hyprland"; # services.xserver.xkb.options = "eurosign:e,caps:escape"; # Enable CUPS to print documents. # services.printing.enable = true; # Enable sound. - hardware.pulseaudio.enable = true; + hardware.pulseaudio = { + enable = true; + support32Bit = true; + }; + nixpkgs.config.pulseaudio = true; # OR - # services.pipewire = { - # enable = true; - # pulse.enable = true; - # }; + services.pipewire.enable = false; + #services.pipewire = { + # enable = true; + # pulse.enable = true; + #}; # Enable touchpad support (enabled default in most desktopManager). # services.libinput.enable = true; @@ -96,11 +93,23 @@ services.libinput.touchpad.naturalScrolling = true; services.auto-cpufreq.enable = true; + services.gnome.gnome-keyring.enable = true; + security.pam.services.sddm.enableGnomeKeyring = true; + + virtualisation.docker.enable = true; + + virtualisation.docker.rootless = { + enable = true; + setSocketVariable = true; + }; users.users.lorenz = { shell = pkgs.zsh; isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + extraGroups = [ + "wheel" # Enable ‘sudo’ for the user. + "docker" + ]; }; fonts.packages = with pkgs; [ @@ -113,16 +122,19 @@ users.defaultUserShell = pkgs.zsh; environment.systemPackages = [ pkgs.auto-cpufreq + pkgs.killall pkgs.neovim pkgs.neofetch pkgs.wget + # for neovim pkgs.gcc pkgs.nodejs_22 pkgs.python313 pkgs.cargo + pkgs.go pkgs.networkmanager_dmenu pkgs.dmenu @@ -137,7 +149,28 @@ pkgs.gitFull # git, git gui, gitk pkgs.tk # for git ui - pkgs.vscode + pkgs.lxqt.lxqt-openssh-askpass # git freeze fix + + pkgs.pavucontrol + pkgs.dunst + pkgs.i3lock-color # locksreen + pkgs.arandr # manager monitor + pkgs.lxqt.lxqt-sudo + + #hyprland + pkgs.rofi-wayland + pkgs.waybar + pkgs.hyprlock + pkgs.hyprpaper + + pkgs.kanshi + + inputs.mcmojave-hyprcursor.packages.${pkgs.stdenv.hostPlatform.system}.default + ]; + + programs.nix-ld.libraries = with pkgs; [ + pkgs.lua-language-server + pkgs.lua ]; # Some programs need SUID wrappers, can be configured further or are @@ -153,11 +186,14 @@ # Enable the OpenSSH daemon. services.openssh.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; + networking.firewall = { + enable = true; + allowedTCPPorts = [ 53317 ]; + allowedUDPPorts = [ 53317 ]; + }; + + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you diff --git a/flake.lock b/flake.lock index a4d481e..842d620 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "catppuccin": { "locked": { - "lastModified": 1721784420, - "narHash": "sha256-bgF6fN4Qgk7NErFKGuuqWXcLORsiykTYyqMUFRiAUBY=", + "lastModified": 1731232837, + "narHash": "sha256-0aIwr/RC/oe7rYkfJb47xjdEQDSNcqpFGsEa+EPlDEs=", "owner": "catppuccin", "repo": "nix", - "rev": "8bdb55cc1c13f572b6e4307a3c0d64f1ae286a4f", + "rev": "32359bf226fe874d3b7a0a5753d291a4da9616fe", "type": "github" }, "original": { @@ -38,11 +38,11 @@ ] }, "locked": { - "lastModified": 1721534365, - "narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=", + "lastModified": 1731968878, + "narHash": "sha256-+hTCwETOE9N8voTAaF+IzdUZz28Ws3LDpH90FWADrEE=", "owner": "nix-community", "repo": "home-manager", - "rev": "635563f245309ef5320f80c7ebcb89b2398d2949", + "rev": "a42fa14b53ceab66274a21da480c9f8e06204173", "type": "github" }, "original": { @@ -52,13 +52,149 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": "hyprlang", + "nixpkgs": [ + "mcmojave-hyprcursor", + "nixpkgs" + ], + "systems": "systems" + }, + "locked": { + "lastModified": 1721330371, + "narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": "hyprutils", + "nixpkgs": [ + "mcmojave-hyprcursor", + "hyprcursor", + "nixpkgs" + ], + "systems": [ + "mcmojave-hyprcursor", + "hyprcursor", + "systems" + ] + }, + "locked": { + "lastModified": 1721324361, + "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "mcmojave-hyprcursor", + "hyprcursor", + "hyprlang", + "nixpkgs" + ], + "systems": [ + "mcmojave-hyprcursor", + "hyprcursor", + "hyprlang", + "systems" + ] + }, + "locked": { + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "962582a090bc233c4de9d9897f46794280288989", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "mcmojave-hyprcursor": { + "inputs": { + "hyprcursor": "hyprcursor", + "nixpkgs": "nixpkgs", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1722822648, + "narHash": "sha256-aM3y6Fq156ilzKUPrZTwp+XWmIqcoQeklRERN0Y0Nvo=", + "owner": "libadoxon", + "repo": "mcmojave-hyprcursor", + "rev": "ad4bbde8d87810f74fe72ae102ce824f26bb1b07", + "type": "github" + }, + "original": { + "owner": "libadoxon", + "repo": "mcmojave-hyprcursor", + "type": "github" + } + }, + "nix-ld": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1728031945, + "narHash": "sha256-NRkLjdMtVfC6dD1gEbYZWFEtbmC2xfD6ft1IP7l76Vw=", + "owner": "Mic92", + "repo": "nix-ld", + "rev": "4524c512e8729ccb5a1b9239d01e1474cbf074a2", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-ld", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1721379653, - "narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=", + "lastModified": 1722062969, + "narHash": "sha256-QOS0ykELUmPbrrUGmegAUlpmUFznDQeR4q7rFhl8eQg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374", + "rev": "b73c2221a46c13557b1b3be9c2070cc42cf01eb3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1731676054, + "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", "type": "github" }, "original": { @@ -72,7 +208,9 @@ "inputs": { "catppuccin": "catppuccin", "home-manager": "home-manager", - "nixpkgs": "nixpkgs", + "mcmojave-hyprcursor": "mcmojave-hyprcursor", + "nix-ld": "nix-ld", + "nixpkgs": "nixpkgs_2", "spicetify-nix": "spicetify-nix" } }, @@ -84,11 +222,11 @@ ] }, "locked": { - "lastModified": 1722053480, - "narHash": "sha256-DG1jdoSIcRLkQvCs63MSMJmssHTwm4zGOmP3hUtAzSY=", + "lastModified": 1731989835, + "narHash": "sha256-Y1S+x2jWLQB9hn4aG04/213ZlTp+30itKe9KcSsrFgw=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "e954f700aeaeb1b4df261c68c2391089f655fac8", + "rev": "aac6c81489f61034916efa4ed62840dc1d72c413", "type": "github" }, "original": { @@ -96,6 +234,36 @@ "repo": "spicetify-nix", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 13593a6..53bf59a 100644 --- a/flake.nix +++ b/flake.nix @@ -10,9 +10,13 @@ url = "github:Gerg-L/spicetify-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + nix-ld.url = "github:Mic92/nix-ld"; + nix-ld.inputs.nixpkgs.follows = "nixpkgs"; + + mcmojave-hyprcursor.url = "github:libadoxon/mcmojave-hyprcursor"; }; - outputs = { nixpkgs, home-manager, catppuccin, spicetify-nix, ... } @ inputs: let + outputs = { self, nixpkgs, ... } @ inputs: let lib = nixpkgs.lib; system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -22,16 +26,18 @@ hp-laptop-lho = lib.nixosSystem { inherit system; specialArgs = { + inherit inputs; inherit catppuccinFlavor; }; modules = [ + inputs.nix-ld.nixosModules.nix-ld ./configuration.nix - catppuccin.nixosModules.catppuccin + inputs.catppuccin.nixosModules.catppuccin ]; }; }; homeConfigurations = { - lorenz = home-manager.lib.homeManagerConfiguration { + lorenz = inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; extraSpecialArgs = { inherit inputs; @@ -39,7 +45,7 @@ }; modules = [ ./home.nix - catppuccin.homeManagerModules.catppuccin + inputs.catppuccin.homeManagerModules.catppuccin ]; }; }; diff --git a/home.nix b/home.nix index 5ab3cb2..26626b4 100644 --- a/home.nix +++ b/home.nix @@ -1,5 +1,6 @@ -{ config, pkgs, inputs, catppuccinFlavor, ... }: -{ imports = [ +{ pkgs, inputs, catppuccinFlavor, ... }: +{ + imports = [ inputs.spicetify-nix.homeManagerModules.default ]; @@ -26,6 +27,11 @@ }; }; + # git freeze fix + home.sessionVariables = { + SSH_ASKPASS = "${pkgs.lxqt.lxqt-openssh-askpass}/bin/lxqt-openssh-askpass"; + }; + #spotify programs.spicetify = @@ -66,6 +72,7 @@ style.name = "kvantum"; }; + # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "lorenz"; @@ -85,6 +92,8 @@ # environment. nixpkgs.config.allowUnfree = true; home.packages = [ + pkgs.firefox + pkgs.git-credential-manager pkgs.zsh # shell pkgs.fzf # fuzzy search @@ -113,14 +122,44 @@ pkgs.betterdiscordctl pkgs.aseprite - pkgs.flameshot + pkgs.hyprshot + pkgs.xdg-desktop-portal-kde + pkgs.xdg-desktop-portal pkgs.xournalpp + pkgs.texliveGUST pkgs.unzip pkgs.textsnatcher pkgs.copyq + #d-bus + pkgs.d-spy + pkgs.kdePackages.qttools + + pkgs.wireshark + pkgs.hoppscotch + + #flash boot sticks + pkgs.impression + pkgs.rpi-imager + + pkgs.xorg.xrandr + + #alternative to airdrop + pkgs.localsend + + #edit metadata + pkgs.metadata-cleaner + + #convert images + pkgs.switcheroo + + pkgs.jetbrains.datagrip + pkgs.jetbrains.idea-ultimate + + #better man pages + pkgs.tealdeer # run wtih tldr # # It is sometimes useful to fine-tune packages, for example, by applying # # overrides. You can do that directly here, just don't forget the # # parentheses. Maybe you want to install Nerd Fonts with a limited number of