diff --git a/hosts/common/optional/hyprland.nix b/hosts/common/optional/hyprland.nix new file mode 100644 index 0000000..baddd00 --- /dev/null +++ b/hosts/common/optional/hyprland.nix @@ -0,0 +1,16 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: + +{ + + programs.hyprland.enable = true; + programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland; # does only work with nixos-unstable + programs.hyprland.xwayland.enable = true; + security.pam.services.hyprlock = { }; + services.displayManager.defaultSession = "hyprland"; +} diff --git a/hosts/common/optional/thunar.nix b/hosts/common/optional/thunar.nix new file mode 100644 index 0000000..face0de --- /dev/null +++ b/hosts/common/optional/thunar.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + + programs.thunar.enable = true; + programs.xfconf.enable = true; # Persist saved preferences + programs.thunar.plugins = with pkgs.xfce; [ + thunar-archive-plugin + thunar-volman + thunar-media-tags-plugin + ]; + services.gvfs.enable = true; # Mount, trash, and other functionalities + services.tumbler.enable = true; # Thumbnail support for images +} diff --git a/hosts/common/optional/wayland.nix b/hosts/common/optional/wayland.nix new file mode 100644 index 0000000..5b72ee9 --- /dev/null +++ b/hosts/common/optional/wayland.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + + environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland + + security.pam.services.gtklock = { }; + + environment.systemPackages = with pkgs; [ + kdePackages.qtwayland + wl-clipboard + ]; +} diff --git a/modules/nixos/builder/default.nix b/modules/nixos/builder/default.nix deleted file mode 100644 index 5a75e9b..0000000 --- a/modules/nixos/builder/default.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.builder; -in -{ - options.modules.builder = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - nix.distributedBuilds = true; - nix.settings.builders-use-substitutes = true; - - nix.buildMachines = [ - { - hostName = "builder.julian-mutter.de"; - protocol = "ssh"; - sshUser = "nix"; - systems = [ - "x86_64-linux" - "aarch64-linux" - ]; - maxJobs = 4; - speedFactor = 3; - supportedFeatures = [ - "nixos-test" - "benchmark" - "big-parallel" - "kvm" - ]; - mandatoryFeatures = [ ]; - } - # { - # hostName = "localhost"; - # protocol = null; - # systems = [ - # "x86_64-linux" - # ]; - # maxJobs = 4; - # speedFactor = 1; - # } - ]; - }; -} diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 8464af6..321a10a 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1,3 +1,4 @@ { # hydra-auto-upgrade = import ./hydra-auto-upgrade.nix; + syncthing = import ./syncthing.nix; } diff --git a/modules/nixos/hyprland/default.nix b/modules/nixos/hyprland/default.nix deleted file mode 100644 index a06bd71..0000000 --- a/modules/nixos/hyprland/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.hyprland; -in -{ - options.modules.hyprland = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - programs.hyprland.enable = true; - programs.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland; # does only work with nixos-unstable - programs.hyprland.xwayland.enable = true; - security.pam.services.hyprlock = { }; - services.displayManager.defaultSession = "hyprland"; - }; -} diff --git a/modules/nixos/i3/default.nix b/modules/nixos/i3/default.nix deleted file mode 100644 index 7fa204a..0000000 --- a/modules/nixos/i3/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.i3; -in -{ - options.modules.i3 = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - services.xserver.windowManager.i3.enable = true; - services.xserver.windowManager.i3.package = pkgs.i3-gaps; - services.displayManager.defaultSession = "none+i3"; - - programs.xss-lock = { - # responds to "loginctl lock-session" via dbus - enable = true; - lockerCommand = "${pkgs.i3lock}/bin/i3lock --ignore-empty-password --color=000000"; - }; - }; -} diff --git a/modules/nixos/keyring/default.nix b/modules/nixos/keyring/default.nix deleted file mode 100644 index 35400e3..0000000 --- a/modules/nixos/keyring/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.keyring; -in -{ - options.modules.keyring = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - programs.seahorse.enable = true; - services.gnome.gnome-keyring.enable = true; - }; -} diff --git a/modules/nixos/syncthing/default.nix b/modules/nixos/syncthing.nix similarity index 100% rename from modules/nixos/syncthing/default.nix rename to modules/nixos/syncthing.nix diff --git a/modules/nixos/thunar/default.nix b/modules/nixos/thunar/default.nix deleted file mode 100644 index 6c3a2c2..0000000 --- a/modules/nixos/thunar/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.thunar; -in -{ - options.modules.thunar = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - programs.thunar.enable = true; - programs.xfconf.enable = true; # Persist saved preferences - programs.thunar.plugins = with pkgs.xfce; [ - thunar-archive-plugin - thunar-volman - thunar-media-tags-plugin - ]; - services.gvfs.enable = true; # Mount, trash, and other functionalities - services.tumbler.enable = true; # Thumbnail support for images - }; -} diff --git a/modules/nixos/tuigreet/default.nix b/modules/nixos/tuigreet/default.nix deleted file mode 100644 index 689352a..0000000 --- a/modules/nixos/tuigreet/default.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.tuigreet; -in -{ - options.modules.tuigreet = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - services.greetd = { - enable = true; - settings = { - default_session = { - command = "${lib.getExe pkgs.greetd.tuigreet} --time --remember --remember-session"; - user = "greeter"; - }; - }; - }; - - # https://www.reddit.com/r/NixOS/comments/u0cdpi/tuigreet_with_xmonad_how/ - systemd.services.greetd.serviceConfig = { - Type = "idle"; - StandardInput = "tty"; - StandardOutput = "tty"; - StandardError = "journal"; # Without this errors will spam on screen - # Without these bootlogs will spam on screen - TTYReset = true; - TTYVHangup = true; - TTYVTDisallocate = true; - }; - - # unlock GPG keyring on login - security.pam.services.greetd.enableGnomeKeyring = true; - }; -} diff --git a/modules/nixos/users-julian/default.nix b/modules/nixos/users-julian/default.nix deleted file mode 100644 index 69d4945..0000000 --- a/modules/nixos/users-julian/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.users-julian; -in -{ - options.modules.users-julian = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - users.users.julian = { - isNormalUser = true; - description = "Julian"; - uid = 1000; - group = "julian"; - shell = pkgs.fish; - extraGroups = [ - "networkmanager" - "wheel" - "docker" - ]; - }; - programs.fish.enable = true; - users.groups.julian = { - gid = 1000; - }; - }; -} diff --git a/modules/nixos/wayland/default.nix b/modules/nixos/wayland/default.nix deleted file mode 100644 index 5b82c01..0000000 --- a/modules/nixos/wayland/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the module system. - config, - ... -}: - -let - cfg = config.modules.wayland; -in -{ - options.modules.wayland = { - enable = lib.mkOption { default = false; }; - }; - - config = lib.mkIf cfg.enable { - environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland - - security.pam.services.gtklock = { }; - - environment.systemPackages = with pkgs; [ - kdePackages.qtwayland - wl-clipboard - ]; - }; -}