Gen 396: updated flake and input files to use a username special arg instead of hardcoding my username

This commit is contained in:
pagedMov
2024-10-11 23:51:59 -04:00
parent a31cbe4d7e
commit f8d099d40b
8 changed files with 24 additions and 28 deletions

View File

@@ -46,7 +46,7 @@
outputs = { nixpkgs, home-manager, self, nvim, toilet, ... }@inputs: outputs = { nixpkgs, home-manager, self, nvim, toilet, ... }@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
user = "pagedmov"; username = "pagedmov";
allowed-unfree-packages = [ allowed-unfree-packages = [
"foundryvtt" "foundryvtt"
]; ];
@@ -55,9 +55,7 @@
nixosConfigurations = { nixosConfigurations = {
glasshouse = nixpkgs.lib.nixosSystem { glasshouse = nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
inherit self; inherit self inputs allowed-unfree-packages username;
inherit inputs;
inherit allowed-unfree-packages user;
}; };
inherit system; inherit system;
modules = [ ./glasshouse-desktop/sys ]; modules = [ ./glasshouse-desktop/sys ];

View File

@@ -1,4 +1,4 @@
{ inputs, ... }: { inputs, username, system, ... }:
{ {
imports = imports =

View File

@@ -1,4 +1,4 @@
{ ... }: { username, ... }:
{ {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
@@ -17,7 +17,7 @@
"systemctl --user import-environment &" "systemctl --user import-environment &"
"hash dbus-update-activation-environment 2>/dev/null &" "hash dbus-update-activation-environment 2>/dev/null &"
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &" "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &"
"aplay /home/pagedmov/sound/sys/login.wav &" "aplay /home/${username}/sound/sys/login.wav &"
]; ];
workspace = [ workspace = [
@@ -138,7 +138,7 @@
"super, q, exec, kitty --title Kitty" "super, q, exec, kitty --title Kitty"
"super, d, exec, switchmon" "super, d, exec, switchmon"
"super, c, killactive," "super, c, killactive,"
"super, e, exec, [float;size 45% 55%;move 10 50] kitty btop" "super, e, exec, [float;size 45% 70%;move 10 50] kitty btop"
"super shift, q, exit," "super shift, q, exit,"
"super, m, exec, fuzzel" "super, m, exec, fuzzel"
"super, r, exec, neovide" "super, r, exec, neovide"
@@ -146,7 +146,7 @@
"super, b, togglesplit, # dwindle" "super, b, togglesplit, # dwindle"
"super, f, togglefloating" "super, f, togglefloating"
"super, g, fullscreen" "super, g, fullscreen"
"super, home, exec, /home/pagedmov/scripts/home.sh" "super, home, exec, /home/${username}/scripts/home.sh"
"super, h, movefocus, l" "super, h, movefocus, l"
"super, l, movefocus, r" "super, l, movefocus, r"
"super, k, movefocus, u" "super, k, movefocus, u"

View File

@@ -1,4 +1,4 @@
{ ... }: { username, ... }:
{ {
services.hyprpaper = { services.hyprpaper = {
@@ -7,11 +7,11 @@
ipc = "on"; ipc = "on";
splash = false; splash = false;
splash_offset = 2.0; splash_offset = 2.0;
preload = [ "/home/pagedmov/Pictures/Wallpapers/cat-leaves.png" ]; preload = [ "/home/${username}/Pictures/Wallpapers/cat-leaves.png" ];
wallpaper = [ wallpaper = [
"DP-1,/home/pagedmov/Pictures/Wallpapers/cat-leaves.png" "DP-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png"
"HDMI-A-1,/home/pagedmov/Pictures/Wallpapers/cat-leaves.png" "HDMI-A-1,/home/${username}/Pictures/Wallpapers/cat-leaves.png"
]; ];
}; };
}; };

View File

@@ -12,7 +12,7 @@
"($username)(bold white)($cmd_duration)($character)" "($username)(bold white)($cmd_duration)($character)"
"($git_branch)($git_status)($rust)($nix-shell)" "($git_branch)($git_status)($rust)($nix-shell)"
"($directory)" "($directory)"
"$line_break[ ](bold #89b4fa)" "$line_break[ > ](bold #89b4fa)"
]; ];

View File

@@ -1,4 +1,4 @@
{ inputs, nixpkgs, self, ... }: { inputs, nixpkgs, self, username, ... }:
{ {
imports = imports =

View File

@@ -1,12 +1,10 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, modulesPath, username, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
@@ -29,7 +27,7 @@
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/home/pagedmov/steamlib" = fileSystems."/home/${username}/steamlib" =
{ device = "/dev/nvme0n1p1"; { device = "/dev/nvme0n1p1";
fsType = "ext4"; fsType = "ext4";
}; };

View File

@@ -1,4 +1,4 @@
{ inputs, pkgs, ... }: { inputs, pkgs, username, ... }:
{ {
imports = [ inputs.home-manager.nixosModules.home-manager ]; imports = [ inputs.home-manager.nixosModules.home-manager ];
@@ -6,13 +6,13 @@
useUserPackages = true; useUserPackages = true;
useGlobalPkgs = true; useGlobalPkgs = true;
backupFileExtension = "backup"; backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs username; };
users.pagedmov = { users.${username} = {
programs.home-manager.enable = true; programs.home-manager.enable = true;
imports = [ ./../home ]; imports = [ ./../home ];
home = { home = {
username = "pagedmov"; username = "${username}";
homeDirectory = "/home/pagedmov"; homeDirectory = "/home/${username}";
stateVersion = "24.05"; stateVersion = "24.05";
pointerCursor = { pointerCursor = {
name = "Quintom_Ink"; name = "Quintom_Ink";
@@ -22,13 +22,13 @@
}; };
}; };
}; };
users.users.pagedmov = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
}; };
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
pagedmov ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild ${username} ALL=(ALL) NOPASSWD: /run/current-system/sw/bin/nixos-rebuild
''; '';
nix.settings.allowed-users = [ "pagedmov" ]; nix.settings.allowed-users = [ "${username}" ];
} }