From 9247d8235d6ffc0476dcbc3522d4e3f0c9ca550e Mon Sep 17 00:00:00 2001 From: 0qln Date: Mon, 20 Oct 2025 11:16:14 +0200 Subject: [PATCH] fixes --- default.nix | 23 +++++++++++++++++++++++ flake.nix | 15 +++++++++++++++ pa-01/a1/c.sh | 3 ++- pa-01/a1/i.sh | 2 +- pa-01/a2/d.sh | 2 +- 5 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 default.nix create mode 100644 flake.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..a24b50e --- /dev/null +++ b/default.nix @@ -0,0 +1,23 @@ +with import {}; let + let isDir + let pDirs = builtins.readDir ./.; + script1 = writeShellScriptBin "script1" '' + echo "Hello from script1" + ''; + + script2 = writeShellScriptBin "script2" '' + echo "Hello from script2" + ''; +in + stdenv.mkDerivation { + name = "all-scripts"; + buildInputs = [ + script1 + script2 + ]; + + # Or use buildEnv to create a combined package + buildCommand = '' + mkdir -p $out + ''; + } diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c7a9a1c --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: { + + packages.x86_64-linux.hello = nixpkgs.legacyPackages.x86_64-linux.hello; + + packages.x86_64-linux.default = self.packages.x86_64-linux.hello; + + }; +} diff --git a/pa-01/a1/c.sh b/pa-01/a1/c.sh index f9a4475..587ff01 100755 --- a/pa-01/a1/c.sh +++ b/pa-01/a1/c.sh @@ -1 +1,2 @@ -finger +#!/bin/sh +last diff --git a/pa-01/a1/i.sh b/pa-01/a1/i.sh index 4a9d70c..a20e4b1 100755 --- a/pa-01/a1/i.sh +++ b/pa-01/a1/i.sh @@ -1,2 +1,2 @@ #!/bin/sh -uname -pv +uname -pr diff --git a/pa-01/a2/d.sh b/pa-01/a2/d.sh index 6bbd44d..3f33910 100755 --- a/pa-01/a2/d.sh +++ b/pa-01/a2/d.sh @@ -1,2 +1,2 @@ #!/bin/sh -wc -wl /etc/passwd +wc -ml /etc/passwd