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 = {
|
||||
editors = {
|
||||
emacs.enable = false;
|
||||
# only emacs for me, right now.
|
||||
neovim.enable = true;
|
||||
# sadly just not advanced enough, yet.
|
||||
helix.enable = true;
|
||||
};
|
||||
discord.enable = true;
|
||||
# nushell.enable = true;
|
||||
eza.enable = true;
|
||||
firefox.enable = true;
|
||||
spotify.enable = false;
|
||||
# starship.enable = true;
|
||||
zellij.enable = true;
|
||||
terminals = {
|
||||
foot.enable = true;
|
||||
};
|
||||
|
|
|
@ -52,24 +52,10 @@ in {
|
|||
};
|
||||
programs = {
|
||||
editors = {
|
||||
emacs.enable = false;
|
||||
# only emacs for me, right now.
|
||||
neovim.enable = true;
|
||||
# sadly just not advanced enough, yet.
|
||||
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 = {
|
||||
foot.enable = true;
|
||||
kitty.enable = true;
|
||||
};
|
||||
};
|
||||
sound.enable = true;
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
editors = {
|
||||
helix.enable = true;
|
||||
};
|
||||
eza.enable = true;
|
||||
};
|
||||
};
|
||||
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
|
||||
./monitors.nix
|
||||
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
options.modules.system = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkOption;
|
||||
inherit (lib.types) str submodule int ints number attrsOf listOf;
|
||||
inherit (lib.types) submodule int ints number attrsOf ;
|
||||
in {
|
||||
options.modules.system.hardware.monitors = mkOption {
|
||||
description = "\n List of monitors to use\n ";
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
in {
|
||||
options.modules.system.programs = {
|
||||
editors = {
|
||||
emacs.enable = mkEnableOption "Emacs operatig system";
|
||||
neovim.enable = mkEnableOption "Neovim text editor";
|
||||
helix.enable = mkEnableOption "Helix text editor";
|
||||
kakoune.enable = mkEnableOption "Kakoune text editor";
|
||||
};
|
||||
|
@ -12,13 +10,7 @@ in {
|
|||
discord.enable = mkEnableOption "Discord messenger";
|
||||
spotify.enable = mkEnableOption "Spotify music client";
|
||||
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";
|
||||
terminals = {
|
||||
foot.enable = mkEnableOption "Foot terminal emulator";
|
||||
|
|
|
@ -17,8 +17,6 @@ in {
|
|||
pull.ff = "only";
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = "true";
|
||||
# breaks forgejo
|
||||
# diff.external = "${pkgs.difftastic}/bin/difft";
|
||||
|
||||
signing = {
|
||||
key = "${key}";
|
||||
|
|
|
@ -1,29 +1,62 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) elemAt;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) listOf str;
|
||||
|
||||
inherit (config.meta.mainUser) username;
|
||||
in {
|
||||
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";
|
||||
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
|
||||
'';
|
||||
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,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.programs.steam;
|
||||
in {
|
||||
options.modules.system.programs.steam.enable = mkEnableOption "Steam games platform";
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
});
|
||||
in {
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit patched-zellij;
|
||||
# inherit patched-zellij;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,38 +1,37 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.options) mkEnableOption;
|
||||
|
||||
cfg = config.modules.system.hardware;
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.modules) mkForce;
|
||||
in {
|
||||
options.modules.system.hardware = {
|
||||
nvidia = {
|
||||
enable = mkEnableOption "Nvidia graphics drivers";
|
||||
};
|
||||
amd.enable = mkEnableOption "AMD graphics drivers";
|
||||
};
|
||||
config = {
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = mkIf cfg.amd.enable (builtins.attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
mesa
|
||||
libva
|
||||
vaapiVdpa
|
||||
;
|
||||
});
|
||||
};
|
||||
graphics.enable = true;
|
||||
nvidia = mkIf cfg.nvidia.enable {
|
||||
# we want the open-source drivers
|
||||
open = true;
|
||||
|
||||
modesetting.enable = true;
|
||||
open = mkForce true;
|
||||
nvidiaSettings = false;
|
||||
|
||||
# fixes sleep on nvidia devices
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
finegrained = false;
|
||||
};
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
};
|
||||
};
|
||||
boot.initrd.kernelModules = mkIf cfg.amd.enable ["amdgpu"];
|
||||
services.xserver.videoDrivers = mkIf cfg.nvidia.enable ["nvidia"];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue