Skip to content

Commit

Permalink
flake: introduce new variables
Browse files Browse the repository at this point in the history
Signed-off-by: Patrizio Bekerle <[email protected]>
  • Loading branch information
pbek committed Nov 6, 2024
1 parent 07d124a commit 5c712c1
Show file tree
Hide file tree
Showing 43 changed files with 133 additions and 126 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-publish-nix-cache-nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
userLogin: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-publish-nix-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
userLogin: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-publish-node-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
userLogin: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
Expand Down
17 changes: 12 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ outputs =
# hostname = config.networking.hostName;
# nixosModules = import ./modules { inherit (nixpkgs) lib; };
commonArgs = {
username = "omega";
userLogin = "omega";
userNameLong = "Patrizio Bekerle";
userNameShort = "Patrizio";
userEmail = "[email protected]";
termFontSize = 12.0;
# By default we will use Wayland with Plasma 6
x11Support = false;
Expand Down Expand Up @@ -234,7 +237,9 @@ outputs =
];
specialArgs = self.commonArgs // {
inherit inputs;
username = "cow";
userLogin = "cow";
userNameLong = "cow";
userEmail = "cow@cow";
};
};
# Asus Laptop
Expand Down Expand Up @@ -306,7 +311,9 @@ outputs =
];
specialArgs = self.commonArgs // {
inherit inputs;
username = "dp";
userLogin = "dp";
userNameLong = "dp";
userEmail = "dp@dp";
};
};
# # Home Server miniserver24 for Markus
Expand All @@ -319,7 +326,7 @@ outputs =
# ];
# specialArgs = self.commonArgs // {
# inherit inputs;
# username = "mba";
# userLogin = "mba";
# };
# };
# vm-netcup02 = nixpkgs.lib.nixosSystem {
Expand All @@ -340,7 +347,7 @@ outputs =
# ];
# specialArgs = self.commonArgs // {
# inherit inputs;
# username = "mba";
# userLogin = "mba";
# };
# };
# # VM Desktop
Expand Down
2 changes: 1 addition & 1 deletion hosts/astra/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down
4 changes: 2 additions & 2 deletions hosts/caliban/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down Expand Up @@ -61,7 +61,7 @@
dragAndDrop = true;
};
};
users.extraGroups.vboxusers.members = [ username ];
users.extraGroups.vboxusers.members = [ userLogin ];

# virtualisation.virtualbox.host.enableExtensionPack = true;

Expand Down
2 changes: 1 addition & 1 deletion hosts/dp01/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down
2 changes: 1 addition & 1 deletion hosts/eris/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down
8 changes: 4 additions & 4 deletions hosts/gaia/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down Expand Up @@ -70,7 +70,7 @@
# Extract

# https://github.com/NixOS/nixpkgs/issues/215450
# users.users.${username} = {
# users.users.${userLogin} = {
# packages = with pkgs; [
# playwright
# (runCommand "wrapped-playwright" { buildInputs = [ makeWrapper ]; } ''
Expand All @@ -83,12 +83,12 @@

# https://nixos.wiki/wiki/VirtualBox
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ username ];
users.extraGroups.vboxusers.members = [ userLogin ];
# virtualisation.virtualbox.host.enableExtensionPack = true;

