made x11 conditional
This commit is contained in:
parent
37eac1b4bb
commit
ada74f1c4e
4 changed files with 56 additions and 32 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
|
|
@ -46,35 +46,14 @@
|
||||||
|
|
||||||
services.displayManager.defaultSession = "none+i3";
|
services.displayManager.defaultSession = "none+i3";
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
xkb.layout = "de";
|
|
||||||
xkb.variant = "";
|
|
||||||
enable = true;
|
|
||||||
dpi = 120;
|
|
||||||
|
|
||||||
displayManager = {
|
|
||||||
setupCommands = ''
|
|
||||||
${pkgs.xorg.xrandr}/bin/xrandr --output eDP-1 --mode 3840x2160;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
windowManager.i3 = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.i3-gaps;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
dmenu
|
|
||||||
i3lock
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
desktopManager.wallpaper.mode = "fill";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./programm_configs/yubikey-gpg.nix
|
./programm_configs/yubikey-gpg.nix
|
||||||
./printing/config.nix
|
./printing/config.nix
|
||||||
];
|
|
||||||
|
] ++ (if inputs.x11mode then
|
||||||
|
[ ./programm_configs/x11.nix ]
|
||||||
|
else [ ]);
|
||||||
|
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
|
|
@ -99,6 +78,12 @@
|
||||||
# GNOME Keyring
|
# GNOME Keyring
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
# duplicati
|
||||||
|
services.duplicati = {
|
||||||
|
enable = true;
|
||||||
|
user = "clemens";
|
||||||
|
};
|
||||||
|
|
||||||
# PipeWire Setup
|
# PipeWire Setup
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
|
|
@ -127,7 +112,11 @@
|
||||||
# home manager
|
# home manager
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.clemens = import ./home.nix;
|
home-manager.users.clemens = (import ./home.nix {
|
||||||
|
config = config;
|
||||||
|
pkgs = pkgs;
|
||||||
|
x11mode = inputs.x11mode;
|
||||||
|
});
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
|
||||||
12
flake.nix
12
flake.nix
|
|
@ -17,8 +17,18 @@
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
laptop-x11 = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
specialArgs = let inputs.x11mode = true; in { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
./hardware_configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
];
|
||||||
|
};
|
||||||
|
laptop-wayland = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = let inputs.x11mode = false; in { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
./hardware_configuration.nix
|
./hardware_configuration.nix
|
||||||
|
|
|
||||||
5
home.nix
5
home.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, x11mode, ... }:
|
||||||
let
|
let
|
||||||
tex = (pkgs.texlive.combine {
|
tex = (pkgs.texlive.combine {
|
||||||
inherit (pkgs.texlive) scheme-full;
|
inherit (pkgs.texlive) scheme-full;
|
||||||
|
|
@ -23,14 +23,13 @@ in
|
||||||
./programm_configs/git.nix
|
./programm_configs/git.nix
|
||||||
./programm_configs/vscode.nix
|
./programm_configs/vscode.nix
|
||||||
./programm_configs/rofi.nix
|
./programm_configs/rofi.nix
|
||||||
./programm_configs/i3.nix
|
|
||||||
./programm_configs/picom.nix
|
./programm_configs/picom.nix
|
||||||
./programm_configs/zsh.nix
|
./programm_configs/zsh.nix
|
||||||
./programm_configs/gnome.nix
|
./programm_configs/gnome.nix
|
||||||
./programm_configs/autorandr.nix
|
./programm_configs/autorandr.nix
|
||||||
./programm_configs/polybar.nix
|
./programm_configs/polybar.nix
|
||||||
./programm_configs/redshift.nix
|
./programm_configs/redshift.nix
|
||||||
];
|
] ++ (if x11mode then [ ./programm_configs/i3.nix ] else [ ]);
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
|
|
|
||||||
26
programm_configs/x11.nix
Normal file
26
programm_configs/x11.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.xserver = {
|
||||||
|
xkb.layout = "de";
|
||||||
|
xkb.variant = "";
|
||||||
|
enable = true;
|
||||||
|
dpi = 120;
|
||||||
|
|
||||||
|
displayManager = {
|
||||||
|
setupCommands = ''
|
||||||
|
${pkgs.xorg.xrandr}/bin/xrandr --output eDP-1 --mode 3840x2160;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
windowManager.i3 = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.i3-gaps;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
dmenu
|
||||||
|
i3lock
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopManager.wallpaper.mode = "fill";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue