Compare commits
6 commits
c7c866f8a5
...
8ba97b865d
Author | SHA1 | Date | |
---|---|---|---|
8ba97b865d | |||
4596f846bf | |||
c360cc0fd5 | |||
617966a6cc | |||
388104ce88 | |||
edf0326c04 |
13 changed files with 72 additions and 118 deletions
|
@ -41,19 +41,10 @@
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
editors = {
|
editors = {
|
||||||
emacs.enable = false;
|
|
||||||
# only emacs for me, right now.
|
|
||||||
neovim.enable = true;
|
|
||||||
# sadly just not advanced enough, yet.
|
|
||||||
helix.enable = true;
|
helix.enable = true;
|
||||||
};
|
};
|
||||||
discord.enable = true;
|
|
||||||
# nushell.enable = true;
|
# nushell.enable = true;
|
||||||
eza.enable = true;
|
|
||||||
firefox.enable = true;
|
|
||||||
spotify.enable = false;
|
|
||||||
# starship.enable = true;
|
# starship.enable = true;
|
||||||
zellij.enable = true;
|
|
||||||
terminals = {
|
terminals = {
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -52,24 +52,10 @@ in {
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
editors = {
|
editors = {
|
||||||
emacs.enable = false;
|
|
||||||
# only emacs for me, right now.
|
|
||||||
neovim.enable = true;
|
|
||||||
# sadly just not advanced enough, yet.
|
|
||||||
helix.enable = true;
|
helix.enable = true;
|
||||||
kakoune.enable = true;
|
|
||||||
};
|
};
|
||||||
discord.enable = true;
|
|
||||||
nushell.enable = true;
|
|
||||||
oh-my-posh.enable = true;
|
|
||||||
eza.enable = true;
|
|
||||||
firefox.enable = true;
|
|
||||||
spotify.enable = true;
|
|
||||||
zellij.enable = false;
|
|
||||||
steam.enable = false;
|
|
||||||
terminals = {
|
terminals = {
|
||||||
foot.enable = true;
|
foot.enable = true;
|
||||||
kitty.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
editors = {
|
editors = {
|
||||||
helix.enable = true;
|
helix.enable = true;
|
||||||
};
|
};
|
||||||
eza.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
other = {
|
other = {
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (builtins) elemAt;
|
|
||||||
inherit (lib) options types;
|
|
||||||
inherit (options) mkOption;
|
|
||||||
inherit (types) listOf str;
|
|
||||||
in {
|
|
||||||
options.meta = {
|
|
||||||
users = mkOption {
|
|
||||||
type = listOf str;
|
|
||||||
default = ["cr"];
|
|
||||||
description = ''
|
|
||||||
A list of users on a system.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
mainUser = {
|
|
||||||
username = mkOption {
|
|
||||||
type = str;
|
|
||||||
default = elemAt config.meta.users 0;
|
|
||||||
description = ''
|
|
||||||
The main user for each system. This is the first element of the list of users by default.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
gitSigningKey = mkOption {
|
|
||||||
type = str;
|
|
||||||
description = ''
|
|
||||||
The main user's git signing key, used to automatically sing git commits with this key
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
inherit (lib) mkOption mkEnableOption;
|
|
||||||
in {
|
|
||||||
options.modules.system.hardware = {
|
|
||||||
nvidia = {
|
|
||||||
enable = mkEnableOption "Nvidia Nvidia graphics drivers";
|
|
||||||
};
|
|
||||||
amd.enable = mkEnableOption "AMD graphics drivers";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -29,8 +29,6 @@ in {
|
||||||
|
|
||||||
# monitor configuration
|
# monitor configuration
|
||||||
./monitors.nix
|
./monitors.nix
|
||||||
|
|
||||||
./hardware.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
options.modules.system = {
|
options.modules.system = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib) mkOption;
|
inherit (lib) mkOption;
|
||||||
inherit (lib.types) str submodule int ints number attrsOf listOf;
|
inherit (lib.types) submodule int ints number attrsOf ;
|
||||||
in {
|
in {
|
||||||
options.modules.system.hardware.monitors = mkOption {
|
options.modules.system.hardware.monitors = mkOption {
|
||||||
description = "\n List of monitors to use\n ";
|
description = "\n List of monitors to use\n ";
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
in {
|
in {
|
||||||
options.modules.system.programs = {
|
options.modules.system.programs = {
|
||||||
editors = {
|
editors = {
|
||||||
emacs.enable = mkEnableOption "Emacs operatig system";
|
|
||||||
neovim.enable = mkEnableOption "Neovim text editor";
|
|
||||||
helix.enable = mkEnableOption "Helix text editor";
|
helix.enable = mkEnableOption "Helix text editor";
|
||||||
kakoune.enable = mkEnableOption "Kakoune text editor";
|
kakoune.enable = mkEnableOption "Kakoune text editor";
|
||||||
};
|
};
|
||||||
|
@ -12,13 +10,7 @@ in {
|
||||||
discord.enable = mkEnableOption "Discord messenger";
|
discord.enable = mkEnableOption "Discord messenger";
|
||||||
spotify.enable = mkEnableOption "Spotify music client";
|
spotify.enable = mkEnableOption "Spotify music client";
|
||||||
zathura.enable = mkEnableOption "Zathura pdf viewer";
|
zathura.enable = mkEnableOption "Zathura pdf viewer";
|
||||||
nextcloud.enable = mkEnableOption "Nextcloud sync client";
|
|
||||||
firefox.enable = mkEnableOption "Firefox web browser";
|
|
||||||
zellij.enable = mkEnableOption "Zellij terminal multiplexer";
|
|
||||||
steam.enable = mkEnableOption "Steam games platform";
|
|
||||||
|
|
||||||
eza.enable = mkEnableOption "eza";
|
|
||||||
oh-my-posh.enable = mkEnableOption "oh-my-posh";
|
|
||||||
nushell.enable = mkEnableOption "nushell";
|
nushell.enable = mkEnableOption "nushell";
|
||||||
terminals = {
|
terminals = {
|
||||||
foot.enable = mkEnableOption "Foot terminal emulator";
|
foot.enable = mkEnableOption "Foot terminal emulator";
|
||||||
|
|
|
@ -17,8 +17,6 @@ in {
|
||||||
pull.ff = "only";
|
pull.ff = "only";
|
||||||
gpg.format = "ssh";
|
gpg.format = "ssh";
|
||||||
commit.gpgsign = "true";
|
commit.gpgsign = "true";
|
||||||
# breaks forgejo
|
|
||||||
# diff.external = "${pkgs.difftastic}/bin/difft";
|
|
||||||
|
|
||||||
signing = {
|
signing = {
|
||||||
key = "${key}";
|
key = "${key}";
|
||||||
|
|
|
@ -1,29 +1,62 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (builtins) elemAt;
|
||||||
|
inherit (lib.options) mkOption;
|
||||||
|
inherit (lib.types) listOf str;
|
||||||
|
|
||||||
inherit (config.meta.mainUser) username;
|
inherit (config.meta.mainUser) username;
|
||||||
in {
|
in {
|
||||||
users = {
|
options.meta = {
|
||||||
mutableUsers = true;
|
users = mkOption {
|
||||||
users = {
|
type = listOf str;
|
||||||
${username} = {
|
default = ["cr"];
|
||||||
isNormalUser = true;
|
description = ''
|
||||||
extraGroups = [
|
A list of users on a system.
|
||||||
"wheel"
|
'';
|
||||||
"networking"
|
};
|
||||||
"video"
|
mainUser = {
|
||||||
"networkmanager"
|
username = mkOption {
|
||||||
"audio"
|
type = str;
|
||||||
"nix"
|
default = elemAt config.meta.users 0;
|
||||||
"docker"
|
description = ''
|
||||||
];
|
The main user for each system. This is the first element of the list of users by default.
|
||||||
shell = self.packages.${pkgs.stdenv.system}.fish;
|
'';
|
||||||
# hashedPasswordFile = "/etc/passwords/cr";
|
};
|
||||||
|
gitSigningKey = mkOption {
|
||||||
|
type = str;
|
||||||
|
description = ''
|
||||||
|
The main user's git signing key, used to automatically sing git commits with this key
|
||||||
|
'';
|
||||||
|
default = ''
|
||||||
|
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw== '';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
users = {
|
||||||
|
mutableUsers = true;
|
||||||
|
users = {
|
||||||
|
${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"networking"
|
||||||
|
"video"
|
||||||
|
"networkmanager"
|
||||||
|
"audio"
|
||||||
|
"nix"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
shell = self.packages.${pkgs.stdenv.system}.fish;
|
||||||
|
# hashedPasswordFile = "/etc/passwords/cr";
|
||||||
|
};
|
||||||
|
# root.hashedPasswordFile = "/persist/passwords/root";
|
||||||
};
|
};
|
||||||
# root.hashedPasswordFile = "/persist/passwords/root";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,12 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
cfg = config.modules.system.programs.steam;
|
cfg = config.modules.system.programs.steam;
|
||||||
in {
|
in {
|
||||||
|
options.modules.system.programs.steam.enable = mkEnableOption "Steam games platform";
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = builtins.attrValues {
|
environment.systemPackages = builtins.attrValues {
|
||||||
inherit patched-zellij;
|
# inherit patched-zellij;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,37 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
cfg = config.modules.system.hardware;
|
cfg = config.modules.system.hardware;
|
||||||
inherit (lib) mkIf;
|
|
||||||
inherit (lib.modules) mkForce;
|
|
||||||
in {
|
in {
|
||||||
|
options.modules.system.hardware = {
|
||||||
|
nvidia = {
|
||||||
|
enable = mkEnableOption "Nvidia graphics drivers";
|
||||||
|
};
|
||||||
|
amd.enable = mkEnableOption "AMD graphics drivers";
|
||||||
|
};
|
||||||
config = {
|
config = {
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics.enable = true;
|
||||||
enable = true;
|
|
||||||
extraPackages = mkIf cfg.amd.enable (builtins.attrValues {
|
|
||||||
inherit
|
|
||||||
(pkgs)
|
|
||||||
mesa
|
|
||||||
libva
|
|
||||||
vaapiVdpa
|
|
||||||
;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
nvidia = mkIf cfg.nvidia.enable {
|
nvidia = mkIf cfg.nvidia.enable {
|
||||||
|
# we want the open-source drivers
|
||||||
|
open = true;
|
||||||
|
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
open = mkForce true;
|
nvidiaSettings = false;
|
||||||
|
|
||||||
|
# fixes sleep on nvidia devices
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
enable = true;
|
enable = true;
|
||||||
finegrained = false;
|
finegrained = false;
|
||||||
};
|
};
|
||||||
nvidiaSettings = false;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
boot.initrd.kernelModules = mkIf cfg.amd.enable ["amdgpu"];
|
|
||||||
services.xserver.videoDrivers = mkIf cfg.nvidia.enable ["nvidia"];
|
services.xserver.videoDrivers = mkIf cfg.nvidia.enable ["nvidia"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue