mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 22:29:06 +01:00
Move user configuration into profiles
This commit is contained in:
parent
f1e10f728e
commit
7ab6b77048
7 changed files with 41 additions and 55 deletions
|
|
@ -9,14 +9,15 @@ let
|
|||
hostName:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs self; };
|
||||
modules = [
|
||||
{ networking = { inherit hostName; }; }
|
||||
"${self}/hosts/${hostName}/default.nix"
|
||||
"${self}/hosts/${hostName}/hardware.nix"
|
||||
"${self}/hosts/${hostName}/disko.nix"
|
||||
"${self}/users/seb"
|
||||
]
|
||||
++ lib.optional (lib.pathExists "${self}/users/seb/@${hostName}") "${self}/users/seb/@${hostName}";
|
||||
modules =
|
||||
(lib.singleton { networking = { inherit hostName; }; })
|
||||
++ (
|
||||
"${self}/hosts/${hostName}"
|
||||
|> builtins.readDir
|
||||
|> lib.attrNames
|
||||
|> lib.filter (file: file |> lib.hasSuffix ".nix")
|
||||
|> lib.map (file: "${self}/hosts/${hostName}/${file}")
|
||||
);
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,7 +68,16 @@
|
|||
|
||||
console.keyMap = "de-latin1-nodeadkeys";
|
||||
|
||||
users.mutableUsers = false;
|
||||
sops.secrets."seb-password".neededForUsers = true;
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users.seb = {
|
||||
isNormalUser = true;
|
||||
description = "Sebastian Stork";
|
||||
hashedPasswordFile = config.sops.secrets."seb-password".path;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,16 @@
|
|||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [ self.nixosModules.profile-core ];
|
||||
config,
|
||||
inputs,
|
||||
self,
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
self.nixosModules.profile-core
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
|
|
@ -19,4 +29,14 @@
|
|||
};
|
||||
|
||||
programs.localsend.enable = true;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.users.seb.shell = pkgs.zsh;
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs self pkgs-unstable; };
|
||||
users.seb = "${self}/users/seb/@${config.networking.hostName}/home.nix";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
self,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs self pkgs-unstable;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [ "${self}/users/home-manager.nix" ];
|
||||
home-manager.users.seb = ./home.nix;
|
||||
|
||||
users.users.seb.shell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [ "${self}/users/home-manager.nix" ];
|
||||
home-manager.users.seb = ./home.nix;
|
||||
|
||||
users.users.seb.shell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
sops.secrets."seb-password".neededForUsers = true;
|
||||
|
||||
users.users.seb = {
|
||||
isNormalUser = true;
|
||||
description = "Sebastian Stork";
|
||||
hashedPasswordFile = config.sops.secrets."seb-password".path;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue