nixos-dots

nixos dots
git clone git://popovic.xyz/nixos-dots.git
Log | Files | Refs

commit d1d3943505ab8cb63ae8c7d1054ac312516666e7
parent 9ad94a65a035ead7493912183c4cf8333c6bc33c
Author: Milutin Popovic <milutin@popovic.xyz>
Date:   Mon, 16 Mar 2026 11:02:57 +0000

bump

Diffstat:
Mlib/dotfiles.nix | 2+-
Mmodules/nix_settings.nix | 19+++++++++++++++++--
Msystem/host/frame.nix | 24+++++++++++++-----------
Msystem/host/mac.nix | 43++++++++++++++++++++++++++++++++-----------
Msystem/host/server.nix | 18++++++++++--------
Musers/mika.nix | 48++++++++++++++++++++++++++----------------------
6 files changed, 99 insertions(+), 55 deletions(-)

diff --git a/lib/dotfiles.nix b/lib/dotfiles.nix @@ -2,6 +2,6 @@ dotfiles = builtins.fetchGit { url = "git://popovic.xyz/dots.git"; ref = "master"; - rev = "2c6c50b45dfc7c6667e9a816b8d7f002889e2efe"; + rev = "3de6735d1c827c3e1a4795793420322201f6d24f"; }; } diff --git a/modules/nix_settings.nix b/modules/nix_settings.nix @@ -1,15 +1,30 @@ { + config, pkgs, + lib, ... }: + +let + isHomeManager = config ? home; +in { nix = { enable = true; package = pkgs.nix; settings = { use-xdg-base-directories = true; - experimental-features = [ "nix-command" "flakes" ]; - trusted-users = [ "mika" "root" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; + trusted-users = [ + "mika" + "root" + ]; }; + } + // lib.optionalAttrs (!isHomeManager) { + channel.enable = false; }; } diff --git a/system/host/frame.nix b/system/host/frame.nix @@ -4,14 +4,13 @@ hostName, isDarwin, ... -} : +}: { - imports = - [ - ../../users/root.nix - ../../modules/nix_settings.nix - ../../modules/nm.nix - ]; + imports = [ + ../../users/root.nix + ../../modules/nix_settings.nix + ../../modules/nm.nix + ]; sops.defaultSopsFile = ../../secrets.yaml; sops.defaultSopsFormat = "yaml"; @@ -93,7 +92,10 @@ users = { mika = { isNormalUser = true; - extraGroups = [ "wheel" "docker" ]; + extraGroups = [ + "wheel" + "docker" + ]; initialPassword = "123"; shell = pkgs.zsh; }; @@ -127,7 +129,7 @@ Option "Xauth" "$XAUTHORITY" ''; displayManager.startx = { - enable = true; + enable = true; }; }; getty.autologinUser = "mika"; @@ -137,7 +139,8 @@ HandleLidSwitch = "suspend-then-hibernate"; HandlePowerKeyLongPress = "poweroff"; }; - } // lib.optionalAttrs (!isDarwin) { + } + // lib.optionalAttrs (!isDarwin) { gnome.gnome-keyring.enable = true; libinput = { enable = true; @@ -190,4 +193,3 @@ ]; fonts.fontconfig.useEmbeddedBitmaps = true; } - diff --git a/system/host/mac.nix b/system/host/mac.nix @@ -1,5 +1,4 @@ { - lib, pkgs, hostName, systemName, @@ -235,7 +234,6 @@ alt-shift-8 = "move-node-to-workspace 8"; alt-shift-9 = "move-node-to-workspace 9"; - alt-enter = "exec-and-forget open -n /Users/mika/Applications/kitty.app"; alt-c = "exec-and-forget open -n /Users/mika/Applications/Firefox.app"; alt-shift-w = "exec-and-forget open -n /Users/mika/Applications/Spotify.app"; @@ -243,7 +241,6 @@ alt-m = "exec-and-forget /Users/mika/Applications/kitty.app/Contents/MacOS/kitty neomutt"; alt-f = "fullscreen"; - # Workspace navigation alt-tab = "workspace-back-and-forth"; alt-shift-tab = "move-workspace-to-monitor --wrap-around next"; @@ -253,14 +250,38 @@ }; mode.service.binding = { - esc = [ "reload-config" "mode main" ]; - r = [ "flatten-workspace-tree" "mode main" ]; - f = [ "layout floating tiling" "mode main" ]; - backspace = [ "close-all-windows-but-current" "mode main" ]; - alt-shift-h = [ "join-with left" "mode main" ]; - alt-shift-j = [ "join-with down" "mode main" ]; - alt-shift-k = [ "join-with up" "mode main" ]; - alt-shift-l = [ "join-with right" "mode main" ]; + esc = [ + "reload-config" + "mode main" + ]; + r = [ + "flatten-workspace-tree" + "mode main" + ]; + f = [ + "layout floating tiling" + "mode main" + ]; + backspace = [ + "close-all-windows-but-current" + "mode main" + ]; + alt-shift-h = [ + "join-with left" + "mode main" + ]; + alt-shift-j = [ + "join-with down" + "mode main" + ]; + alt-shift-k = [ + "join-with up" + "mode main" + ]; + alt-shift-l = [ + "join-with right" + "mode main" + ]; }; }; }; diff --git a/system/host/server.nix b/system/host/server.nix @@ -2,13 +2,12 @@ pkgs, hostName, ... -} : +}: { - imports = - [ - ../../users/root.nix - ../../modules/nix_settings.nix - ]; + imports = [ + ../../users/root.nix + ../../modules/nix_settings.nix + ]; system.stateVersion = "25.11"; @@ -29,7 +28,11 @@ "-vga virtio" ]; forwardPorts = [ - { from = "host"; host.port = 2222; guest.port = 61745; } + { + from = "host"; + host.port = 2222; + guest.port = 61745; + } ]; }; }; @@ -123,4 +126,3 @@ terminus_font ]; } - diff --git a/users/mika.nix b/users/mika.nix @@ -15,17 +15,20 @@ let configDirs = builtins.attrNames (builtins.readDir "${dotfiles}/.config"); in { - nixpkgs = if standalone - then { - config.allowUnfree = true; - } else - {}; + nixpkgs = + if standalone then + { + config.allowUnfree = true; + } + else + { }; home = { username = "mika"; stateVersion = if isDarwin then "25.05" else "25.11"; packages = lib.flatten ( - with packageSets; [ + with packageSets; + [ system shell cli @@ -37,7 +40,8 @@ in fonts email development - ] ++ lib.optionals (!isDarwin) [ xorg ] + ] + ++ lib.optionals (!isDarwin) [ xorg ] ); file = { @@ -54,14 +58,16 @@ in source ${pkgs.zsh-fast-syntax-highlighting}/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh source ${pkgs.zsh-system-clipboard}/share/zsh/zsh-system-clipboard/zsh-system-clipboard.zsh ''; - } // lib.optionalAttrs (isDarwin) { + } + // lib.optionalAttrs (isDarwin) { "/Users/mika/Applications" = { source = link "/Users/mika/Applications/Home Manager Apps/"; recursive = true; force = true; }; }; - } // lib.optionalAttrs (!isDarwin || standalone){ + } + // lib.optionalAttrs (!isDarwin || standalone) { homeDirectory = if isDarwin then "/Users/mika" else "/home/mika"; }; @@ -78,18 +84,18 @@ in }; }; - imports = - [ - ../modules/mbsync_timer.nix - ../modules/firefox.nix - ] - ++ lib.optionals standalone [ ../modules/nix_settings.nix ] - ++ lib.optionals (!isDarwin) [ ../modules/theme.nix ] - ++ lib.optionals (!isDarwin && standalone) [../modules/xdg.nix]; + imports = [ + ../modules/mbsync_timer.nix + ../modules/firefox.nix + ] + ++ lib.optionals standalone [ ../modules/nix_settings.nix ] + ++ lib.optionals (!isDarwin) [ ../modules/theme.nix ] + ++ lib.optionals (!isDarwin && standalone) [ ../modules/xdg.nix ]; - xdg.configFile = let - filteredDirs = builtins.filter (dir: dir != "systemd") configDirs; - in + xdg.configFile = + let + filteredDirs = builtins.filter (dir: dir != "systemd") configDirs; + in lib.genAttrs filteredDirs (dir: { source = link "${dotfiles}/.config/${dir}"; recursive = true; @@ -97,5 +103,3 @@ in }); } - -