Move wallpaper setting into flake.nix to make it easier and drop requirement for specialArgs

This commit is contained in:
Evie Litherland-Smith 2023-06-24 09:10:26 +01:00
parent 8578fc23c3
commit a40b8d38d8
3 changed files with 11 additions and 15 deletions

View file

@ -10,9 +10,10 @@
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git"; wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
}; };
outputs = inputs @ { outputs = {
nixpkgs, nixpkgs,
home-manager, home-manager,
wallpapers,
... ...
}: let }: let
common = {lib, ...}: { common = {lib, ...}: {
@ -64,6 +65,7 @@
powerOnBoot = true; powerOnBoot = true;
}; };
}; };
wallpaper = {wayland.windowManager.sway.config.output."*".bg = "${wallpapers.outputs.default} fill";};
in { in {
nixosConfigurations = { nixosConfigurations = {
Legion = nixpkgs.lib.nixosSystem { Legion = nixpkgs.lib.nixosSystem {
@ -83,13 +85,13 @@
hardware-audio hardware-audio
hardware-bluetooth hardware-bluetooth
./hosts/Vanguard/configuration.nix ./hosts/Vanguard/configuration.nix
{home.users.xenia = {imports = [wallpaper];};}
./wm/sway.nix ./wm/sway.nix
./services/sshd ./services/sshd
]; ];
}; };
N0245 = nixpkgs.lib.nixosSystem { N0245 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = inputs;
modules = [ modules = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
common common
@ -97,6 +99,7 @@
hardware-bluetooth hardware-bluetooth
./hosts/N0245/configuration.nix ./hosts/N0245/configuration.nix
./wm/sway.nix ./wm/sway.nix
{home.users.elitherl = {imports = [wallpaper];};}
./services/syncthing/N0245.nix ./services/syncthing/N0245.nix
]; ];
}; };
@ -108,7 +111,10 @@
}; };
"xenia" = home-manager.lib.homeManagerConfiguration { "xenia" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."aarch64-linux"; pkgs = nixpkgs.legacyPackages."aarch64-linux";
modules = [./hosts/Northstar/home.nix]; modules = [
./hosts/Northstar/home.nix
wallpaper
];
}; };
}; };
}; };

View file

@ -1,11 +1,7 @@
# Edit this configuration file to define what should be installed on # Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ {pkgs, ...}: {
pkgs,
wallpapers,
...
}: {
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -95,7 +91,6 @@
wayland.windowManager.sway.config = { wayland.windowManager.sway.config = {
output = { output = {
"*".bg = "${wallpapers.outputs.default} fill";
"Dell Inc. DELL U2417H 5K9YD872FY1L".transform = "270"; "Dell Inc. DELL U2417H 5K9YD872FY1L".transform = "270";
}; };
startup = [{command = "firefox";} {command = "teams-for-linux";}]; startup = [{command = "firefox";} {command = "teams-for-linux";}];

View file

@ -1,8 +1,4 @@
{ {pkgs, ...}: {
pkgs,
wallpapers,
...
}: {
imports = [ imports = [
../../home/personal.nix ../../home/personal.nix
../../home/gui/firefox.nix ../../home/gui/firefox.nix
@ -22,7 +18,6 @@
wayland.windowManager.sway = { wayland.windowManager.sway = {
config = { config = {
output."*".bg = "${wallpapers.outputs.default} fill";
input = { input = {
"touch" = {map_to_output = "DSI-1";}; "touch" = {map_to_output = "DSI-1";};
"touchpad" = {click_method = "clickfinger";}; "touchpad" = {click_method = "clickfinger";};