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"; };
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"; };
backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
quitman-rpi4 = libx.mkHost { hostname = "quitman-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"; system = "aarch64-linux"; type = "small"; };
quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
};
homeConfigurations = {
"albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; };
@ -65,9 +65,9 @@
"albert@nuc-server" = libx.mkHome { hostname = "nuc-server"; };
"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@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-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"; system = "aarch64-linux"; type = "small"; };
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
};
deploy.nodes = {
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
@ -75,13 +75,13 @@
# nuc-server = libx.deploy { hostname = "nuc-server"; };
# nixos-desktop = libx.deploy { hostname = "nixos-desktop"; };
# nixos-framework = libx.deploy { hostname = "nixos-framework"; };
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; platform = "aarch64-linux"; };
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; platform = "aarch64-linux"; };
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; platform = "aarch64-linux"; };
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; system = "aarch64-linux"; };
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; system = "aarch64-linux"; };
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; };
};
imageConfigurations = {
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-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 ];
programs.waybar = {

View file

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

View file

@ -609,7 +609,7 @@
user_pref("media.peerconnection.ice.default_address_only", true);
/* 2004: force exclusion of private IPs from ICE candidates [FF51+]
* [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);
/* 2020: disable GMP (Gecko Media Plugins)
* [1] https://wiki.mozilla.org/GeckoMediaPlugins ***/
@ -667,7 +667,7 @@
* Currently applies to cross-origin geolocation, camera, mic and screen-sharing
* permissions, and fullscreen requests. Disabling delegation means any prompts
* 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);
/* 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]
@ -872,7 +872,7 @@
user_pref("browser.display.use_system_colors", false); // [DEFAULT: false NON-WINDOWS]
/* 4511: enforce non-native widget theme
* 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
* [2] https://bugzilla.mozilla.org/1411425 ***/
user_pref("widget.non-native-theme.enabled", true); // [DEFAULT: true]
@ -1224,7 +1224,7 @@
// user_pref("general.appversion.override", "");
// user_pref("general.buildID.override", "");
// user_pref("general.oscpu.override", "");
// user_pref("general.platform.override", "");
// user_pref("general.system.override", "");
// user_pref("general.useragent.override", "");
// user_pref("media.navigator.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 = [
# Doom-Emacs input import
# 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 = [
# Common configs
./common/software/cli/bash.nix

View file

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

View file

@ -1,4 +1,4 @@
{lib, inputs, pkgs, gpu, platform, theme, ...}: {
{lib, inputs, pkgs, gpu, system, theme, ...}: {
# nixpkgs = {
# overlays = [
@ -142,7 +142,7 @@
pkgs.papirus-icon-theme # Papirus Icons
# 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.

View file

@ -56,9 +56,9 @@
SUNSET=`date -d \`cat /tmp/wttr.sunset\` +%s`
CURRENT=`date +%s`
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
/run/current-system/sw/bin/plasma-apply-colorscheme -platform offscreen ArcDark
/run/current-system/sw/bin/plasma-apply-colorscheme -system offscreen ArcDark
fi
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 = [
# Modules
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 = [
inputs.nixos-hardware.nixosModules.framework-13th-gen-intel
(modulesPath + "/installer/scan/not-detected.nix")
@ -16,7 +16,7 @@
];
environment.systemPackages = [
inputs.deploy-rs.packages.${platform}.deploy-rs
inputs.deploy-rs.packages.${system}.deploy-rs
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 = [
./disks.nix
../../common/modules/secureboot.nix
@ -64,7 +64,7 @@
environment.systemPackages = [
# deployments and development environments
inputs.deploy-rs.packages.${platform}.deploy-rs
inputs.deploy-rs.packages.${system}.deploy-rs
pkgs.distrobox
# nVidia gpu options

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, platform, ... }: {
{ config, lib, pkgs, modulesPath, system, ... }: {
# Build this image with:
# nix build .#nixosConfigurations.nixos-rpi4-img.config.system.build.sdImage
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 = [
(modulesPath + "/installer/scan/not-detected.nix")
../../common/services/tailscale-autoconnect.nix
@ -11,7 +11,7 @@
];
environment.systemPackages = [
inputs.deploy-rs.packages.${platform}.deploy-rs
inputs.deploy-rs.packages.${system}.deploy-rs
];
# 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 = [
# Services
./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 = [
# Modules
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
stylix = {
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
stylix = {
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
stylix = {
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
stylix = {
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
stylix = {
polarity = "dark";