replaced isThinInstallation with isThinUser
added util folder
This commit is contained in:
parent
0e58bc282b
commit
30fb7851ac
|
@ -35,12 +35,13 @@ TODO: keys.txt should prob be readable by owning user only?
|
||||||
- graphics driver things should prob be in the hardware-configuration.nix
|
- graphics driver things should prob be in the hardware-configuration.nix
|
||||||
- what does `boot.kernelModules = [ "sg" ]` do?
|
- what does `boot.kernelModules = [ "sg" ]` do?
|
||||||
- sops.age.keyFile should not just be hard coded to leyla?
|
- sops.age.keyFile should not just be hard coded to leyla?
|
||||||
- isThinInstallation -> isThinUser
|
- use dashes for options not camel case
|
||||||
## New Features
|
## New Features
|
||||||
- openssh configuration for server
|
- openssh configuration for server
|
||||||
- VS code extensions should be installed declaratively
|
- VS code extensions should be installed declaratively
|
||||||
- Flake templates
|
- Flake templates - https://nix.dev/manual/nix/2.22/command-ref/new-cli/nix3-flake-init
|
||||||
- Install all the things on the NAS
|
- Install all the things on the NAS
|
||||||
- firefox declarative???
|
- firefox declarative???
|
||||||
- figure out steam vr things?
|
- figure out steam vr things?
|
||||||
- Open GL?
|
- Open GL?
|
||||||
|
- util functions
|
|
@ -16,10 +16,7 @@
|
||||||
|
|
||||||
sops.age.keyFile = "/home/leyla/.config/sops/age/keys.txt";
|
sops.age.keyFile = "/home/leyla/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
users.leyla = {
|
users.leyla.isThinUser = true;
|
||||||
isNormalUser = true;
|
|
||||||
isThinInstallation = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -9,7 +9,7 @@ in
|
||||||
|
|
||||||
options.users.leyla = {
|
options.users.leyla = {
|
||||||
isNormalUser = lib.mkEnableOption "create usable leyla user";
|
isNormalUser = lib.mkEnableOption "create usable leyla user";
|
||||||
isThinInstallation = lib.mkEnableOption "are most programs going to be installed or not";
|
isThinUser = lib.mkEnableOption "create usable user but witohut user applications";
|
||||||
hasPiperMouse = lib.mkEnableOption "install programs for managing piper supported mouses";
|
hasPiperMouse = lib.mkEnableOption "install programs for managing piper supported mouses";
|
||||||
hasOpenRGBHardware = lib.mkEnableOption "install programs for managing openRGB supported hardware";
|
hasOpenRGBHardware = lib.mkEnableOption "install programs for managing openRGB supported hardware";
|
||||||
hasViaKeyboard = lib.mkEnableOption "install programs for managing via supported keyboards";
|
hasViaKeyboard = lib.mkEnableOption "install programs for managing via supported keyboards";
|
||||||
|
@ -34,12 +34,12 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
(
|
(
|
||||||
if cfg.isNormalUser then {
|
if (cfg.isNormalUser || cfg.isThinUser) then {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = lib.mkMerge [
|
extraGroups = lib.mkMerge [
|
||||||
["networkmanager" "wheel" "docker"]
|
["networkmanager" "wheel" "docker"]
|
||||||
(
|
(
|
||||||
lib.mkIf (!cfg.isThinInstallation) [ "adbusers" ]
|
lib.mkIf (!cfg.isThinUser) [ "adbusers" ]
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -50,6 +50,6 @@ in
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.leyla = lib.mkIf cfg.isNormalUser (import ./home.nix);
|
home-manager.users.leyla = lib.mkIf (cfg.isNormalUser || cfg.isThinUser) (import ./home.nix);
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -22,7 +22,7 @@ in
|
||||||
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
||||||
users.users.leyla.packages = lib.mkIf cfg.isNormalUser (
|
users.users.leyla.packages = lib.mkIf (cfg.isNormalUser || cfg.isThinUser) (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
(
|
(
|
||||||
with pkgs; [
|
with pkgs; [
|
||||||
|
@ -33,7 +33,7 @@ in
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
lib.mkIf (!cfg.isThinInstallation) (
|
lib.mkIf (!cfg.isThinUser) (
|
||||||
with pkgs; [
|
with pkgs; [
|
||||||
#foss platforms
|
#foss platforms
|
||||||
signal-desktop
|
signal-desktop
|
||||||
|
|
8
util/default.nix
Normal file
8
util/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
mkUnless = condition: then: (mkIf (!condition) then);
|
||||||
|
mkIfElse = condition: then: else: lib.mkMerge [
|
||||||
|
(mkIf condition then)
|
||||||
|
(mkUnless condition else)
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in a new issue