Update platform to system

This commit is contained in:
iFargle 2024-01-31 12:31:01 +09:00
parent 43e6f5bbeb
commit 39b3b165c9
21 changed files with 53 additions and 53 deletions

View file

@ -55,9 +55,9 @@
nuc-server = libx.mkHost { hostname = "nuc-server"; }; nuc-server = libx.mkHost { hostname = "nuc-server"; };
nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "nvidia"; theme = "tokyo-night"; }; nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "nvidia"; theme = "tokyo-night"; };
nixos-framework = libx.mkHost { hostname = "nixos-framework"; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "amd"; theme = "tokyo-night"; }; nixos-framework = libx.mkHost { hostname = "nixos-framework"; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "amd"; theme = "tokyo-night"; };
backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; }; backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; system = "aarch64-linux"; type = "small"; };
piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; }; piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; };
quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; }; quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
}; };
homeConfigurations = { homeConfigurations = {
"albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; }; "albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; };
@ -65,9 +65,9 @@
"albert@nuc-server" = libx.mkHome { hostname = "nuc-server"; }; "albert@nuc-server" = libx.mkHome { hostname = "nuc-server"; };
"albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "hyprland"; theme = "tokyo-night"; }; "albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "hyprland"; theme = "tokyo-night"; };
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "tokyo-night"; }; "albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "tokyo-night"; };
"albert@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; }; "albert@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; system = "aarch64-linux"; type = "small"; };
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; }; "albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; };
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; platform = "aarch64-linux"; type = "small"; }; "albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
}; };
deploy.nodes = { deploy.nodes = {
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; }; osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
@ -75,13 +75,13 @@
# nuc-server = libx.deploy { hostname = "nuc-server"; }; # nuc-server = libx.deploy { hostname = "nuc-server"; };
# nixos-desktop = libx.deploy { hostname = "nixos-desktop"; }; # nixos-desktop = libx.deploy { hostname = "nixos-desktop"; };
# nixos-framework = libx.deploy { hostname = "nixos-framework"; }; # nixos-framework = libx.deploy { hostname = "nixos-framework"; };
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; platform = "aarch64-linux"; }; backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; system = "aarch64-linux"; };
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; platform = "aarch64-linux"; }; piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; system = "aarch64-linux"; };
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; platform = "aarch64-linux"; }; # quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; };
}; };
imageConfigurations = { imageConfigurations = {
nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; }; nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; };
nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; platform = "aarch64-linux"; }; nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; system = "aarch64-linux"; };
nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; }; nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; };
nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; }; nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; };
}; };

View file

