mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-04 03:52:10 +02:00
Put every variables in top of the file for easy copy to another config
Former-commit-id: 0bd55fdc10
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
{ config, ... }: {
|
||||
{ config, ... }:
|
||||
let configDir = config.var.configDirectory;
|
||||
in {
|
||||
system.autoUpgrade = {
|
||||
enable = config.var.autoUpgrade;
|
||||
dates = "04:00";
|
||||
flake = "${config.var.configDirectory}";
|
||||
flake = "${configDir}";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
allowReboot = false;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{ config, ... }: {
|
||||
{ config, ... }:
|
||||
let autoGarbageCollector = config.var.autoGarbageCollector;
|
||||
in {
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
allowBroken = true;
|
||||
@@ -16,7 +18,7 @@
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
automatic = config.var.autoGarbageCollector;
|
||||
automatic = autoGarbageCollector;
|
||||
persistent = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ config, pkgs, ... }:
|
||||
let username = config.var.username;
|
||||
in {
|
||||
programs.zsh.enable = true;
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.${config.var.username} = {
|
||||
users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "${config.var.username} account";
|
||||
description = "${username} account";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
{ pkgs, config, ... }: {
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
hostname = config.var.hostname;
|
||||
keyboardLayout = config.var.keyboardLayout;
|
||||
in {
|
||||
|
||||
networking.hostName = config.var.hostname;
|
||||
networking.hostName = hostname;
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = config.var.keyboardLayout;
|
||||
xkb.layout = keyboardLayout;
|
||||
xkb.variant = "";
|
||||
};
|
||||
gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
console.keyMap = config.var.keyboardLayout;
|
||||
console.keyMap = keyboardLayout;
|
||||
|
||||
environment.variables = {
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
|
||||
Reference in New Issue
Block a user