From e1760deb23e7f991a4be3d6e075b546b8d9394be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 25 Jul 2020 08:46:56 +0100 Subject: [PATCH] refactor to one single config per box --- .../foureighty/{configuration.nix => default.nix} | 8 ++++++-- nixos/boxes/foureighty/home.nix | 12 ------------ nixos/boxes/skinnyv/home.nix | 1 - nixos/gnome/default.nix | 12 ++++++++++++ nixos/i3/system.nix | 6 +++++- nixos/sway/system.nix | 1 + 6 files changed, 24 insertions(+), 16 deletions(-) rename nixos/boxes/foureighty/{configuration.nix => default.nix} (90%) delete mode 100644 nixos/boxes/foureighty/home.nix create mode 100644 nixos/gnome/default.nix diff --git a/nixos/boxes/foureighty/configuration.nix b/nixos/boxes/foureighty/default.nix similarity index 90% rename from nixos/boxes/foureighty/configuration.nix rename to nixos/boxes/foureighty/default.nix index 360eba95..f559640d 100644 --- a/nixos/boxes/foureighty/configuration.nix +++ b/nixos/boxes/foureighty/default.nix @@ -49,12 +49,16 @@ fonts.fontconfig.enable = true; home-manager.users.cyryl = {...}: { imports = [ - ./home.nix + ../../home-common.nix + ../../programs/git.nix + ../../gui.nix ]; home.stateVersion = config.system.stateVersion; nixpkgs.overlays = config.nixpkgs.overlays; nixpkgs.config = config.nixpkgs.config; + + home.file.".config/i3/status.toml".source = ../../../.config/i3/status-double-bat.toml; }; imports = [ @@ -66,8 +70,8 @@ ../../zerotier.nix ../../distributed-builds.nix ../../libvirt.nix - ../../gnome/system.nix ../../backups.nix + ../../gnome ]; diff --git a/nixos/boxes/foureighty/home.nix b/nixos/boxes/foureighty/home.nix deleted file mode 100644 index 84a24dcf..00000000 --- a/nixos/boxes/foureighty/home.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, pkgs, ... }: - -{ - home.file.".config/i3/status.toml".source = ../../../.config/i3/status-double-bat.toml; - - imports = [ - ../../home-common.nix - ../../programs/git.nix - ../../gui.nix - ../../gnome/home.nix - ]; -} diff --git a/nixos/boxes/skinnyv/home.nix b/nixos/boxes/skinnyv/home.nix index 0112cb72..f6f7d93f 100644 --- a/nixos/boxes/skinnyv/home.nix +++ b/nixos/boxes/skinnyv/home.nix @@ -6,6 +6,5 @@ ../../home-common.nix ../../programs/git.nix ../../gui.nix - ../../i3/home.nix ]; } diff --git a/nixos/gnome/default.nix b/nixos/gnome/default.nix new file mode 100644 index 00000000..7cbe14ea --- /dev/null +++ b/nixos/gnome/default.nix @@ -0,0 +1,12 @@ +{ config, pkgs, ... }: +{ + imports = [ + ./system.nix + ]; + + home-manager.users.cyryl = {...}: { + imports = [ + ./home.nix + ]; + }; +} diff --git a/nixos/i3/system.nix b/nixos/i3/system.nix index 74269f57..ff5d9f0f 100644 --- a/nixos/i3/system.nix +++ b/nixos/i3/system.nix @@ -11,7 +11,11 @@ allowAnyUser = true; }; - dbus.packages = with pkgs; [ gnome2.GConf gnome3.dconf ]; + dbus = { + packages = with pkgs; [ gnome2.GConf gnome3.dconf ]; + socketActivated = true; + }; + fractalart.enable = true; colord.enable = true; xserver.windowManager.i3.enable = true; diff --git a/nixos/sway/system.nix b/nixos/sway/system.nix index 33a6f9e3..28f8433d 100644 --- a/nixos/sway/system.nix +++ b/nixos/sway/system.nix @@ -1,6 +1,7 @@ { config, pkgs, ... }: { services.dbus.packages = with pkgs; [ gnome2.GConf gnome3.dconf ]; + services.dbus.socketActivated = true; programs.sway.enable = true; systemd.defaultUnit = "graphical.target"; }