diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b076fa0..e35399a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,3 @@ - name: "Release (with Cachix)" on: push: @@ -8,39 +7,39 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 - - uses: cachix/install-nix-action@v13 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/8d8xah1f6ypccpmw9cfsl8ziw1chj4cl/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: > - experimental-features = nix-command flakes - system-features = nixos-test benchmark big-parallel kvm recursive-nix - extra-platforms = aarch64-linux - keep-going = true - substituters = - https://aciceri-fleet.cachix.org - https://nrdxp.cachix.org - https://nix-community.cachix.org - arm.cachix.org - https://cache.nixos.org - trusted-public-keys = > - aciceri-fleet.cachix.org-1:WiHJIK4UFTdfvWx0lG3mCR4EddyYsRhIuMGSje3/YGI= - nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= - nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= - arm.cachix.org-1:K3XjAeWPgWkFtSS9ge5LJSLw3xgnNqyOaG7MDecmTQ8= - cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - - uses: cachix/cachix-action@v10 - with: - name: aciceri-fleet - authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - - run: nix -Lv develop -c bud build pc bootstrapIso - - run: nix -Lv develop -c bud build hs bootstrapIso - - uses: marvinpinto/action-automatic-releases@latest - with: - repo_token: '${{ secrets.GITHUB_TOKEN }}' - prerelease: false - automatic_release_tag: latest - title: Latest ISOs - files: | - result/iso/*.iso + - uses: actions/checkout@v2.3.4 + - uses: cachix/install-nix-action@v13 + with: + install_url: https://nixos-nix-install-tests.cachix.org/serve/8d8xah1f6ypccpmw9cfsl8ziw1chj4cl/install + install_options: "--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve" + extra_nix_config: > + experimental-features = nix-command flakes + system-features = nixos-test benchmark big-parallel kvm recursive-nix + extra-platforms = aarch64-linux + keep-going = true + substituters = + https://aciceri-fleet.cachix.org + https://nrdxp.cachix.org + https://nix-community.cachix.org + arm.cachix.org + https://cache.nixos.org + trusted-public-keys = > + aciceri-fleet.cachix.org-1:WiHJIK4UFTdfvWx0lG3mCR4EddyYsRhIuMGSje3/YGI= + nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= + nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= + arm.cachix.org-1:K3XjAeWPgWkFtSS9ge5LJSLw3xgnNqyOaG7MDecmTQ8= + cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= + - uses: cachix/cachix-action@v10 + with: + name: aciceri-fleet + authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" + - run: nix -Lv develop -c bud build pc pcBootstrapIso + - run: nix -Lv develop -c bud build hs hsBootstrapIso + - uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false + automatic_release_tag: latest + title: Latest ISOs + files: | + result/iso/*.iso diff --git a/flake.lock b/flake.lock index 7342b41..39ec0ed 100644 --- a/flake.lock +++ b/flake.lock @@ -111,11 +111,11 @@ }, "devshell": { "locked": { - "lastModified": 1632436039, - "narHash": "sha256-OtITeVWcKXn1SpVEnImpTGH91FycCskGBPqmlxiykv4=", + "lastModified": 1637575296, + "narHash": "sha256-ZY8YR5u8aglZPe27+AJMnPTG6645WuavB+w0xmhTarw=", "owner": "numtide", "repo": "devshell", - "rev": "7a7a7aa0adebe5488e5abaec688fd9ae0f8ea9c6", + "rev": "0e56ef21ba1a717169953122c7415fa6a8cd2618", "type": "github" }, "original": { @@ -132,10 +132,9 @@ "flake-utils": "flake-utils_2", "flake-utils-plus": "flake-utils-plus", "home-manager": [ - "home" + "unstable" ], "latest": "latest", - "nix": "nix", "nixlib": [ "stable" ], @@ -145,11 +144,11 @@ ] }, "locked": { - "lastModified": 1634161492, - "narHash": "sha256-7OZz7DqAhO+3axY68xsMXAyD+b5gJgVXuKjslTSCM3Y=", + "lastModified": 1638227261, + "narHash": "sha256-CbleULqH3NRnnLdwqHqi0qk1sEmhyXE8ZOzjofilGM4=", "owner": "divnix", "repo": "digga", - "rev": "a55450a16d362b6e1c50bb4025aaa604b385d3ba", + "rev": "1ce6cef4230f82cb986ef3d08d57a2e3a0e6e80d", "type": "github" }, "original": { @@ -160,11 +159,11 @@ }, "emacs-overlay": { "locked": { - "lastModified": 1636794537, - "narHash": "sha256-LNnwJte2m6eZZYf2/oC7oEs+3padSuXjgFHkvljvEls=", + "lastModified": 1638785903, + "narHash": "sha256-Fdcppk+4AIZilRpbSCVPWuDy1/GbV64Slyahf5XR4J4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "254678418cb80265cbb0e20df9a79b37c2a70ab2", + "rev": "d266fd6e14cde2a2aa17fd821dd1e7ca6b62f012", "type": "github" }, "original": { @@ -227,11 +226,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", "owner": "numtide", "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", "type": "github" }, "original": { @@ -243,31 +242,31 @@ "home": { "inputs": { "nixpkgs": [ - "stable" + "unstable" ] }, "locked": { - "lastModified": 1634544068, - "narHash": "sha256-RlRQBaAHfdWqfRyHdWuDPMkplBTYwuyDQqDcNbP/Sog=", + "lastModified": 1638553958, + "narHash": "sha256-leETjYMtD9y37CvfRSQhIGibcIl4dNVlFkY/8QgqmAM=", "owner": "nix-community", "repo": "home-manager", - "rev": "ff2bed9dac84fb202bbb3c49fdcfe30c29d0b12f", + "rev": "6ce1d64073f48b9bc9425218803b1b607454c1e7", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-21.05", + "ref": "release-21.11", "repo": "home-manager", "type": "github" } }, "latest": { "locked": { - "lastModified": 1632660378, - "narHash": "sha256-sjA8eQlnyDjDLyAyq3XlJmN0nqW0ftl/pb7VnMg86L0=", + "lastModified": 1638198142, + "narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "31ffc50c571e6683e9ecc9dbcbd4a8e9914b4497", + "rev": "8a308775674e178495767df90c419425474582a1", "type": "github" }, "original": { @@ -277,45 +276,6 @@ "type": "github" } }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1617481909, - "narHash": "sha256-SqnfOFuLuVRRNeVJr1yeEPJue/qWoCp5N6o5Kr///p4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "148f9b2f586c41b7e36e73009db43ea68c7a1a4d", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "ref": "VERSION_0_8_4", - "repo": "lowdown", - "type": "github" - } - }, - "nix": { - "inputs": { - "lowdown-src": "lowdown-src", - "nixpkgs": [ - "digga", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1630335771, - "narHash": "sha256-eljjEPJdLK3aDskF7qX4YM/6KCq+w9nr+IKhrKW/AIQ=", - "owner": "nixos", - "repo": "nix", - "rev": "50a35860ee9237d341948437c5f70a7f0987d393", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nix", - "type": "github" - } - }, "nixos": { "locked": { "lastModified": 1632257251, @@ -341,11 +301,11 @@ ] }, "locked": { - "lastModified": 1624973746, - "narHash": "sha256-11JbJRduNwyf556gndGErR5/12ceyHOHBfEuha5Vws4=", + "lastModified": 1637655461, + "narHash": "sha256-kXZPbclN3gKwjhp2/RYFDFpAsSBwzX1iLF4EcnHZsPQ=", "owner": "nix-community", "repo": "nixos-generators", - "rev": "022ef440af8dc237ab1f59fa363cb1e25783ec3e", + "rev": "05a3eb158a9c7746a5d463726d7f7cccf07500e4", "type": "github" }, "original": { @@ -356,11 +316,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1636317251, - "narHash": "sha256-u1cWvvtGH5mfGkeIKrqw2usk4IL7wDiRcnJkUSiZq3Q=", + "lastModified": 1638440530, + "narHash": "sha256-kmoNW+RmSka988iWvSrkiAxO8g6D76O0gW2cIIhL6U8=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "fd6f34afcf062761fb5035230f6297752bfedcba", + "rev": "4c9f07277bd4bc29a051ff2a0ca58c6403e3881a", "type": "github" }, "original": { @@ -379,11 +339,11 @@ ] }, "locked": { - "lastModified": 1636730729, - "narHash": "sha256-pIFHZ6nEQPvdbXsCslFWn7DcbiH1o06j8CKt+Rph1pY=", + "lastModified": 1638622184, + "narHash": "sha256-Q4sqRwSphmMg/gTmvvXCB+q+bKAg1QrEMessnMOLyvQ=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "4643ca2a6b9099841643a48c55bd78fda93533b5", + "rev": "f08f674a02761c1c30941e747b405ac5fe4cccca", "type": "github" }, "original": { @@ -394,11 +354,11 @@ }, "nur": { "locked": { - "lastModified": 1636800222, - "narHash": "sha256-rQHVTQnt7HCoO/MKXutFA8ArIkJHgut/96giwryMOpw=", + "lastModified": 1638781597, + "narHash": "sha256-a50uySjuYlhO0Tl/ynTyavXUzev8t+JXX9nlQkYj75c=", "owner": "nix-community", "repo": "NUR", - "rev": "3a6eb10aeb8ed51a307c5867765379a0d82bc3e8", + "rev": "5e79be778f710458c533fea966809b0f3df01d03", "type": "github" }, "original": { @@ -521,16 +481,16 @@ }, "stable": { "locked": { - "lastModified": 1636792033, - "narHash": "sha256-5RwKd3+OolhWAPUQG9SNoptr9eks8j2oukKgjAo5NQA=", + "lastModified": 1638787439, + "narHash": "sha256-1Lptae0EZ/vugPJSEfmY9qEi+5li+Z8HgQNGL5gnpXE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "68d4f5970b69b0fd0a95c57c8d0ab4b2b68fb9aa", + "rev": "93a707704d0ba1316cd01a205c3163e764f05fad", "type": "github" }, "original": { "owner": "nixos", - "ref": "release-21.05", + "ref": "release-21.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index c05ad35..e214459 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { - stable.url = "github:nixos/nixpkgs/release-21.05"; + stable.url = "github:nixos/nixpkgs/release-21.11"; unstable.url = "github:nixos/nixpkgs/30aeeaded47d4e246941147acaa357d1605ad486"; nur.url = "github:nix-community/NUR"; @@ -11,14 +11,14 @@ digga.url = "github:divnix/digga"; digga.inputs.nixpkgs.follows = "stable"; digga.inputs.nixlib.follows = "stable"; - digga.inputs.home-manager.follows = "home"; + digga.inputs.home-manager.follows = "unstable"; bud.url = "github:divnix/bud"; bud.inputs.nixpkgs.follows = "unstable"; bud.inputs.devshell.follows = "digga/devshell"; - home.url = "github:nix-community/home-manager/release-21.05"; - home.inputs.nixpkgs.follows = "stable"; + home.url = "github:nix-community/home-manager/release-21.11"; + home.inputs.nixpkgs.follows = "unstable"; darwin.url = "github:LnL7/nix-darwin"; darwin.inputs.nixpkgs.follows = "unstable"; @@ -72,7 +72,6 @@ channels = let commonOverlays = [ - digga.overlays.patchedNix nur.overlay emacs-overlay.overlay nvfetcher.overlay @@ -167,7 +166,7 @@ emails = [ mails ]; shell = [ zsh exa fzf ]; gui = [ sway xdg gtk foot bat ]; - browser = [ firefox chromium qutebrowser ]; + browser = [ firefox chromium qutebrowser tor-browser ]; multimedia = [ mpv zathura ]; dev = [ vim emacs vscode lorri direnv ]; }; diff --git a/hosts/hs/configuration.nix b/hosts/hs/configuration.nix index 394fe2f..189aa6b 100644 --- a/hosts/hs/configuration.nix +++ b/hosts/hs/configuration.nix @@ -4,21 +4,19 @@ imports = with profiles; [ sshd ]; boot = { - initrd.availableKernelModules = [ "ohci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; loader.grub = pkgs.lib.mkForce { enable = true; version = 2; - device = "/dev/disk/by-label/nixos"; + device = "/dev/disk/by-id/usb-SanDisk_Cruzer_Force_03021612083020030151-0:0"; }; }; fileSystems = { - "/" = - { - device = "/dev/disk/by-label/nixos"; - fsType = "btrfs"; - }; + "/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "btrfs"; + }; "/mnt/archivio" = { device = "/dev/disk/by-label/archivio"; fsType = "ext4"; @@ -32,5 +30,235 @@ swapDevices = [{ device = "/dev/disk/by-label/swap"; }]; + systemd.services.standby-sda = { + description = "Set spindown time (sleep) for /dev/sda "; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sda"; + }; + }; + + systemd.services.standby-sdb = { + description = "Set spindown time (sleep) for /dev/sdb "; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.hdparm}/bin/hdparm -B 127 -S 241 /dev/sdb"; + }; + }; + + systemd.services.amuled.serviceConfig.Restart = pkgs.lib.mkForce "always"; + users.users.amule = { + isNormalUser = false; + isSystemUser = true; + group = "amule"; + }; + users.groups."amule" = { }; + + services = { + + samba-wsdd = { + enable = true; + workgroup = "WORKGROUP"; + hostname = "nas"; + discovery = true; + }; + + samba = { + enable = true; + securityType = "user"; + extraConfig = '' + workgroup = WORKGROUP + server string = nas + netbios name = nas + security = user + map to guest = bad user + vfs objects = recycle + recycle:repository = .recycle + recycle:keeptree = yes + recycle:versions = yes + ''; + shares = { + archivio = { + path = "/mnt/archivio/archivio"; + comment = "archivio"; + "force user" = "ccr"; + browseable = "yes"; + writeable = "yes"; + "guest ok" = "yes"; + "read only" = "no"; + }; + film = { + path = "/mnt/film/film"; + comment = "film"; + "force user" = "ccr"; + browseable = "yes"; + writeable = "yes"; + "guest ok" = "yes"; + "read only" = "no"; + }; + transmission = { + path = "/mnt/archivio/transmission"; + comment = "transmission"; + "force user" = "transmission"; + browseable = "yes"; + writeable = "yes"; + "guest ok" = "yes"; + "read only" = "no"; + }; + amule = { + path = "/mnt/archivio/amule"; + comment = "amule"; + "force user" = "ccr"; + browseable = "yes"; + writeable = "yes"; + "guest ok" = "yes"; + "read only" = "no"; + }; + musica = { + path = "/mnt/film/musica"; + comment = "music"; + "force user" = "ccr"; + browseable = "yes"; + writeable = "no"; + "guest ok" = "yes"; + "read only" = "no"; + }; + }; + }; + + transmission = { + enable = true; + port = 9091; + # the following json is merged to this attrset, it must have `rpc-username` and `rpc-password` + credentialsFile = "/mnt/archivio/transmission/credentials.json"; + settings = { + download-dir = "/mnt/archivio/transmission/"; + incomplete-dir = "/mnt/archivio/transmission/.incomplete"; + incomplete-dir-enabled = true; + + rpc-whitelist-enabled = false; + rpc-host-whitelist-enabled = false; + rpc-authentication-required = true; + }; + }; + + amule = { + dataDir = "/mnt/archivio/amule"; + enable = true; + user = "amule"; + }; + + calibre-web = { + enable = true; + listen = { + ip = "0.0.0.0"; + port = 9092; + }; + options.calibreLibrary = "/mnt/archivio/calibre/"; + openFirewall = true; + }; + + syncthing = { + enable = true; + guiAddress = "0.0.0.0:8384"; + dataDir = "/mnt/archivio/syncthing"; + user = "ccr"; + }; + + navidrome = { + enable = true; + settings = { + Address = "0.0.0.0"; + Port = 9093; + MusicFolder = "/mnt/film/musica"; + DataFolder = "/mnt/film/musica/.navidrome"; + }; + }; + + nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + clientMaxBodySize = "10G"; # max file size for uploads + commonHttpConfig = '' + log_format upstream_time '$remote_addr - $remote_user [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent"' + 'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"'; + ''; + virtualHosts = { + + "torrent.ccr.ydns.eu" = { + + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://localhost:9091"; + + }; + }; + + "sync.ccr.ydns.eu" = { + enableACME = true; + addSSL = true; + locations."/" = { + proxyPass = "http://localhost:8384"; + }; + }; + + "books.ccr.ydns.eu" = { + enableACME = true; + addSSL = true; + locations."/" = { + proxyPass = "http://localhost:9092"; + }; + }; + + "music.ccr.ydns.eu" = { + enableACME = true; + addSSL = true; + locations."/" = { + proxyPass = "http://localhost:9093"; + }; + }; + + "gate.ccr.ydns.eu" = { + enableACME = true; + addSSL = true; + locations."/" = { + proxyPass = "http://192.168.1.71:80"; + }; + }; + }; + }; + }; + + networking.firewall = { + enable = true; + allowPing = true; + allowedTCPPorts = [ + 80 # http + 139 # samba + 443 # https + 445 # samba + 4712 # amule + 8384 # syncthing + ]; + allowedUDPPorts = [ + 137 # samba + 138 # samba + ]; + }; + + security.acme = { + acceptTerms = true; + email = "andrea.ciceri@autistici.org"; + }; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; } + diff --git a/hosts/pc/configuration.nix b/hosts/pc/configuration.nix index 9cee61d..ee0d07b 100644 --- a/hosts/pc/configuration.nix +++ b/hosts/pc/configuration.nix @@ -1,12 +1,12 @@ { config, lib, pkgs, profiles, ... }: { - imports = with profiles; [ mount-nas sshd dbus avahi printing xdg docker ]; + imports = with profiles; [ mount-nas sshd dbus avahi printing xdg docker adb ]; boot = { initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; initrd.kernelModules = [ ]; - kernelModules = [ "kvm-intel" ]; + kernelModules = [ "kvm-intel" "v4l2loopback" ]; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; diff --git a/pkgs/amule/default.nix b/pkgs/amule/default.nix new file mode 100644 index 0000000..1d32434 --- /dev/null +++ b/pkgs/amule/default.nix @@ -0,0 +1,99 @@ +{ fetchFromGitHub +, stdenv +, lib +, zlib +, wxGTK +, perl +, cryptopp +, libupnp +, gettext +, libpng +, autoreconfHook +, pkg-config +, makeWrapper +, libX11 +, ... +}: +let + monolithic = true; # build monolithic amule + enableDaemon = true; # build amule daemon + httpServer = false; # build web interface for the daemon + client = false; # build amule remote gui + + oldAmule = stdenv.mkDerivation rec { + pname = "amule"; + version = "unstable-20201006"; + + src = fetchFromGitHub { + owner = "amule-project"; + repo = "amule"; + rev = "6f8951527eda670c7266984ce476061bfe8867fc"; + sha256 = "12b44b6hz3mb7nsn6xhzvm726xs06xcim013i1appif4dr8njbx1"; + }; + + postPatch = '' + substituteInPlace src/libs/ec/file_generator.pl \ + --replace /usr/bin/perl ${perl}/bin/perl + # autotools expects these to be in the root + cp docs/{AUTHORS,README} . + cp docs/Changelog ./ChangeLog + cp docs/Changelog ./NEWS + ''; + + preAutoreconf = '' + pushd src/pixmaps/flags_xpm >/dev/null + ./makeflags.sh + popd >/dev/null + ''; + + nativeBuildInputs = [ autoreconfHook gettext makeWrapper pkg-config ]; + + buildInputs = [ + zlib + wxGTK + perl + cryptopp.dev + libupnp + ] ++ lib.optional httpServer libpng + ++ lib.optional client libX11; + + enableParallelBuilding = true; + + configureFlags = [ + "--with-crypto-prefix=${cryptopp.dev}" + "--disable-debug" + "--enable-optimize" + (lib.enableFeature monolithic "monolithic") + (lib.enableFeature enableDaemon "amule-daemon") + (lib.enableFeature client "amule-gui") + (lib.enableFeature httpServer "webserver") + ]; + + # aMule will try to `dlopen' libupnp and libixml, so help it + # find them. + postInstall = lib.optionalString monolithic '' + wrapProgram $out/bin/amule \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libupnp ]} + ''; + + meta = with lib; { + description = "Peer-to-peer client for the eD2K and Kademlia networks"; + longDescription = '' + aMule is an eMule-like client for the eD2k and Kademlia + networks, supporting multiple platforms. Currently aMule + (officially) supports a wide variety of platforms and operating + systems, being compatible with more than 60 different + hardware+OS configurations. aMule is entirely free, its + sourcecode released under the GPL just like eMule, and includes + no adware or spyware as is often found in proprietary P2P + applications. + ''; + + homepage = "https://github.com/amule-project/amule"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ phreedom ]; + platforms = platforms.unix; + }; + }; +in +oldAmule diff --git a/pkgs/default.nix b/pkgs/default.nix index 6ff38fd..52dfcdb 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -2,5 +2,6 @@ final: prev: { # keep sources this first sources = prev.callPackage (import ./_sources/generated.nix) { }; customEmacs = prev.callPackage (import ./emacs) { }; + amule = prev.callPackage (import ./amule) { }; # then, call packages with `final.callPackage` } diff --git a/profiles/adb/default.nix b/profiles/adb/default.nix new file mode 100644 index 0000000..435add8 --- /dev/null +++ b/profiles/adb/default.nix @@ -0,0 +1,3 @@ +{ + programs.adb.enable = true; +} diff --git a/profiles/core/default.nix b/profiles/core/default.nix index 5df7b16..4781df6 100644 --- a/profiles/core/default.nix +++ b/profiles/core/default.nix @@ -47,7 +47,9 @@ in location.provider = "geoclue2"; - users.users.root.openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJmn7H6wxrxCHypvY74Z6pBr5G6v564NaUZb9xIILV92JEdpZzuTLLlP+JkMx/8MLRy+pC7prMwR+FhH+LaTm/9x3T6FYP/q9UIAL3cFwBAwj5XQXQKzx9f6pX/7iJrMfAUQ+ZrRUNJHt5Gl+8UypmDgnQLuv5vmQSMRzKnUPuu4lCJtWOpSPhXffz3Ec1tm5nAMuxIMRPY91PYu1fMLlFrjB1FX1goVHKB1uWx16GjJszYCVbN6xcPac0sgUg+qNGBhWkUh0F073rhepQJeWp5FtwIxe2zRsZBxxTy5qxNLmHzBeNDxlOkcy2/Lr+BxVy+mhF/2fJziX80/bWSEA1" ]; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJmn7H6wxrxCHypvY74Z6pBr5G6v564NaUZb9xIILV92JEdpZzuTLLlP+JkMx/8MLRy+pC7prMwR+FhH+LaTm/9x3T6FYP/q9UIAL3cFwBAwj5XQXQKzx9f6pX/7iJrMfAUQ+ZrRUNJHt5Gl+8UypmDgnQLuv5vmQSMRzKnUPuu4lCJtWOpSPhXffz3Ec1tm5nAMuxIMRPY91PYu1fMLlFrjB1FX1goVHKB1uWx16GjJszYCVbN6xcPac0sgUg+qNGBhWkUh0F073rhepQJeWp5FtwIxe2zRsZBxxTy5qxNLmHzBeNDxlOkcy2/Lr+BxVy+mhF/2fJziX80/bWSEA1" + ]; nix = { autoOptimiseStore = true; diff --git a/profiles/mount-nas/default.nix b/profiles/mount-nas/default.nix index 1a506da..b7b76aa 100644 --- a/profiles/mount-nas/default.nix +++ b/profiles/mount-nas/default.nix @@ -2,24 +2,26 @@ { environment.systemPackages = [ pkgs.sshfs ]; - fileSystems = let - nasUser = "andrea"; - nasHost = "ccr.ydns.eu"; - fsType = "fuse.sshfs"; - target = "/home/ccr/nas"; - options = [ - "delay_connect" - "_netdev,user" - "idmap=user" - "transform_symlinks" - "identityfile=/home/andrea/.ssh/id_rsa" - "allow_other" - "default_permissions" - "uid=1000" - "gid=100" - "nofail" - ]; - in + fileSystems = + let + nasUser = "ccr"; + nasHost = "ccr.ydns.eu"; + fsType = "fuse.sshfs"; + target = "/home/ccr/nas"; + options = [ + "delay_connect" + "_netdev,user" + "idmap=user" + "transform_symlinks" + # ssh-add -L > ~/.ssh/id_rsa + "identityfile=/home/ccr/.ssh/id_rsa" + "allow_other" + "default_permissions" + "uid=1000" + "gid=100" + "nofail" + ]; + in { "${target}/amule" = { inherit fsType options; diff --git a/users/ccr/default.nix b/users/ccr/default.nix index 444fd59..d2305b7 100644 --- a/users/ccr/default.nix +++ b/users/ccr/default.nix @@ -6,13 +6,13 @@ gui ++ browser ++ multimedia ++ emails ++ dev ) else [ ]); - home.packages = with pkgs; [ ack ranger ] ++ (if config.networking.hostName != "hs" then [ imv calibre + scrcpy element-desktop gtk-engine-murrine gtk_engines @@ -20,6 +20,7 @@ lxappearance yarn yarn2nix + python39Packages.poetry texlive.combined.scheme-full ] else [ ]); }; @@ -41,6 +42,9 @@ "camera" ]; shell = pkgs.zsh; - openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJmn7H6wxrxCHypvY74Z6pBr5G6v564NaUZb9xIILV92JEdpZzuTLLlP+JkMx/8MLRy+pC7prMwR+FhH+LaTm/9x3T6FYP/q9UIAL3cFwBAwj5XQXQKzx9f6pX/7iJrMfAUQ+ZrRUNJHt5Gl+8UypmDgnQLuv5vmQSMRzKnUPuu4lCJtWOpSPhXffz3Ec1tm5nAMuxIMRPY91PYu1fMLlFrjB1FX1goVHKB1uWx16GjJszYCVbN6xcPac0sgUg+qNGBhWkUh0F073rhepQJeWp5FtwIxe2zRsZBxxTy5qxNLmHzBeNDxlOkcy2/Lr+BxVy+mhF/2fJziX80/bWSEA1" ]; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJmn7H6wxrxCHypvY74Z6pBr5G6v564NaUZb9xIILV92JEdpZzuTLLlP+JkMx/8MLRy+pC7prMwR+FhH+LaTm/9x3T6FYP/q9UIAL3cFwBAwj5XQXQKzx9f6pX/7iJrMfAUQ+ZrRUNJHt5Gl+8UypmDgnQLuv5vmQSMRzKnUPuu4lCJtWOpSPhXffz3Ec1tm5nAMuxIMRPY91PYu1fMLlFrjB1FX1goVHKB1uWx16GjJszYCVbN6xcPac0sgUg+qNGBhWkUh0F073rhepQJeWp5FtwIxe2zRsZBxxTy5qxNLmHzBeNDxlOkcy2/Lr+BxVy+mhF/2fJziX80/bWSEA1" + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDynKeHTnXOTCi+MH2agM4k5uBkTL+W5xkL/ep3DKuTIb9MbKjHkRIquSdVRAit4ZQVQN+S3yoCXCRdLLurM3/a6C7vc/a3UfGPyV/oDYDCdHNsOwimqIQg8Pc0WtnevLpZTC2VR4UU8zzaD/mmEWqxNszaNNUve+Fy0lwg6jn6vTnQCupbyMnghherozPJu94H/JLuDEcPT0wZUmBjhjT+yHp65Yk8hKVb1jRqEdjAHM4yZf6ceIxI9NMGeSnAKf/b8IsO6y7A93NZ75CnD6AW9Rclemi+nOqZo9zQ2m2LRtMTHSoNOLLkNQCCD+l2G4w1wPMONw4mz1vR917iJdd+5BXDtEVwScDfOmqVewynxkfztSvB+qTDzdqde3NO8fFA8jMk3rUXXfIl/Yb0G87wVT/Jcl7+ZBch8s+ljPsmyy5RY+uXLgKgE1tne0KJuzeJtxSAzTrPUhILB/A8PuJUzVGVWAdGRcusOc/0SdsluFsa11E0D946JcgNo72bWm0=" + ]; }; } diff --git a/users/profiles/gpg/default.nix b/users/profiles/gpg/default.nix index 248b73b..fd7e8fb 100644 --- a/users/profiles/gpg/default.nix +++ b/users/profiles/gpg/default.nix @@ -11,6 +11,6 @@ programs.gpg = { enable = true; - settings = {}; + settings = { }; }; } diff --git a/users/profiles/tor-browser/default.nix b/users/profiles/tor-browser/default.nix new file mode 100644 index 0000000..94ea836 --- /dev/null +++ b/users/profiles/tor-browser/default.nix @@ -0,0 +1,3 @@ +{ pkgs, ... }: { + #home.packages = [ pkgs.tor-browser-bundle-bin ]; # broken +} diff --git a/users/profiles/vscode/default.nix b/users/profiles/vscode/default.nix index be69e1a..5ffd529 100644 --- a/users/profiles/vscode/default.nix +++ b/users/profiles/vscode/default.nix @@ -10,7 +10,11 @@ userSettings = { "update.channel" = "none"; - "editor"."formatOnSave" = true; + "editor" = { + "formatOnSave" = true; + "fontFamily" = "Fira Code"; + "fontLigatures" = true; + }; "window"."menuBarVisibility" = "classic"; "[nix]"."editor.tabSize" = 2; "nix"."enableLanguageServer" = true; @@ -20,6 +24,7 @@ jnoortheen.nix-ide haskell.haskell justusadam.language-haskell + #ms-python.python ]; };