diff --git a/configuration.nix b/configuration.nix index f10cb8f..ab1c3b3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -18,6 +18,8 @@ # Include the results of the hardware scan. ./imports.nix ]; + + environment.pathsToLink = [ "/share/applications" "/share/xdg-desktop-portal" ]; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/flake.nix b/flake.nix index e06ab98..db896da 100644 --- a/flake.nix +++ b/flake.nix @@ -8,12 +8,12 @@ }; outputs = - inputs@{ + { self, nixpkgs, home-manager, ... - }: + }@inputs: let pkgs = nixpkgs.legacyPackages.x86_64-linux; in @@ -40,16 +40,12 @@ }; marty-latitude = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit inputs; }; modules = [ ./marty-latitude.nix ./configuration.nix ./user/marty.nix home-manager.nixosModules.home-manager - # { - # home-manager.useGlobalPkgs = true; - # home-manager.useUserPackages = true; - # home-manager.users.marty = import ./config.nix/modules/home.nix - # } ]; }; diff --git a/marty-pc.nix b/marty-pc.nix index f5bd0e0..780241d 100644 --- a/marty-pc.nix +++ b/marty-pc.nix @@ -23,7 +23,7 @@ useGlobalPkgs = true; useUserPackages = true; users = { - marty = import ./config.nix/modules/home.nix; + marty = import ./modules/home.nix; }; }; diff --git a/marty-server.nix b/marty-server.nix index 3732222..e8c85a1 100644 --- a/marty-server.nix +++ b/marty-server.nix @@ -23,7 +23,7 @@ useGlobalPkgs = true; useUserPackages = true; users = { - marty = import ./config.nix/modules/home.nix; + marty = import ./modules/home.nix; }; }; diff --git a/modules/home.nix b/modules/home.nix index 500efb6..d645cef 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: { + imports = [ ./window_manager ]; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "marty"; @@ -17,6 +18,9 @@ # The home.packages option allows you to install Nix packages into your # environment. + + programs.fish.enable = true; + home.packages = with pkgs; [ # # Adds the 'hello' command to your environment. It prints a friendly # # "Hello, world!" when run. diff --git a/modules/import_modules.nix b/modules/import_modules.nix index 7062de3..012425b 100644 --- a/modules/import_modules.nix +++ b/modules/import_modules.nix @@ -8,7 +8,6 @@ { imports = [ ./development/import_development.nix - ./window_manager/import_wm.nix ]; } diff --git a/modules/window_manager/bar.nix b/modules/window_manager/bar.nix index 483288f..158d934 100644 --- a/modules/window_manager/bar.nix +++ b/modules/window_manager/bar.nix @@ -5,22 +5,22 @@ ... }: -let - enable_waybar = - if config.networking.hostName == "marty-pc" then - true - else if config.networking.hostName == "marty-latitude" then - true - else if config.networking.hostName == "marty-server" then - false - else - false; -in +# let +# enable_waybar = +# if config.networking.hostName == "marty-pc" then +# true +# else if config.networking.hostName == "marty-latitude" then +# true +# else if config.networking.hostName == "marty-server" then +# false +# else +# false; +# in { programs = { waybar = { - enable = enable_waybar; + enable = true; }; }; } diff --git a/modules/window_manager/import_wm.nix b/modules/window_manager/default.nix similarity index 100% rename from modules/window_manager/import_wm.nix rename to modules/window_manager/default.nix diff --git a/modules/window_manager/launcher.nix b/modules/window_manager/launcher.nix index 9f8bc3c..426111c 100644 --- a/modules/window_manager/launcher.nix +++ b/modules/window_manager/launcher.nix @@ -1,6 +1,7 @@ -{ config, pkgs, ... }: +{ config, pkgs,... }: { + home.packages = [pkgs.cmatrix]; programs.rofi = { enable = true; theme = "sidebar"; diff --git a/modules/window_manager/window_manager.nix b/modules/window_manager/window_manager.nix index c759bd4..fc6de68 100644 --- a/modules/window_manager/window_manager.nix +++ b/modules/window_manager/window_manager.nix @@ -5,26 +5,41 @@ ... }: -let - enable_hyprland = - if config.networking.hostName == "marty-pc" then - true - else if config.networking.hostName == "marty-latitude" then - true - else if config.networking.hostName == "marty-server" then - false - else - false; -in +# let +# enable_hyprland = +# if config.networking.hostName == "marty-pc" then +# true +# else if config.networking.hostName == "marty-latitude" then +# true +# else if config.networking.hostName == "marty-server" then +# false +# else +# false; +# in { + xdg.portal = { + enable = true; + configPackages = [ pkgs.xdg-desktop-portal-hyprland ]; + extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; + }; programs = { - hyprland = { - enable = enable_hyprland; - xwayland.enable = enable_hyprland; + kitty = { + enable = true; }; hyprlock = { - enable = enable_hyprland; + enable = true; }; }; + wayland.windowManager.hyprland = { + enable = true; + settings = { + "$mod" = "SUPER"; + bind = [ + "$mod, D, exec, rofi -show drun" + "$mod, Enter, exec, kitty" + ]; + }; + }; + home.sessionVariables.NIXOS_OZONE_WL = "1"; } diff --git a/system/dm.nix b/system/dm.nix new file mode 100644 index 0000000..944bf6c --- /dev/null +++ b/system/dm.nix @@ -0,0 +1,18 @@ +{ config, pkgs, lib, ...}: + +{ + services = { + xserver = { + xkb = { +layout = "de"; +variant = ""; +}; +}; +displayManager.gdm = { +enable = true; +wayland = true; +autoSuspend = false; +}; +}; +} + diff --git a/system/import_system.nix b/system/import_system.nix index 3eee286..196ba87 100644 --- a/system/import_system.nix +++ b/system/import_system.nix @@ -11,5 +11,6 @@ ./shell.nix ./terminal.nix ./networking.nix + ./dm.nix ]; } diff --git a/system/shell.nix b/system/shell.nix index d8b02d0..968d8fa 100644 --- a/system/shell.nix +++ b/system/shell.nix @@ -7,9 +7,9 @@ coreutils ]; }; - programs = { - fish = { - enable = true; - }; - }; + # programs = { + # fish = { + # enable = true; + # }; + # }; } diff --git a/user/marty.nix b/user/marty.nix index 0cdb836..2a7b6c2 100644 --- a/user/marty.nix +++ b/user/marty.nix @@ -16,7 +16,7 @@ "audio" "render" ]; - shell = pkgs.fish; + # shell = pkgs.fish; }; security.sudo = {