diff --git a/flake.lock b/flake.lock index 0fa81e37..c7550b8b 100644 --- a/flake.lock +++ b/flake.lock @@ -193,16 +193,15 @@ ] }, "locked": { - "lastModified": 1744117652, - "narHash": "sha256-t7dFCDl4vIOOUMhEZnJF15aAzkpaup9x4ZRGToDFYWI=", + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", "owner": "nix-community", "repo": "home-manager", - "rev": "b4e98224ad1336751a2ac7493967a4c9f6d9cb3f", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -312,6 +311,22 @@ "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz" } }, + "mobile-nixos": { + "flake": false, + "locked": { + "lastModified": 1743812405, + "narHash": "sha256-BedQ9Z3+nqtp9BRjHjJNPUeLIMVbTsP3Udbz0b1cUn0=", + "owner": "mobile-nixos", + "repo": "mobile-nixos", + "rev": "6679fd7a8dd4ccf4aa538b82216723861cfe61a2", + "type": "github" + }, + "original": { + "owner": "mobile-nixos", + "repo": "mobile-nixos", + "type": "github" + } + }, "nix-flatpak": { "locked": { "lastModified": 1739444422, @@ -346,16 +361,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1744168086, - "narHash": "sha256-S9M4HddBCxbbX1CKSyDYgZ8NCVyHcbKnBfoUXeRu2jQ=", + "lastModified": 1745391562, + "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "60e405b241edb6f0573f3d9f944617fe33ac4a73", + "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-24.11", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -447,6 +462,7 @@ "kmonad": "kmonad", "lanzaboote": "lanzaboote", "lix-module": "lix-module", + "mobile-nixos": "mobile-nixos", "nix-flatpak": "nix-flatpak", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 686c242f..9794eb66 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,12 @@ description = "xyno doin nixos"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11"; + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs-master.url = "github:nixos/nixpkgs?ref=master"; + mobile-nixos.url = "github:mobile-nixos/mobile-nixos"; + mobile-nixos.flake = false; nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; + home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; quadlet.url = "github:SEIAROTg/quadlet-nix"; @@ -34,7 +36,6 @@ helix.inputs.nixpkgs.follows = "nixpkgs-master"; csharp-language-server.url = "github:sofusa/csharp-language-server"; csharp-language-server.inputs.nixpkgs.follows = "nixpkgs-master"; - }; @@ -69,15 +70,16 @@ config.allowUnfree = true; }; }; - nixosConfigurations = - lib.xyno.loadInstances ./instances ([ + nixosConfigurations = lib.xyno.loadInstances ./instances ( + [ inputs.lix-module.nixosModules.default inputs.kmonad.nixosModules.default inputs.home-manager.nixosModules.default inputs.lanzaboote.nixosModules.lanzaboote inputs.quadlet.nixosModules.quadlet ] - ++ (import ./modules/module-list.nix)); + ++ (import ./modules/module-list.nix) + ); devShell."x86_64-linux" = let pkgs = genPkgs "x86_64-linux"; diff --git a/hm-modules/helix.nix b/hm-modules/helix.nix index afecd125..7f466c9e 100644 --- a/hm-modules/helix.nix +++ b/hm-modules/helix.nix @@ -17,13 +17,13 @@ in nodePackages_latest.typescript-language-server nodePackages_latest.vscode-langservers-extracted ## python - ruff-lsp + # ruff-lsp # nodePackages_latest.pyright - inputs.csharp-language-server.packages.${pkgs.system}.csharp-language-server + # inputs.csharp-language-server.packages.${pkgs.system}.csharp-language-server netcoredbg ]; programs.helix = { - package = inputs.helix.packages.${pkgs.system}.default; + package = inputs.helix.packages.${pkgs.stdenv.hostPlatform.system}.default; enable = true; defaultEditor = true; settings = { diff --git a/instances/minos/configuration.nix b/instances/minos/configuration.nix new file mode 100644 index 00000000..041b8ffe --- /dev/null +++ b/instances/minos/configuration.nix @@ -0,0 +1,82 @@ +{ + config, + pkgs, + inputs, + lib, + ... +}: +{ + nixpkgs.system = "aarch64-linux"; + nixpkgs.buildPlatform = { system = "x86_64-linux"; }; + nixpkgs.hostPlatform = { system = "aarch64-linux"; }; + imports = [ (import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "lenovo-krane";} ) ]; + mobile.boot.stage-1.kernel.useStrictKernelConfig = lib.mkDefault true; + # hardware.keyboard.zsa.enable = true; + services.gnome.core-utilities.enable = lib.mkForce false; + users.users.root.initialPassword = "hunter2"; + # users.users.xyno.initialPassword = "hunter2"; + # home-manager.users.${config.xyno.system.user.name} = ( + # { ... }: + # { + # xyno.git.enable = true; + # xyno.borgmatic.enable = true; + # home.packages = [ + # # work + # pkgs.jetbrains.rider + # (pkgs.firefox-devedition.overrideAttrs (super: self: { meta.priority = 1; })) + # ]; + # services.flatpak.update.auto.enable = true; + # services.flatpak = { + # enable = true; + # packages = [ + # "com.unicornsonlsd.finamp" + # # "io.github.softfever.OrcaSlicer" + # "io.anytype.anytype" + # "org.bionus.Grabber" + # "org.getmonero.Monero" + # { + # appId = "org.gimp.GIMP"; + # origin = "flathub-beta"; + # } + # "org.kicad.KiCad" + # "org.pencil2d.Pencil2D" + # ]; + # }; + # } + # ); + # environment.systemPackages = with pkgs; [ + # aerc + # glib # rider wants gsettings + # ]; + + time.timeZone = "Europe/Berlin"; + networking.firewall.allowedTCPPorts = [ 1880 2021 ]; + networking.firewall.allowedUDPPorts = [ 1880 2021 ]; + + # services.tailscale.enable = true; + # services.tailscale.useRoutingFeatures = "client"; + # xyno.desktop.common-programs.enable = true; + # xyno.hardware.kmonad.enable = true; + # xyno.presets.cli.enable = true; + # xyno.presets.gui.enable = true; + # xyno.presets.home-manager.enable = true; + # xyno.system.user.enable = true; + # xyno.user-services.syncthing = { + # enable = true; + # tray = true; + # }; + xyno.networking.networkd = { + enable = true; + enableWifi = true; + }; + # xyno.desktop.easyeffects.enable = true; + # xyno.desktop.fcitx5.enable = true; + # hardware.bluetooth.enable = true; + # services.blueman.enable = true; + services.power-profiles-daemon.enable = true; + programs.kdeconnect.enable = true; + # services.flatpak.enable = true; + + system.stateVersion = "24.11"; + programs.nh.enable = true; +} diff --git a/instances/minos/default.nix b/instances/minos/default.nix new file mode 100644 index 00000000..aa50c939 --- /dev/null +++ b/instances/minos/default.nix @@ -0,0 +1,4 @@ +{ + modules = [ ./configuration.nix ]; + hostName = "minos"; +} diff --git a/instances/theseus/configuration.nix b/instances/theseus/configuration.nix index 967e09f5..0368cff2 100644 --- a/instances/theseus/configuration.nix +++ b/instances/theseus/configuration.nix @@ -6,8 +6,10 @@ ... }: { + nixpkgs.system = "x86_64-linux"; imports = [ ./hardware-configuration.nix ]; hardware.keyboard.zsa.enable = true; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; home-manager.users.${config.xyno.system.user.name} = ( { ... }: { @@ -64,7 +66,8 @@ enable = true; enableWifi = true; }; - xyno.desktop.fcitx5.enable = true; + xyno.desktop.easyeffects.enable = true; + # xyno.desktop.fcitx5.enable = true; hardware.bluetooth.enable = true; services.blueman.enable = true; services.power-profiles-daemon.enable = true; diff --git a/instances/theseus/default.nix b/instances/theseus/default.nix index e44b9dd4..1035fe0f 100644 --- a/instances/theseus/default.nix +++ b/instances/theseus/default.nix @@ -1,5 +1,4 @@ { modules = [ ./configuration.nix ]; - system = "x86_64-linux"; hostName = "theseus"; } diff --git a/lib/default.nix b/lib/default.nix index 318af80a..b8c8f172 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -15,7 +15,6 @@ rec { loadInstance = extraModules: instance: nixpkgs.lib.nixosSystem { - system = instance.system; specialArgs = { inherit inputs; }; modules = instance.modules diff --git a/modules/desktop/easyeffects.nix b/modules/desktop/easyeffects.nix new file mode 100644 index 00000000..504110a3 --- /dev/null +++ b/modules/desktop/easyeffects.nix @@ -0,0 +1,43 @@ +{ + pkgs, + config, + lib, + ... +}: +let + cfg = config.xyno.desktop.easyeffects; +in +{ + options.xyno.desktop.easyeffects.enable = lib.mkEnableOption "enable easyeffects sound thingy"; + options.xyno.desktop.easyeffects.wantedBy = lib.mkOption { + type = lib.types.str; + default = "niri.service"; + }; + options.xyno.desktop.easyeffects.package = lib.mkOption { + type = lib.types.package; + default = pkgs.easyeffects; + }; + config = lib.mkIf cfg.enable { + environment.systemPackages = [ cfg.package ]; + systemd.user.services.easyeffects = { + unitConfig = { + Description = "Easyeffects daemon"; + Requires = [ "dbus.service" ]; + After = [ cfg.wantedBy ]; + PartOf = [ + cfg.wantedBy + "pipewire.service" + ]; + }; + + wantedBy = [ cfg.wantedBy ]; + + serviceConfig = { + ExecStart = "${cfg.package}/bin/easyeffects --gapplication-service"; + ExecStop = "${cfg.package}/bin/easyeffects --quit"; + Restart = "on-failure"; + RestartSec = 5; + }; + }; + }; +} diff --git a/modules/desktop/mako.nix b/modules/desktop/mako.nix index 653371fe..63c9661a 100644 --- a/modules/desktop/mako.nix +++ b/modules/desktop/mako.nix @@ -32,7 +32,7 @@ in unitConfig.Requisite = "graphical-session.target"; serviceConfig.Restart = "on-failure"; wantedBy = [ cfg.wantedBy ]; - script = "${cfg.package}/bin/mako -c ${makoConf}"; + script = "exec ${cfg.package}/bin/mako -c ${makoConf}"; restartTriggers = [makoConf]; }; }; diff --git a/modules/desktop/mate-polkit.nix b/modules/desktop/mate-polkit.nix index f177f202..640ef49e 100644 --- a/modules/desktop/mate-polkit.nix +++ b/modules/desktop/mate-polkit.nix @@ -26,7 +26,7 @@ in unitConfig.Requisite = "graphical-session.target"; serviceConfig.Restart = "on-failure"; wantedBy = [ cfg.wantedBy ]; - script = "${cfg.package}/libexec/polkit-mate-authentication-agent-1"; + script = "exec ${cfg.package}/libexec/polkit-mate-authentication-agent-1"; }; }; } diff --git a/modules/desktop/shikane.nix b/modules/desktop/shikane.nix index 7f732658..8c392a89 100644 --- a/modules/desktop/shikane.nix +++ b/modules/desktop/shikane.nix @@ -25,7 +25,7 @@ in unitConfig.Requisite = "graphical-session.target"; serviceConfig.Restart = "on-failure"; wantedBy = [ cfg.wantedBy ]; - script = "${cfg.package}/bin/shikane"; + script = "exec ${cfg.package}/bin/shikane"; }; }; } diff --git a/modules/desktop/swayidle.nix b/modules/desktop/swayidle.nix index 0883dbdf..adc8b979 100644 --- a/modules/desktop/swayidle.nix +++ b/modules/desktop/swayidle.nix @@ -39,7 +39,7 @@ in unitConfig.Requisite = "graphical-session.target"; serviceConfig.Restart = "on-failure"; wantedBy = [ cfg.wantedBy ]; - script = "${cfg.package}/bin/swayidle -w timeout 310 'niri msg action power-off-monitors' timeout 300 '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}' before-sleep '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}'"; + script = "exec ${cfg.package}/bin/swayidle -w timeout 310 'niri msg action power-off-monitors' timeout 300 '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}' before-sleep '${cfg.swaylockPackage}/bin/swaylock ${cfg.swaylockArgs}'"; }; }; } diff --git a/modules/desktop/wpaperd.nix b/modules/desktop/wpaperd.nix index 6a0ca49d..4c9059e1 100644 --- a/modules/desktop/wpaperd.nix +++ b/modules/desktop/wpaperd.nix @@ -32,7 +32,7 @@ in unitConfig.Requisite = "graphical-session.target"; serviceConfig.Restart = "on-failure"; wantedBy = [ cfg.wantedBy ]; - script = "${cfg.package}/bin/wpaperd -c ${wpaperdConf}"; + script = "exec ${cfg.package}/bin/wpaperd -c ${wpaperdConf}"; restartTriggers = [wpaperdConf]; }; }; diff --git a/modules/module-list.nix b/modules/module-list.nix index ba9b333a..902774e2 100644 --- a/modules/module-list.nix +++ b/modules/module-list.nix @@ -3,6 +3,7 @@ ./cli/starship.nix ./desktop/audio.nix ./desktop/common-programs.nix + ./desktop/easyeffects.nix ./desktop/fcitx5.nix ./desktop/foot.nix ./desktop/fuzzel.nix diff --git a/modules/presets/cli.nix b/modules/presets/cli.nix index 3b28cff2..c1991bd2 100644 --- a/modules/presets/cli.nix +++ b/modules/presets/cli.nix @@ -74,6 +74,7 @@ in helix lm_sensors dig + nix-output-monitor (pkgs.writeShellScriptBin "sudo" "run0 $@") ]; programs.mosh.enable = true; diff --git a/modules/presets/gui.nix b/modules/presets/gui.nix index e4e7ca2f..7a080a5d 100644 --- a/modules/presets/gui.nix +++ b/modules/presets/gui.nix @@ -92,7 +92,7 @@ in # fonts fonts.packages = with pkgs; [ - nerdfonts + nerd-fonts.jetbrains-mono cantarell-fonts dejavu_fonts source-code-pro # Default monospace font in 3.32 diff --git a/modules/system/user.nix b/modules/system/user.nix index 9f12778f..04961acb 100644 --- a/modules/system/user.nix +++ b/modules/system/user.nix @@ -30,6 +30,7 @@ in "tape" "uucp" "wireshark" + ]; };