mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-05-20 16:20:43 +02: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 = {
|
containers.rar = {
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
|
|
||||||
bindMounts = {
|
bindMounts = {
|
||||||
"/home/user" = {
|
"/home/user" = {
|
||||||
hostPath = "/home/user/containers/rar";
|
hostPath = "/home/${VARIABLES.username}/containers/rar";
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{config, ...}: let
|
{config, ...}: let
|
||||||
|
VARIABLES = import ../src/variables.nix;
|
||||||
hostCfg = config;
|
hostCfg = config;
|
||||||
in {
|
in {
|
||||||
containers.wine = {
|
containers.wine = {
|
||||||
@ -6,7 +7,7 @@ in {
|
|||||||
|
|
||||||
bindMounts = {
|
bindMounts = {
|
||||||
"/home/user" = {
|
"/home/user" = {
|
||||||
hostPath = "/home/user/containers/wine";
|
hostPath = "/home/${VARIABLES.username}/containers/wine";
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: let
|
||||||
|
VARIABLES = import ../src/variables.nix;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./feh
|
./feh
|
||||||
./kitty
|
./kitty
|
||||||
@ -150,7 +152,7 @@
|
|||||||
};
|
};
|
||||||
initial_session = {
|
initial_session = {
|
||||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
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 = [
|
home-manager.sharedModules = [
|
||||||
{
|
{
|
||||||
services.mpd = {
|
services.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "/home/user/Music";
|
musicDirectory = "/home/${VARIABLES.username}/Music";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."mpd/mpd.conf".text = ''
|
xdg.configFile."mpd/mpd.conf".text = ''
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
{
|
let
|
||||||
|
VARIABLES = import ../../src/variables.nix;
|
||||||
|
in {
|
||||||
home-manager.sharedModules = [
|
home-manager.sharedModules = [
|
||||||
{
|
{
|
||||||
xdg.userDirs = {
|
xdg.userDirs = {
|
||||||
@ -8,11 +10,11 @@
|
|||||||
templates = null;
|
templates = null;
|
||||||
publicShare = null;
|
publicShare = null;
|
||||||
|
|
||||||
download = "/home/user/ダウンロード";
|
download = "/home/${VARIABLES.username}/ダウンロード";
|
||||||
documents = "/home/user/ドキュメント";
|
documents = "/home/${VARIABLES.username}/ドキュメント";
|
||||||
music = "/home/user/音楽";
|
music = "/home/${VARIABLES.username}/音楽";
|
||||||
pictures = "/home/user/画像";
|
pictures = "/home/${VARIABLES.username}/画像";
|
||||||
videos = "/home/user/ビデオ";
|
videos = "/home/${VARIABLES.username}/ビデオ";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."user-dirs.locale".text = "ja_JP";
|
xdg.configFile."user-dirs.locale".text = "ja_JP";
|
||||||
|
@ -161,7 +161,7 @@ in {
|
|||||||
users = {
|
users = {
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
|
|
||||||
users.user = {
|
users."${VARIABLES.username}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
password = "user";
|
password = "user";
|
||||||
@ -170,8 +170,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.user = {
|
home-manager.users.user = {
|
||||||
home.username = "user";
|
home.username = VARIABLES.username;
|
||||||
home.homeDirectory = "/home/user";
|
home.homeDirectory = "/home/${VARIABLES.username}";
|
||||||
};
|
};
|
||||||
|
|
||||||
# dev
|
# dev
|
||||||
|
@ -6,4 +6,5 @@
|
|||||||
stateVersion = "22.11";
|
stateVersion = "22.11";
|
||||||
defaultLocale = "ja_JP.UTF-8";
|
defaultLocale = "ja_JP.UTF-8";
|
||||||
supportedLocales = ["ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/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