diff --git a/flake.lock b/flake.lock index b0cd59e..ba7e822 100644 --- a/flake.lock +++ b/flake.lock @@ -391,11 +391,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1750400657, - "narHash": "sha256-3vkjFnxCOP6vm5Pm13wC/Zy6/VYgei/I/2DWgW4RFeA=", + "lastModified": 1750622754, + "narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b2485d56967598da068b5a6946dadda8bfcbcd37", + "rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1", "type": "github" }, "original": { @@ -430,11 +430,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1750149910, - "narHash": "sha256-M0WNjAy2FCHJAb1hEp+J2gnMk707K5/iTA24amEu/s8=", + "lastModified": 1750512587, + "narHash": "sha256-kZqTQEARUkkKDFhECd0MGU4wXCJcxCdh5WeM/yD6oI4=", "owner": "nix-community", "repo": "nixvim", - "rev": "1252966779a5632a3cd5238e442d55a1d2f56660", + "rev": "b04bcdcbba4aa648903e065ad1907a97d4f7aee9", "type": "github" }, "original": { @@ -549,11 +549,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1750370365, - "narHash": "sha256-Yblt2LusglzBXlg+ekckztIUgvl1WQwJ7gLRJEt/IHE=", + "lastModified": 1750697672, + "narHash": "sha256-F8z6QXKRZfVKwTj8+Uw920tHGDmiRIOD+BsA6wVGOgY=", "owner": "danth", "repo": "stylix", - "rev": "cc82dae884f45ffeb996d2b5116afa70933e507f", + "rev": "438a702dc2a49a48eae380623cdc04fe36ef5422", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 60ac238..f07fd87 100644 --- a/flake.nix +++ b/flake.nix @@ -59,22 +59,6 @@ ]; }; - FCS-Tristan-Nixbook = mkConf { - nixos-modules = [ - ./hardware/fcs-tristan-nixbook.nix - ./nixos/workstation.nix - ./nixos/modules/work.nix - ./nixos/programs/cosmic.nix - ./nixos/programs/libvertd.nix - ./nixos/programs/hyprland.nix - ]; - home-modules = [ - ./home/programs/work.nix - ./home/programs/graphical.nix - ./home/desktop/cosmic/laptop.nix - ]; - }; - framework-13 = mkConf { nixos-modules = [ ./hardware/framework-13.nix @@ -85,6 +69,7 @@ home-modules = [ ./home/programs/work.nix ./home/programs/graphical.nix + ./home/desktop/cosmic/. ]; }; @@ -109,26 +94,6 @@ ]; }; - vm-sway = - builtins.trace '' - use super+enter to start a terminal. - use super+d to launch applications - - start the vm with '-vga qxl' or '-vga virtio' - '' - mkConf - { - nixos-modules = [ - ./hardware/vm.nix - (auto-login "sway") - ./nixos/workstation.nix - ]; - home-modules = [ - ./home/desktop/sway/. - ./home/workstation.nix - ]; - }; - vm-cosmic = mkConf { diff --git a/hardware/alpine.nix b/hardware/alpine.nix index 17e78eb..611eb01 100644 --- a/hardware/alpine.nix +++ b/hardware/alpine.nix @@ -86,6 +86,7 @@ in { nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.graphics.enable = true; system.stateVersion = "24.05"; # don't change. home-manager.users.${user}.imports = [ diff --git a/hardware/framework-13.nix b/hardware/framework-13.nix index b8ef1a9..120e188 100644 --- a/hardware/framework-13.nix +++ b/hardware/framework-13.nix @@ -14,6 +14,7 @@ boot.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; + services.btrfs.autoScrub.enable = true; fileSystems."/" = { device = "/dev/mapper/crypted"; fsType = "btrfs"; diff --git a/home/desktop/cosmic/default.nix b/home/desktop/cosmic/default.nix index 8efbee1..107cb5e 100644 --- a/home/desktop/cosmic/default.nix +++ b/home/desktop/cosmic/default.nix @@ -49,16 +49,7 @@ in { output = "all"; rotation_frequency = 600; sampling_method = mkRON "enum" "Alphanumeric"; - scaling_mode = mkRON "enum" { - value = [ - (mkRON "tuple" [ - 0.5 - 1.0 - (mkRON "raw" "0.345354352") - ]) - ]; - variant = "Fit"; - }; + scaling_mode = mkRON "enum" "Zoom"; source = mkRON "enum" { value = [ (toString config.stylix.image) ]; variant = "Path"; diff --git a/lib/nixvim.nix b/lib/nixvim.nix index e5cc8a4..1b26adb 100644 --- a/lib/nixvim.nix +++ b/lib/nixvim.nix @@ -247,13 +247,6 @@ in { vim.lsp.buf.format({async = false}) ''; } - { - event = "BufWritePre"; - pattern = "*.ts"; - callback = luaFunc '' - vim.lsp.buf.format() - ''; - } ]; plugins = { @@ -284,6 +277,7 @@ in { }; }; + lsp-format.enable = true; lsp = { enable = true; inlayHints = true; diff --git a/nixos/default.nix b/nixos/default.nix index 04cca58..5241347 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -96,8 +96,7 @@ in { sops lsof nix-tree - nix-index - nh + comma jq ]; @@ -109,4 +108,9 @@ in { enable = true; enabledCollectors = ["systemd"]; }; + + programs.command-not-found.enable = false; + programs.nix-index.enable = true; + programs.nh.enable = true; + } diff --git a/nixos/programs/cosmic.nix b/nixos/programs/cosmic.nix index 21f0e54..369930d 100644 --- a/nixos/programs/cosmic.nix +++ b/nixos/programs/cosmic.nix @@ -1,8 +1,8 @@ -{ - inputs, - config, - ... -}: { +{...}: { services.desktopManager.cosmic.enable = true; services.displayManager.cosmic-greeter.enable = true; + # fix for shutdown, not yet in 25.05 + # https://github.com/NixOS/nixpkgs/pull/412260/commits/27c3430d620adfed574674e36a89a52be80f01d9 + services.geoclue2.enable = true; + services.geoclue2.enableDemoAgent = false; } diff --git a/nixos/services/grafana.nix b/nixos/services/grafana.nix index 353bbc8..9bfb549 100644 --- a/nixos/services/grafana.nix +++ b/nixos/services/grafana.nix @@ -5,9 +5,9 @@ name = "dashboards"; paths = map mkDashboard dashboards; }; - mkDashboard = {name, url, sha256}: pkgs.writeTextFile { + mkDashboard = {name, url, sha256, patch ? lib.id}: pkgs.writeTextFile { inherit name; - text = builtins.readFile ( builtins.fetchurl {inherit url sha256;} ); + text = patch (builtins.readFile ( builtins.fetchurl {inherit url sha256;} )); destination = "/dash/${name}.json"; }; in { @@ -42,6 +42,8 @@ in { name = "node-exporter"; url = "https://grafana.com/api/dashboards/1860/revisions/37/download"; sha256 = "sha256:0qza4j8lywrj08bqbww52dgh2p2b9rkhq5p313g72i57lrlkacfl"; + # https://github.com/rfmoz/grafana-dashboards/issues/169 + patch = builtins.replaceStrings ["$__rate_interval"] ["$__range"]; } { name = "synapse"; diff --git a/nixos/services/prometheus.nix b/nixos/services/prometheus.nix index 9e18f22..8581e70 100644 --- a/nixos/services/prometheus.nix +++ b/nixos/services/prometheus.nix @@ -2,8 +2,8 @@ inherit (config.services) prometheus; nodes = [ "alpine" - "100.106.49.128" - "zenix" + "100.106.49.128" # laptop + "100.65.29.110" # gaming pc ]; addPort = ip: "${ip}:${toString prometheus.exporters.node.port}"; in { diff --git a/nixos/workstation.nix b/nixos/workstation.nix index 1d24a21..334e4de 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -53,6 +53,7 @@ }; }; }; + qt.enable = true; nixpkgs.overlays = [ (final: prev: {