Compare commits

..

No commits in common. "e1a274c88eca1ddaacbc48175f508d4b4599c31f" and "88a6d046b80af97dd62c1f2da777a77b8416d0ac" have entirely different histories.

7 changed files with 103 additions and 139 deletions

View File

@ -28,5 +28,4 @@
me.graphical = true;
me.graphics_card_type = "intel";
me.kodi.enable = true;
me.lvfs.enable = true;
}

View File

@ -37,14 +37,11 @@
me.docker.enable = true;
me.emacs_flavor = "full";
me.firefox.enable = true;
me.git.config = ../../roles/git/files/gitconfig_home;
me.git.config = ./roles/git/files/gitconfig_home;
me.graphical = true;
me.graphics_card_type = "amd";
me.kanshi.enable = true;
me.kubernetes.enable = true;
me.latex.enable = true;
me.launch_keyboard.enable = true;
me.sway.enable = true;
me.lvfs.enable = true;
me.media.enable = true;
}

View File

@ -84,7 +84,7 @@ in
};
};
environment.variables.EDITOR = "plainmacs";
environment.variables.EDITOR = "${pkgs.my_emacs}/bin/plainmacs";
}
(lib.mkIf (config.me.graphical) {
nixpkgs.overlays = [

View File

@ -32,54 +32,54 @@
};
};
})
# (lib.mkIf (config.me.graphical) {
# nixpkgs.overlays = [
# (final: prev: {
# git = pkgs.buildEnv {
# name = prev.git.name;
# paths = [
# prev.git
# ];
# extraOutputsToInstall = [
# "man"
# "doc"
# "info"
# ];
# buildInputs = [ final.makeWrapper ];
# postBuild = ''
# wrapProgram $out/bin/git --prefix PATH : ${
# lib.makeBinPath [
# final.meld
# ]
# }
# '';
# };
# })
# ];
# })
# (lib.mkIf (!config.me.graphical) {
# nixpkgs.overlays = [
# (final: prev: {
# git = pkgs.buildEnv {
# name = prev.git.name;
# paths = [
# prev.git
# ];
# extraOutputsToInstall = [
# "man"
# "doc"
# "info"
# ];
# buildInputs = [ final.makeWrapper ];
# postBuild = ''
# wrapProgram $out/bin/git --prefix PATH : ${
# lib.makeBinPath [
# ]
# }
# '';
# };
# })
# ];
# })
(lib.mkIf (config.me.graphical) {
nixpkgs.overlays = [
(final: prev: {
git = pkgs.buildEnv {
name = prev.git.name;
paths = [
prev.git
];
extraOutputsToInstall = [
"man"
"doc"
"info"
];
buildInputs = [ final.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/git --prefix PATH : ${
lib.makeBinPath [
final.meld
]
}
'';
};
})
];
})
(lib.mkIf (!config.me.graphical) {
nixpkgs.overlays = [
(final: prev: {
git = pkgs.buildEnv {
name = prev.git.name;
paths = [
prev.git
];
extraOutputsToInstall = [
"man"
"doc"
"info"
];
buildInputs = [ final.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/git --prefix PATH : ${
lib.makeBinPath [
]
}
'';
};
})
];
})
];
}

View File

@ -8,41 +8,28 @@
{
imports = [ ];
options.me = {
launch_keyboard.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install launch_keyboard.";
config = lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
system76-keyboard-configurator
dfu-programmer # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
avrdude # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator
];
systemd = {
user.services.lxqt-policykit-agent = {
description = "lxqt-policykit-agent";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
};
config = lib.mkIf config.me.launch_keyboard.enable (
lib.mkMerge [
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
system76-keyboard-configurator
dfu-programmer # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
avrdude # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator
];
systemd = {
user.services.lxqt-policykit-agent = {
description = "lxqt-policykit-agent";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.lxqt.lxqt-policykit}/bin/lxqt-policykit-agent";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
})
]
);
}

View File

@ -8,36 +8,26 @@
{
imports = [ ];
options.me = {
lvfs.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install lvfs.";
};
};
config = lib.mkMerge [
{
services.fwupd.enable = true;
config = lib.mkIf config.me.lvfs.enable (
lib.mkMerge [
{
services.fwupd.enable = true;
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
directories = [
{
directory = "/var/lib/fwupd";
user = "root";
group = "root";
mode = "0755";
}
];
};
}
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
gnome-firmware
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
directories = [
{
directory = "/var/lib/fwupd";
user = "root";
group = "root";
mode = "0755";
}
];
})
]
);
};
}
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
gnome-firmware
];
})
];
}

View File

@ -21,30 +21,12 @@ in
{
imports = [ ];
options.me = {
media.enable = lib.mkOption {
type = lib.types.bool;
default = false;
example = true;
description = "Whether we want to install media.";
};
};
config = lib.mkIf config.me.media.enable (
config = (
lib.mkMerge [
{
environment.systemPackages = with pkgs; [
ffmpeg
];
}
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
mpv
evince
gimp
# So far I prefer imv over swayimg because imv supports the 'p' hotkey to print the currently-viewed file to stdout (useful for pipelines) and afaik doesn't support the exec:// protocol which seems like a massive risk.
imv
];
home-manager.users.talexander =
{ pkgs, ... }:
@ -53,6 +35,15 @@ in
source = ./files/mpv.conf;
};
};
}
(lib.mkIf config.me.graphical {
environment.systemPackages = with pkgs; [
mpv
evince
gimp
# So far I prefer imv over swayimg because imv supports the 'p' hotkey to print the currently-viewed file to stdout (useful for pipelines) and afaik doesn't support the exec:// protocol which seems like a massive risk.
imv
];
})
(lib.mkIf (config.me.graphics_card_type == "amd" || config.me.graphics_card_type == "intel") {
environment.systemPackages = with pkgs; [