refactoring for iServer and isWorkstation: part 2
This commit is contained in:
parent
af1d9ac368
commit
021ab24e79
15 changed files with 116 additions and 131 deletions
|
|
@ -1,9 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./home-manager.nix
|
||||
./impermanence.nix
|
||||
./stylix.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "bkp";
|
||||
users.user = import ../../../users/desktops/user.nix;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
environment.persistence.main = {
|
||||
persistentStoragePath = "/persistent";
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/flatpak"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/var/lib/systemd/timers"
|
||||
"/var/lib/tailscale"
|
||||
"/var/log"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://w.wallhaven.cc/full/dp/wallhaven-dpwvl3.jpg";
|
||||
sha256 = "sha256-h9UeYj8jSRgSv8XL+zgds4KtooLlJ+IqwxZbQEXdCh4=";
|
||||
};
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
cursor = {
|
||||
package = pkgs.kdePackages.breeze-icons;
|
||||
name = "Breeze_Light";
|
||||
size = 24;
|
||||
};
|
||||
opacity = {
|
||||
applications = 1.0;
|
||||
desktop = 0.8;
|
||||
popups = config.stylix.opacity.desktop;
|
||||
terminal = 1.0;
|
||||
};
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.source-serif;
|
||||
name = "Source Serif 4 Display";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.inter;
|
||||
name = "Inter";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.fira-code;
|
||||
name = "FiraCode Nerd Font";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
sizes = {
|
||||
applications = 10;
|
||||
desktop = config.stylix.fonts.sizes.applications;
|
||||
popups = config.stylix.fonts.sizes.applications;
|
||||
terminal = 12;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -17,10 +17,7 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
# Host-common imports
|
||||
../common
|
||||
# Desktop-common imports
|
||||
./common
|
||||
../modules
|
||||
# Host-specific imports
|
||||
./io
|
||||
];
|
||||
|
|
|
|||
|
|
@ -30,12 +30,8 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
# Host-common imports
|
||||
../modules
|
||||
# Desktop-common imports
|
||||
./common
|
||||
# Host-specific imports
|
||||
./rotterdam
|
||||
../modules
|
||||
];
|
||||
|
||||
networking.hostName = "rotterdam";
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@
|
|||
./boot.nix
|
||||
./console.nix
|
||||
./desktop.nix
|
||||
./impermanence.nix
|
||||
./locale.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
||||
./programs.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./stylix.nix
|
||||
./users.nix
|
||||
./virtualisation.nix
|
||||
];
|
||||
|
|
|
|||
37
hosts/modules/impermanence.nix
Normal file
37
hosts/modules/impermanence.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ hostType, lib, ... }:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# Common configuration
|
||||
{
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
(lib.mkIf hostType.isWorkstation {
|
||||
environment.persistence.main = {
|
||||
persistentStoragePath = "/persistent";
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/flatpak"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/var/lib/systemd/timers"
|
||||
"/var/lib/tailscale"
|
||||
"/var/log"
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
66
hosts/modules/stylix.nix
Normal file
66
hosts/modules/stylix.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
config,
|
||||
hostType,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# Common configuration
|
||||
{
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
(lib.mkIf hostType.isWorkstation {
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://w.wallhaven.cc/full/dp/wallhaven-dpwvl3.jpg";
|
||||
sha256 = "sha256-h9UeYj8jSRgSv8XL+zgds4KtooLlJ+IqwxZbQEXdCh4=";
|
||||
};
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||
cursor = {
|
||||
package = pkgs.kdePackages.breeze-icons;
|
||||
name = "Breeze_Light";
|
||||
size = 24;
|
||||
};
|
||||
opacity = {
|
||||
applications = 1.0;
|
||||
desktop = 0.8;
|
||||
popups = config.stylix.opacity.desktop;
|
||||
terminal = 1.0;
|
||||
};
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.source-serif;
|
||||
name = "Source Serif 4 Display";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.inter;
|
||||
name = "Inter";
|
||||
};
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.fira-code;
|
||||
name = "FiraCode Nerd Font";
|
||||
};
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
sizes = {
|
||||
applications = 10;
|
||||
desktop = config.stylix.fonts.sizes.applications;
|
||||
popups = config.stylix.fonts.sizes.applications;
|
||||
terminal = 12;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
@ -33,10 +33,17 @@
|
|||
hashedPassword = "!";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "bkp";
|
||||
};
|
||||
}
|
||||
|
||||
# Server specific configuration
|
||||
(lib.mkIf hostType.isServer {
|
||||
home-manager.users.user = import ../../users/servers/user.nix;
|
||||
})
|
||||
|
||||
# Workstation specific configuration
|
||||
|
|
@ -66,6 +73,8 @@
|
|||
hashedPassword = "$y$j9T$yHLUDvj6bDIP19dchU.aA/$OY4qeFNtx/GvI.VUYx4LapHiiVwi0MEvs8AT0HN7j58";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.user = import ../../users/desktops/user.nix;
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./home-manager.nix
|
||||
./nix.nix
|
||||
./services.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "bkp";
|
||||
users.user = import ../../../users/servers/user.nix;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue