diff --git a/common/configuration.nix b/common/configuration.nix index 2d3aed2..635267a 100644 --- a/common/configuration.nix +++ b/common/configuration.nix @@ -89,7 +89,7 @@ users.users.lukas = { isNormalUser = true; description = "Lukas Heiligenbrunner"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "docker"]; }; # Allow unfree packages diff --git a/common/home-root.nix b/common/home-root.nix index c8b10ce..c2791cc 100644 --- a/common/home-root.nix +++ b/common/home-root.nix @@ -20,6 +20,7 @@ shellAliases = { ll = "ls -l"; up = "nix flake update && nixos-rebuild switch --flake .#laptop"; + inst = "nixos-rebuild switch --flake .#laptop"; gc = "nix-env --delete-generations +5 -p /nix/var/nix/profiles/system && nix store gc"; listgen = "nix-env -p /nix/var/nix/profiles/system --list-generations"; }; diff --git a/common/home.nix b/common/home.nix index d03ad6e..8f10745 100644 --- a/common/home.nix +++ b/common/home.nix @@ -79,10 +79,15 @@ in { dconf.settings = { "org/gnome/nautilus/preferences" = { default-folder-viewer = "list-view"; + show-delete-permanently = true; + show-create-link = true; }; "org/gnome/nautilus/list-view" = { default-zoom-level = "small"; }; + "org/gtk/gtk4/settings/file-chooser" = { + sort-directories-first = true; + }; }; # set git names diff --git a/common/modules/packages.nix b/common/modules/packages.nix index e05bb7e..927a475 100644 --- a/common/modules/packages.nix +++ b/common/modules/packages.nix @@ -29,10 +29,14 @@ # cli util to upate hardware services.fwupd.enable = true; programs.steam.enable = true; + virtualisation.docker.enable = true; # use zsh shell programs.zsh.enable = true; + # enable virtualization support for eg. boxes + virtualisation.libvirtd.enable = true; + # packages in global env environment.systemPackages = with pkgs; [ # system utilities @@ -47,7 +51,8 @@ neofetch dmidecode - #(pkgs.callPackage ./resources.nix { }) + (pkgs.callPackage ./resources.nix { }) + bottles # web firefox @@ -55,6 +60,7 @@ openscad vscode git + ninja flutter prusa-slicer @@ -62,11 +68,18 @@ discord rustup + gcc + sqlite + sea-orm-cli + poetry + python3 ## ides jetbrains.idea-ultimate jetbrains.dataspell + jetbrains.rust-rover gnome-builder + gnome.gnome-boxes ## R statistics stuff rstudio @@ -85,7 +98,15 @@ diebahn appflowy kicad + authenticator + dialect + gnome-decoder + video-trimmer + pods + + eyedropper + gaphor ] ++ ([ - custompkgs.resources + #custompkgs.resources ]); } \ No newline at end of file diff --git a/common/modules/resources.nix b/common/modules/resources.nix index aaca302..2d83bed 100644 --- a/common/modules/resources.nix +++ b/common/modules/resources.nix @@ -13,23 +13,25 @@ , glib , gtk4 , libadwaita +, dmidecode +, util-linux }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "resources"; version = "1.2.1"; src = fetchFromGitHub { owner = "nokyan"; - repo = pname; - rev = "refs/tags/v${version}"; + repo = "resources"; + rev = "refs/tags/v${finalAttrs.version}"; hash = "sha256-OVz1vsmOtH/5sEuyl2BfDqG2/9D1HGtHA0FtPntKQT0="; }; cargoDeps = rustPlatform.fetchCargoTarball { - inherit src; - name = "${pname}-v${version}"; - hash = "sha256-JxcqHM7jccZ+YwU93AejXejZK1bj7IggO1QrE5cSPYU="; + inherit (finalAttrs) src; + name = "resources-${finalAttrs.version}"; + hash = "sha256-MNYKfvbLQPWm7MKS5zYGrc+aoC9WeU5FTftkCrogZg0="; }; nativeBuildInputs = [ @@ -50,15 +52,26 @@ stdenv.mkDerivation rec { libadwaita ]; + postPatch = '' + substituteInPlace src/utils/memory.rs \ + --replace '"dmidecode"' '"${dmidecode}/bin/dmidecode"' + substituteInPlace src/utils/cpu.rs \ + --replace '"lscpu"' '"${util-linux}/bin/lscpu"' + substituteInPlace src/utils/memory.rs \ + --replace '"pkexec"' '"/run/wrappers/bin/pkexec"' + ''; + mesonFlags = [ - "-Dprofile=default" + (lib.mesonOption "profile" "default") ]; meta = { - description = "Resources"; + changelog = "https://github.com/nokyan/resources/releases/tag/${finalAttrs.version}"; + description = "Monitor your system resources and processes"; homepage = "https://github.com/nokyan/resources"; license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [ dotlambda foo-dogsquared ]; - platforms = lib.platforms.all; + mainProgram = "resources"; + maintainers = with lib.maintainers; [ lukas-heiligenbrunner ewuuwe ]; + platforms = lib.platforms.linux; }; -} \ No newline at end of file +}) \ No newline at end of file diff --git a/flake.lock b/flake.lock index 5510e05..f0fe7d6 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "customnixpkgs": { "locked": { - "lastModified": 1701032485, - "narHash": "sha256-k7vaOoXSEge6cFAtLo9jqSwyfZsAMy5FcI7CoLZUO1k=", + "lastModified": 1701463092, + "narHash": "sha256-qMaqNsI+PjQ2q/16DsYiceODw6w6ZhMEzKLGgIVJz60=", "owner": "lukas-heiligenbrunner", "repo": "nixpkgs", - "rev": "65fe93c4b879f64081e43539628ceb0b15078842", + "rev": "ed03ef9581aec66515be7d57aa002dacac9bcd48", "type": "github" }, "original": { @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1700900274, - "narHash": "sha256-KWoKDP5I1viHR4bG3ENnJ7H1DD16tXWH4ROvS0IfXw8=", + "lastModified": 1703147088, + "narHash": "sha256-6yBZjzzj4Flruh8zFilqx+OzDT8oFBliV3Fy1V2l/lA=", "owner": "nix-community", "repo": "home-manager", - "rev": "a462e7315deaa8194b0821f726709bb7e51a850c", + "rev": "b897544a798d487044d7356ff4cf6d4748ac231a", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1701020860, - "narHash": "sha256-NwnRn04C8s+hH+KdVtGmVB1FFNIG7DtPJmQSCBDaET4=", + "lastModified": 1702453208, + "narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "b006ec52fce23b1d57f6ab4a42d7400732e9a0a2", + "rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6", "type": "github" }, "original": { @@ -54,11 +54,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1700794826, - "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", + "lastModified": 1703013332, + "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8", + "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index af8aa01..69065b7 100644 --- a/flake.nix +++ b/flake.nix @@ -49,6 +49,28 @@ } ]; }; + + exampleIso = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit custompkgs; }; + + modules = [ + "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix" + + ./common/configuration.nix + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.lukas = { + imports = [ ./common/home.nix ]; + }; + home-manager.users.root = { + imports = [ ./common/home-root.nix ]; + }; + } + ]; + }; }; }; } diff --git a/result b/result new file mode 120000 index 0000000..cff3c8c --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/12ch8gwvwmqqmk4gfqw9ypzg08sp9av2-nixos-24.05.20231204.2c7f3c0-x86_64-linux.iso \ No newline at end of file