Move home-manager config into separate directories

Add platform specific hyprland/hyprpaper/waybar config into platform
specific home-manager files, better integration with nix and no
conflicing links
This commit is contained in:
Evie Litherland-Smith 2023-05-16 09:13:59 +01:00
parent 2db705ad25
commit 5a18c254ac
10 changed files with 85 additions and 41 deletions

View file

@ -3,9 +3,9 @@
imports = [ imports = [
./home ./home
./common.nix ./common.nix
./hardware/audio.nix
./locales/en_GB.nix ./locales/en_GB.nix
./desktop/plasma.nix ./desktop/hyprland.nix
./hardware/audio.nix
./syncthing/H0615.nix ./syncthing/H0615.nix
]; ];
@ -18,14 +18,7 @@
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.fish; shell = pkgs.fish;
}; };
home-manager.users.elitherl = { ... }: { home-manager.users.elitherl = import ./home/H0615/elitherl.nix;
imports = [ ./home/work.nix ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "elitherl";
home.homeDirectory = "/home/elitherl";
home.stateVersion = "22.11";
};
system.autoUpgrade = { system.autoUpgrade = {
enable = false; enable = false;

View file

@ -3,10 +3,10 @@
imports = [ imports = [
./home ./home
./common.nix ./common.nix
./locales/en_GB.nix
./desktop/hyprland.nix
./hardware/audio.nix ./hardware/audio.nix
./hardware/bluetooth.nix ./hardware/bluetooth.nix
./locales/en_GB.nix
./desktop/plasma.nix
]; ];
networking.hostName = "J0162"; # Define your hostname. networking.hostName = "J0162"; # Define your hostname.
@ -18,14 +18,7 @@
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.fish; shell = pkgs.fish;
}; };
home-manager.users.elitherl = { ... }: { home-manager.users.elitherl = import ./home/J0162/elitherl.nix;
imports = [ ./home/collections/work ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "elitherl";
home.homeDirectory = "/home/elitherl";
home.stateVersion = "22.11";
};
system.autoUpgrade = { system.autoUpgrade = {
enable = false; enable = false;

View file

@ -6,7 +6,7 @@
./hardware/audio.nix ./hardware/audio.nix
./hardware/bluetooth.nix ./hardware/bluetooth.nix
./locales/en_GB.nix ./locales/en_GB.nix
./desktop/plasma.nix ./desktop/hyprland.nix
./desktop/steam.nix ./desktop/steam.nix
./syncthing/Vanguard.nix ./syncthing/Vanguard.nix
./server/adguardhome.nix ./server/adguardhome.nix
@ -19,8 +19,6 @@
services.openssh.enable = true; services.openssh.enable = true;
networking.firewall = { enable = true; allowedTCPPorts = [ 22 ]; }; networking.firewall = { enable = true; allowedTCPPorts = [ 22 ]; };
services.xserver.displayManager.defaultSession = "plasmawayland";
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII1tJFdbiyJApuVZFvo9E9kjlBwvXZeySqVuS2qGdxha tux@monarch"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
@ -38,14 +36,8 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAcvAQ8W71Bn8pdMYst1hoVCmVJ+0h4HBlJzu1C6dwy xenia@Northstar" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGAcvAQ8W71Bn8pdMYst1hoVCmVJ+0h4HBlJzu1C6dwy xenia@Northstar"
]; ];
}; };
home-manager.users.root = import ./home/Vanguard/root.nix;
home-manager.users.xenia = { ... }: { home-manager.users.xenia = import ./home/Vanguard/xenia.nix;
imports = [ ./home/personal.nix ];
home.username = "xenia";
home.homeDirectory = "/home/xenia";
home.stateVersion = "22.11";
home.packages = with pkgs; [ prismlauncher ];
};
# Extra hardware configuration # Extra hardware configuration
hardware.openrazer = { hardware.openrazer = {

View file

@ -7,12 +7,6 @@
# Home manager integration with NixOS # Home manager integration with NixOS
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.root = { ... }: {
imports = [ ./home/env ./home/tui ./home/git/personal.nix ./home/ssh/personal.nix ];
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "22.11";
};
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
@ -20,8 +14,6 @@
# Enable power-profiles # Enable power-profiles
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
environment.systemPackages = with pkgs; [ home-manager ];
programs.nix-ld = { programs.nix-ld = {
enable = true; enable = true;
libraries = with pkgs; [ libraries = with pkgs; [

View file

@ -1,6 +1,5 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ ./xserver.nix ./sddm.nix ];
environment.systemPackages = [ pkgs.mesa ]; environment.systemPackages = [ pkgs.mesa ];
programs.gamescope.enable = true; programs.gamescope.enable = true;
programs.steam = { programs.steam = {

8
home/H0615/elitherl.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }: {
imports = [ ../work.nix ../desktop/hyprland.nix ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "elitherl";
home.homeDirectory = "/home/elitherl";
home.stateVersion = "22.11";
}

8
home/J0162/elitherl.nix Normal file
View file

@ -0,0 +1,8 @@
{ ... }: {
imports = [ ../work.nix ../desktop/hyprland.nix ];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "elitherl";
home.homeDirectory = "/home/elitherl";
home.stateVersion = "22.11";
}

View file

@ -1,6 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ ./personal.nix ]; imports = [ ../personal.nix ];
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
# paths it should manage. # paths it should manage.
home.username = "tux"; home.username = "tux";

11
home/Vanguard/root.nix Normal file
View file

@ -0,0 +1,11 @@
{ ... }: {
imports = [
../env
../tui
../git/personal.nix
../ssh/personal.nix
];
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "22.11";
}

48
home/Vanguard/xenia.nix Normal file
View file

@ -0,0 +1,48 @@
{ pkgs, ... }: {
imports = [ ../personal.nix ../desktop/hyprland.nix ];
home.username = "xenia";
home.homeDirectory = "/home/xenia";
home.stateVersion = "22.11";
home.packages = with pkgs; [ prismlauncher ];
xdg.configFile."hypr/hyprpaper.conf".source = ../desktop/config/hypr/hyprpaper-Vanguard.conf;
wayland.windowManager.hyprland.extraConfig = ''
source=./common.conf
misc {
vrr = 2
}
monitor=DP-1,highrr,auto,1
monitor=HDMI-A-1,highres,auto,2
exec-once = waybar -c
exec-once=hyprpaper -c ~/.config/hypr/hyprpaper-Vanguard.conf
'';
programs.waybar = {
style = ''
@import 'common.css';
'';
settings = {
main = {
"include" = [
"~/.config/waybar/modules.json"
"~/.config/waybar/layout.json"
];
"modules-left" = [ "custom/launcher" "cpu" "memory" "temperature" ];
"modules-center" = [ "wlr/workspaces" ];
"modules-right" = [
"pulseaudio"
"bluetooth"
"network"
"backlight"
"battery"
"battery#bat2"
"clock"
"tray"
"custom/power"
];
};
};
};
}