@ -1,4 +1,4 @@
{ config, inputs, platform, ... }: { { config, inputs, system, ... }: {
imports = [ ../assets/waybar/scripts.nix ]; imports = [ ../assets/waybar/scripts.nix ];
programs.waybar = { programs.waybar = {

View file

@ -1,4 +1,4 @@
{ pkgs, platform, ... }: { { pkgs, system, ... }: {
programs.doom-emacs = { programs.doom-emacs = {
emacsPackage = pkgs.emacs; emacsPackage = pkgs.emacs;
enable = true; enable = true;

View file

@ -609,7 +609,7 @@
user_pref("media.peerconnection.ice.default_address_only", true); user_pref("media.peerconnection.ice.default_address_only", true);
/* 2004: force exclusion of private IPs from ICE candidates [FF51+] /* 2004: force exclusion of private IPs from ICE candidates [FF51+]
* [SETUP-HARDEN] This will protect your private IP even in TRUSTED scenarios after you * [SETUP-HARDEN] This will protect your private IP even in TRUSTED scenarios after you
* grant device access, but often results in breakage on video-conferencing platforms ***/ * grant device access, but often results in breakage on video-conferencing systems ***/
// user_pref("media.peerconnection.ice.no_host", true); // user_pref("media.peerconnection.ice.no_host", true);
/* 2020: disable GMP (Gecko Media Plugins) /* 2020: disable GMP (Gecko Media Plugins)
* [1] https://wiki.mozilla.org/GeckoMediaPlugins ***/ * [1] https://wiki.mozilla.org/GeckoMediaPlugins ***/
@ -667,7 +667,7 @@
* Currently applies to cross-origin geolocation, camera, mic and screen-sharing * Currently applies to cross-origin geolocation, camera, mic and screen-sharing
* permissions, and fullscreen requests. Disabling delegation means any prompts * permissions, and fullscreen requests. Disabling delegation means any prompts
* for these will show/use their correct 3rd party origin * for these will show/use their correct 3rd party origin
* [1] https://groups.google.com/forum/#!topic/mozilla.dev.platform/BdFOMAuCGW8/discussion ***/ * [1] https://groups.google.com/forum/#!topic/mozilla.dev.system/BdFOMAuCGW8/discussion ***/
user_pref("permissions.delegation.enabled", false); user_pref("permissions.delegation.enabled", false);
/* 2624: disable middle click on new tab button opening URLs or searches using clipboard [FF115+] */ /* 2624: disable middle click on new tab button opening URLs or searches using clipboard [FF115+] */
user_pref("browser.tabs.searchclipboardfor.middleclick", false); // [DEFAULT: false NON-LINUX] user_pref("browser.tabs.searchclipboardfor.middleclick", false); // [DEFAULT: false NON-LINUX]
@ -872,7 +872,7 @@
user_pref("browser.display.use_system_colors", false); // [DEFAULT: false NON-WINDOWS] user_pref("browser.display.use_system_colors", false); // [DEFAULT: false NON-WINDOWS]
/* 4511: enforce non-native widget theme /* 4511: enforce non-native widget theme
* Security: removes/reduces system API calls, e.g. win32k API [1] * Security: removes/reduces system API calls, e.g. win32k API [1]
* Fingerprinting: provides a uniform look and feel across platforms [2] * Fingerprinting: provides a uniform look and feel across systems [2]
* [1] https://bugzilla.mozilla.org/1381938 * [1] https://bugzilla.mozilla.org/1381938
* [2] https://bugzilla.mozilla.org/1411425 ***/ * [2] https://bugzilla.mozilla.org/1411425 ***/
user_pref("widget.non-native-theme.enabled", true); // [DEFAULT: true] user_pref("widget.non-native-theme.enabled", true); // [DEFAULT: true]
@ -1224,7 +1224,7 @@
// user_pref("general.appversion.override", ""); // user_pref("general.appversion.override", "");
// user_pref("general.buildID.override", ""); // user_pref("general.buildID.override", "");
// user_pref("general.oscpu.override", ""); // user_pref("general.oscpu.override", "");
// user_pref("general.platform.override", ""); // user_pref("general.system.override", "");
// user_pref("general.useragent.override", ""); // user_pref("general.useragent.override", "");
// user_pref("media.navigator.enabled", ""); // user_pref("media.navigator.enabled", "");
// user_pref("media.ondevicechange.enabled", ""); // user_pref("media.ondevicechange.enabled", "");

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, inputs, hostname, platform, username, desktop, theme, hmStateVersion, ... }: { { lib, config, pkgs, inputs, hostname, system, username, desktop, theme, hmStateVersion, ... }: {
imports = [ imports = [
# Doom-Emacs input import # Doom-Emacs input import
# inputs.doom-emacs.hmModule # inputs.doom-emacs.hmModule

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, inputs, hostname, platform, username, desktop, theme, hmStateVersion, ... }: { { lib, config, pkgs, inputs, hostname, system, username, desktop, theme, hmStateVersion, ... }: {
imports = [ imports = [
# Common configs # Common configs
./common/software/cli/bash.nix ./common/software/cli/bash.nix

View file

@ -1,7 +1,7 @@
{ self, inputs, outputs, stateVersion, hmStateVersion , ... }: { { self, inputs, outputs, stateVersion, hmStateVersion , ... }: {
deploy = { deploy = {
hostname, hostname,
platform ? "x86_64-linux", system ? "x86_64-linux",
username ? "albert" username ? "albert"
}: { }: {
user = "root"; user = "root";
@ -10,8 +10,8 @@
sshOpts = [ "-A" "-q"]; sshOpts = [ "-A" "-q"];
profiles = { profiles = {
system.path = inputs.deploy-rs.lib.${platform}.activate.nixos self.nixosConfigurations.${hostname}; system.path = inputs.deploy-rs.lib.${system}.activate.nixos self.nixosConfigurations.${hostname};
home-manager.path = inputs.deploy-rs.lib.${platform}.activate.home-manager self.homeConfigurations."${username}@${hostname}"; home-manager.path = inputs.deploy-rs.lib.${system}.activate.home-manager self.homeConfigurations."${username}@${hostname}";
home-manager.user = "${username}"; home-manager.user = "${username}";
}; };
}; };
@ -21,12 +21,12 @@
hostname, hostname,
username ? "albert", username ? "albert",
desktop ? null, desktop ? null,
platform ? "x86_64-linux", system ? "x86_64-linux",
theme ? "default", theme ? "default",
type ? "default" type ? "default"
}: inputs.home-manager.lib.homeManagerConfiguration { }: inputs.home-manager.lib.homeManagerConfiguration {
pkgs = inputs.nixpkgs.legacyPackages.${platform}; pkgs = inputs.nixpkgs.legacyPackages.${system};
extraSpecialArgs = { inherit inputs outputs desktop hostname platform username hmStateVersion theme; }; extraSpecialArgs = { inherit inputs outputs desktop hostname system username hmStateVersion theme; };
modules = [ modules = [
../home-manager/${type}.nix ../home-manager/${type}.nix
]; ];
@ -38,13 +38,13 @@
username ? "albert", username ? "albert",
desktop ? null, desktop ? null,
gpu ? null, gpu ? null,
platform ? "x86_64-linux", system ? "x86_64-linux",
theme ? "default", theme ? "default",
type ? "default", type ? "default",
repo ? "nixpkgs" repo ? "nixpkgs"
}: inputs.nixpkgs.lib.nixosSystem { }: inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu platform theme; }; specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu system theme; };
pkgs = import inputs.${repo} { inherit system = platform; }; pkgs = import inputs.${repo} { inherit system; };
modules = [ modules = [
# Types are 'default', 'small', and 'minimal' # Types are 'default', 'small', and 'minimal'
@ -59,13 +59,13 @@
hostname , hostname ,
username ? "albert", username ? "albert",
desktop ? null, desktop ? null,
platform ? "x86_64-linux", system ? "x86_64-linux",
gpu ? null, gpu ? null,
theme ? "default", theme ? "default",
format format
}: inputs.nixos-generators.nixosGenerate { }: inputs.nixos-generators.nixosGenerate {
specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu platform theme format; }; specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu system theme format; };
system = platform; system = system;
format = format; format = format;
modules = [ modules = [
@ -74,7 +74,7 @@
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.lanzaboote.nixosModules.lanzaboote inputs.lanzaboote.nixosModules.lanzaboote
inputs.home-manager.nixosModules.home-manager { inputs.home-manager.nixosModules.home-manager {
home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu platform theme format; }; home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu system theme format; };
home-manager.users."${username}" = import ../home-manager; home-manager.users."${username}" = import ../home-manager;
} }
]; ];
@ -85,14 +85,14 @@
hostname , hostname ,
username ? "albert", username ? "albert",
desktop ? null, desktop ? null,
platform ? "x86_64-linux", system ? "x86_64-linux",
gpu ? null, gpu ? null,
theme ? "default", theme ? "default",
format format
}: }:
inputs.nixos-generators.nixosGenerate { inputs.nixos-generators.nixosGenerate {
specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu platform theme format; }; specialArgs = { inherit inputs outputs desktop hostname username stateVersion hmStateVersion gpu system theme format; };
system = platform; system = system;
format = format; format = format;
modules = [ modules = [

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, theme, ...}: { {lib, inputs, pkgs, gpu, system, theme, ...}: {
# nixpkgs = { # nixpkgs = {
# overlays = [ # overlays = [
@ -142,7 +142,7 @@
pkgs.papirus-icon-theme # Papirus Icons pkgs.papirus-icon-theme # Papirus Icons
# wayland-packages # wayland-packages
inputs.nixpkgs-wayland.packages.${platform}.wayprompt # from nixpkgs-wayland exclusively - pinentry UI inputs.nixpkgs-wayland.packages.${system}.wayprompt # from nixpkgs-wayland exclusively - pinentry UI
]; ];
# Enable sound with pipewire. # Enable sound with pipewire.

View file

@ -56,9 +56,9 @@
SUNSET=`date -d \`cat /tmp/wttr.sunset\` +%s` SUNSET=`date -d \`cat /tmp/wttr.sunset\` +%s`
CURRENT=`date +%s` CURRENT=`date +%s`
if [ $CURRENT -gt $SUNRISE -a $CURRENT -lt $SUNSET ] ; then if [ $CURRENT -gt $SUNRISE -a $CURRENT -lt $SUNSET ] ; then
/run/current-system/sw/bin/plasma-apply-colorscheme -platform offscreen Arc /run/current-system/sw/bin/plasma-apply-colorscheme -system offscreen Arc
else else
/run/current-system/sw/bin/plasma-apply-colorscheme -platform offscreen ArcDark /run/current-system/sw/bin/plasma-apply-colorscheme -system offscreen ArcDark
fi fi
echo "set-theme.service - Complete" echo "set-theme.service - Complete"
''; '';

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, inputs, platform, theme, ... }: { { lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, inputs, system, theme, ... }: {
imports = [ imports = [
# Modules # Modules
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko

View file

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, modulesPath, desktop, username, hostname, platform, ... }: { { inputs, config, lib, pkgs, modulesPath, desktop, username, hostname, system, ... }: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.framework-13th-gen-intel inputs.nixos-hardware.nixosModules.framework-13th-gen-intel
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
@ -16,7 +16,7 @@
]; ];
environment.systemPackages = [ environment.systemPackages = [
inputs.deploy-rs.packages.${platform}.deploy-rs inputs.deploy-rs.packages.${system}.deploy-rs
pkgs.distrobox pkgs.distrobox
]; ];

View file

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, modulesPath, desktop, hostname, username, platform, ... }: { { inputs, config, lib, pkgs, modulesPath, desktop, hostname, username, system, ... }: {
imports = [ imports = [
./disks.nix ./disks.nix
../../common/modules/secureboot.nix ../../common/modules/secureboot.nix
@ -64,7 +64,7 @@
environment.systemPackages = [ environment.systemPackages = [
# deployments and development environments # deployments and development environments
inputs.deploy-rs.packages.${platform}.deploy-rs inputs.deploy-rs.packages.${system}.deploy-rs
pkgs.distrobox pkgs.distrobox
# nVidia gpu options # nVidia gpu options

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, platform, ... }: { { config, lib, pkgs, modulesPath, system, ... }: {
# Build this image with: # Build this image with:
# nix build .#nixosConfigurations.nixos-rpi4-img.config.system.build.sdImage # nix build .#nixosConfigurations.nixos-rpi4-img.config.system.build.sdImage
nixpkgs.buildPlatform.system = "x86_64-linux"; nixpkgs.buildPlatform.system = "x86_64-linux";

View file

@ -1,4 +1,4 @@
{ inputs, config, lib, pkgs, modulesPath, hostname, username, platform, ... }: { { inputs, config, lib, pkgs, modulesPath, hostname, username, system, ... }: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
../../common/services/tailscale-autoconnect.nix ../../common/services/tailscale-autoconnect.nix
@ -11,7 +11,7 @@
]; ];
environment.systemPackages = [ environment.systemPackages = [
inputs.deploy-rs.packages.${platform}.deploy-rs inputs.deploy-rs.packages.${system}.deploy-rs
]; ];
# steam , etc # steam , etc

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, inputs, platform, theme, ... }: { { lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, inputs, system, theme, ... }: {
imports = [ imports = [
# Services # Services
./common/services/openssh.nix ./common/services/openssh.nix

View file

@ -1,4 +1,4 @@
{ lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, inputs, platform, theme, ... }: { { lib, config, pkgs, hostname, stateVersion, username, desktop, gpu, inputs, system, theme, ... }: {
imports = [ imports = [
# Modules # Modules
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, theme, ...}: { {lib, inputs, pkgs, gpu, system, theme, ...}: {
# Themes https://github.com/tinted-theming/base16-schemes # Themes https://github.com/tinted-theming/base16-schemes
stylix = { stylix = {
polarity = "dark"; polarity = "dark";

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, theme, ...}: { {lib, inputs, pkgs, gpu, system, theme, ...}: {
# Themes https://github.com/tinted-theming/base16-schemes # Themes https://github.com/tinted-theming/base16-schemes
stylix = { stylix = {
polarity = "dark"; polarity = "dark";

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, theme, ...}: { {lib, inputs, pkgs, gpu, system, theme, ...}: {
# Themes https://github.com/tinted-theming/base16-schemes # Themes https://github.com/tinted-theming/base16-schemes
stylix = { stylix = {
polarity = "dark"; polarity = "dark";

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, theme, ...}: { {lib, inputs, pkgs, gpu, system, theme, ...}: {
# Themes https://github.com/tinted-theming/base16-schemes # Themes https://github.com/tinted-theming/base16-schemes
stylix = { stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-light.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-terminal-light.yaml";

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, theme, ...}: { {lib, inputs, pkgs, gpu, system, theme, ...}: {
# Themes https://github.com/tinted-theming/base16-schemes # Themes https://github.com/tinted-theming/base16-schemes
stylix = { stylix = {
polarity = "dark"; polarity = "dark";