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 = ./.;
|
flakeDir = ./.;
|
||||||
publicsDir = ./publics;
|
publicsDir = ./publics;
|
||||||
secretsDir = ./secrets;
|
secretsDir = ./secrets;
|
||||||
systemsDir = ./systems;
|
hostsDir = ./hosts;
|
||||||
usersDir = ./users;
|
usersDir = ./users;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
acc // {
|
acc // {
|
||||||
"${nixConfig.name}" = nixpkgs.lib.nixosSystem
|
"${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 // {
|
specialArgs = inputs // {
|
||||||
ylib = nypkgs.legacyPackages.${nixConfig.opts.system}.lib;
|
ylib = nypkgs.legacyPackages.${nixConfig.opts.system}.lib;
|
||||||
settings = directories // nixConfig.settings // {
|
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
|
# Secrets management
|
||||||
./ragenix.nix
|
./ragenix.nix
|
||||||
# Include the results of the hardware scan.
|
# 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.
|
# Include the specific machine's config.
|
||||||
(/${settings.systemsDir}/${settings.system.hostname}/configuration.nix)
|
(/${settings.hostsDir}/${settings.system.hostname}/configuration.nix)
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
|
@ -3,14 +3,14 @@
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# TODO revisit
|
# TODO revisit
|
||||||
(settings.systemsDir + "/_common/components/todo_neovim.nix")
|
(settings.hostsDir + "/_common/components/todo_neovim.nix")
|
||||||
# Common components this machine uses
|
# Common components this machine uses
|
||||||
(settings.systemsDir + "/_common/components/systemd_boot.nix")
|
(settings.hostsDir + "/_common/components/systemd_boot.nix")
|
||||||
(settings.systemsDir + "/_common/components/ssh.nix")
|
(settings.hostsDir + "/_common/components/ssh.nix")
|
||||||
(settings.systemsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
(settings.hostsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
||||||
(settings.systemsDir + "/_common/components/font_jetbrainsmono.nix")
|
(settings.hostsDir + "/_common/components/font_jetbrainsmono.nix")
|
||||||
(settings.systemsDir + "/_common/components/home_manager.nix")
|
(settings.hostsDir + "/_common/components/home_manager.nix")
|
||||||
(settings.systemsDir + "/_common/components/gnome_wayland.nix")
|
(settings.hostsDir + "/_common/components/gnome_wayland.nix")
|
||||||
# Users this machine has
|
# Users this machine has
|
||||||
(settings.usersDir + "/root/configuration.nix")
|
(settings.usersDir + "/root/configuration.nix")
|
||||||
(settings.usersDir + "/josh/configuration.nix")
|
(settings.usersDir + "/josh/configuration.nix")
|
|
@ -3,14 +3,14 @@
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# TODO revisit
|
# TODO revisit
|
||||||
(settings.systemsDir + "/_common/components/todo_neovim.nix")
|
(settings.hostsDir + "/_common/components/todo_neovim.nix")
|
||||||
# Common components this machine uses
|
# Common components this machine uses
|
||||||
(settings.systemsDir + "/_common/components/systemd_boot.nix")
|
(settings.hostsDir + "/_common/components/systemd_boot.nix")
|
||||||
(settings.systemsDir + "/_common/components/ssh.nix")
|
(settings.hostsDir + "/_common/components/ssh.nix")
|
||||||
(settings.systemsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
(settings.hostsDir + "/_common/components/caps_to_escape_in_tty.nix")
|
||||||
(settings.systemsDir + "/_common/components/font_jetbrainsmono.nix")
|
(settings.hostsDir + "/_common/components/font_jetbrainsmono.nix")
|
||||||
(settings.systemsDir + "/_common/components/home_manager.nix")
|
(settings.hostsDir + "/_common/components/home_manager.nix")
|
||||||
(settings.systemsDir + "/_common/components/gnome_xorg.nix")
|
(settings.hostsDir + "/_common/components/gnome_xorg.nix")
|
||||||
# Users this machine has
|
# Users this machine has
|
||||||
(settings.usersDir + "/root/configuration.nix")
|
(settings.usersDir + "/root/configuration.nix")
|
||||||
(settings.usersDir + "/josh/configuration.nix")
|
(settings.usersDir + "/josh/configuration.nix")
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
- `cp -r /etc/nixos ~/nixos_bak` Backup configuration
|
- `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`
|
- 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... ]]
|
- 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
|
- 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
|
- 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
|
- Push changes to remote using temp user password
|
||||||
- rekey secrets with any other onboarded system
|
- rekey secrets with any other onboarded system
|
||||||
- TODO
|
- 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
|
- pull new secrets down with new added keys and rebuild
|
||||||
|
|
||||||
- clone neovim setup...
|
- 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 =
|
imports =
|
||||||
# Common settings all users share
|
# Common settings all users share
|
||||||
[ (settings.usersDir + "/_common/home.nix") ]
|
[ (settings.usersDir + "/_common/home.nix") ]
|
||||||
# User programs
|
# Programs
|
||||||
++ ylib.umport {
|
++ ylib.umport {
|
||||||
paths = [ ./programs ];
|
paths = [ ./programs ];
|
||||||
recursive = true;
|
recursive = true;
|
||||||
}
|
}
|
||||||
# User theme
|
# Programs by host
|
||||||
++ ylib.umport {
|
++ ylib.umport {
|
||||||
paths = [ ./theme ];
|
paths = [ ./by_hosts/${settings.system.hostname} ];
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -54,10 +54,10 @@
|
||||||
move-to-workspace-3 = [ "" ];
|
move-to-workspace-3 = [ "" ];
|
||||||
move-to-workspace-4 = [ "" ];
|
move-to-workspace-4 = [ "" ];
|
||||||
move-to-workspace-last = [ "" ];
|
move-to-workspace-last = [ "" ];
|
||||||
move-to-workspace-down = [ "<Control><Super>Down" ];
|
move-to-workspace-down = [ "<Control><Super>j" ];
|
||||||
move-to-workspace-up = [ "<Control><Super>Up" ];
|
move-to-workspace-up = [ "<Control><Super>k" ];
|
||||||
move-to-workspace-left = [ "<Control><Super>Left" ];
|
move-to-workspace-left = [ "<Control><Super>h" ];
|
||||||
move-to-workspace-right = [ "<Control><Super>Right" ];
|
move-to-workspace-right = [ "<Control><Super>l" ];
|
||||||
|
|
||||||
switch-to-workspace-1 = [ "<Super>1" ];
|
switch-to-workspace-1 = [ "<Super>1" ];
|
||||||
switch-to-workspace0 = [ "<Super>2" ];
|
switch-to-workspace0 = [ "<Super>2" ];
|
Loading…
Add table
Add a link
Reference in a new issue