From dadd3ef3670abb7c94fdcdcea3601c84eafa6508 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Wed, 5 Jul 2023 20:43:59 +0200 Subject: [PATCH] updates --- flake.lock | 74 +++++++++---------- flake.nix | 1 + nixos/components/gui/xorg/xlock.nix | 29 +++----- nixos/machines/chungus/configuration.nix | 1 + .../chungus/network-tinc-retiolum.nix | 13 ++++ nixos/machines/cream/configuration.nix | 1 + nixos/machines/cream/packages-development.nix | 57 ++++++++++++++ nixos/machines/cream/packages.nix | 14 +--- nixos/modules/programs/steam.nix | 1 + 9 files changed, 121 insertions(+), 70 deletions(-) create mode 100644 nixos/machines/chungus/network-tinc-retiolum.nix create mode 100644 nixos/machines/cream/packages-development.nix diff --git a/flake.lock b/flake.lock index 2adc521..64c4f20 100644 --- a/flake.lock +++ b/flake.lock @@ -47,11 +47,11 @@ ] }, "locked": { - "lastModified": 1687968164, - "narHash": "sha256-L9jr2zCB6NIaBE3towusjGBigsnE2pMID8wBGkYbTS4=", + "lastModified": 1688506538, + "narHash": "sha256-h61+DDCkd4g28u6kXL6JAlUV4UQMViQ34kIYtFH9tVg=", "owner": "nix-community", "repo": "disko", - "rev": "8002e7cb899bc2a02a2ebfb7f999fcd7c18b92a1", + "rev": "3200614b9f51c10689212ceb797f252762e62576", "type": "github" }, "original": { @@ -179,11 +179,11 @@ "emacs-overlay_2": { "flake": false, "locked": { - "lastModified": 1688033745, - "narHash": "sha256-5u9ysFHuBahdKFcBBz26VxZYw9GKLiDvQLJHDzjIQX8=", + "lastModified": 1688494665, + "narHash": "sha256-wXIBz6NVB1/d+H/nz+6XOrtn5s2jdFEJWuFP1qoHIjY=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "5fb607b2ee0c37a9aa0570a53c11405b21883313", + "rev": "54567ac566cd6bfa2607fbe155f9e009ce72306a", "type": "github" }, "original": { @@ -614,11 +614,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1671116920, - "narHash": "sha256-QmDGsUUmAGn77UTR7eQJmebl8f3IIUCtmbbAdJqKA3s=", + "lastModified": 1688141737, + "narHash": "sha256-qHrNMYWukOKmKVf6wXOGKj1xxUnOGjvTRbt/PLLXuBE=", "owner": "matthewcroughan", "repo": "nixinate", - "rev": "b4d17b8e2a4abc47e93e1a1c466e0286a63640d8", + "rev": "7902ae845e6cc5bd450e510cdf5e009a6e4a44d9", "type": "github" }, "original": { @@ -713,11 +713,11 @@ }, "nixpkgs-legacy_2211": { "locked": { - "lastModified": 1687666471, - "narHash": "sha256-88VoE8jLzjRhH38mUUrom+zJ7GVMjuW4M321Iri5C/w=", + "lastModified": 1688392541, + "narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6610eb320efb234025e477e51ae7625ccd65a2e8", + "rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b", "type": "github" }, "original": { @@ -729,11 +729,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1687031877, - "narHash": "sha256-yMFcVeI+kZ6KD2QBrFPNsvBrLq2Gt//D0baHByMrjFY=", + "lastModified": 1688256355, + "narHash": "sha256-/E+OSabu4ii5+ccWff2k4vxDsXYhpc4hwnm0s6JOz7Y=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e2e2059d19668dab1744301b8b0e821e3aae9c99", + "rev": "f553c016a31277246f8d3724d3b1eee5e8c0842c", "type": "github" }, "original": { @@ -745,11 +745,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1687898314, - "narHash": "sha256-B4BHon3uMXQw8ZdbwxRK1BmxVOGBV4viipKpGaIlGwk=", + "lastModified": 1688322751, + "narHash": "sha256-eW62dC5f33oKZL7VWlomttbUnOTHrAbte9yNUNW8rbk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e18dc963075ed115afb3e312b64643bf8fd4b474", + "rev": "0fbe93c5a7cac99f90b60bdf5f149383daaa615f", "type": "github" }, "original": { @@ -792,11 +792,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1687829761, - "narHash": "sha256-QRe1Y8SS3M4GeC58F/6ajz6V0ZLUVWX3ZAMgov2N3/g=", + "lastModified": 1688389917, + "narHash": "sha256-RKiK1QeommEsjQ8fLgxt4831x9O6n2gD7wAhVZTrr8M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9790f3242da2152d5aa1976e3e4b8b414f4dd206", + "rev": "aed4b19d312525ae7ca9bceb4e1efe3357d0e2eb", "type": "github" }, "original": { @@ -822,11 +822,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1686979235, - "narHash": "sha256-gBlBtk+KrezFkfMrZw6uwTuA7YWtbFciiS14mEoTCo0=", + "lastModified": 1688188316, + "narHash": "sha256-CXuQllDKCxtZaB/umnZOvoJ/d4kJguYgffeTA9l1B3o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7cc30fd5372ddafb3373c318507d9932bd74aafe", + "rev": "8277b539d371bf4308fc5097911aa58bfac1794f", "type": "github" }, "original": { @@ -1005,11 +1005,11 @@ }, "retiolum": { "locked": { - "lastModified": 1686076643, - "narHash": "sha256-midjyNXeGAqXzwXKnHNsTnRwPIbturlq2FcHOh9fivg=", + "lastModified": 1688281987, + "narHash": "sha256-P0UmNCmiz9iqQmQhS2R3Ihedhtl7qSLYxDsNJ2cLp5o=", "owner": "Mic92", "repo": "retiolum", - "rev": "f79b533caf30820d93a79878d871c08faa35b3f4", + "rev": "b74b9594c8b7d9eee0dc535b9262b5e9b9d0eb2c", "type": "github" }, "original": { @@ -1098,11 +1098,11 @@ "secrets": { "flake": false, "locked": { - "lastModified": 1685300533, - "narHash": "sha256-4c8uc5a1K8YcgOD/URVKomTHbVmwLVGKyDiTM1vCVAc=", + "lastModified": 1688508041, + "narHash": "sha256-A4o4KjFY+PhJXbSHppGLqs63nSAIqWvpyghYlrLbBjo=", "ref": "main", - "rev": "6b2dce79889e21dd469de56e8c1cb8ffdb45cf4e", - "revCount": 52, + "rev": "b6f84d68d11029e1442b31a599f25b2a6aab4c6b", + "revCount": 53, "type": "git", "url": "ssh://gitea@git.ingolf-wagner.de/palo/nixos-secrets.git" }, @@ -1134,11 +1134,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1687398569, - "narHash": "sha256-e/umuIKFcFtZtWeX369Hbdt9r+GQ48moDmlTcyHWL28=", + "lastModified": 1688268466, + "narHash": "sha256-fArazqgYyEFiNcqa136zVYXihuqzRHNOOeVICayU2Yg=", "owner": "Mic92", "repo": "sops-nix", - "rev": "2ff6973350682f8d16371f8c071a304b8067f192", + "rev": "5ed3c22c1fa0515e037e36956a67fe7e32c92957", "type": "github" }, "original": { @@ -1155,11 +1155,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1687876430, - "narHash": "sha256-c1fXtnyQNm9HQ74NSsrvTi1ZrbRpIyIRrR2+4Ozg2j0=", + "lastModified": 1688308288, + "narHash": "sha256-dahwZIc0zGgGMKR/j1SJjYhaoGJTHJUse8CzC8DUyV0=", "owner": "danth", "repo": "stylix", - "rev": "7dfce721b923549a773bf32c16515ebf1a509dae", + "rev": "35cab8eb76c1d3672b2b290a64f357847c30d090", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9951b2d..6ef60ca 100644 --- a/flake.nix +++ b/flake.nix @@ -298,6 +298,7 @@ name = "chungus"; modules = [ homeManagerModules + retiolum.nixosModules.retiolum ]; }; robi = nixosConfigurationSetup { diff --git a/nixos/components/gui/xorg/xlock.nix b/nixos/components/gui/xorg/xlock.nix index 837a2f5..b0877f1 100644 --- a/nixos/components/gui/xorg/xlock.nix +++ b/nixos/components/gui/xorg/xlock.nix @@ -4,25 +4,6 @@ let name = "lock"; - # desktop file - # ------------ - # makes it possible to be used by other programs - desktopFile = pkgs.writeTextFile { - name = "${name}.desktop"; - destination = "/share/applications/${name}.desktop"; - text = '' - [Desktop Entry] - Categories=Application;Utility; - Comment=Screen Saver - Encoding=UTF-8 - Exec=${lockProgram}/bin/${name} - Icon=gnome-lockscreen - Name=${name} - Terminal=false - Type=Application - ''; - }; - # the lock program lockProgram = pkgs.writeShellScriptBin "${name}" '' ${pkgs.xlockmore}/bin/xlock -mode life1d -size 1 @@ -31,6 +12,14 @@ let in { config = mkIf config.components.gui.enable { - environment.systemPackages = [ lockProgram desktopFile ]; + environment.systemPackages = [ + lockProgram + (pkgs.makeDesktopItem { + name = "lock"; + desktopName = "lock"; + exec = "${lockProgram}/bin/lock"; + terminal = false; + }) + ]; }; } diff --git a/nixos/machines/chungus/configuration.nix b/nixos/machines/chungus/configuration.nix index 04da82e..13acd9c 100644 --- a/nixos/machines/chungus/configuration.nix +++ b/nixos/machines/chungus/configuration.nix @@ -11,6 +11,7 @@ ./network-wireguard.nix ./network-tinc.nix + # ./network-tinc-retiolum.nix # make sure no service is open for this vpn! ./hass.nix ./hass-zigbee2mqtt.nix diff --git a/nixos/machines/chungus/network-tinc-retiolum.nix b/nixos/machines/chungus/network-tinc-retiolum.nix new file mode 100644 index 0000000..c9b708f --- /dev/null +++ b/nixos/machines/chungus/network-tinc-retiolum.nix @@ -0,0 +1,13 @@ +{ config, ... }: +{ + sops.secrets.tinc_retiolum_ed25519_key = { }; + sops.secrets.tinc_retiolum_rsa_key = { }; + + networking.retiolum.port = 720; + networking.retiolum.nodename = "centari"; + + services.tinc.networks.retiolum = { + ed25519PrivateKeyFile = config.sops.secrets.tinc_retiolum_ed25519_key.path; + rsaPrivateKeyFile = config.sops.secrets.tinc_retiolum_rsa_key.path; + }; +} diff --git a/nixos/machines/cream/configuration.nix b/nixos/machines/cream/configuration.nix index f52e2b8..c2e738e 100644 --- a/nixos/machines/cream/configuration.nix +++ b/nixos/machines/cream/configuration.nix @@ -8,6 +8,7 @@ ./hardware-configuration.nix ./packages.nix + ./packages-development.nix ./syncthing.nix ./cups.nix ./tinc.nix diff --git a/nixos/machines/cream/packages-development.nix b/nixos/machines/cream/packages-development.nix new file mode 100644 index 0000000..368c045 --- /dev/null +++ b/nixos/machines/cream/packages-development.nix @@ -0,0 +1,57 @@ +{ pkgs, lib, ... }: +{ + + environment.systemPackages = with pkgs; let + + # to make copilot work + # jetbrains.pycharm-professional + fhsPyCharm = pkgs.buildFHSUserEnv { + name = "pycharm"; + targetPkgs = pkgs: (with pkgs; [ + black + isort + jetbrains.pycharm-professional + python311 + pipenv + zlib # needed for NumPy + nodejs + ]); + runScript = "pycharm-professional"; + }; + + # jetbrains.datagrip + fhsDataGrip = pkgs.buildFHSUserEnv { + name = "datagrip"; + targetPkgs = pkgs: (with pkgs; [ + jetbrains.datagrip + ]); + runScript = "datagrip"; + }; + + in + [ + + # rust development environment + rustup + jetbrains.clion + + # general + jetbrains.idea-ultimate + #vscode + + fhsDataGrip + + fhsPyCharm + (pkgs.makeDesktopItem { + name = "pycharm"; + desktopName = "Python IDE"; + exec = "${fhsPyCharm}/bin/pycharm"; + terminal = false; + }) + + # python + python3Full + pipenv + + ]; +} diff --git a/nixos/machines/cream/packages.nix b/nixos/machines/cream/packages.nix index 785263e..4c0be5b 100644 --- a/nixos/machines/cream/packages.nix +++ b/nixos/machines/cream/packages.nix @@ -73,19 +73,6 @@ in -t "#" '') - # rust development environment - rustup - jetbrains.clion - - # general - jetbrains.idea-ultimate - #vscode - - # python - python3Full - jetbrains.pycharm-professional - jetbrains.datagrip - # matrix clients # -------------- #element-desktop @@ -106,6 +93,7 @@ in # }; #})) + sops steam-run diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix index 14d5efe..6da51b1 100644 --- a/nixos/modules/programs/steam.nix +++ b/nixos/modules/programs/steam.nix @@ -35,6 +35,7 @@ in createHome = true; extraGroups = [ "audio" "input" "video" "pipewire" ]; group = "steam"; + shell = pkgs.bashInteractive; }; users.groups.steam = { };