mirror of
https://github.com/thilobillerbeck/dotfiles.git
synced 2024-12-22 20:13:04 +01:00
cleaned up home manager config
This commit is contained in:
parent
84321246c1
commit
3c19c99ef4
6 changed files with 109 additions and 30 deletions
63
machines/common.nix
Normal file
63
machines/common.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
news.display = "silent";
|
||||
|
||||
imports = [
|
||||
./../programs/alacritty.nix
|
||||
./../programs/bat.nix
|
||||
./../programs/beets.nix
|
||||
./../programs/command-not-found.nix
|
||||
./../programs/direnv.nix
|
||||
./../programs/fzf.nix
|
||||
./../programs/git.nix
|
||||
./../programs/htop.nix
|
||||
./../programs/neovim.nix
|
||||
./../programs/starship.nix
|
||||
./../programs/topgrade.nix
|
||||
./../programs/vscode.nix
|
||||
./../programs/yt-dlp.nix
|
||||
./../programs/zsh.nix
|
||||
./../programs/go.nix
|
||||
./../packages.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "thilo";
|
||||
homeDirectory = "/home/thilo";
|
||||
stateVersion = "22.11";
|
||||
file = {
|
||||
".config/nano/nanorc".text = ''
|
||||
set linenumbers
|
||||
include "/usr/share/nano/*.nanorc"
|
||||
'';
|
||||
".ssh/config".source = ./../dotfiles/ssh-config;
|
||||
};
|
||||
sessionVariables = {
|
||||
|
||||
};
|
||||
activation = {
|
||||
linkDesktopApplications = {
|
||||
after = [ "writeBoundary" "createXdgUserDirectories" ];
|
||||
before = [ ];
|
||||
data = ''
|
||||
for dir in ${config.home.homeDirectory}/.nix-profile/share/applications/*; do
|
||||
chmod +x $(realpath $dir) -v
|
||||
done
|
||||
'';
|
||||
};
|
||||
setNodeGlobalDir = {
|
||||
after = [ "writeBoundary" "createXdgUserDirectories" ];
|
||||
before = [ ];
|
||||
data = ''
|
||||
mkdir -p ${config.home.homeDirectory}/.node-global
|
||||
${pkgs.nodejs}/bin/npm config set prefix ${config.home.homeDirectory}/.node-global
|
||||
'';
|
||||
};
|
||||
};
|
||||
sessionPath = [ "${config.home.homeDirectory}/.node-global/bin" ];
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
43
machines/laptop.nix
Normal file
43
machines/laptop.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
chromeArgs = lib.strings.concatStringsSep " " [
|
||||
"--force-dark-mode"
|
||||
"--enable-features=WebUIDarkMode"
|
||||
"--enable-smooth-scrolling"
|
||||
"--ozone-platform-hint=auto"
|
||||
"--ignore-gpu-blocklist"
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-zero-copy"
|
||||
"--force-device-scale-factor=1.0"
|
||||
"--use-gl=desktop"
|
||||
];
|
||||
nixGLWrap = import ./../utils/nixGLWrap.nix { inherit pkgs lib; };
|
||||
in {
|
||||
imports = [
|
||||
./common.nix
|
||||
];
|
||||
|
||||
targets.genericLinux.enable = true;
|
||||
news.display = "silent";
|
||||
|
||||
programs.vscode.package = (nixGLWrap (pkgs.vscode.override {
|
||||
commandLineArgs =
|
||||
"--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --gtk-version=4";
|
||||
}));
|
||||
programs.alacritty.package = (nixGLWrap pkgs.alacritty);
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(nixGLWrap (pkgs.vivaldi.override {
|
||||
proprietaryCodecs = true;
|
||||
enableWidevine = true;
|
||||
commandLineArgs = chromeArgs;
|
||||
}))
|
||||
(nixGLWrap (pkgs.google-chrome.override { commandLineArgs = chromeArgs; }))
|
||||
];
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
mime.enable = true;
|
||||
};
|
||||
}
|
22
packages.nix
22
packages.nix
|
@ -1,18 +1,5 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
chromeArgs = lib.strings.concatStringsSep " " [
|
||||
"--force-dark-mode"
|
||||
"--enable-features=WebUIDarkMode"
|
||||
"--enable-smooth-scrolling"
|
||||
"--ozone-platform-hint=auto"
|
||||
"--ignore-gpu-blocklist"
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-zero-copy"
|
||||
"--force-device-scale-factor=1.0"
|
||||
"--use-gl=desktop"
|
||||
];
|
||||
nixGLWrap = import ./utils/nixGLWrap.nix { inherit pkgs lib; };
|
||||
in {
|
||||
{
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
up
|
||||
|
@ -41,13 +28,6 @@ in {
|
|||
(pkgs.nerdfonts.override {
|
||||
fonts = [ "JetBrainsMono" "FiraCode" "FiraMono" ];
|
||||
})
|
||||
(nixGLWrap (pkgs.vivaldi.override {
|
||||
proprietaryCodecs = true;
|
||||
enableWidevine = true;
|
||||
commandLineArgs = chromeArgs;
|
||||
}))
|
||||
(nixGLWrap
|
||||
(pkgs.google-chrome.override { commandLineArgs = chromeArgs; }))
|
||||
(pkgs.writeShellScriptBin "ssh-fix-permissions"
|
||||
(builtins.readFile ./scripts/ssh-fix-permissions.sh))
|
||||
(pkgs.writeShellScriptBin "yt-dlp-audio"
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let nixGLWrap = import ./../utils/nixGLWrap.nix { inherit pkgs lib; };
|
||||
in {
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
package = (nixGLWrap pkgs.alacritty);
|
||||
settings = {
|
||||
window = {
|
||||
decorations = "full";
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let nixGLWrap = import ./../utils/nixGLWrap.nix { inherit pkgs lib; };
|
||||
in {
|
||||
{
|
||||
programs = {
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = (nixGLWrap (pkgs.vscode.override {
|
||||
commandLineArgs =
|
||||
"--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --gtk-version=4";
|
||||
}));
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
0
wrappers/vscode.nix
Normal file
0
wrappers/vscode.nix
Normal file
Loading…
Reference in a new issue