Compare commits

..

No commits in common. "91adefc48ec8202c230be6b0fdbabc556df6cbb9" and "b49e4656f29885a2cb62fffc9fa15046f13a6c5c" have entirely different histories.

11 changed files with 269 additions and 294 deletions

View File

@ -5,7 +5,6 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
@ -34,7 +33,7 @@
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
formatter.${system} = pkgs.alejandra;
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
homeConfigurations = {
kristian = home-manager.lib.homeManagerConfiguration {
@ -50,7 +49,7 @@
{
nixpkgs.overlays = [
zig.overlays.default # Add zig
zig.overlays.default # Adds zig
( # https://github.com/nix-community/home-manager/issues/1538#issuecomment-706627100
final: prev: {
unstable = import nixpkgs-unstable {

View File

@ -1,11 +1,8 @@
{...}: {
config.programs.bash = {
enable = true;
{enable}: {
inherit enable;
shellAliases = {
ll = "ls -lh";
la = "ls -lah";
".." = "cd ..";
};
};
}

View File

@ -1,10 +1,14 @@
{
config,
pkgs,
lib,
options,
specialArgs,
modulesPath,
wallpaper,
}: {
nixpkgs.config.allowUnfreePredicate = _: true;
home.stateVersion = "23.05";
home.username = "kristian";
home.homeDirectory = "/home/kristian";
@ -14,23 +18,19 @@
NIXOS_OZONE_WL = 1;
};
# Keyboard Layout
home.keyboard.layout = "at";
# TODO Change for Laptop
# TODO: Change for Laptop
targets.genericLinux.enable = false; # Enable on non-nixos ditros
imports = [
./bash.nix
./direnv.nix
./firefox.nix
./git.nix
./gnome.nix
./nvim
./packages.nix
./thunderbird.nix
./vscode.nix
];
# Keyboard Layout
home.keyboard.layout = "at"; # NOTE: Set by Hyprland config
# Programs (additional programs)
home.packages = import ./packages.nix {inherit pkgs;};
# Services
services = {
copyq.enable = true;
};
# Programs
programs = {
@ -38,16 +38,29 @@
mpv.enable = true;
obs-studio.enable = true;
yt-dlp.enable = true;
bash = import ./bash.nix {enable = true;};
vscode = import ./vscode.nix {
enable = true;
inherit pkgs;
};
direnv = import ./direnv.nix {enable = true;};
git = import ./git.nix {enable = true;};
thunderbird = import ./thunderbird.nix {enable = true;};
neovim = import ./nvim {
enable = true;
inherit pkgs;
};
# Services
services = {
copyq.enable = true;
firefox = import ./firefox.nix {
enable = true;
nur = config.nur;
};
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"image/png" = ["org.gnome.eog.desktop"];
"image/jpeg" = ["org.gnome.eog.desktop"];
@ -55,4 +68,10 @@
"application/pdf" = ["org.gnome.Evince.desktop"];
};
};
# Gnome settings
dconf.settings = import ./gnome.nix {
inherit lib;
inherit wallpaper;
};
}

View File

@ -1,8 +1,5 @@
{...}: {
config.programs.direnv = {
enable = true;
nix-direnv.enable = true;
{enable}: {
inherit enable;
nix-direnv.enable = enable;
enableBashIntegration = true;
};
}

View File

@ -1,23 +1,24 @@
{config, ...}: {
config.programs.firefox = {
enable = true;
{
nur,
enable,
}: {
inherit enable;
profiles.kristian = {
isDefault = true;
search.default = "DuckDuckGo";
search.force = true;
extensions = with config.nur.repos.rycee.firefox-addons; [
extensions = builtins.attrValues {
inherit
(nur.repos.rycee.firefox-addons)
ublock-origin
umatrix
sponsorblock
sidebery
];
;
};
settings = {
"extensions.pocket.enabled" = false;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
};
};
}

View File

@ -1,11 +1,6 @@
{...}: {
config.programs.git = {
enable = true;
{enable}: {
inherit enable;
userName = "Kristian Krsnik";
userEmail = "git@krsnik.at";
extraConfig = {
init.defaultBranch = "main";
};
};
extraConfig = {init.defaultBranch = "main";};
}

View File

@ -1,18 +1,63 @@
{
pkgs,
lib,
wallpaper,
...
}: {
config = {
home.packages = with pkgs.gnomeExtensions; [
quick-settings-audio-panel
tray-icons-reloaded
espresso
pano
];
dconf.settings = {
# Use `dconf watch /` to track stateful changes you are doing, then set them here.
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "Adwaita-dark";
};
"org/gnome/desktop/background" = let
width = 3840;
height = 2160;
in {
picture-uri = "file://${wallpaper.override {
preset = "nord-snow-aurora";
inherit width;
inherit height;
}}/share/wallpapers/nixos-wallpaper.png";
picture-uri-dark = "file://${wallpaper.override {
preset = "nord-night-aurora";
inherit width;
inherit height;
}}/share/wallpapers/nixos-wallpaper.png";
};
"org/gnome/desktop/wm/keybindings" = {
switch-to-workspace-left = ["<Alt>1"];
switch-to-workspace-right = ["<Alt>2"];
move-to-workspace-left = ["<Shift><Alt>1"];
move-to-workspace-right = ["<Shift><Alt>2"];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Shift><Alt>a";
command = "kgx";
name = "Console";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Shift><Alt>f";
command = "nautilus";
name = "File Manager";
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
];
};
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing"; # Automatic suspend/hibernation creates a suspend/hibernation loop
power-button-action = "suspend";
};
"org/gnome/mutter" = {
edge-tiling = true;
dynamic-workspaces = true;
};
"org/gnome/Console" = {
theme = "auto";
};
"org/gnome/simple-scan" = {
text-dpi = 300;
};
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [
@ -24,72 +69,4 @@
"pano@elhan.io"
];
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk-theme = "Adwaita-dark";
};
"org/gnome/desktop/background" = let
width = 3840;
height = 2160;
in {
picture-uri = "file://${wallpaper.override {
preset = "nord-snow-aurora";
inherit width;
inherit height;
}}/share/wallpapers/nixos-wallpaper.png";
picture-uri-dark = "file://${wallpaper.override {
preset = "nord-night-aurora";
inherit width;
inherit height;
}}/share/wallpapers/nixos-wallpaper.png";
};
"org/gnome/desktop/wm/keybindings" = {
switch-to-workspace-left = ["<Alt>1"];
switch-to-workspace-right = ["<Alt>2"];
move-to-workspace-left = ["<Shift><Alt>1"];
move-to-workspace-right = ["<Shift><Alt>2"];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Shift><Alt>a";
command = "kgx";
name = "Console";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Shift><Alt>f";
command = "nautilus";
name = "File Manager";
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
];
};
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing"; # Automatic suspend/hibernation creates a suspend/hibernation loop
power-button-action = "suspend";
};
"org/gnome/mutter" = {
edge-tiling = true;
dynamic-workspaces = true;
};
"org/gnome/Console" = {
theme = "auto";
};
"org/gnome/simple-scan" = {
text-dpi = 300;
};
};
};
}

View File

@ -1,14 +1,16 @@
{pkgs, ...}: {
config.programs.neovim = {
enable = true;
{
pkgs,
enable,
}: {
inherit enable;
defaultEditor = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
plugins = with pkgs.vimPlugins;
[
plugins = builtins.attrValues ({
inherit
(pkgs.vimPlugins)
telescope-nvim # fuzzy finder
tokyonight-nvim # theme
undotree # undotree
@ -16,13 +18,17 @@
nvim-treesitter # syntax highlighting
# Autocomplete and LSP
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
luasnip
]
++ (with pkgs.vimPlugins.nvim-treesitter-parsers; [
;
}
// {
# Parsers for syntax highlighting
inherit
(pkgs.vimPlugins.nvim-treesitter-parsers)
nix
zig
python
@ -37,8 +43,8 @@
c
glsl
bash
]);
;
});
extraPackages = [pkgs.nodePackages.pyright];
extraLuaConfig =
builtins.readFile ./keybinds.lua
@ -50,5 +56,4 @@
+ builtins.readFile ./cmp.lua
+ builtins.readFile ./lspconfig.lua;
extraConfig = "set number relativenumber";
};
}

View File

@ -1,21 +1,5 @@
{
pkgs,
lib,
...
}: {
config.nixpkgs.config = {
allowUnfree = false;
allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"vscode"
"vscode-extension-MS-python-vscode-pylance"
"vscode-extension-github-copilot"
"osu-lazer"
];
};
config.home.packages = with pkgs; [
{pkgs}:
with pkgs; [
# Basic utils
unzip
magic-wormhole
@ -32,17 +16,24 @@
signal-desktop
element-desktop
# Creative software
# image editor
gimp
davinci-resolve
# Games
# games
osu-lazer
# Misc
nerdfonts # Font with glyphs for status bar
comma # Run any binary from the repos with a comma `, cowsay neato`
# Gnome extension
gnomeExtensions.quick-settings-audio-panel
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.espresso
gnomeExtensions.pano
gnome-decoder
tor-browser-bundle-bin
];
}
]

View File

@ -1,9 +1,6 @@
{...}: {
config.programs.thunderbird = {
enable = true;
{enable}: {
inherit enable;
profiles.kristian = {
isDefault = true;
};
};
}

View File

@ -1,10 +1,10 @@
{pkgs, ...}: {
config.programs.vscode = {
enable = true;
{
enable,
pkgs,
}: {
inherit enable;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
keybindings = [
{
key = "alt+a";
@ -12,7 +12,6 @@
when = "editorTextFocus && !editorReadonly";
}
];
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
arrterian.nix-env-selector
@ -25,7 +24,6 @@
tamasfe.even-better-toml
asciidoctor.asciidoctor-vscode
];
userSettings = {
"window.menuBarVisibility" = "hidden";
"[nix]" = {
@ -63,5 +61,4 @@
};
"terminal.integrated.defaultProfile.linux" = "bash";
};
};
}