mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-01-18 18:03:06 +01:00
[general] add work and gaming user, tweak configs
feat: added new ssh configuration modules for home-manager feat: add user work with configurations for my work environment feat: added gaming user with configuration for my gaming enviornment eg. lutris and steam Signed-off-by: Jo <johannesreckers2006@gmail.com>
This commit is contained in:
parent
75e635ad4b
commit
339bd28d1d
14 changed files with 280 additions and 58 deletions
12
flake.lock
12
flake.lock
|
@ -28,11 +28,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715077503,
|
"lastModified": 1715930644,
|
||||||
"narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=",
|
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "6e277d9566de9976f47228dd8c580b97488734d4",
|
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1715087517,
|
"lastModified": 1715787315,
|
||||||
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=",
|
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b211b392b8486ee79df6cdfb1157ad2133427a29",
|
"rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
35
flake.nix
35
flake.nix
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
# Haumea (map directory structure into an attribute set)
|
# Haumea (map directory structure into an attribute set)
|
||||||
haumea = {
|
haumea = {
|
||||||
url = "github:nix-community/haumea/v0.2.2";
|
url = "github:nix-community/haumea/v0.2.2";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,23 +38,17 @@
|
||||||
# It takes each system as an argument
|
# It takes each system as an argument
|
||||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
in {
|
in {
|
||||||
# My custom packages
|
# My custom packagess
|
||||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
# External resources (wallpapers, icons, dotfiles)
|
# External resources (wallpapers, icons, dotfiles)
|
||||||
resources = import ./resources;
|
resources = import ./resources;
|
||||||
|
|
||||||
# My reusable modules for nixos
|
# My reusable modules for nixos
|
||||||
nixosModules = haumea.lib.load {
|
nixosModules = import ./modules/nixos;
|
||||||
src = ./modules/nixos;
|
|
||||||
inputs = { inherit inputs outputs; pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# My reusable modules for home-manager
|
# My reusable modules for home-manager
|
||||||
homeManagerModules = haumea.lib.load {
|
homeManagerModules = import ./modules/home-manager;
|
||||||
src = ./modules/home-manager;
|
|
||||||
inputs = { inherit inputs outputs; pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
|
||||||
};
|
|
||||||
|
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
|
@ -62,6 +56,7 @@
|
||||||
puzzlevision = nixpkgs.lib.nixosSystem {
|
puzzlevision = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = {inherit inputs outputs;};
|
||||||
modules = [
|
modules = [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
./hosts/puzzlevision/configuration.nix
|
./hosts/puzzlevision/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -74,7 +69,23 @@
|
||||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./users/jo_puzzlevision/home.nix
|
./users/jo/home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"work@puzzlevision" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
modules = [
|
||||||
|
./users/work/home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"gaming@puzzlevision" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
modules = [
|
||||||
|
./users/gaming/home.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -96,9 +96,8 @@
|
||||||
# Configure console keymap
|
# Configure console keymap
|
||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
|
|
||||||
# Enable the TLP service for improved battery management
|
# Enable the power-profiles-daemon service for improved battery health
|
||||||
services.tlp.enable = true;
|
services.power-profiles-daemon.enable = true;
|
||||||
services.power-profiles-daemon.enable = false;
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
@ -118,6 +117,9 @@
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|
||||||
|
# Enable automatic screen rotation and similar features
|
||||||
|
hardware.sensor.iio.enable = true;
|
||||||
|
|
||||||
# Enable docker
|
# Enable docker
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
@ -136,28 +138,24 @@
|
||||||
users.users = {
|
users.users = {
|
||||||
jo = {
|
jo = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Jo";
|
description = "Personal account for general tasks";
|
||||||
|
initialPassword = "jo";
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" "tty" "dialout" ];
|
extraGroups = [ "networkmanager" "wheel" "docker" "tty" "dialout" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
work = {
|
work = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Work";
|
description = "Work account";
|
||||||
initialPassword = "fortnite";
|
initialPassword = "work";
|
||||||
extraGroups = [ "networkmanager" ];
|
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||||
packages = with pkgs; [
|
|
||||||
jetbrains.phpstorm
|
|
||||||
teams-for-linux
|
|
||||||
enpass
|
|
||||||
thunderbird
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
programs.steam = {
|
gaming = {
|
||||||
enable = true;
|
isNormalUser = true;
|
||||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
description = "Gaming account";
|
||||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
initialPassword = "gaming";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -165,13 +163,7 @@
|
||||||
firefox
|
firefox
|
||||||
vlc
|
vlc
|
||||||
libreoffice
|
libreoffice
|
||||||
|
spotify
|
||||||
# For development
|
|
||||||
git
|
|
||||||
bun
|
|
||||||
|
|
||||||
# Home manager
|
|
||||||
home-manager
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
|
11
modules/home-manager/default.nix
Normal file
11
modules/home-manager/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
themes = {
|
||||||
|
gruvbox = {
|
||||||
|
plasma = import ./themes/gruvbox/plasma.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
development = {
|
||||||
|
ssh = import ./development/ssh.nix;
|
||||||
|
};
|
||||||
|
}
|
42
modules/home-manager/development/ssh.nix
Normal file
42
modules/home-manager/development/ssh.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
sshDir = "${config.home.homeDirectory}/.ssh";
|
||||||
|
in {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
openssh
|
||||||
|
];
|
||||||
|
|
||||||
|
services.ssh-agent.enable = true;
|
||||||
|
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
AddKeysToAgent yes
|
||||||
|
'';
|
||||||
|
|
||||||
|
matchBlocks = {
|
||||||
|
"github.com" = {
|
||||||
|
identityFile = "${sshDir}/id_ed25519";
|
||||||
|
identitiesOnly = true;
|
||||||
|
user = "git";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
"gitlab.com" = {
|
||||||
|
identityFile = "${sshDir}/id_ed25519";
|
||||||
|
identitiesOnly = true;
|
||||||
|
user = "git";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
"bitbucket.org" = {
|
||||||
|
identityFile = "${sshDir}/id_ed25519";
|
||||||
|
identitiesOnly = true;
|
||||||
|
user = "git";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
outputs
|
outputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
tela-icon-theme
|
tela-icon-theme
|
||||||
|
|
7
modules/nixos/default.nix
Normal file
7
modules/nixos/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
desktop = {
|
||||||
|
kde = import ./desktop/kde.nix;
|
||||||
|
gnome = import ./desktop/gnome.nix;
|
||||||
|
cosmic = import ./desktop/cosmic.nix;
|
||||||
|
};
|
||||||
|
}
|
|
@ -17,9 +17,8 @@
|
||||||
# Enable KDE-Connect
|
# Enable KDE-Connect
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
# On-screen keyboard and automatic screen rotation dependencies
|
# On-screen keyboard dependency
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
maliit-keyboard
|
maliit-keyboard
|
||||||
iio-sensor-proxy
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
42
users/gaming/home.nix
Normal file
42
users/gaming/home.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
outputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./desktop/plasma.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
|
||||||
|
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||||
|
allowUnfreePredicate = _: true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Username and home directory
|
||||||
|
home = {
|
||||||
|
username = "gaming";
|
||||||
|
homeDirectory = "/home/gaming";
|
||||||
|
};
|
||||||
|
|
||||||
|
# General packages
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
lutris
|
||||||
|
vesktop
|
||||||
|
steam
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable home-manager
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# Nicely reload system units when changing configs
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
}
|
27
users/jo/desktop/kde.nix
Normal file
27
users/jo/desktop/kde.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
outputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
|
outputs.homeManagerModules.themes.gruvbox.plasma
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
kdePackages.sierra-breeze-enhanced
|
||||||
|
kde-rounded-corners
|
||||||
|
];
|
||||||
|
|
||||||
|
# Plasma configuration
|
||||||
|
programs.plasma = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
workspace = {
|
||||||
|
clickItemTo = "select";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -6,9 +6,9 @@
|
||||||
outputs,
|
outputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# You can import other home-manager modules here
|
|
||||||
imports = [
|
imports = [
|
||||||
./desktop/kde.nix
|
./desktop/kde.nix
|
||||||
|
outputs.homeManagerModules.development.ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
@ -28,20 +28,19 @@
|
||||||
|
|
||||||
# General packages
|
# General packages
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
spotify
|
|
||||||
qflipper
|
qflipper
|
||||||
wineWowPackages.waylandFull
|
wineWowPackages.waylandFull
|
||||||
vesktop
|
vesktop
|
||||||
|
|
||||||
|
# For development
|
||||||
avra
|
avra
|
||||||
avrdude
|
avrdude
|
||||||
|
vscodium
|
||||||
jetbrains.phpstorm
|
jetbrains.phpstorm
|
||||||
teams-for-linux
|
git
|
||||||
enpass
|
bun
|
||||||
thunderbird
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# home.file.".config/gtk-4.0/gtk.css".source = "${orchis}/share/themes/Orchis-Green-Dark-Compact/gtk-4.0/gtk.css";
|
|
||||||
|
|
||||||
# Enable home-manager
|
# Enable home-manager
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
@ -52,17 +51,40 @@
|
||||||
userEmail = "jo@thevoid.cafe";
|
userEmail = "jo@thevoid.cafe";
|
||||||
userName = "Jo";
|
userName = "Jo";
|
||||||
|
|
||||||
# Enable git-credential-helper
|
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
credential.helper = "${
|
user = {
|
||||||
pkgs.git.override { withLibsecret = true; }
|
signingkey = "$HOME/.ssh/id_ed25519";
|
||||||
}/bin/git-credential-libsecret";
|
};
|
||||||
|
|
||||||
|
init = {
|
||||||
|
defaultBranch = "main";
|
||||||
|
};
|
||||||
|
|
||||||
|
color = {
|
||||||
|
ui = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gh = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
gitCredentialHelper = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
hosts = [
|
||||||
|
"https://github.com"
|
||||||
|
"https://gist.github.com"
|
||||||
|
"https://git.thevoid.cafe"
|
||||||
|
"https://gitlab.org"
|
||||||
|
"https://git.semiko.dev"
|
||||||
|
"https://bitbucket.org"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Nicely reload system units when changing configs
|
# Nicely reload system units when changing configs
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
}
|
}
|
27
users/work/desktop/plasma.nix
Normal file
27
users/work/desktop/plasma.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
outputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
|
outputs.homeManagerModules.themes.gruvbox.plasma
|
||||||
|
];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
kdePackages.sierra-breeze-enhanced
|
||||||
|
kde-rounded-corners
|
||||||
|
];
|
||||||
|
|
||||||
|
# Plasma configuration
|
||||||
|
programs.plasma = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
workspace = {
|
||||||
|
clickItemTo = "select";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
39
users/work/home.nix
Normal file
39
users/work/home.nix
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
outputs,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./desktop/plasma.nix
|
||||||
|
outputs.homeManagerModules.development.ssh
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
|
||||||
|
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||||
|
allowUnfreePredicate = _: true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "work";
|
||||||
|
homeDirectory = "/home/work";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
jetbrains.phpstorm
|
||||||
|
thunderbird
|
||||||
|
teams-for-linux
|
||||||
|
enpass
|
||||||
|
vscodium
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
|
home.stateVersion = "23.05";
|
||||||
|
}
|
Loading…
Reference in a new issue