removed settings.username

This commit is contained in:
Gerg-L 2023-04-21 10:15:15 -04:00
parent 60206e95e1
commit 4f9c434347
11 changed files with 39 additions and 43 deletions

30
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1681674661,
"narHash": "sha256-UNaleEsACF/AZt2XKdml4OdbXOnnsDfvWAs6ojvG+VA=",
"lastModified": 1681977899,
"narHash": "sha256-G5/DB7t1t1uhGEwPk6HY2JSVOPp3k9qZC5sOl2vrn7E=",
"owner": "nix-community",
"repo": "disko",
"rev": "ba53a0433d1694b96c63ea67db0f3e1292bb2b01",
"rev": "a433c7995448989e697c9f913405df1a98122885",
"type": "github"
},
"original": {
@ -141,11 +141,11 @@
},
"master": {
"locked": {
"lastModified": 1681778372,
"narHash": "sha256-qnwEoQWaFzfYc171kf3ZkcKcCZMuW13BWVEE/yycJmE=",
"lastModified": 1682012766,
"narHash": "sha256-qcQvCO3vBENFBnE7btDf2mi7PeLqnZmnktYKDWHEUu4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3af6e7dcda5413ff257e45ef7bb7acfb2d6bb52c",
"rev": "1c74273033e2d375122d4d301c8bff44d657872b",
"type": "github"
},
"original": {
@ -333,11 +333,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1681721408,
"narHash": "sha256-NWCbZKOQEXz1hA2YDFxdd+fVrrw9edbG1DvbbLf7KUY=",
"lastModified": 1681821695,
"narHash": "sha256-uwyBGo/9IALi97AfMuzkJroQQhV6hkybaZVdw6pRNG4=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "de6514f8fe1b3c2b57307569a0898bc4be9ae1c5",
"rev": "5698b06b0731a2c15ff8c2351644427f8ad33993",
"type": "github"
},
"original": {
@ -386,11 +386,11 @@
},
"stable": {
"locked": {
"lastModified": 1681696129,
"narHash": "sha256-Ba2y1lmsWmmAOAoTD5G9UnTS/UqV0ZFyzysgdfu7qag=",
"lastModified": 1681932375,
"narHash": "sha256-tSXbYmpnKSSWpzOrs27ie8X3I0yqKA6AuCzCYNtwbCU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "de66115c552acc4e0c0f92c5a5efb32e37dfa216",
"rev": "3d302c67ab8647327dba84fbdb443cdbf0e82744",
"type": "github"
},
"original": {
@ -452,11 +452,11 @@
},
"unstable": {
"locked": {
"lastModified": 1681737997,
"narHash": "sha256-pHhjgsIkRMu80LmVe8QoKIZB6VZGRRxFmIvsC5S89k4=",
"lastModified": 1681828457,
"narHash": "sha256-o4Zvs309HOhrNeVloPKqangcKHobsggVt6GFbnEPZlQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f00994e78cd39e6fc966f0c4103f908e63284780",
"rev": "555daa9d339b3df75e58ee558a4fec98ea92521e",
"type": "github"
},
"original": {

View file

@ -53,9 +53,6 @@
system = "x86_64-linux";
specialArgs = {
inherit self;
settings = {
username = "gerg";
};
};
modules = [
(import ./modules inputs)
@ -71,9 +68,6 @@
system = "x86_64-linux";
specialArgs = {
inherit self;
settings = {
username = "games";
};
};
modules = [
(import ./modules inputs)
@ -84,9 +78,6 @@
system = "x86_64-linux";
specialArgs = {
inherit self;
settings = {
username = "jo";
};
};
modules = [
(import ./modules inputs)

View file

@ -2,7 +2,6 @@ _: {
config,
lib,
options,
settings,
...
}:
with lib; let
@ -13,7 +12,7 @@ in {
services.xserver.displayManager = {
autoLogin = {
enable = true;
user = settings.username;
user = config.localModules.DM.loginUser;
};
};
};

View file

@ -2,5 +2,6 @@ inputs: {
imports = [
(import ./autoLogin.nix inputs)
(import ./lightDM.nix inputs)
(import ./misc.nix inputs)
];
}

View file

@ -2,7 +2,6 @@ _: {
config,
lib,
options,
settings,
self,
...
}:
@ -21,7 +20,7 @@ in {
extraConfig = "minimum-vt=1";
greeters.mini = {
enable = true;
user = settings.username;
user = config.localModules.DM.loginUser;
extraConfig = ''
[greeter]
show-password-label = false

11
modules/DM/misc.nix Normal file
View file

@ -0,0 +1,11 @@
_: {
options,
lib,
...
}:
with lib; {
options.localModules.DM.loginUser = mkOption {
type = types.nullOr types.str;
default = null;
};
}

View file

@ -1,6 +1,5 @@
inputs: {
pkgs,
settings,
config,
...
}: {
@ -14,6 +13,7 @@ inputs: {
DM = {
lightdm.enable = true;
autoLogin = true;
loginUser = "games";
};
theming = {
enable = true;
@ -55,7 +55,7 @@ inputs: {
users = {
mutableUsers = false;
users = {
"${settings.username}" = {
games = {
useDefaultShell = true;
uid = 1000;
isNormalUser = true;

View file

@ -1,6 +1,5 @@
inputs: {
pkgs,
settings,
config,
...
}: {
@ -22,6 +21,7 @@ inputs: {
DM = {
lightdm.enable = true;
autoLogin = true;
loginUser = "gerg";
};
theming = {
enable = true;
@ -106,7 +106,7 @@ inputs: {
users = {
mutableUsers = false;
users = {
"${settings.username}" = {
gerg = {
useDefaultShell = true;
uid = 1000;
isNormalUser = true;

View file

@ -1,6 +1,5 @@
_: {
pkgs,
settings,
self,
config,
lib,
@ -83,7 +82,7 @@ in {
runAsRoot = true;
ovmf.enable = true;
verbatimConfig = ''
user = "${settings.username}"
user = "gerg"
group = "kvm"
namespaces = []
'';
@ -100,7 +99,7 @@ in {
};
};
users.users."${settings.username}".extraGroups = ["kvm" "libvirtd"];
users.users.gerg.extraGroups = ["kvm" "libvirtd"];
services.xserver.displayManager.xserverArgs = lib.mkAfter ["-config /tmp/xorg.conf"];
services.xserver.displayManager.sessionCommands = lib.mkBefore ''

View file

@ -1,6 +1,5 @@
inputs: {
pkgs,
settings,
config,
...
}: {
@ -13,6 +12,7 @@ inputs: {
DM = {
lightdm.enable = true;
autoLogin = true;
loginUser = "jo";
};
DE.xfce.enable = true;
theming = {
@ -40,7 +40,7 @@ inputs: {
users = {
mutableUsers = false;
users = {
"${settings.username}" = {
jo = {
useDefaultShell = true;
uid = 1000;
isNormalUser = true;

View file

@ -1,15 +1,11 @@
_: {
pkgs,
settings,
...
}: {
_: {pkgs, ...}: {
nixpkgs.allowedUnfree = ["hplip"];
environment.systemPackages = [
pkgs.gimp
(pkgs.xsane.override {gimpSupport = true;})
pkgs.libreoffice
];
users.users."${settings.username}".extraGroups = ["scanner" "lp" "cups"];
users.users.jo.extraGroups = ["scanner" "lp" "cups"];
hardware.sane = {
enable = true;
extraBackends = [pkgs.hplipWithPlugin];