Delete root user config per machine as it's common to all

Move root user home-config into home/default.nix so that it's used by all
Removed personal/work specific things from root user
This commit is contained in:
Evie Litherland-Smith 2023-05-31 10:54:57 +01:00
parent fc02c96394
commit 52ff1c36a3
14 changed files with 51 additions and 49 deletions

View file

@ -10,14 +10,12 @@
networking.hostName = "H0615"; # Define your hostname. networking.hostName = "H0615"; # Define your hostname.
users.users.root.shell = pkgs.zsh;
users.users.elitherl = { users.users.elitherl = {
isNormalUser = true; isNormalUser = true;
description = "Evie Litherland-Smith"; description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel"]; extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish; shell = pkgs.fish;
}; };
home-manager.users.root = import ./home/H0615/root.nix;
home-manager.users.elitherl = import ./home/H0615/elitherl.nix; home-manager.users.elitherl = import ./home/H0615/elitherl.nix;
system.autoUpgrade = { system.autoUpgrade = {

View file

@ -2,22 +2,20 @@
imports = [ imports = [
./home ./home
./common.nix ./common.nix
./locales/en_GB.nix
./desktop/plasma.nix
./hardware/audio.nix ./hardware/audio.nix
./hardware/bluetooth.nix ./hardware/bluetooth.nix
./locales/en_GB.nix
./desktop/hyprland.nix
]; ];
networking.hostName = "J0162"; # Define your hostname. networking.hostName = "J0162"; # Define your hostname.
# Define a user account. Don't forget to set a password with passwd.
users.users.elitherl = { users.users.elitherl = {
isNormalUser = true; isNormalUser = true;
description = "Evie Litherland-Smith"; description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel"]; extraGroups = ["networkmanager" "wheel"];
shell = pkgs.fish; shell = pkgs.fish;
}; };
home-manager.users.root = import ./home/J0162/root.nix;
home-manager.users.elitherl = import ./home/J0162/elitherl.nix; home-manager.users.elitherl = import ./home/J0162/elitherl.nix;
system.autoUpgrade = { system.autoUpgrade = {

View file

@ -15,7 +15,6 @@
firewall = {enable = true;}; firewall = {enable = true;};
}; };
users.users.root.shell = pkgs.zsh;
users.users.xenia = { users.users.xenia = {
isNormalUser = true; isNormalUser = true;
description = "Evie Litherland-Smith"; description = "Evie Litherland-Smith";
@ -28,7 +27,6 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDI44C35I2x9tqzeZDmIpbzmGJWXfATn/Wp5KzVRdlCi root@debian" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDI44C35I2x9tqzeZDmIpbzmGJWXfATn/Wp5KzVRdlCi root@debian"
]; ];
}; };
home-manager.users.root = import ./home/Vanguard/root.nix;
home-manager.users.xenia = import ./home/Vanguard/xenia.nix; home-manager.users.xenia = import ./home/Vanguard/xenia.nix;
# Enable steam with proper integrations # Enable steam with proper integrations

View file

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

View file

@ -1,8 +1,39 @@
{...}: { {...}: {
imports = [../work.nix]; 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.username = "elitherl";
home.homeDirectory = "/home/elitherl"; home.homeDirectory = "/home/elitherl";
home.stateVersion = "22.11"; home.stateVersion = "22.11";
programs.fish.shellAbbrs.hypr = "exec Hyprland";
xdg.configFile."hypr/hyprpaper.conf".text = ''
preload = /etc/nixos/config/wallpaper/images_dark/1920x1080.png
wallpaper = ,/etc/nixos/config/wallpaper/images_dark/1920x1080.png
'';
wayland.windowManager.hyprland.extraConfig = ''
source=./common.conf
'';
programs.waybar = {
settings = {
main = {
"include" = [
"~/.config/waybar/modules.json"
"~/.config/waybar/layout.json"
];
"modules-left" = ["wlr/workspaces"];
"modules-center" = ["clock"];
"modules-right" = [
"cpu"
"memory"
"temperature"
"pulseaudio"
"network"
"bluetooth"
"backlight"
"battery"
"battery#bat2"
"tray"
];
};
};
};
} }

View file

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

View file

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

View file

@ -1 +1,11 @@
{...}: let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; in {imports = [(import "${home-manager}/nixos")];} {...}: let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in {
imports = [(import "${home-manager}/nixos")];
home-manager.users.root = {
imports = [./env ./ssh ./git];
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "22.11";
};
}

View file

@ -1,4 +1,4 @@
{...}: { {...}: {
imports = [./common.nix]; imports = [./default.nix];
programs.git.userEmail = "evie@xenia.me.uk"; programs.git.userEmail = "evie@xenia.me.uk";
} }

View file

@ -1,4 +1,4 @@
{...}: { {...}: {
imports = [./common.nix]; imports = [./default.nix];
programs.git.userEmail = "evie.litherland-smith@ukaea.uk"; programs.git.userEmail = "evie.litherland-smith@ukaea.uk";
} }

View file

@ -1,5 +1,5 @@
{lib, ...}: { {lib, ...}: {
imports = [./common.nix]; imports = [./default.nix];
programs.ssh.matchBlocks = { programs.ssh.matchBlocks = {
"vanguard" = { "vanguard" = {
user = "xenia"; user = "xenia";

View file

@ -3,7 +3,7 @@
lib, lib,
... ...
}: { }: {
imports = [./common.nix]; imports = [./default.nix];
home.packages = with pkgs; [sshfs]; home.packages = with pkgs; [sshfs];
programs.ssh.matchBlocks = { programs.ssh.matchBlocks = {
"git.ccfe.ac.uk" = {user = "git";}; "git.ccfe.ac.uk" = {user = "git";};