[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": {
|
||||
"lastModified": 1715077503,
|
||||
"narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=",
|
||||
"lastModified": 1715930644,
|
||||
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6e277d9566de9976f47228dd8c580b97488734d4",
|
||||
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -44,11 +44,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1715087517,
|
||||
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=",
|
||||
"lastModified": 1715787315,
|
||||
"narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b211b392b8486ee79df6cdfb1157ad2133427a29",
|
||||
"rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
35
flake.nix
35
flake.nix
|
@ -20,8 +20,8 @@
|
|||
|
||||
# Haumea (map directory structure into an attribute set)
|
||||
haumea = {
|
||||
url = "github:nix-community/haumea/v0.2.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nix-community/haumea/v0.2.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -38,23 +38,17 @@
|
|||
# It takes each system as an argument
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
# My custom packages
|
||||
# My custom packagess
|
||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
|
||||
# External resources (wallpapers, icons, dotfiles)
|
||||
resources = import ./resources;
|
||||
|
||||
# My reusable modules for nixos
|
||||
nixosModules = haumea.lib.load {
|
||||
src = ./modules/nixos;
|
||||
inputs = { inherit inputs outputs; pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
||||
};
|
||||
nixosModules = import ./modules/nixos;
|
||||
|
||||
# My reusable modules for home-manager
|
||||
homeManagerModules = haumea.lib.load {
|
||||
src = ./modules/home-manager;
|
||||
inputs = { inherit inputs outputs; pkgs = nixpkgs.legacyPackages.x86_64-linux; };
|
||||
};
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
|
@ -62,6 +56,7 @@
|
|||
puzzlevision = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
./hosts/puzzlevision/configuration.nix
|
||||
];
|
||||
};
|
||||
|
@ -74,7 +69,23 @@
|
|||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
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
|
||||
console.keyMap = "de";
|
||||
|
||||
# Enable the TLP service for improved battery management
|
||||
services.tlp.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
# Enable the power-profiles-daemon service for improved battery health
|
||||
services.power-profiles-daemon.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
@ -118,6 +117,9 @@
|
|||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
|
||||
# Enable automatic screen rotation and similar features
|
||||
hardware.sensor.iio.enable = true;
|
||||
|
||||
# Enable docker
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
|
@ -136,28 +138,24 @@
|
|||
users.users = {
|
||||
jo = {
|
||||
isNormalUser = true;
|
||||
description = "Jo";
|
||||
description = "Personal account for general tasks";
|
||||
initialPassword = "jo";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" "tty" "dialout" ];
|
||||
};
|
||||
|
||||
work = {
|
||||
isNormalUser = true;
|
||||
description = "Work";
|
||||
initialPassword = "fortnite";
|
||||
extraGroups = [ "networkmanager" ];
|
||||
packages = with pkgs; [
|
||||
jetbrains.phpstorm
|
||||
teams-for-linux
|
||||
enpass
|
||||
thunderbird
|
||||
];
|
||||
description = "Work account";
|
||||
initialPassword = "work";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
gaming = {
|
||||
isNormalUser = true;
|
||||
description = "Gaming account";
|
||||
initialPassword = "gaming";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
@ -165,13 +163,7 @@
|
|||
firefox
|
||||
vlc
|
||||
libreoffice
|
||||
|
||||
# For development
|
||||
git
|
||||
bun
|
||||
|
||||
# Home manager
|
||||
home-manager
|
||||
spotify
|
||||
];
|
||||
|
||||
# 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,
|
||||
outputs
|
||||
outputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
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
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
# On-screen keyboard and automatic screen rotation dependencies
|
||||
# On-screen keyboard dependency
|
||||
environment.systemPackages = with pkgs; [
|
||||
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,
|
||||
...
|
||||
}: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
./desktop/kde.nix
|
||||
outputs.homeManagerModules.development.ssh
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
@ -28,20 +28,19 @@
|
|||
|
||||
# General packages
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
qflipper
|
||||
wineWowPackages.waylandFull
|
||||
vesktop
|
||||
|
||||
# For development
|
||||
avra
|
||||
avrdude
|
||||
vscodium
|
||||
jetbrains.phpstorm
|
||||
teams-for-linux
|
||||
enpass
|
||||
thunderbird
|
||||
git
|
||||
bun
|
||||
];
|
||||
|
||||
# home.file.".config/gtk-4.0/gtk.css".source = "${orchis}/share/themes/Orchis-Green-Dark-Compact/gtk-4.0/gtk.css";
|
||||
|
||||
# Enable home-manager
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
|
@ -52,17 +51,40 @@
|
|||
userEmail = "jo@thevoid.cafe";
|
||||
userName = "Jo";
|
||||
|
||||
# Enable git-credential-helper
|
||||
extraConfig = {
|
||||
credential.helper = "${
|
||||
pkgs.git.override { withLibsecret = true; }
|
||||
}/bin/git-credential-libsecret";
|
||||
user = {
|
||||
signingkey = "$HOME/.ssh/id_ed25519";
|
||||
};
|
||||
|
||||
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
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
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