diff --git a/Makefile b/Makefile index 0fda0ac8..ef02c0aa 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ HOMEMANAGER_CONFIG := $(PWD)/machines/$(HOSTNAME)/$(USER).nix CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config) HOMEMANAGER_CONFIG_DIR := $(CONFIG_DIR)/home-manager -.PHONY: default all clean nixos home /etc/nixos/config nvim +.PHONY: default all clean nixos home home-init /etc/nixos/config nvim default: command -v nix > /dev/null || exit 1 @@ -18,9 +18,12 @@ clean: nixos: /etc/nixos/config grep -i ./config/machines/$$(hostname) /etc/nixos/configuration.nix && sudo nixos-rebuild switch -home: $(HOMEMANAGER_CONFIG_DIR)/home.nix +home: $(HOMEMANAGER_CONFIG_DIR)/home.nix $(CONFIG_DIR)/nixpkgs/config.nix $(HOME)/.nix-defexpr/channels/home-manager nix-shell -p home-manager --run "home-manager switch" +home-init: $(HOMEMANAGER_CONFIG_DIR)/home.nix $(CONFIG_DIR)/nixpkgs/config.nix $(HOME)/.nix-defexpr/channels/home-manager + nix-shell '' -A install + /etc/nixos/config: sudo rsync -avz --exclude-from=.rsyncignore --filter=':- .gitignore' --delete-during --delete-excluded ./ $@ @@ -32,6 +35,13 @@ $(HOMEMANAGER_CONFIG): $(HOMEMANAGER_CONFIG_DIR)/home.nix: $(HOMEMANAGER_CONFIG) $(HOMEMANAGER_CONFIG_DIR) /nix -ln -s $(HOMEMANAGER_CONFIG) $@ +$(CONFIG_DIR)/nixpkgs/config.nix: + echo '{ allowUnfree = true; }' > $@ + +$(HOME)/.nix-defexpr/channels/home-manager: + nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager + nix-channel --update + $(CONFIG_DIR)/nvim: $(CONFIG_DIR) -nix-shell -p git --run "git clone https://git.xenia.me.uk/xenia/nvim.git $@" -nix-shell -p git --run "git -C $@ pull --ff-only" diff --git a/home/desktop/sway.nix b/home/desktop/sway.nix index f235a3ce..2ca50bfe 100644 --- a/home/desktop/sway.nix +++ b/home/desktop/sway.nix @@ -41,7 +41,6 @@ in { ]; home.packages = with pkgs; [ configure-gtk - swaycons pipewire wireplumber wl-clipboard @@ -51,7 +50,6 @@ in { programs.rofi.package = pkgs.rofi-wayland; wayland.windowManager.sway = { enable = true; - systemd.enable = true; wrapperFeatures.gtk = true; xwayland = true; extraSessionCommands = '' @@ -98,10 +96,6 @@ in { command = "configure-gtk"; always = true; } - { - command = "swaycons"; - always = true; - } {command = "dunst";} ]; modifier = lib.mkDefault "Mod1"; diff --git a/home/desktop/waybar.nix b/home/desktop/waybar.nix index 0cfbfd46..47389beb 100644 --- a/home/desktop/waybar.nix +++ b/home/desktop/waybar.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{pkgs, lib, ...}: { home.packages = with pkgs; [ (nerdfonts.override {fonts = ["FiraCode"];}) bluez @@ -14,16 +14,16 @@ "~/.config/waybar/modules.json" "~/.config/waybar/layout.json" ]; - "modules-left" = [ + "modules-left" = lib.mkDefault [ "sway/workspaces" "cpu" "memory" "temperature" ]; - "modules-center" = [ + "modules-center" = lib.mkDefault [ "clock" ]; - "modules-right" = [ + "modules-right" = lib.mkDefault [ "pulseaudio" "bluetooth" "network#compact" diff --git a/machines/Northstar/xenia.nix b/machines/Northstar/xenia.nix index 00f89e5e..8e1e5fa3 100644 --- a/machines/Northstar/xenia.nix +++ b/machines/Northstar/xenia.nix @@ -18,41 +18,22 @@ wayland.windowManager.sway = { config = { input = { - "*" = {xkb_layout = "gb";}; "touch" = {map_to_output = "DSI-1";}; "touchpad" = {click_method = "clickfinger";}; "10182:3632:hid-over-i2c_27C6:0E30" = {map_to_output = "DSI-1";}; }; - modifier = "Mod1"; - terminal = "{pkgs.foot}/bin/foot"; + terminal = "${pkgs.foot}/bin/foot"; output = { DSI-1 = { scale = "2.0"; transform = "270"; - bg = "~/nixos/wallpaper.jpg fill"; }; }; - gaps = { - inner = 5; - top = 5; - bottom = 5; - left = 20; - right = 20; - }; - startup = [ - {command = "dunst";} - {command = "waybar";} - # {command = "rot8";} - ]; }; }; programs.waybar = { settings = { main = { - "include" = [ - "~/.config/waybar/modules.json" - "~/.config/waybar/layout.json" - ]; "modules-left" = ["sway/workspaces"]; "modules-center" = ["clock#compact"]; "modules-right" = ["network#compact" "backlight" "battery" "tray"];