From 72567a19fe6fd7c6e23c79f558be84e202a78e8d Mon Sep 17 00:00:00 2001 From: ChUrl Date: Fri, 29 Jul 2022 16:03:52 +0200 Subject: [PATCH] remove rebuild aliases + bottles flatpak perms --- home/home.nix | 10 ++++----- shell-nixinator-flake.nix | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 5 deletions(-) create mode 100755 shell-nixinator-flake.nix diff --git a/home/home.nix b/home/home.nix index 61f6bf75..d865a91b 100644 --- a/home/home.nix +++ b/home/home.nix @@ -78,7 +78,7 @@ rec { ''; home.file.".local/share/flatpak/overrides/com.usebottles.bottles".text = '' [Context] - filesystems=${home.homeDirectory}/.var/app/com.valvesoftware.Steam/data/Steam;${home.homeDirectory}/Downloads + filesystems=${home.homeDirectory}/.var/app/com.valvesoftware.Steam/data/Steam;${home.homeDirectory}/Downloads;${home.homeDirectory}/GameSSD;${home.homeDirectory}/GameHDD ''; # TODO: Make to a derivation with makeDesktopIcon and add to music module @@ -251,6 +251,7 @@ rec { # Flatpak nur.repos.dukzcry.gamescope # We need to install this with flatpak to be able to use with bottles # Flatpak bottles # Flatpak steam + # Flatpak proton-ge # Flatpak polymc # Use flatpak as it bundles java and I don't have/want system wide java installation # lutris # I don't want to ]; @@ -282,10 +283,9 @@ rec { q = "exit"; h = "history | bat"; - upgrade = - "nix flake update && sudo nixos-rebuild build --flake .#nixinator && nvd diff /run/current-system result"; - rebuild = "sudo nixos-rebuild switch --flake .#nixinator"; - rebuildfast = "sudo nixos-rebuild switch --fast --flake .#nixinator"; + # upgrade = "nix flake update && sudo nixos-rebuild build --flake .#nixinator && nvd diff /run/current-system result"; + # rebuild = "sudo nixos-rebuild switch --flake .#nixinator"; + # rebuildfast = "sudo nixos-rebuild switch --fast --flake .#nixinator"; failed = "systemctl --failed"; errors = "journalctl -p 3 -xb"; diff --git a/shell-nixinator-flake.nix b/shell-nixinator-flake.nix new file mode 100755 index 00000000..4b190c6a --- /dev/null +++ b/shell-nixinator-flake.nix @@ -0,0 +1,43 @@ +{ + description = "BSEos flake for development shell"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.devshell.url = "github:numtide/devshell"; + + outputs = { self, nixpkgs, flake-utils, devshell }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; # For clion + overlays = [ devshell.overlay ]; + }; + + in { + devShell = pkgs.devshell.mkShell { + name = "NixFlake"; + + packages = with pkgs; [ + jetbrains.clion + ]; + commands = [ + { + name = "ide"; + help = "Run clion for project"; + command = "clion &>/dev/null ./ &"; + } + { + name = "rebuild"; + help = "Build the configuration and activate the system"; + command = "sudo nixos-rebuild switch --flake .#nixinator"; + } + { + name = "upgrade"; + help = "Upgrade the flake, rebuild the system and show diff"; + command = "nix flake update && sudo nixos-rebuild build --flake .#nixinator && nvd diff /run/current-system result"; + } + ]; + }; + }); +}