mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 16:23:57 +01:00
variables: Add username
This commit is contained in:
parent
b5ccd2e18b
commit
4d9a6b6877
@ -1,10 +1,12 @@
|
||||
{
|
||||
let
|
||||
VARIABLES = import ../src/variables.nix;
|
||||
in {
|
||||
containers.rar = {
|
||||
privateNetwork = true;
|
||||
|
||||
bindMounts = {
|
||||
"/home/user" = {
|
||||
hostPath = "/home/user/containers/rar";
|
||||
hostPath = "/home/${VARIABLES.username}/containers/rar";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
{config, ...}: let
|
||||
VARIABLES = import ../src/variables.nix;
|
||||
hostCfg = config;
|
||||
in {
|
||||
containers.wine = {
|
||||
@ -6,7 +7,7 @@ in {
|
||||
|
||||
bindMounts = {
|
||||
"/home/user" = {
|
||||
hostPath = "/home/user/containers/wine";
|
||||
hostPath = "/home/${VARIABLES.username}/containers/wine";
|
||||
isReadOnly = false;
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
VARIABLES = import ../src/variables.nix;
|
||||
in {
|
||||
imports = [
|
||||
./feh
|
||||
./kitty
|
||||
@ -150,7 +152,7 @@
|
||||
};
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
||||
user = "user";
|
||||
user = VARIABLES.username;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,9 +1,11 @@
|
||||
{pkgs, ...}: {
|
||||
{pkgs, ...}: let
|
||||
VARIABLES = import ../../src/variables.nix;
|
||||
in {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/home/user/Music";
|
||||
musicDirectory = "/home/${VARIABLES.username}/Music";
|
||||
};
|
||||
|
||||
xdg.configFile."mpd/mpd.conf".text = ''
|
||||
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
let
|
||||
VARIABLES = import ../../src/variables.nix;
|
||||
in {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
xdg.userDirs = {
|
||||
@ -8,11 +10,11 @@
|
||||
templates = null;
|
||||
publicShare = null;
|
||||
|
||||
download = "/home/user/ダウンロード";
|
||||
documents = "/home/user/ドキュメント";
|
||||
music = "/home/user/音楽";
|
||||
pictures = "/home/user/画像";
|
||||
videos = "/home/user/ビデオ";
|
||||
download = "/home/${VARIABLES.username}/ダウンロード";
|
||||
documents = "/home/${VARIABLES.username}/ドキュメント";
|
||||
music = "/home/${VARIABLES.username}/音楽";
|
||||
pictures = "/home/${VARIABLES.username}/画像";
|
||||
videos = "/home/${VARIABLES.username}/ビデオ";
|
||||
};
|
||||
|
||||
xdg.configFile."user-dirs.locale".text = "ja_JP";
|
||||
|
@ -161,7 +161,7 @@ in {
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
|
||||
users.user = {
|
||||
users."${VARIABLES.username}" = {
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
password = "user";
|
||||
@ -170,8 +170,8 @@ in {
|
||||
};
|
||||
|
||||
home-manager.users.user = {
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
home.username = VARIABLES.username;
|
||||
home.homeDirectory = "/home/${VARIABLES.username}";
|
||||
};
|
||||
|
||||
# dev
|
||||
|
@ -6,4 +6,5 @@
|
||||
stateVersion = "22.11";
|
||||
defaultLocale = "ja_JP.UTF-8";
|
||||
supportedLocales = ["ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8"];
|
||||
username = "user";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user