# Try to get get around: /nix/store/lx50avim6rzf20b69q4zwak07c479qwp-udev-rules/60-openocd.rules:188 Unknown group 'plugdev', ignoring.
# https://github.com/NixOS/nixpkgs/issues/81326#issuecomment-592790668
users.users.${username} = {
users.users.${userLogin} = {
extraGroups = [ "plugdev" ];
};

Expand Down
2 changes: 1 addition & 1 deletion hosts/home01/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# home01 server
{ modulesPath, config, pkgs, username, ... }:
{ modulesPath, config, pkgs, userLogin, ... }:

{
imports =
Expand Down
4 changes: 2 additions & 2 deletions hosts/home01/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
# build in vm
# > nixos-rebuild --flake .#vm-home01 build-vm
#
{ lib, config, username, ... }:
{ lib, config, userLogin, ... }:
{
imports =
[
./configuration.nix
];

users.users.root.initialPassword = "root";
users.users.${username}.initialPassword = username;
users.users.${userLogin}.initialPassword = userLogin;
}
2 changes: 1 addition & 1 deletion hosts/hyperion/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down
2 changes: 1 addition & 1 deletion hosts/jupiter/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down
6 changes: 3 additions & 3 deletions hosts/miniserver24/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# miniserver24 server for Markus
{ modulesPath, config, pkgs, username, ... }:
{ modulesPath, config, pkgs, userLogin, ... }:

{
imports =
Expand Down Expand Up @@ -35,7 +35,7 @@
# No password needed for sudo for wheel group
security.sudo.wheelNeedsPassword = false;

users.users.${username} = {
users.users.${userLogin} = {
description = "Markus";
openssh.authorizedKeys.keys = [
# Markus public key
Expand All @@ -44,7 +44,7 @@
];
};

home-manager.users.${username} = {
home-manager.users.${userLogin} = {
programs.git = {
userName = "Markus Barta";
userEmail = "[email protected]";
Expand Down
4 changes: 2 additions & 2 deletions hosts/miniserver24/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
# build in vm
# > nixos-rebuild --flake .#vm-miniserver24 build-vm
#
{ lib, config, username, ... }:
{ lib, config, userLogin, ... }:
{
imports =
[
./configuration.nix
];

users.users.root.initialPassword = "root";
users.users.${username}.initialPassword = username;
users.users.${userLogin}.initialPassword = userLogin;
}
2 changes: 1 addition & 1 deletion hosts/moobox01/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
];

users.users.root.initialPassword = "root";
users.users.${username}.initialPassword = username;
users.users.${userLogin}.initialPassword = userLogin;
}
2 changes: 1 addition & 1 deletion hosts/netcup01/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
];

users.users.root.initialPassword = "root";
users.users.${username}.initialPassword = username;
users.users.${userLogin}.initialPassword = userLogin;
}
4 changes: 2 additions & 2 deletions hosts/netcup02/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
# build in vm
# > nixos-rebuild --flake .#vm-netcup02 build-vm
#
{ lib, config, username, ... }:
{ lib, config, userLogin, ... }:
{
imports =
[
./configuration.nix
];

users.users.root.initialPassword = "root";
users.users.${username}.initialPassword = username;
users.users.${userLogin}.initialPassword = userLogin;
}
4 changes: 2 additions & 2 deletions hosts/pluto/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down Expand Up @@ -36,7 +36,7 @@

# https://nixos.wiki/wiki/VirtualBox
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ username ];
users.extraGroups.vboxusers.members = [ userLogin ];
# virtualisation.virtualbox.host.enableExtensionPack = true;

# https://nixos.wiki/wiki/steam
Expand Down
2 changes: 1 addition & 1 deletion hosts/rhea/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down
2 changes: 1 addition & 1 deletion hosts/sinope/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down
4 changes: 2 additions & 2 deletions hosts/venus/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
imports =
Expand Down Expand Up @@ -127,7 +127,7 @@

# https://nixos.wiki/wiki/VirtualBox
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ username ];
users.extraGroups.vboxusers.members = [ userLogin ];

programs.alvr.enable = true;
programs.alvr.openFirewall = true;
Expand Down
4 changes: 2 additions & 2 deletions hosts/vm-desktop/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# > nixos-rebuild -I nixos-config=./vm.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/pull/223593/head.tar.gz build-vm
# > QEMU_OPTS="-m 4096 -smp 4 -enable-kvm" ./result/bin/run-*-vm
#
{ lib, config, username, ... }:
{ lib, config, userLogin, ... }:
{
imports =
[
Expand All @@ -24,5 +24,5 @@
];

users.users.root.initialPassword = "root";
users.users.${username}.initialPassword = username;
users.users.${userLogin}.initialPassword = userLogin;
}
4 changes: 2 additions & 2 deletions hosts/vm-server/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# > nixos-rebuild -I nixos-config=./vm.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/pull/223593/head.tar.gz build-vm
# > QEMU_OPTS="-m 4096 -smp 4 -enable-kvm" ./result/bin/run-*-vm
#
{ lib, config, username, ... }:
{ lib, config, userLogin, ... }:
{
imports =
[
../../modules/mixins/server-remote.nix
];

users.users.root.initialPassword = "root";
users.users.${username}.initialPassword = username;
users.users.${userLogin}.initialPassword = userLogin;
}
2 changes: 1 addition & 1 deletion iso.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This module defines a small NixOS installation CD.
# https://nixos.wiki/wiki/Creating_a_NixOS_live_CD
{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:
{
imports = [
# <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
Expand Down
2 changes: 1 addition & 1 deletion modules/mixins/audio.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, pkgs, username, ... }:
{ config, pkgs, userLogin, ... }:

{
# Enable sound with pipewire.
Expand Down
Loading

0 comments on commit 5c712c1

Please sign in to comment.