added second user woohoo

This commit is contained in:
shibazaki 2025-01-14 16:41:37 +01:00
parent f28c471997
commit 2075b119db
7 changed files with 127 additions and 13 deletions

View File

@ -29,14 +29,35 @@
allowUnfree = true; allowUnfree = true;
}; };
}; };
in { in
nixosConfigurations.shibazaki = nixpkgs.lib.nixosSystem { {
system = "x86_64-linux"; nixosConfigurations = {
specialArgs = { inherit inputs pkgs; }; shibazaki = nixpkgs.lib.nixosSystem {
modules = [ system = system;
./users/shibazaki/configuration.nix specialArgs = {
inputs.stylix.nixosModules.stylix inherit inputs pkgs;
]; userSettings = {
username = "shibazaki";
};
};
modules = [
./users/shibazaki/configuration.nix
inputs.stylix.nixosModules.stylix
];
};
twelve = nixpkgs.lib.nixosSystem {
system = system;
specialArgs = {
inherit inputs pkgs;
userSettings = {
username = "twelve";
};
};
modules = [
./users/twelve/configuration.nix
inputs.stylix.nixosModules.stylix
];
};
}; };
}; };
} }

View File

@ -182,7 +182,7 @@
]; ];
bind = [ bind = [
"$mod, Q, exec, /home/shibazaki/.nix-profile/bin/dontkillsteam" "$mod, Q, exec, ~/.nix-profile/bin/dontkillsteam"
"$mod, Delete, exit" "$mod, Delete, exit"
"$mod, W, togglefloating" "$mod, W, togglefloating"
"$mod, G, togglegroup" "$mod, G, togglegroup"

View File

@ -1,6 +1,7 @@
{ {
inputs, inputs,
pkgs, pkgs,
userSettings,
... ...
}: { }: {
imports = [ imports = [
@ -10,7 +11,7 @@
extraSpecialArgs = { inherit inputs pkgs; }; extraSpecialArgs = { inherit inputs pkgs; };
backupFileExtension = "backup"; backupFileExtension = "backup";
users = { users = {
shibazaki = import ./../../users/shibazaki/home.nix; ${userSettings.username} = import ./../../users/${userSettings.username}/home.nix;
}; };
}; };
} }

View File

@ -1,7 +1,7 @@
{ pkgs, ... }: { { pkgs, userSettings, ... }: {
users.users.shibazaki = { users.users.${userSettings.username} = {
isNormalUser = true; isNormalUser = true;
description = "shibazaki"; description = "${userSettings.username}";
extraGroups = ["wheel" "networkmanager"]; extraGroups = ["wheel" "networkmanager"];
}; };
} }

View File

@ -0,0 +1,28 @@
{
inputs,
pkgs,
lib,
...
}: {
imports = [
./hardware-configuration.nix
./../../nixos/system/home-manager.nix
./../../nixos/system/user-configuration.nix
./../../nixos/system/desktop-environment.nix
./../../nixos/system/audio.nix
./../../nixos/system/fonts.nix
./../../nixos/system/input-devices.nix
./../../nixos/system/networking.nix
./../../nixos/system/bluetooth.nix
./../../nixos/system/display-manager.nix
./../../nixos/system/security-and-privacy.nix
./../../nixos/system/stylix.nix
./../../nixos/system/system-settings.nix
./../../nixos/system/asus.nix
];
# Global configuration
nix.settings.experimental-features = ["nix-command" "flakes"];
system.stateVersion = "24.11"; # Did you read the comment?
}

View File

@ -0,0 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c281b329-1fa0-487b-a42c-8aafda4a224f";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D0D6-2A60";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

26
users/twelve/home.nix Normal file
View File

@ -0,0 +1,26 @@
{
pkgs,
lib,
...
}: {
home.username = "twelve";
home.homeDirectory = "/home/twelve";
imports = [
./../../nixos/home/imports/hyprland.nix
./../../nixos/home/imports/starship.nix
./../../nixos/home/modules/shell.nix
./../../nixos/home/modules/git.nix
./../../nixos/home/modules/editors.nix
./../../nixos/home/modules/terminal.nix
./../../nixos/home/modules/media.nix
./../../nixos/home/modules/development.nix
./../../nixos/home/modules/games.nix
./../../nixos/home/modules/utilities.nix
./../../nixos/home/modules/environment.nix
./../../nixos/home/modules/session-variables.nix
];
home.stateVersion = "24.11"; # Please read the comment before changing.
}