diff --git a/flake.lock b/flake.lock index 07b4713..c7bdb2c 100644 --- a/flake.lock +++ b/flake.lock @@ -10,11 +10,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1745630506, - "narHash": "sha256-bHCFgGeu8XjWlVuaWzi3QONjDW3coZDqSHvnd4l7xus=", + "lastModified": 1747575206, + "narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=", "owner": "ryantm", "repo": "agenix", - "rev": "96e078c646b711aee04b82ba01aefbff87004ded", + "rev": "4835b1dc898959d8547a871ef484930675cb47f1", "type": "github" }, "original": { @@ -162,11 +162,11 @@ ] }, "locked": { - "lastModified": 1747226316, - "narHash": "sha256-INBPqK9ogSvw5Q9HJ5H7KI83v6Jc3goAnXN3b2F+eMU=", + "lastModified": 1747742835, + "narHash": "sha256-kYL4GCwwznsypvsnA20oyvW8zB/Dvn6K5G/tgMjVMT4=", "owner": "nix-community", "repo": "disko", - "rev": "490c0d6bd151e33caa5b2cf0ae37758234e947f6", + "rev": "df522e787fdffc4f32ed3e1fca9ed0968a384d62", "type": "github" }, "original": { @@ -380,16 +380,16 @@ ] }, "locked": { - "lastModified": 1747020534, - "narHash": "sha256-D/6rkiC6w2p+4SwRiVKrWIeYzun8FBg7NlMKMwQMxO0=", + "lastModified": 1747556831, + "narHash": "sha256-Qb84nbYFFk0DzFeqVoHltS2RodAYY5/HZQKE8WnBDsc=", "owner": "nix-community", "repo": "home-manager", - "rev": "b4bbdc6fde16fc2051fcde232f6e288cd22007ca", + "rev": "d0bbd221482c2713cccb80220f3c9d16a6e20a33", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", + "ref": "release-25.05", "repo": "home-manager", "type": "github" } @@ -406,11 +406,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1747152040, - "narHash": "sha256-C6xbCOgSAi+a/1Bk1GPdWd5l791neY5YRWxVM/0cYNg=", + "lastModified": 1747748806, + "narHash": "sha256-l9QFObh9tCuMGlPlUwuYFRCyhwYhK6Wx7H7zI1++H4k=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "fa50b6e56aaf6c9b32aadc44f7a2e47187e9b6ac", + "rev": "b8a51a59528c974de04b246cfb4b1bdf52cd2f91", "type": "github" }, "original": { @@ -439,11 +439,11 @@ "niri-unstable": { "flake": false, "locked": { - "lastModified": 1747145615, - "narHash": "sha256-U6MhqL4QXLojCOKH5yc8GbfOF7Fas36e1nqcPQx6/zQ=", + "lastModified": 1747635487, + "narHash": "sha256-za7ctGh4MaW1h5Drm1WtwNZxiXvQK9yXZAeeIyY9b2Q=", "owner": "YaLTeR", "repo": "niri", - "rev": "0d6843ea67da91aea37b655be5de92dfeea081b5", + "rev": "3f2b7e63ba15cf33475116d32e8b7d22208a8438", "type": "github" }, "original": { @@ -459,11 +459,11 @@ ] }, "locked": { - "lastModified": 1746934494, - "narHash": "sha256-3n6i+F0sDASjkhbvgFDpPDZGp7z19IrRtjfF9TwJpCA=", + "lastModified": 1747540584, + "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "e9b21b01e4307176b9718a29ac514838e7f6f4ff", + "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce", "type": "github" }, "original": { @@ -478,11 +478,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1747188026, - "narHash": "sha256-NjiJ2Bce5F7dn+6ZGCenzIjem2+Ei4SDF78x2wHVlOY=", + "lastModified": 1747706401, + "narHash": "sha256-GbNsCBxX2zMMckvlY7SPgUkxL9IaVT49p/gbdwqvyuE=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "083675f78e7de80e9fec1f621b8a508e58327131", + "rev": "d096058275e83be4133081e53dcd53e029a5ad80", "type": "github" }, "original": { @@ -529,11 +529,11 @@ ] }, "locked": { - "lastModified": 1742568034, - "narHash": "sha256-QaMEhcnscfF2MqB7flZr+sLJMMYZPnvqO4NYf9B4G38=", + "lastModified": 1747663185, + "narHash": "sha256-Obh50J+O9jhUM/FgXtI3he/QRNiV9+J53+l+RlKSaAk=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "42ee229088490e3777ed7d1162cb9e9d8c3dbb11", + "rev": "ee07ba0d36c38e9915c55d2ac5a8fb0f05f2afcc", "type": "github" }, "original": { @@ -572,11 +572,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "lastModified": 1747485343, + "narHash": "sha256-YbsZyuRE1tobO9sv0PUwg81QryYo3L1F3R3rF9bcG38=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "rev": "9b5ac7ad45298d58640540d0323ca217f32a6762", "type": "github" }, "original": { @@ -588,11 +588,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1746904237, - "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "lastModified": 1747542820, + "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "type": "github" }, "original": { @@ -620,16 +620,16 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "lastModified": 1747610100, + "narHash": "sha256-rpR5ZPMkWzcnCcYYo3lScqfuzEw5Uyfh+R0EKZfroAc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "rev": "ca49c4304acf0973078db0a9d200fd2bae75676d", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -659,11 +659,11 @@ "treefmt-nix": "treefmt-nix_3" }, "locked": { - "lastModified": 1747219899, - "narHash": "sha256-CsPGzZJVK3MvrVVkAqSNjUfwdxKUr4jTB2hr5W71WEU=", + "lastModified": 1747756205, + "narHash": "sha256-bS0BPhwULgL/GSY39toDi125bktaIo4AalMfgA+bqIw=", "owner": "nix-community", "repo": "NUR", - "rev": "82093385149d108c8bcb4ab01ce6de548ee55f03", + "rev": "b5814fa35e56ce5f94997206d07db45a012e8881", "type": "github" }, "original": { @@ -826,11 +826,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1746989248, - "narHash": "sha256-uoQ21EWsAhyskNo8QxrTVZGjG/dV4x5NM1oSgrmNDJY=", + "lastModified": 1747469671, + "narHash": "sha256-bo1ptiFoNqm6m1B2iAhJmWCBmqveLVvxom6xKmtuzjg=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "708ec80ca82e2bbafa93402ccb66a35ff87900c5", + "rev": "ab0378b61b0d85e73a8ab05d5c6029b5bd58c9fb", "type": "github" }, "original": { @@ -879,11 +879,11 @@ ] }, "locked": { - "lastModified": 1744348724, - "narHash": "sha256-mNiG88qTYAonaH8zlAN6NsMFuPtY/pD7knQHii4b9vY=", + "lastModified": 1747409654, + "narHash": "sha256-gjnC65Mc88X4eho8xmJrIVMzFC15kwILB2foYUVT9/U=", "owner": "netbrain", "repo": "zwift", - "rev": "3ed8b1a620eb23b09335812a28bd891c98f2bd24", + "rev": "7080d431c1828b5c961852d1a2d80be392a09d30", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f57832b..98dc18b 100644 --- a/flake.nix +++ b/flake.nix @@ -17,25 +17,10 @@ "aarch64-linux" ]; - perSystem = { - pkgs, - system, - ... - }: { - # This sets `pkgs` to a nixpkgs with allowUnfree option set. - _module.args.pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; - _module.args.pkgsUnstable = import inputs.nixpkgs-unstable { - inherit system; - config.allowUnfree = true; - }; - }; }; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nix-index-database.url = "github:nix-community/nix-index-database"; @@ -46,7 +31,7 @@ nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; + home-manager.url = "github:nix-community/home-manager/release-25.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nur.url = "github:nix-community/NUR"; diff --git a/hosts/default.nix b/hosts/default.nix index 29a3188..b441f94 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -21,11 +21,6 @@ with lib; let }: withSystem system ( {system, ...}: let - pkgs = import inputs.nixpkgs { - inherit system; - config.allowUnfree = true; - }; - pkgsUnstable = import inputs.nixpkgs-unstable { inherit system; config.allowUnfree = true; @@ -33,7 +28,7 @@ with lib; let in inputs.nixpkgs.lib.nixosSystem { inherit system; - specialArgs = {inherit inputs hostname username pkgs pkgsUnstable;}; + specialArgs = {inherit inputs hostname username pkgsUnstable;}; modules = [ inputs.disko.nixosModules.disko @@ -48,6 +43,7 @@ with lib; let inputs.zwift.nixosModules.zwift ../modules/base/user.nix (mkSystemImports hostname) + { nixpkgs.config.allowUnfree = true; } ] ++ modules ++ ( diff --git a/hosts/desktop/monitors.nix b/hosts/desktop/monitors.nix index 76ec460..de61a4d 100644 --- a/hosts/desktop/monitors.nix +++ b/hosts/desktop/monitors.nix @@ -4,25 +4,19 @@ _: { name = "DP-3"; resolution = "2560x1440"; refreshRate = 144; - position = "2560x1080"; - } - { - name = "HDMI-A-1"; - resolution = "2560x1440"; - refreshRate = 60; - position = "0x1080"; + position = "1920x0"; } { name = "DP-1"; resolution = "2560x1440"; refreshRate = 144; - position = "5120x1080"; + position = "4480x0"; } { - name = "DP-2"; + name = "HDMI-A-1"; resolution = "1920x1080"; refreshRate = 60; - position = "2880x0"; + position = "0x0"; } ]; } diff --git a/hosts/desktop/niri.nix b/hosts/desktop/niri.nix index 123ea24..c0449df 100644 --- a/hosts/desktop/niri.nix +++ b/hosts/desktop/niri.nix @@ -2,8 +2,8 @@ _: { fireproof.home-manager.programs.niri.settings.outputs = { "DP-3" = { position = { - x = 0; - y = 1080; + x = 1920; + y = 0; }; mode = { refresh = 164.998; @@ -13,8 +13,8 @@ _: { }; "DP-1" = { position = { - x = 2560; - y = 1080; + x = 4480; + y = 0; }; mode = { refresh = 165.000; @@ -22,14 +22,16 @@ _: { height = 1440; }; }; - "DP-2" = { + "HDMI-A-1" = { position = { - x = (2560 - 1920) / 2; + x = 0; y = 0; }; - }; - "HDMI-A-1" = { - enable = false; + mode = { + refresh = 60.000; + width = 1920; + height = 1080; + }; }; }; } diff --git a/hosts/desktop/nvidia.nix b/hosts/desktop/nvidia.nix index 47dae8d..6d4b225 100644 --- a/hosts/desktop/nvidia.nix +++ b/hosts/desktop/nvidia.nix @@ -1,6 +1,5 @@ { config, - pkgsUnstable, ... }: { hardware = { @@ -13,7 +12,6 @@ package = config.boot.kernelPackages.nvidiaPackages.beta; }; }; - boot.kernelPackages = pkgsUnstable.linuxPackages_6_14; services.xserver.videoDrivers = ["nvidia"]; fireproof.home-manager.wayland.windowManager.hyprland.settings = { diff --git a/hosts/laptop/disk-configuration.nix b/hosts/laptop/disk-configuration.nix index 89e50ab..df343de 100644 --- a/hosts/laptop/disk-configuration.nix +++ b/hosts/laptop/disk-configuration.nix @@ -14,7 +14,7 @@ _: { }; ESP = { - size = "512M"; + size = "1G"; type = "EF00"; content = { type = "filesystem"; @@ -23,6 +23,14 @@ _: { mountOptions = ["defaults"]; }; }; + windows = { + size = "150G"; + type = "0700"; # for Microsoft basic data + content = { + type = "filesystem"; + format = "ntfs"; + }; + }; luks = { size = "100%"; content = { diff --git a/modules/apps/firefox.nix b/modules/apps/firefox.nix index ae04053..3d6bc95 100644 --- a/modules/apps/firefox.nix +++ b/modules/apps/firefox.nix @@ -25,7 +25,7 @@ in { enable = true; package = pkgsUnstable.firefox; profiles.default = { - extensions = with extensions; [ + extensions.packages = with extensions; [ # Privacy ublock-origin clearurls diff --git a/modules/apps/vscode.nix b/modules/apps/vscode.nix index b03a036..305d16a 100644 --- a/modules/apps/vscode.nix +++ b/modules/apps/vscode.nix @@ -6,15 +6,7 @@ lib, ... }: let - vscodePackage = pkgsUnstable.vscode.overrideAttrs (_old: let - version = "1.99.0"; - in { - src = pkgs.fetchurl { - name = "VSCode_${version}_linux-x64.tar.gz"; - url = "https://update.code.visualstudio.com/${version}/linux-x64/stable"; - sha256 = "sha256-ojUaCVrrQozw3CYkWEimAphMoxhEb3a+TffPV9VAurk="; - }; - }); + vscodePackage = pkgsUnstable.vscode; vscode-extensions = inputs.nix-vscode-extensions.extensions.${pkgs.system}; vscodePkgs = vscode-extensions.vscode-marketplace // vscode-extensions.vscode-marketplace-release; # Prefer release over pre-release @@ -32,98 +24,100 @@ in { programs.vscode = { enable = true; package = vscodePackage; - enableUpdateCheck = true; - enableExtensionUpdateCheck = true; - keybindings = [ - { - "key" = "ctrl+shift+p"; - "command" = "editor.action.formatDocument"; - } - ]; - userSettings = lib.mkMerge [ - { - # General - "extensions.ignoreRecommendations" = true; - "telemetry.telemetryLevel" = "off"; + profiles.default = { + enableUpdateCheck = true; + enableExtensionUpdateCheck = true; + keybindings = [ + { + "key" = "ctrl+shift+p"; + "command" = "editor.action.formatDocument"; + } + ]; + userSettings = lib.mkMerge [ + { + # General + "extensions.ignoreRecommendations" = true; + "telemetry.telemetryLevel" = "off"; - # Editor - "editor.linkedEditing" = true; - "files.exclude" = { - "**/*.egg-info" = true; - "**/__pycache__" = true; - }; + # Editor + "editor.linkedEditing" = true; + "files.exclude" = { + "**/*.egg-info" = true; + "**/__pycache__" = true; + }; - # Files - "files.autoSave" = "afterDelay"; + # Files + "files.autoSave" = "afterDelay"; + # Remote + "remote.SSH.useLocalServer" = false; + "remote.SSH.remotePlatform" = lib.mapAttrs (_name: _value: "linux") config.fireproof.home-manager.programs.ssh.matchBlocks; + + # AI + "github.copilot.editor.enableAutoCompletions" = true; + "github.copilot.enable" = { + "*" = true; + "plaintext" = true; + "markdown" = true; + "scminput" = true; + }; + "chat.agent.enabled" = true; + "github.copilot.chat.agent.thinkingTool" = true; + "github.copilot.chat.codesearch.enabled" = true; + "github.copilot.nextEditSuggestions.enabled" = true; + + # Theme + "workbench.colorTheme" = "Darcula Theme from IntelliJ"; + "window.titleBarStyle" = "custom"; + "editor.fontFamily" = "'Hack Nerd Font', 'Hack', 'monospace', monospace"; + + # Keybindings + "workbench.commandPalette.experimental.suggestCommands" = true; # Emulates IntelliJ's "Search Everywhere" + + # nix-ide + "nix.enableLanguageServer" = true; + "nix.serverPath" = lib.getExe pkgs.nil; + "nix.serverSettings" = { + nil.formatting.command = ["nix" "fmt" "--" "--"]; + }; + } + (mkFormatter "esbenp.prettier-vscode" ["json" "jsonc" "markdown" "css" "scss" "typescript" "typescriptreact" "html" "yaml"]) + (mkFormatter "charliermarsh.ruff" ["python"]) + ]; + extensions = with vscodePkgs; [ # Remote - "remote.SSH.useLocalServer" = false; - "remote.SSH.remotePlatform" = lib.mapAttrs (_name: _value: "linux") config.fireproof.home-manager.programs.ssh.matchBlocks; + (allowUnfree ms-vscode-remote.remote-ssh) # AI - "github.copilot.editor.enableAutoCompletions" = true; - "github.copilot.enable" = { - "*" = true; - "plaintext" = true; - "markdown" = true; - "scminput" = true; - }; - "chat.agent.enabled" = true; - "github.copilot.chat.agent.thinkingTool" = true; - "github.copilot.chat.codesearch.enabled" = true; - "github.copilot.nextEditSuggestions.enabled" = true; + (allowUnfree github.copilot) + (allowUnfree github.copilot-chat) + + # Git(hub) + github.vscode-pull-request-github + + # Python + ms-pyright.pyright + ms-python.python + charliermarsh.ruff + + # JavaScript + dbaeumer.vscode-eslint + esbenp.prettier-vscode + + # Nix + jnoortheen.nix-ide + + # Other languages + nefrob.vscode-just-syntax + redhat.vscode-yaml # Theme - "workbench.colorTheme" = "Darcula Theme from IntelliJ"; - "window.titleBarStyle" = "custom"; - "editor.fontFamily" = "'Hack Nerd Font', 'Hack', 'monospace', monospace"; + trinm1709.dracula-theme-from-intellij # Keybindings - "workbench.commandPalette.experimental.suggestCommands" = true; # Emulates IntelliJ's "Search Everywhere" - - # nix-ide - "nix.enableLanguageServer" = true; - "nix.serverPath" = lib.getExe pkgs.nil; - "nix.serverSettings" = { - nil.formatting.command = ["nix" "fmt" "--" "--"]; - }; - } - (mkFormatter "esbenp.prettier-vscode" ["json" "jsonc" "markdown" "css" "scss" "typescript" "typescriptreact" "html" "yaml"]) - (mkFormatter "charliermarsh.ruff" ["python"]) - ]; - extensions = with vscodePkgs; [ - # Remote - (allowUnfree ms-vscode-remote.remote-ssh) - - # AI - (allowUnfree github.copilot) - (allowUnfree github.copilot-chat) - - # Git(hub) - github.vscode-pull-request-github - - # Python - ms-pyright.pyright - ms-python.python - charliermarsh.ruff - - # JavaScript - dbaeumer.vscode-eslint - esbenp.prettier-vscode - - # Nix - jnoortheen.nix-ide - - # Other languages - nefrob.vscode-just-syntax - redhat.vscode-yaml - - # Theme - trinm1709.dracula-theme-from-intellij - - # Keybindings - k--kato.intellij-idea-keybindings - ]; + k--kato.intellij-idea-keybindings + ]; + }; }; }; } diff --git a/modules/base/user.nix b/modules/base/user.nix index 611f57d..2112a35 100644 --- a/modules/base/user.nix +++ b/modules/base/user.nix @@ -10,7 +10,7 @@ with lib; let in { options.fireproof = { home-manager = lib.mkOption { - type = options.home-manager.users.type.functor.wrapped; + type = options.home-manager.users.type.nestedTypes.elemType; }; }; config = { @@ -19,7 +19,6 @@ in { users.users.${username} = { isNormalUser = true; extraGroups = ["wheel"]; - # initialPassword = "password"; hashedPasswordFile = secrets.hashed-user-password.path; }; diff --git a/modules/desktop/fonts.nix b/modules/desktop/fonts.nix index 407722a..a22d280 100644 --- a/modules/desktop/fonts.nix +++ b/modules/desktop/fonts.nix @@ -1,6 +1,6 @@ {pkgs, ...}: { fonts.enableDefaultPackages = true; fonts.packages = with pkgs; [ - (nerdfonts.override {fonts = ["Hack"];}) + nerd-fonts.hack ]; }