Compare commits
4 Commits
88a6d046b8
...
e1a274c88e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e1a274c88e | ||
![]() |
cdc4bdffb6 | ||
![]() |
9b9a103e49 | ||
![]() |
ea7bf809fc |
@ -28,4 +28,5 @@
|
|||||||
me.graphical = true;
|
me.graphical = true;
|
||||||
me.graphics_card_type = "intel";
|
me.graphics_card_type = "intel";
|
||||||
me.kodi.enable = true;
|
me.kodi.enable = true;
|
||||||
|
me.lvfs.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -37,11 +37,14 @@
|
|||||||
me.docker.enable = true;
|
me.docker.enable = true;
|
||||||
me.emacs_flavor = "full";
|
me.emacs_flavor = "full";
|
||||||
me.firefox.enable = true;
|
me.firefox.enable = true;
|
||||||
me.git.config = ./roles/git/files/gitconfig_home;
|
me.git.config = ../../roles/git/files/gitconfig_home;
|
||||||
me.graphical = true;
|
me.graphical = true;
|
||||||
me.graphics_card_type = "amd";
|
me.graphics_card_type = "amd";
|
||||||
me.kanshi.enable = true;
|
me.kanshi.enable = true;
|
||||||
me.kubernetes.enable = true;
|
me.kubernetes.enable = true;
|
||||||
me.latex.enable = true;
|
me.latex.enable = true;
|
||||||
|
me.launch_keyboard.enable = true;
|
||||||
me.sway.enable = true;
|
me.sway.enable = true;
|
||||||
|
me.lvfs.enable = true;
|
||||||
|
me.media.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.variables.EDITOR = "${pkgs.my_emacs}/bin/plainmacs";
|
environment.variables.EDITOR = "plainmacs";
|
||||||
}
|
}
|
||||||
(lib.mkIf (config.me.graphical) {
|
(lib.mkIf (config.me.graphical) {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
@ -32,54 +32,54 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(lib.mkIf (config.me.graphical) {
|
# (lib.mkIf (config.me.graphical) {
|
||||||
nixpkgs.overlays = [
|
# nixpkgs.overlays = [
|
||||||
(final: prev: {
|
# (final: prev: {
|
||||||
git = pkgs.buildEnv {
|
# git = pkgs.buildEnv {
|
||||||
name = prev.git.name;
|
# name = prev.git.name;
|
||||||
paths = [
|
# paths = [
|
||||||
prev.git
|
# prev.git
|
||||||
];
|
# ];
|
||||||
extraOutputsToInstall = [
|
# extraOutputsToInstall = [
|
||||||
"man"
|
# "man"
|
||||||
"doc"
|
# "doc"
|
||||||
"info"
|
# "info"
|
||||||
];
|
# ];
|
||||||
buildInputs = [ final.makeWrapper ];
|
# buildInputs = [ final.makeWrapper ];
|
||||||
postBuild = ''
|
# postBuild = ''
|
||||||
wrapProgram $out/bin/git --prefix PATH : ${
|
# wrapProgram $out/bin/git --prefix PATH : ${
|
||||||
lib.makeBinPath [
|
# lib.makeBinPath [
|
||||||
final.meld
|
# final.meld
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
})
|
# })
|
||||||
];
|
# ];
|
||||||
})
|
# })
|
||||||
(lib.mkIf (!config.me.graphical) {
|
# (lib.mkIf (!config.me.graphical) {
|
||||||
nixpkgs.overlays = [
|
# nixpkgs.overlays = [
|
||||||
(final: prev: {
|
# (final: prev: {
|
||||||
git = pkgs.buildEnv {
|
# git = pkgs.buildEnv {
|
||||||
name = prev.git.name;
|
# name = prev.git.name;
|
||||||
paths = [
|
# paths = [
|
||||||
prev.git
|
# prev.git
|
||||||
];
|
# ];
|
||||||
extraOutputsToInstall = [
|
# extraOutputsToInstall = [
|
||||||
"man"
|
# "man"
|
||||||
"doc"
|
# "doc"
|
||||||
"info"
|
# "info"
|
||||||
];
|
# ];
|
||||||
buildInputs = [ final.makeWrapper ];
|
# buildInputs = [ final.makeWrapper ];
|
||||||
postBuild = ''
|
# postBuild = ''
|
||||||
wrapProgram $out/bin/git --prefix PATH : ${
|
# wrapProgram $out/bin/git --prefix PATH : ${
|
||||||
lib.makeBinPath [
|
# lib.makeBinPath [
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
})
|
# })
|
||||||
];
|
# ];
|
||||||
})
|
# })
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -8,28 +8,41 @@
|
|||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
config = lib.mkIf config.me.graphical {
|
options.me = {
|
||||||
environment.systemPackages = with pkgs; [
|
launch_keyboard.enable = lib.mkOption {
|
||||||
system76-keyboard-configurator
|
type = lib.types.bool;
|
||||||
dfu-programmer # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
|
default = false;
|
||||||
avrdude # For flashing keyboard https://support.system76.com/articles/launch_2-firmware-update/
|
example = true;
|
||||||
lxqt.lxqt-policykit # Need a polkit agent to launch the keyboard configurator
|
description = "Whether we want to install launch_keyboard.";
|
||||||
];
|
|
||||||
|
|
||||||
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -8,26 +8,36 @@
|
|||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
config = lib.mkMerge [
|
options.me = {
|
||||||
{
|
lvfs.enable = lib.mkOption {
|
||||||
services.fwupd.enable = true;
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install lvfs.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
config = lib.mkIf config.me.lvfs.enable (
|
||||||
hideMounts = true;
|
lib.mkMerge [
|
||||||
directories = [
|
{
|
||||||
{
|
services.fwupd.enable = true;
|
||||||
directory = "/var/lib/fwupd";
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||||
user = "root";
|
hideMounts = true;
|
||||||
group = "root";
|
directories = [
|
||||||
mode = "0755";
|
{
|
||||||
}
|
directory = "/var/lib/fwupd";
|
||||||
|
user = "root";
|
||||||
|
group = "root";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome-firmware
|
||||||
];
|
];
|
||||||
};
|
})
|
||||||
}
|
]
|
||||||
(lib.mkIf config.me.graphical {
|
);
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
gnome-firmware
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -21,20 +21,21 @@ in
|
|||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
config = (
|
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 (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ffmpeg
|
ffmpeg
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.talexander =
|
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.file.".config/mpv/mpv.conf" = {
|
|
||||||
source = ./files/mpv.conf;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
(lib.mkIf config.me.graphical {
|
(lib.mkIf config.me.graphical {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@ -44,6 +45,14 @@ in
|
|||||||
# 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.
|
# 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
|
imv
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/mpv/mpv.conf" = {
|
||||||
|
source = ./files/mpv.conf;
|
||||||
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
(lib.mkIf (config.me.graphics_card_type == "amd" || config.me.graphics_card_type == "intel") {
|
(lib.mkIf (config.me.graphics_card_type == "amd" || config.me.graphics_card_type == "intel") {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user