Fix Northstar config, add requirements for home-manager stand-alone install to Makefile

This commit is contained in:
Evie Litherland-Smith 2023-06-21 08:23:48 +01:00
parent 2e9e40ff36
commit 7297aba1d5
4 changed files with 17 additions and 32 deletions

View file

@ -3,7 +3,7 @@ HOMEMANAGER_CONFIG := $(PWD)/machines/$(HOSTNAME)/$(USER).nix
CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config) CONFIG_DIR := $(if $(XDG_CONFIG_HOME), $(XDG_CONFIG_HOME), $(HOME)/.config)
HOMEMANAGER_CONFIG_DIR := $(CONFIG_DIR)/home-manager 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: default:
command -v nix > /dev/null || exit 1 command -v nix > /dev/null || exit 1
@ -18,9 +18,12 @@ clean:
nixos: /etc/nixos/config nixos: /etc/nixos/config
grep -i ./config/machines/$$(hostname) /etc/nixos/configuration.nix && sudo nixos-rebuild switch 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" 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 '<home-manager>' -A install
/etc/nixos/config: /etc/nixos/config:
sudo rsync -avz --exclude-from=.rsyncignore --filter=':- .gitignore' --delete-during --delete-excluded ./ $@ 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 $(HOMEMANAGER_CONFIG_DIR)/home.nix: $(HOMEMANAGER_CONFIG) $(HOMEMANAGER_CONFIG_DIR) /nix
-ln -s $(HOMEMANAGER_CONFIG) $@ -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) $(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 clone https://git.xenia.me.uk/xenia/nvim.git $@"
-nix-shell -p git --run "git -C $@ pull --ff-only" -nix-shell -p git --run "git -C $@ pull --ff-only"

View file

@ -41,7 +41,6 @@ in {
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
configure-gtk configure-gtk
swaycons
pipewire pipewire
wireplumber wireplumber
wl-clipboard wl-clipboard
@ -51,7 +50,6 @@ in {
programs.rofi.package = pkgs.rofi-wayland; programs.rofi.package = pkgs.rofi-wayland;
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
systemd.enable = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
xwayland = true; xwayland = true;
extraSessionCommands = '' extraSessionCommands = ''
@ -98,10 +96,6 @@ in {
command = "configure-gtk"; command = "configure-gtk";
always = true; always = true;
} }
{
command = "swaycons";
always = true;
}
{command = "dunst";} {command = "dunst";}
]; ];
modifier = lib.mkDefault "Mod1"; modifier = lib.mkDefault "Mod1";

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { {pkgs, lib, ...}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
(nerdfonts.override {fonts = ["FiraCode"];}) (nerdfonts.override {fonts = ["FiraCode"];})
bluez bluez
@ -14,16 +14,16 @@
"~/.config/waybar/modules.json" "~/.config/waybar/modules.json"
"~/.config/waybar/layout.json" "~/.config/waybar/layout.json"
]; ];
"modules-left" = [ "modules-left" = lib.mkDefault [
"sway/workspaces" "sway/workspaces"
"cpu" "cpu"
"memory" "memory"
"temperature" "temperature"
]; ];
"modules-center" = [ "modules-center" = lib.mkDefault [
"clock" "clock"
]; ];
"modules-right" = [ "modules-right" = lib.mkDefault [
"pulseaudio" "pulseaudio"
"bluetooth" "bluetooth"
"network#compact" "network#compact"

View file

@ -18,41 +18,22 @@
wayland.windowManager.sway = { wayland.windowManager.sway = {
config = { config = {
input = { input = {
"*" = {xkb_layout = "gb";};
"touch" = {map_to_output = "DSI-1";}; "touch" = {map_to_output = "DSI-1";};
"touchpad" = {click_method = "clickfinger";}; "touchpad" = {click_method = "clickfinger";};
"10182:3632:hid-over-i2c_27C6:0E30" = {map_to_output = "DSI-1";}; "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 = { output = {
DSI-1 = { DSI-1 = {
scale = "2.0"; scale = "2.0";
transform = "270"; 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 = { programs.waybar = {
settings = { settings = {
main = { main = {
"include" = [
"~/.config/waybar/modules.json"
"~/.config/waybar/layout.json"
];
"modules-left" = ["sway/workspaces"]; "modules-left" = ["sway/workspaces"];
"modules-center" = ["clock#compact"]; "modules-center" = ["clock#compact"];
"modules-right" = ["network#compact" "backlight" "battery" "tray"]; "modules-right" = ["network#compact" "backlight" "battery" "tray"];