Migrate remaining nixos modules
This commit is contained in:
parent
94498a0038
commit
dcdc97aad8
16
hosts/common/optional/hyprland.nix
Normal file
16
hosts/common/optional/hyprland.nix
Normal file
@ -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";
|
||||
}
|
19
hosts/common/optional/thunar.nix
Normal file
19
hosts/common/optional/thunar.nix
Normal file
@ -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
|
||||
}
|
18
hosts/common/optional/wayland.nix
Normal file
18
hosts/common/optional/wayland.nix
Normal file
@ -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
|
||||
];
|
||||
}
|
@ -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;
|
||||
# }
|
||||
];
|
||||
};
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
# hydra-auto-upgrade = import ./hydra-auto-upgrade.nix;
|
||||
syncthing = import ./syncthing.nix;
|
||||
}
|
||||
|
@ -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";
|
||||
};
|
||||
}
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
@ -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;
|
||||
};
|
||||
}
|
@ -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
|
||||
};
|
||||
}
|
@ -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;
|
||||
};
|
||||
}
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user