rename systems -> hosts. Per host program specifications for user programs
This commit is contained in:
parent
ef0f74aae3
commit
2bea94afc4
23 changed files with 52 additions and 27 deletions
|
@ -60,7 +60,7 @@
|
|||
flakeDir = ./.;
|
||||
publicsDir = ./publics;
|
||||
secretsDir = ./secrets;
|
||||
systemsDir = ./systems;
|
||||
hostsDir = ./hosts;
|
||||
usersDir = ./users;
|
||||
};
|
||||
in
|
||||
|
@ -70,7 +70,7 @@
|
|||
acc // {
|
||||
"${nixConfig.name}" = nixpkgs.lib.nixosSystem
|
||||
{
|
||||
modules = [ ./systems/_common/configuration.nix ./systems/${nixConfig.name}/configuration.nix ];
|
||||
modules = [ ./hosts/_common/configuration.nix ./hosts/${nixConfig.name}/configuration.nix ];
|
||||
specialArgs = inputs // {
|
||||
ylib = nypkgs.legacyPackages.${nixConfig.opts.system}.lib;
|
||||
settings = directories // nixConfig.settings // {
|
||||
|
|
19
hosts/_common/components/gnome_xorg.nix
Normal file
19
hosts/_common/components/gnome_xorg.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm = {
|
||||
enable = true;
|
||||
autoSuspend = false;
|
||||
wayland = false;
|
||||
};
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
services.gnome.core-utilities.enable = false;
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.dconf-editor
|
||||
gnomeExtensions.workspace-switch-wraparound
|
||||
xclip
|
||||
];
|
||||
}
|
||||
|
|
@ -8,9 +8,9 @@ in
|
|||
# Secrets management
|
||||
./ragenix.nix
|
||||
# Include the results of the hardware scan.
|
||||
(/${settings.systemsDir}/${settings.system.hostname}/hardware-configuration.nix)
|
||||
(/${settings.hostsDir}/${settings.system.hostname}/hardware-configuration.nix)
|
||||
# Include the specific machine's config.
|
||||
(/${settings.systemsDir}/${settings.system.hostname}/configuration.nix)
|
||||
(/${settings.hostsDir}/${settings.system.hostname}/configuration.nix)
|
||||
];
|
||||
|
||||
# Enable flakes
|
|
@ -3,14 +3,14 @@
|
|||
imports =
|
||||
[
|
||||
# TODO revisit
|
||||
(settings.systemsDir + "/_common/components/todo_neovim.nix")
|
||||
(settings.hostsDir + "/_common/components/todo_neovim.nix")
|
||||
# Common components this machine uses
|
||||
(settings.systemsDir + "/_common/components/systemd_boot.nix")
|
||||
(settings.systemsDir + "/_common/components/ssh.nix")
|
||||
(settings.systemsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
||||
(settings.systemsDir + "/_common/components/font_jetbrainsmono.nix")
|
||||
(settings.systemsDir + "/_common/components/home_manager.nix")
|
||||
(settings.systemsDir + "/_common/components/gnome_wayland.nix")
|
||||
(settings.hostsDir + "/_common/components/systemd_boot.nix")
|
||||
(settings.hostsDir + "/_common/components/ssh.nix")
|
||||
(settings.hostsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
||||
(settings.hostsDir + "/_common/components/font_jetbrainsmono.nix")
|
||||
(settings.hostsDir + "/_common/components/home_manager.nix")
|
||||
(settings.hostsDir + "/_common/components/gnome_wayland.nix")
|
||||
# Users this machine has
|
||||
(settings.usersDir + "/root/configuration.nix")
|
||||
(settings.usersDir + "/josh/configuration.nix")
|
|
@ -3,14 +3,14 @@
|
|||
imports =
|
||||
[
|
||||
# TODO revisit
|
||||
(settings.systemsDir + "/_common/components/todo_neovim.nix")
|
||||
(settings.hostsDir + "/_common/components/todo_neovim.nix")
|
||||
# Common components this machine uses
|
||||
(settings.systemsDir + "/_common/components/systemd_boot.nix")
|
||||
(settings.systemsDir + "/_common/components/ssh.nix")
|
||||
(settings.systemsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
||||
(settings.systemsDir + "/_common/components/font_jetbrainsmono.nix")
|
||||
(settings.systemsDir + "/_common/components/home_manager.nix")
|
||||
(settings.systemsDir + "/_common/components/gnome_xorg.nix")
|
||||
(settings.hostsDir + "/_common/components/systemd_boot.nix")
|
||||
(settings.hostsDir + "/_common/components/ssh.nix")
|
||||
(settings.hostsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
||||
(settings.hostsDir + "/_common/components/font_jetbrainsmono.nix")
|
||||
(settings.hostsDir + "/_common/components/home_manager.nix")
|
||||
(settings.hostsDir + "/_common/components/gnome_xorg.nix")
|
||||
# Users this machine has
|
||||
(settings.usersDir + "/root/configuration.nix")
|
||||
(settings.usersDir + "/josh/configuration.nix")
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
- `cp -r /etc/nixos ~/nixos_bak` Backup configuration
|
||||
- Checkout this repo into /etc/nixos: `rm -rf /etc/nixos` `git clone https://github.com/ringofstorms/dotfiles /etc/nixos`
|
||||
- Copy hardware-configuration into the new /etc/nixos/systems/HOSTNAME/hardware-configuration.nix `mkdir /etc/nixos/systems/HOSTNAM && cp ~/hardware-configuration.nix /etx/nixos/systems/HOSTNAME`
|
||||
- Copy hardware-configuration into the new /etc/nixos/hosts/HOSTNAME/hardware-configuration.nix `mkdir /etc/nixos/hosts/HOSTNAM && cp ~/hardware-configuration.nix /etx/nixos/hosts/HOSTNAME`
|
||||
- copy the existing configuration/other configuration nix of an existing system and edit it to desires state. [[ TODO make this step cleaner/easier... ]]
|
||||
- switch into flake mode `nixos-rebuild switch --flake /etc/nixos[#HOSTNAME]` and switch to new system
|
||||
- copy system ssh public key and create a key for user and copy those into the nixos secrets.nix file
|
||||
|
@ -27,7 +27,7 @@
|
|||
- Push changes to remote using temp user password
|
||||
- rekey secrets with any other onboarded system
|
||||
- TODO
|
||||
- copy over this systems ssh public key ( /etc/shh/*ed25519* ) into the ./secrets/secrets.nix file - push those up, using another computer re-key all the secrets, push up again
|
||||
- copy over this host's ssh public key ( /etc/shh/*ed25519* ) into the ./secrets/secrets.nix file - push those up, using another computer re-key all the secrets, push up again
|
||||
- pull new secrets down with new added keys and rebuild
|
||||
|
||||
- clone neovim setup...
|
||||
|
|
6
users/josh/by_hosts/joe/spotifyd.nix
Normal file
6
users/josh/by_hosts/joe/spotifyd.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.spotifyd ];
|
||||
}
|
||||
|
||||
|
0
users/josh/by_hosts/readme.md
Normal file
0
users/josh/by_hosts/readme.md
Normal file
|
@ -17,14 +17,14 @@
|
|||
imports =
|
||||
# Common settings all users share
|
||||
[ (settings.usersDir + "/_common/home.nix") ]
|
||||
# User programs
|
||||
# Programs
|
||||
++ ylib.umport {
|
||||
paths = [ ./programs ];
|
||||
recursive = true;
|
||||
}
|
||||
# User theme
|
||||
# Programs by host
|
||||
++ ylib.umport {
|
||||
paths = [ ./theme ];
|
||||
paths = [ ./by_hosts/${settings.system.hostname} ];
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -54,10 +54,10 @@
|
|||
move-to-workspace-3 = [ "" ];
|
||||
move-to-workspace-4 = [ "" ];
|
||||
move-to-workspace-last = [ "" ];
|
||||
move-to-workspace-down = [ "<Control><Super>Down" ];
|
||||
move-to-workspace-up = [ "<Control><Super>Up" ];
|
||||
move-to-workspace-left = [ "<Control><Super>Left" ];
|
||||
move-to-workspace-right = [ "<Control><Super>Right" ];
|
||||
move-to-workspace-down = [ "<Control><Super>j" ];
|
||||
move-to-workspace-up = [ "<Control><Super>k" ];
|
||||
move-to-workspace-left = [ "<Control><Super>h" ];
|
||||
move-to-workspace-right = [ "<Control><Super>l" ];
|
||||
|
||||
switch-to-workspace-1 = [ "<Super>1" ];
|
||||
switch-to-workspace0 = [ "<Super>2" ];
|
Loading…
Add table
Add a link
Reference in a new issue